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
get fitted offer sets correspond to the cell.
public ArrayList<Offer> getFittedOffers(){ return this.FittedOffers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFittedOffers(ArrayList<Offer> fittedOffers) {\r\n\t\tFittedOffers = fittedOffers;\r\n\t}", "private Itemsets findFirstCandidateItemsets() {\n\t\t\tItemsets candidateItemsets = new Itemsets();\n\t\t\tItemset[] frequentItemsetsArr = frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t\t\n\t\t\tfor (int i = 0; i < frequentItemsetsArr.length - 1; i++) {\n\t\t\t\t//combine items to form candidate itemset\n\t\t\t\tfor (int j = i + 1; j < frequentItemsetsArr.length; j++) {\n\t\t\t\t\tItemset itemset1 = frequentItemsetsArr[i].getItem(0);\n\t\t\t\t\tItemset itemset2 = frequentItemsetsArr[j].getItem(0);\n\t\t\t\t\tItemset candidateItemset = itemset1;\n\t\t\t\t\tcandidateItemset.add(itemset2);\n\t\t\t\t\t\t\n\t\t\t\t\tcandidateItemsets.addCandidateItemset(candidateItemset);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn candidateItemsets;\n\t\t}", "private Itemsets findCandidateItemsets() {\n\t\t\tItemsets candidateItemsets = new Itemsets();\n\t\t\tItemset[] frequentItemsetsArr = frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t\t\n\t\t\tfor (int i = 0; i < frequentItemsetsArr.length - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j < frequentItemsetsArr.length; j++) {\n\t\t\t\t\tItemset itemset1Subsequence = frequentItemsetsArr[i].getItems(0, frequentItemsetsArr[i].size() - 1);\n\t\t\t\t\tItemset itemset2Subsequence = frequentItemsetsArr[j].getItems(0, frequentItemsetsArr[i].size() - 1);\n\t\t\t\t\t\n\t\t\t\t\t//if all itemset values except last match, then combine itemsets to form candidate itemset\n\t\t\t\t\tif (itemset1Subsequence.equals(itemset2Subsequence)) {\n\t\t\t\t\t\tItemset candidateItemset = frequentItemsetsArr[i].getItems(0, frequentItemsetsArr[i].size());\n\t\t\t\t\t\tcandidateItemset.add(frequentItemsetsArr[j].getItem(frequentItemsetsArr[i].size() - 1));\n\t\t\t\t\t\t\n\t\t\t\t\t\tcandidateItemsets.addCandidateItemset(candidateItemset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn candidateItemsets;\n\t\t}", "@Override\n public SignalSet getFitData() {\n return this.datFit;\n }", "private Itemset[] getItemsets() {\n\t\t\treturn frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t}", "public void setNewFittedOffer(Offer offer){ \r\n\t\t//System.out.println(\"previous offer list size= \"+ this.FittedOffers.size());\r\n\t\tthis.FittedOffers.add(offer);\r\n\t\t//System.out.println(\"current offer list size= \"+ this.FittedOffers.size());\r\n\t}", "public HashMap<Long, OfferBook> getOfferBooks() {\n if (offerBooks == null) {\n\n return new HashMap<Long, OfferBook>();\n }\n return offerBooks;\n }", "public Set<IS> getFreItemSet();", "List<Question> getQuestionsUsed();", "void fit(DataSetIterator iterator);", "private Collection<LabelGeometry> getScalableGeometries()\r\n {\r\n Collection<LabelGeometry> scalableGeoms;\r\n synchronized (getGeometrySet())\r\n {\r\n scalableGeoms = StreamUtilities.filter(getGeometrySet(), g -> g.getRenderProperties().getScaleFunction() != null);\r\n }\r\n return scalableGeoms;\r\n }", "public LinkedHashSet<Spot> getSpotSet() {\n if (spotSet == null) {\n spotSet = new LinkedHashSet<>();\n for (int x = 0; x < WIDTH; x++) {\n for (int y = 0; y < HEIGHT; y++) {\n spotSet.add(board[x][y]);\n }\n }\n }\n return spotSet;\n }", "public synchronized static Set<MeasureUnit> getAvailable() {\n Set<MeasureUnit> result = new HashSet<MeasureUnit>();\n for (String type : new HashSet<String>(MeasureUnit.getAvailableTypes())) {\n for (MeasureUnit unit : MeasureUnit.getAvailable(type)) {\n result.add(unit);\n }\n }\n // Train users not to modify returned set from the start giving us more\n // flexibility for implementation.\n return Collections.unmodifiableSet(result);\n }", "public void preSerialize(){\n\t\tfittings = new ArrayList<Fitting>();\n\t\tfor(CutSheetInfo csi : getMainThreadedList()){\n\t\t\tpreSerializeOne(csi);\n\t\t}\n\t\tfor(BranchInfo bi : getBranchMap().values()){\n\t\t\tfor(EdgeMultiplicity em : bi.getEdgeMultiplicity()){\n\t\t\t\tCutSheetInfo csi = em.getEdgeInfo();\n\t\t\t\tpreSerializeOne(csi);\n\t\t\t\t/*\n\t\t\t\tfor(int i = 0; i < 2; i++){\n\t\t\t\t\tFitting f = (i == 0) ? csi.getStartFitting() : csi.getEndFitting();\n\t\t\t\t\tint idx = fittings.indexOf(f);\n\t\t\t\t\tif(idx < 0){\n\t\t\t\t\t\tidx = fittings.size();\n\t\t\t\t\t\tfittings.add(f);\n\t\t\t\t\t}\n\t\t\t\t\tif(i == 0){\n\t\t\t\t\t\tcsi.startFittingId = idx;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcsi.endFittingId = idx;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\t}", "public StrColumn getEntryFittingList() {\n return delegate.getColumn(\"entry_fitting_list\", DelegatingStrColumn::new);\n }", "public List<WellSetPOJOBigDecimal> getWellsets() {\n \treturn this.wellsets;\n }", "public Collection<Collection<Section>> getSets (Sheet sheet)\r\n {\r\n if (sets == null) {\r\n sets = new ArrayList<>();\r\n\r\n for (SectionDescSet idSet : descSets) {\r\n List<Section> sectionSet = new ArrayList<>();\r\n\r\n for (SectionDesc sectionId : idSet.sections) {\r\n Lag lag = (sectionId.orientation == Orientation.VERTICAL)\r\n ? sheet.getVerticalLag()\r\n : sheet.getHorizontalLag();\r\n Section section = lag.getVertexById(sectionId.id);\r\n\r\n if (section == null) {\r\n logger.warn(sheet.getLogPrefix()\r\n + \"Cannot find section for \" + sectionId,\r\n new Throwable());\r\n } else {\r\n sectionSet.add(section);\r\n }\r\n }\r\n\r\n sets.add(sectionSet);\r\n }\r\n }\r\n\r\n return sets;\r\n }", "Collection<? extends Equipment> getUses();", "public BoxModel getEnergyModel()\r\n/* 111: */ {\r\n/* 112:118 */ BoxModel boxes = new BoxModel();\r\n/* 113:119 */ boxes.add(new Box(0.1875F, 0.3125F, 0.3125F, 0.8125F, 0.6875F, 0.6875F));\r\n/* 114:120 */ boxes.add(new Box(0.3125F, 0.1875F, 0.3125F, 0.6875F, 0.8125F, 0.6875F));\r\n/* 115:121 */ boxes.add(new Box(0.3125F, 0.3125F, 0.1875F, 0.6875F, 0.6875F, 0.8125F));\r\n/* 116:122 */ boxes.add(new Box(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F));\r\n/* 117:123 */ return boxes;\r\n/* 118: */ }", "public List<Supplier> getSuppliers(){ \n\t List<Supplier> list=new ArrayList<Supplier>(); \n\t list=template.loadAll(Supplier.class); \n\t return list; \n\t}", "GridEnvelope getLimits();", "public List<Itemset> getListItem() {\n\t\tList<Itemset> list = new ArrayList<Itemset>();\n\t\tfor (int i = 0; i < trans.size(); i++) {\n\t\t\tfor (int j = 0; j < trans.get(i).size(); j++) {\n\t\t\t\tList<Integer> item = new ArrayList<>();\n\t\t\t\titem.add(trans.get(i).get(j));\n\t\t\t\tItemset itemset = new Itemset(item, 1);\n\t\t\t\tlist.add(itemset);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < list.size() - 1; i++) {\n\t\t\tfor (int j = i + 1; j < list.size(); j++) {\n\t\t\t\tif (list.get(i).getItemset().equals(list.get(j).getItemset())) {\n\t\t\t\t\tlist.remove(j);\n\t\t\t\t\tlist.get(i).updateMinSuppor(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < list.size() - 1; i++) {\n\t\t\tfor (int j = i + 1; j < list.size(); j++) {\n\t\t\t\tif (list.get(i).getItemset().equals(list.get(j).getItemset())) {\n\t\t\t\t\tlist.remove(j);\n\t\t\t\t\tlist.get(i).updateMinSuppor(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "Collection<Generalization> getPowertypeRanges();", "public abstract Collection<FeedProvider> getVisibleFeedProviders();", "public double[] getFitParameters() {\r\n\t\treturn a;\r\n\t}", "public List<Itemset> getItemsets() {\n return itemsets;\n }", "protected ArrayList<DataFromPoint> getFromPoints() {\n\t\treturn fromPoints.stream().map(e -> e.fromPoint)\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\n\t}", "public Element fittest() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n List<Element> bestElements = bestEntry.getValue();\r\n assert !bestElements.isEmpty();\r\n Element result = bestElements.get(0);\r\n\r\n return result;\r\n }", "Map<String, OperationalSets> getSets();", "@Override\r\n public ElementSet nextBestSet() {\r\n \r\n ElementSet bestSet = null; //initialze variables\r\n int countBest = 0;\r\n double bestScore = Double.MAX_VALUE; //arbitrarly large number CHECK ME\r\n int count = 0;\r\n double score = 0;\r\n \r\n for (ElementSet s : _copyModel.getElements()) { //go through all sets in the model\r\n count = 0; //reset count and score for each set\r\n score = 0;\r\n for (Integer i : s.getSet()) {\r\n if(_uncoveredElements.contains(i)) { //get number of covered elements\r\n count++;\r\n } \r\n }\r\n if (count != 0) { //if it contains an element\r\n score = s.getCost() / (double)count; //compute the ratio of cost per element covered\r\n if (score < bestScore) { //if score is better than best score \r\n countBest = count;\r\n bestScore = score;\r\n bestSet = s;\r\n }\r\n }\r\n }\r\n \r\n if (bestSet == null) //if no set was chosen return null\r\n return null;\r\n \r\n _copyModel.getElements().remove(bestSet); //remcoe the chosen set from the model\r\n GreedySolver.printChosenSet(bestSet); //print the chosen set\r\n \r\n return bestSet;\r\n }", "void fit(DataSet dataSet);", "public ArrayList<Sets> getSets() {\n return this.sets;\n }", "public String[] getOffers() {return offers;}", "@JsonIgnore public Collection<Offer> getExpectsAcceptanceOfs() {\n final Object current = myData.get(\"expectsAcceptanceOf\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Offer>) current;\n }\n return Arrays.asList((Offer) current);\n }", "@Factory(\"slotDefsByParams\")\n\tpublic List<SlotDef> retrieveByParams() {\n\t\tString ownerId = this.alfrescoUserIdentity.getMyOwnerId();\n\n\t\tif (this.slotDefParameters.getMode() == null\n\t\t\t\t|| this.slotDefParameters.getMode().equals(\"\")) {\n\t\t\treturn this.retrieve(this.slotDefParameters.isModel(), null,\n\t\t\t\t\townerId);\n\t\t} else if (this.slotDefParameters.getMode().equals(\n\t\t\t\tSlotDefType.PRIMARY.name())) {\n\t\t\treturn this.retrieve(this.slotDefParameters.isModel(),\n\t\t\t\t\tSlotDefType.PRIMARY, ownerId);\n\t\t} else if (this.slotDefParameters.getMode().equals(\n\t\t\t\tSlotDefType.GENERAL.name())) {\n\t\t\treturn this.retrieve(this.slotDefParameters.isModel(),\n\t\t\t\t\tSlotDefType.GENERAL, ownerId);\n\t\t} else if (this.slotDefParameters.getMode().equals(\n\t\t\t\tSlotDefType.DEPENDENT.name())) {\n\t\t\treturn this.retrieve(this.slotDefParameters.isModel(),\n\t\t\t\t\tSlotDefType.DEPENDENT, ownerId);\n\t\t}\n\t\treturn null;\n\t}", "Offer getOffer();", "FrequentItemSet[] getFrequentItemSets() {\n return frequentItemSets;\n }", "public OIFitsCollection getOIFitsCollection() {\n return oiFitsCollection;\n }", "private Itemsets() {\n\t\t\tfrequentItemsets = new LinkedHashMap<Itemset, Integer>();\n\t\t\tinfrequentItemsets = new LinkedHashMap<Itemset, Integer>();\n\t\t}", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "public ArrayList<Double> getHighestFitnesses() { return highFitnesses; }", "public DatosIteracion mejorIteracionVisibles() {\r\n\r\n\t\tArrayList<DatosIteracion> array = new ArrayList<DatosIteracion>();\r\n\r\n\t\tfor (DatosEstrategia e : this.getValoresEstrategias()) {\r\n\t\t\tarray.add(this.mejorIteracionVisibles(e.getValoresIteraciones()));\r\n\t\t}\r\n\t\treturn this.mejorIteracionVisibles(array);\r\n\t}", "public List<ProductDetails> retrieveOffersWithOfferType()\n\t\t\tthrows MISPException {\n\n\t\tlogger.entering(\"retrieveOffersWithOfferType\");\n\n\t\tList<ProductDetails> productsList = null;\n\n\t\ttry {\n\n\t\t\tproductsList = this.offerDetailsMgr.retrieveOffersWithOfferType();\n\n\t\t} catch (DBException exception) {\n\n\t\t\tlogger.error(\n\t\t\t\t\t\"An exception occured while retrieving offer Details.\",\n\t\t\t\t\texception);\n\t\t\tthrow new MISPException(exception);\n\t\t}\n\n\t\tlogger.exiting(\"retrieveOffersWithOfferType\", productsList);\n\n\t\treturn productsList;\n\n\t}", "public static List<Offer> offerList() {\n OfferDAO offerDAO = getOfferDAO();\n List<Offer> offerList = offerDAO.offerList();\n return offerList;\n }", "public ArrayList<Point> getAvailableSlots ()\n {\n return availableSlots;\n }", "public java.util.List<Dimension> getDimensionsAll();", "public List<Float> getBoundingsOfCell() {\n\n\t\tfloat minXPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxXPoint = Float.NEGATIVE_INFINITY;\n\t\tfloat minYPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxYPoint = Float.NEGATIVE_INFINITY;\n\n\t\tfor (int i = 0; i < face.edges().size(); i++) {\n\n\t\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(i);\n\n\t\t\tArc2_Sweep arc = (Arc2_Sweep) e.reference;\n\n\t\t\t// Looking for most left located point of cell\n\t\t\tif (minXPoint > arc.minX().x) {\n\t\t\t\tminXPoint = arc.minX().x;\n\t\t\t}\n\t\t\t// Looking for most right located point of cell\n\t\t\tif (maxXPoint < arc.maxX().x) {\n\t\t\t\tmaxXPoint = arc.maxX().x;\n\t\t\t}\n\t\t\t// Looking for highest located point of cell\n\t\t\tif (minYPoint > arc.minY().y) {\n\t\t\t\tminYPoint = arc.minY().y;\n\t\t\t}\n\t\t\t// Looking for lowest located point of cell\n\t\t\tif (maxYPoint < arc.maxY().y) {\n\t\t\t\tmaxYPoint = arc.maxY().y;\n\t\t\t}\n\n\t\t}\n\n\t\tList<Float> boundings = new ArrayList<Float>();\n\t\tboundings.add(minXPoint);\n\t\tboundings.add(maxXPoint);\n\t\tboundings.add(minYPoint);\n\t\tboundings.add(maxYPoint);\n\t\treturn boundings;\n\n\t}", "public Set getSendAltLocsSet()\r\n {\r\n if ( sendAltLocSet == null )\r\n {// TODO2 use something like a LRUMap. But current LRUMap uses maxSize\r\n // as initial hash size. This would be much to big in most cases!\r\n // Currently this HashSet has no size boundry. We would need our own\r\n // LRUMap implementation with a low initial size and a different max size.\r\n sendAltLocSet = new HashSet();\r\n }\r\n return sendAltLocSet;\r\n }", "private PotCollection loadPotList(){\n SharedPreferences preferences = getSharedPreferences(SHAREDPREF_SET, MODE_PRIVATE);\n int sizeOfPotList = preferences.getInt(SHAREDPREF_ITEM_POTLIST_SIZE, 0);\n for(int i = 0; i<sizeOfPotList; i++){\n Log.i(\"serving calculator\", \"once\");\n String potName = preferences.getString(SHAREDPREF_ITEM_POTLIST_NAME+i, \"N\");\n int potWeight = preferences.getInt(SHAREDPREF_ITEM_POTLIST_WEIGHT+i, 0);\n Pot tempPot = new Pot(potName, potWeight);\n potList.addPot(tempPot);\n }\n return potList;\n }", "public List<Dataset> getDatasets();", "public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}", "Set<Object> getAllCells() {\n Set<Object> ret = new HashSet<Object>();\n ret.addAll(getNodes());\n ret.addAll(getEdges());\n \n // ports\n for( DefaultGraphCell node : getNodes() ) {\n ret.add(node.getChildAt(0));\n }\n \n return ret;\n }", "@Override\r\n\tpublic Set<RepairKit> getRepairKits(Board board)\r\n\t{\r\n\t\treturn board.getElements(RepairKit.class);\r\n\t}", "public Collection<Experiment> getExperiments();", "List<QualityDataSetDTO> getQDSElements(String measureId, String verision);", "public @NonNull List<Integer> getEmoteSets() {\n return this.emoteSets;\n }", "public Map<K, Set<V>> coreGetAllSupersetsOf(Collection<?> set, int mode) {\n // Skip elements in the collection having an incorrect type, as we are looking for subsets which simply\n // cannot contain the conflicting items\n Set<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n List<SetTrieNode> frontier = new ArrayList<>();\n frontier.add(superRootNode);\n\n // For every value, extend the frontier with the successor nodes for that value.\n V from = null;\n V upto = null;\n\n // Use a flag for null safety so we do not rely on the comparator to treat null as the least element\n boolean isLeastFrom = true;\n while(it.hasNext()) {\n from = upto;\n upto = it.next();\n\n List<SetTrieNode> nextNodes = new ArrayList<>();\n\n // Based on the frontier, we need to keep scanning nodes whose values is in the range [from, upto]\n // until we find the nodes whose values equals upto\n // Only these nodes then constitute the next frontier\n Collection<SetTrieNode> currentScanNodes = frontier;\n do {\n Collection<SetTrieNode> nextScanNodes = new ArrayList<>();\n for(SetTrieNode currentNode : currentScanNodes) {\n if(currentNode.nextValueToChild != null) {\n NavigableMap<V, SetTrieNode> candidateNodes = isLeastFrom\n ? currentNode.nextValueToChild.headMap(upto, true)\n : currentNode.nextValueToChild.subMap(from, true, upto, true);\n\n for(SetTrieNode candidateNode : candidateNodes.values()) {\n if(Objects.equals(candidateNode.value, upto)) {\n nextNodes.add(candidateNode);\n } else {\n nextScanNodes.add(candidateNode);\n }\n }\n }\n }\n currentScanNodes = nextScanNodes;\n } while(!currentScanNodes.isEmpty());\n\n frontier = nextNodes;\n\n isLeastFrom = false;\n }\n\n Map<K, Set<V>> result = new HashMap<>();\n\n // Copy all data entries associated with the frontier to the result\n Stream<SetTrie<K, V>.SetTrieNode> stream = frontier.stream();\n\n if(mode != 0) {\n stream = stream.flatMap(node -> reachableNodesAcyclic(\n node,\n x -> (x.nextValueToChild != null ? x.nextValueToChild.values() : Collections.<SetTrieNode>emptySet()).stream()));\n }\n\n stream.forEach(currentNode -> {\n if(currentNode.keyToSet != null) {\n for(Entry<K, NavigableSet<V>> e : currentNode.keyToSet.entrySet()) {\n result.put(e.getKey(), e.getValue());\n }\n }\n });\n\n return result;\n }", "public SortedSet<String> getAvailableDataSets() {\n if (allAvailableDataSets == null) {\n allAvailableDataSets = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n allAvailableDataSets.addAll(DataDeliveryHandlers\n .getDataSetNameHandler().getByDataTypes(dataTypeList));\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the dataset list.\", e);\n }\n }\n\n return allAvailableDataSets;\n }", "private Map<Good, Integer> initiateMarketplace() {\n Random noise = new Random();\n Map<Good, Integer> map = Collections.synchronizedMap(\n new EnumMap<Good, Integer>(Good.class));\n for (Good item : Good.values()) {\n if (item.getMinTech() <= techLevel) {\n Integer price = Math.max(item.getBasePrice()\n - (techLevel - item.getMinTech()) + alignment.getPriceChange()\n + noise.nextInt(5),\n 5);\n map.put(item, price);\n }\n }\n return map;\n }", "public List<Beam> getBeams ()\r\n {\r\n return beams;\r\n }", "@Override\n\tpublic Pair<List<Integer>, List<Integer>> getFittest() {\n\t\tif (m_random == null) {\n\t\t\tm_random = new Random();\n\t\t}\n\t\tfinal Pair<List<Integer>, List<Integer>> inc = getRandomIncomparablePair(m_preorder, m_random);\n\t\tif (inc == null) {\n\t\t\treturn Pair.create(m_rvs.getRankVectors().first(), m_rvs.getRankVectors().first());\n\t\t}\n\t\treturn inc;\n\t}", "public List<DataSet> findDataSetEntities() {\n return findDataSetEntities(true, -1, -1);\n }", "com.google.cloud.channel.v1.PurchasableOffer getPurchasableOffers(int index);", "public List getEpSupplier() {\n\t\treturn getHibernateTemplate().find(\" from JSupplierNh \");\n\t}", "@Override\r\n\tpublic List<Applier> retrieveAllAppliers() {\n\t\treturn em.createQuery(\"Select a from Applier a\").getResultList();\r\n\t}", "private Collection<MarketDataProvider> getActiveMarketDataProviders()\n {\n populateProviderList();\n return providersByPriority;\n }", "@Override\n public ArrayList<int[]> Split()\n {\n double hypervolume_best = -Double.MAX_VALUE;\n int hypervolume_best_i = 0;\n int hypervolume_best_j = 0;\n double hypervolume = 0d;\n\n for( int i = 0; i < Capacity_max + 1; i++)\n {\n for( int j = i + 1; j < Capacity_max + 1; j++)\n {\n hypervolume = 0d;\n double[] point1 = PointMatrix[ Items.get(i)[0] ][ Items.get(i)[1] ];\n double[] point2 = PointMatrix[ Items.get(j)[0] ][ Items.get(j)[1] ];\n\n for(int a = 0; a < Dimensions; a++)\n {\n if( point1[a] > point2[a] )\n hypervolume += Math.log10(point1[a] - point2[a]);\n if( point1[a] < point2[a] )\n hypervolume += Math.log10(point2[a] - point1[a]);\n }\n\n if( hypervolume_best < hypervolume)\n {\n hypervolume_best_i = i;\n hypervolume_best_j = j;\n hypervolume_best = hypervolume;\n }\n }\n }\n\n // Ready the split\n ArrayList<int[]> items_split = new ArrayList<>();\n items_split.addAll(Items);\n\n int point1_x = items_split.get(hypervolume_best_i)[0];\n int point1_y = items_split.get(hypervolume_best_i)[1];\n int point2_x = items_split.get(hypervolume_best_j)[0];\n int point2_y = items_split.get(hypervolume_best_j)[1];\n double[] point1 = PointMatrix[ point1_x ][ point1_y ];\n double[] point2 = PointMatrix[ point2_x ][ point2_y ];\n\n if(hypervolume_best_i > hypervolume_best_j)\n {\n items_split.remove(hypervolume_best_i);\n items_split.remove(hypervolume_best_j);\n }\n else\n {\n items_split.remove(hypervolume_best_j);\n items_split.remove(hypervolume_best_i);\n }\n\n // Create new box with point1\n BoundingBoxLeaf box1 = new BoundingBoxLeaf( PointMatrix, ParentBox, Tree, Depth, point1_x, point1_y );\n\n box1.SetBoxToFit(point1);\n box1.SetCoordsToFit( point1_x, point1_y);\n \n // Reset this box, and add point2\n BoundingBoxLeaf box2 = this;\n \n box2.SetBoxToFit(point2);\n box2.SetCoordsToFit( point2_x, point2_y);\n\n box2.Items.clear();\n box2.Items.add( new int[]{ point2_x, point2_y } );\n\n // Notify parent of split\n ParentBox.InsertBox_internal(box1);\n \n // Add items to the new boxes, up to min capacity\n int[] item_best;\n \n // box1\n while( box1.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n \n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box1.Items.add( new int[]{ item_best[0], item_best[1] } );\n box1.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box1.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // box2\n while( box2.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box2.Items.add( new int[]{ item_best[0], item_best[1] } );\n box2.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box2.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // return remaining to be reinserted into the tree\n return items_split; \n }", "public abstract Set<Measure> supportedMeasures();", "@Override\r\n\tpublic List<String> getHITS()\r\n\t{\r\n\r\n\t\tlogger.info(\"Getting HITS...\");\r\n\t\tHITS<Entity, EntityGraphEdge> ranker = new HITS<Entity, EntityGraphEdge>(\r\n\t\t\t\tdirectedGraph);\r\n\t\tlogger.info(\"Ranker was created.\");\r\n\t\tlogger.info(\"Evaluating...\");\r\n\t\tranker.evaluate();\r\n\r\n\t\tlogger.info(\"Got HITS.\");\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tList<String> rankingList = new ArrayList<String>();\r\n\t\tFormat formatter = new DecimalFormat(\"%7.6f\");\r\n\r\n\t\tfor (Entity vertex : vertices) {\r\n\t\t\trankingList.add(\"hub=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).hub)\r\n\t\t\t\t\t+ \" authority=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).authority)\r\n\t\t\t\t\t+ \" \" + vertex);\r\n\t\t\t// logger.info(\"HITS ranking for \" + vertex.getVertexEntity() +\r\n\t\t\t// \" : \" + ranker.getRankScore(vertex));\r\n\t\t}\r\n\r\n\t\tCollections.sort(rankingList);\r\n\t\tCollections.reverse(rankingList);\r\n\t\t// logger.info(\"Sorted PageRankings: \" + rankingList);\r\n\t\t// ranker.printRankings(false, true);\r\n\r\n\t\treturn rankingList;\r\n\t}", "protected PayloadBuilderSet[] getPayloadBuilderSets() {\n\t\treturn sets;\n\t}", "@Override\n\tpublic WebElement[] getOfferDetail() {\n\t\treturn null;\n\t}", "public ArrayList getEqkRupturesNearSite() {\n\n //initializing the list for containing the EqkRuptures\n ArrayList probEqkList = new ArrayList();\n int numSources = eqkRupForecast.getNumSources();\n\n //Going over each and every source in the forecast\n for (int sourceIndex = 0; sourceIndex < numSources; ++sourceIndex) {\n // get the ith source\n ProbEqkSource source = eqkRupForecast.getSource(sourceIndex);\n int numRuptures = source.getNumRuptures();\n\n //going over all the ruptures in the source\n for (int rupIndex = 0; rupIndex < numRuptures; ++rupIndex) {\n ProbEqkRupture rupture = source.getRupture(rupIndex);\n\n AbstractEvenlyGriddedSurface rupSurface = new EvenlyGridCenteredSurface((EvenlyGriddedSurface)rupture.getRuptureSurface());\n\n\n //getting the iterator for all points on the rupture\n ListIterator it = rupSurface.getAllByRowsIterator();\n //looping over all the rupture pt locations and if any of those lies\n //within the provided distance range then include the rupture in the list.\n while (it.hasNext()) {\n Location ptLoc = (Location) it.next();\n if (region.contains(ptLoc)) {\n probEqkList.add(rupture.clone());\n break;\n }\n }\n }\n }\n return probEqkList;\n }", "java.util.List<? extends com.google.cloud.channel.v1.PurchasableOfferOrBuilder> \n getPurchasableOffersOrBuilderList();", "PriorityQueue<Ride> queryRidesFromAllSuppliers(Trip trip){\n Map<String, Ride> rides = new HashMap<>();\n\n for(Supplier supplier : Supplier.values()){\n Set<Ride> ridesFromSupplier = queryRidesFromSupplier(trip, supplier);\n for(Ride ride : ridesFromSupplier){\n if(!rides.containsKey(ride.getCar().CAR_TYPE)\n || ride.getPrice() < rides.get(ride.getCar().CAR_TYPE).getPrice()){\n rides.put(ride.getCar().CAR_TYPE, ride);\n }\n }\n }\n\n return orderRidesByPriceAscending(rides);\n }", "private static List<ITransferObject> getOfferLines(Offer offer) throws ManagerBeanException{\r\n\t\tList<ITransferObject> lines = null;\r\n\t\tIManagerBean offerDetailBean = BeanManager\r\n\t\t\t\t.getManagerBean(OfferDetail.class);\r\n\t\tCriteria offerDetailCriteria = new Criteria();\r\n\t\tofferDetailCriteria.addEqualExpression(offerDetailBean\r\n\t\t\t\t.getFieldName(ICommercialAlias.OFFER_DETAIL_OFFER_ID), offer.getId());\r\n\t\tlines = offerDetailBean\r\n\t\t\t\t.getList(offerDetailCriteria);\r\n\t\treturn lines;\r\n\t}", "public Iterator getShowings(){\n return super.iterator();\n }", "private List<Arbeitspaket> retrieveData() {\r\n\t\treturn Arrays.asList(new Arbeitspaket(\"A\", 0, 0, 0, 0, 0, 0, 0), new Arbeitspaket(\"B\", 0, 0, 0, 0, 0, 0, 0),\r\n\t\t\t\tnew Arbeitspaket(\"C\", 0, 0, 0, 0, 0, 0, 0), new Arbeitspaket(\"D\", 0, 0, 0, 0, 0, 0, 0));\r\n\t}", "private Set calculateTimeSet() {\n List choices = getDataChoices();\n if (choices.isEmpty()) {\n return null;\n }\n Set newSet = null;\n for (int i = 0; i < choices.size(); i++) {\n try {\n VerticalProfileInfo info = getVPInfo(i);\n GridDataInstance dataInstance = info.getDataInstance();\n Set set = GridUtil.getTimeSet(dataInstance.getGrid());\n //System.out.println(\"di.timeset[\"+i+\"] = \" + set);\n if (set != null) {\n if (newSet == null) {\n newSet = set;\n } else {\n newSet = newSet.merge1DSets(set);\n }\n }\n } catch (Exception e) {\n logger.error(\"Problem calculating TimeSet\", e);\n }\n }\n //System.out.println(\"merged time set = \" + newSet);\n return newSet;\n }", "public List<Bed> solvedBeds() {\n // TODO: Fix me.\n return bed;\n }", "public ArrayList<String> getRack() {\n\t\treturn subsets;\n\t}", "Set<EObject> getAllModelElements();", "public Set<WeightedPoint> getClosedSet()\n {\n return closedSet;\n }", "List<ExamGrSubMeta> getAnswerSheetMeta();", "List<IMEInventoryHandler> getCellArray();", "private void setUsedValueInBoxes() {\n \n setUsedValuesByBox(1,3,1,3);\n setUsedValuesByBox(1,3,4,6);\n setUsedValuesByBox(1,3,7,9);\n setUsedValuesByBox(4,6,1,3);\n setUsedValuesByBox(4,6,4,6);\n setUsedValuesByBox(4,6,7,9);\n setUsedValuesByBox(7,9,1,3);\n setUsedValuesByBox(7,9,4,6);\n setUsedValuesByBox(7,9,7,9);\n }", "public ArrayList<InstanceList> getSets(int i) {\n InstanceList learningSet = new InstanceList(classInstances, numInstances - TEST_SET_1 + 1);\n InstanceList validationSet = new InstanceList(classInstances, TEST_SET_1);\n for (int divideIndex = 0; divideIndex < numInstances; divideIndex++) {\n\n if (log.isInfoEnabled()) {\n log.info(\"index \" + divideIndex + \" fold_size\" + TEST_SET_1 + \" = from \" + TEST_SET_0 + \" to \" + TEST_SET_1 + \" num_instances \" + numInstances + \"\\n\");\n }\n if (divideIndex >= TEST_SET_0 && divideIndex <= TEST_SET_1) { // validation\n // validation [fold_size*i, fold_size*(i+1))\n if (log.isInfoEnabled()) {\n log.info(\"validation one \" + divideIndex + \"\\n\");\n }\n validationSet.addAsInstance(classInstances.getInstance(crossedSet[divideIndex]));\n } else { // learninf part \n learningSet.addAsInstance(classInstances.getInstance(crossedSet[divideIndex]));\n }\n }\n\n ArrayList<InstanceList> lists = new ArrayList<InstanceList>(2);\n lists.add(learningSet);\n lists.add(validationSet);\n return lists;\n }", "private void setWinningTuples() {\n\t\tWINS = new ArrayList<Set<CMNMove>>();\n\t\tSet<CMNMove> winSet = new TreeSet<CMNMove>();\n\t\tfor (int i = MM; i > 0; i--) {\n\t\t\tknapsack(winSet, CC, i, NN);\n\t\t}// end for\n\n\t}", "public ArrayList<Tour_Guide> guidesAvailable() {\n ArrayList<Tour_Guide> avGuide = new ArrayList<>();\n for (int i = 0; i < Guide.size(); i++) {\n if (Guide.get(i).getAvailable() == true) {\n avGuide.add(Guide.get(i));\n }\n }\n return avGuide;\n }", "private Set func_177575_g() {\n/* 450 */ HashSet var1 = Sets.newHashSet();\n/* 451 */ ArrayList<?> var2 = Lists.newArrayList(this.variants.keySet());\n/* 452 */ Collections.sort(var2, new Comparator()\n/* */ {\n/* */ private static final String __OBFID = \"CL_00002390\";\n/* */ \n/* */ public int func_177505_a(ModelResourceLocation p_177505_1_, ModelResourceLocation p_177505_2_) {\n/* 457 */ return p_177505_1_.toString().compareTo(p_177505_2_.toString());\n/* */ }\n/* */ \n/* */ public int compare(Object p_compare_1_, Object p_compare_2_) {\n/* 461 */ return func_177505_a((ModelResourceLocation)p_compare_1_, (ModelResourceLocation)p_compare_2_);\n/* */ }\n/* */ });\n/* 464 */ Iterator<?> var3 = var2.iterator();\n/* */ \n/* 466 */ while (var3.hasNext()) {\n/* */ \n/* 468 */ ModelResourceLocation var4 = (ModelResourceLocation)var3.next();\n/* 469 */ ModelBlockDefinition.Variants var5 = (ModelBlockDefinition.Variants)this.variants.get(var4);\n/* 470 */ Iterator<ModelBlockDefinition.Variant> var6 = var5.getVariants().iterator();\n/* */ \n/* 472 */ while (var6.hasNext()) {\n/* */ \n/* 474 */ ModelBlockDefinition.Variant var7 = var6.next();\n/* 475 */ ModelBlock var8 = (ModelBlock)this.models.get(var7.getModelLocation());\n/* */ \n/* 477 */ if (var8 == null) {\n/* */ \n/* 479 */ LOGGER.warn(\"Missing model for: \" + var4);\n/* */ \n/* */ continue;\n/* */ } \n/* 483 */ var1.addAll(func_177585_a(var8));\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 488 */ var1.addAll(field_177602_b);\n/* 489 */ return var1;\n/* */ }", "com.google.ads.googleads.v6.resources.FeedItemSet getFeedItemSet();", "java.util.List<Report.LocationOuterClass.MobileCell> \n getCellsList();", "@Override\n public IOffer getOffer() {\n return offer;\n }", "public GUIQueueElement getGuiElements(){\n\t\t//retrieve the needed sets\n\t\tSet<Drone> drones = this.getDroneSet();\n//\t\tSet<Block> blocks = this.getBlockSet(); //no blocks in the world\n\t\tSet<WorldAirport> airports = this.getAirportSet();\n\t\tSet<WorldDelivery> deliveries = this.getPackageService().getSubmittedWorldDeliveries();\n\n\t\t//generate the necessary data\n\t\tMap<String, DroneGuiState> droneGuiQueueElem = getDroneGuiStates(drones);\n\t\tSet<CubeGuiState> cubeGuiQueueElem = new HashSet<>(); //there are no blocks anymore\n\t\tSet<AirportGuiState> airportGuiQueueElem = getAirportGuiStates(airports);\n\t\tSet<DeliveryGuiState> deliveryGuiQueueElem = getDeliveryGuiStates(deliveries);\n\n\t\t//create a new entry for the queue\n\t\treturn new GUIQueueElement() {\n\t\t\t@Override\n\t\t\tpublic Map<String, DroneGuiState> getDroneStates() {\n\t\t\t\treturn droneGuiQueueElem;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Set<CubeGuiState> getCubePositions() {\n\t\t\t\treturn cubeGuiQueueElem;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Set<AirportGuiState> getAirports() {\n\t\t\t\treturn airportGuiQueueElem;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Set<DeliveryGuiState> getDeliveries(){\n\t\t\t\treturn deliveryGuiQueueElem;\n\t\t\t}\n\t\t};\n\n\t}", "@Override\n //Metodo para retornar una lista de los equipos que avanzan\n public List<Equipo> getEquiposQueAvanzan(){\n List<Equipo> equipos = new ArrayList<>();\n //Recorremos la lista de partidos de la etapa mundial\n for (Partido partidito : getPartidos()){\n /*Si en el partido que estamos parados gano el local, agregamos ese equipo\n local a la lista de equipos*/\n if (partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getLocal());\n }\n /*Si NO gano el local, agregamos el equipo visitante a la lista de equipos*/\n if (!partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getVisitante());\n }\n }\n //Retornamos la nueva lista con los equipos que avanzan\n return equipos;\n }", "private EmbeddedTreePlaneSubset getTreeSubset() {\n if (treeSubset == null) {\n treeSubset = new EmbeddedTreePlaneSubset(plane);\n\n if (convexSubset != null) {\n treeSubset.add(convexSubset);\n\n convexSubset = null;\n }\n }\n\n return treeSubset;\n }", "Object[] getElements() {\n\tif (this.results == null) {\n\t\tinitResults();\n\t\tif (this.filterAdvancedScenarios != null) {\n\t\t\tthis.results.setFingerprints(this.filterAdvancedScenarios.isChecked());\n\t\t}\n\t}\n\treturn this.results.getElements();\n}", "private List<GetNearestPubDTO> getPubsWithTabes(List<Result> results){\n List<GetNearestPubDTO> getNearestPubDTOList = new ArrayList<>();\n Double averageRating;\n int numberOfFreeTables;\n for (Result result : results){\n averageRating = this.countRatingsAverage(ratingRepository.findByPubId(result.getPubId()));\n numberOfFreeTables = this.countFreeTables(tableRepository.findByPubId(result.getPubId()));\n Location location = result.getGeometry().getLocation();\n Double pubLongitude = Double.parseDouble(location.getLng());\n Double pubLatitude = Double.parseDouble(location.getLat());\n GetNearestPubDTO getNearestPubDTO = new GetNearestPubDTO(result.getPubId(), result.getName(), averageRating,\n pubLongitude, pubLatitude, numberOfFreeTables, result.getDistance());\n getNearestPubDTOList.add(getNearestPubDTO);\n }\n return getNearestPubDTOList;\n }", "public Collection<AskConstraint> getAskConstraints()\n {\n\t\treturn Empty.getInstance();\n\t}", "public List<Set> getSets() {\n\t\treturn this.sets;\n\t}", "public Queue<Point> getPoints() {\n\tQueue<Point> iter = new Queue<Point>();\n\tfor (Shape s : this.shapes) {\n\t for (Point p : s.getPoints())\n\t\titer.enqueue(p);\n\t}\n\n\treturn iter;\n }" ]
[ "0.5813328", "0.5781191", "0.57552063", "0.5473394", "0.53763056", "0.53480506", "0.5256472", "0.5167554", "0.5070444", "0.50490063", "0.5036968", "0.5009817", "0.5006667", "0.50029093", "0.49743143", "0.4959535", "0.49466175", "0.49264488", "0.4917286", "0.49068886", "0.482761", "0.481905", "0.48082086", "0.48065653", "0.4803559", "0.47877526", "0.47733903", "0.4773098", "0.47711736", "0.4753824", "0.4741221", "0.47312602", "0.47139525", "0.47107732", "0.47044665", "0.47039264", "0.46979594", "0.4685361", "0.46852174", "0.46726018", "0.46653956", "0.46465412", "0.46400082", "0.46344078", "0.46317878", "0.46278542", "0.46238622", "0.46189892", "0.46139598", "0.4599667", "0.45985466", "0.45888904", "0.4587603", "0.45854238", "0.45811436", "0.4573566", "0.45701763", "0.4567253", "0.45669797", "0.45557976", "0.45548657", "0.45523757", "0.45510313", "0.4548951", "0.45469984", "0.45447284", "0.45440194", "0.45439252", "0.4543338", "0.45432895", "0.45387882", "0.45308647", "0.4530392", "0.45282707", "0.45190224", "0.45172104", "0.4513243", "0.4505165", "0.45034072", "0.45017827", "0.45009914", "0.44994846", "0.4488758", "0.44814888", "0.44766688", "0.44765508", "0.4467469", "0.44631112", "0.4453503", "0.44534838", "0.44530538", "0.4447538", "0.44470003", "0.44464633", "0.44319642", "0.44305772", "0.4428592", "0.44281217", "0.44265282", "0.44211236" ]
0.65712696
0
Set fitted offer sets correspond to the cell.
public void setFittedOffers(ArrayList<Offer> fittedOffers) { FittedOffers = fittedOffers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNewFittedOffer(Offer offer){ \r\n\t\t//System.out.println(\"previous offer list size= \"+ this.FittedOffers.size());\r\n\t\tthis.FittedOffers.add(offer);\r\n\t\t//System.out.println(\"current offer list size= \"+ this.FittedOffers.size());\r\n\t}", "protected void setFitness(float fit)\t{\tfitness = fit;\t\t}", "private void setUsedValueInBoxes() {\n \n setUsedValuesByBox(1,3,1,3);\n setUsedValuesByBox(1,3,4,6);\n setUsedValuesByBox(1,3,7,9);\n setUsedValuesByBox(4,6,1,3);\n setUsedValuesByBox(4,6,4,6);\n setUsedValuesByBox(4,6,7,9);\n setUsedValuesByBox(7,9,1,3);\n setUsedValuesByBox(7,9,4,6);\n setUsedValuesByBox(7,9,7,9);\n }", "public void setAllSpieler(Vector<Spieler> spielerListe) {\n\t\tspieler.setAllSpieler(spielerListe);\n\t}", "public void preSerialize(){\n\t\tfittings = new ArrayList<Fitting>();\n\t\tfor(CutSheetInfo csi : getMainThreadedList()){\n\t\t\tpreSerializeOne(csi);\n\t\t}\n\t\tfor(BranchInfo bi : getBranchMap().values()){\n\t\t\tfor(EdgeMultiplicity em : bi.getEdgeMultiplicity()){\n\t\t\t\tCutSheetInfo csi = em.getEdgeInfo();\n\t\t\t\tpreSerializeOne(csi);\n\t\t\t\t/*\n\t\t\t\tfor(int i = 0; i < 2; i++){\n\t\t\t\t\tFitting f = (i == 0) ? csi.getStartFitting() : csi.getEndFitting();\n\t\t\t\t\tint idx = fittings.indexOf(f);\n\t\t\t\t\tif(idx < 0){\n\t\t\t\t\t\tidx = fittings.size();\n\t\t\t\t\t\tfittings.add(f);\n\t\t\t\t\t}\n\t\t\t\t\tif(i == 0){\n\t\t\t\t\t\tcsi.startFittingId = idx;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcsi.endFittingId = idx;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\t}", "protected void setSpies() {\n\t\tint numberOfSpies = SPIES[numberOfPlayers-5];\n\t\tfor(int i = 0; i < numberOfSpies; i++) {\n\t\t\tplayers[i].setSpy();\n\t\t}\n\t}", "public void setFitness(int fit)\n {\n this.fitness=fit;\n }", "public ArrayList<Offer> getFittedOffers(){\r\n\t\treturn this.FittedOffers;\r\n\t}", "public void setCells(ArrayList<CellState> cells) {\n this.cells = cells;\n }", "void fit(DataSetIterator iterator);", "public void setWellsets(List<WellSetPOJOBigDecimal> wellsets) {\n this.wellsets = wellsets;\n }", "private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }", "public void setFitness(double fit) {\n fitness = fit;\n }", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "public void setCustomPowers(HashSet<ElitePower> elitePowers) {\n\n this.powers = elitePowers;\n for (ElitePower elitePower : elitePowers) {\n elitePower.applyPowers(this.eliteMob);\n if (elitePower instanceof MinorPower)\n this.minorPowerCount++;\n if (elitePower instanceof MajorPower)\n this.majorPowerCount++;\n }\n\n if (this.minorPowerCount > 0) {\n MinorPowerPowerStance minorPowerStanceMath = new MinorPowerPowerStance(this);\n }\n\n if (this.majorPowerCount > 0) {\n MajorPowerPowerStance majorPowerPowerStance = new MajorPowerPowerStance(this);\n }\n\n }", "void setAllData()\n {\n this.filteredLessons = allLessons;\n notifyDataSetChanged();\n }", "private static void setElongations(final Cell3D[] aCells, final ImageStack aInputStack, final int[] aLables, final double[] aResol)\r\n\t{\r\n\t\tfinal double[][] elongations = GeometricMeasures3D.computeEllipsoidElongations(getEllipsoid(aInputStack, aLables, aResol));\r\n\t\tfor (int i = 0; i < aCells.length; i++)\r\n\t\t{\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLOGATION_R1_R2, elongations[i][0]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLOGATION_R1_R3, elongations[i][1]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLOGATION_R2_R3, elongations[i][2]);\r\n\t\t}\r\n\t}", "private void setMarket() {\n\t\tObject [][] data = new Object[players.length][5];\n\t\t\n\t\tfor(int i = 0; i<players.length; i++) {\n\t\t\tdata[i][0] = game.getLastName(players[i].getName());\n\t\t\tdata[i][1] = players[i].getPosition();\n\t\t\tdata[i][2] = players[i].getTeamName();\n\t\t\tdata[i][3] = players[i].getScore();\n\t\t\tdata[i][4] = players[i].getMarketValue();\n\t\t}\n\t\tString [] columnNames = {\"Name\", \"Position\", \"Team\", \"Points\", \"Cost\"};\n\t\tDefaultTableModel tableModel = new DefaultTableModel(data,columnNames);\n\t\ttableMarket.setModel(tableModel);\n\t}", "private void addAllComposedGlyphsToSubset() {\n int newIndex = this.subset.size();\n for (final int composedGlyph : this.composedGlyphs) {\n this.subset.put(composedGlyph, newIndex++);\n }\n }", "void fit(DataSet dataSet);", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "private void setUsedValuesByColumns() {\n //Loop through each column.\n IntStream.rangeClosed(1,9).forEach(i -> {\n //Loop through each position in the row.\n IntStream.rangeClosed(1,9).forEach(j -> {\n //If this value is not set find all the other values in the row and set \n //the possible values of this item to those that are not currently set.\n int column = i;\n Number currentNumber = numbers.stream()\n .filter(n -> n.getRow() == j)\n .filter(n -> n.getColumn() == column)\n .findAny().get();\n if (currentNumber.getValue() < 1) {\n //Used numbers in this column\n List<Integer> usedNumbers = numbers.stream()\n .filter(n -> n.getValue() > 0)\n .filter(n -> n.getRow() != j)\n .filter(n -> n.getColumn() == column)\n .map(Number::getValue)\n .collect(Collectors.toList());\n\n //Figure out where the numbers are different\n if (currentNumber.getUsedValues() == null){\n currentNumber.setUsedValues(usedNumbers);\n }\n else {\n currentNumber.setUsedValues(\n CollectionUtils.union(currentNumber.getUsedValues(), usedNumbers)\n .stream().collect(Collectors.toList()));\n }\n }\n });\n });\n\n }", "private void setWinningTuples() {\n\t\tWINS = new ArrayList<Set<CMNMove>>();\n\t\tSet<CMNMove> winSet = new TreeSet<CMNMove>();\n\t\tfor (int i = MM; i > 0; i--) {\n\t\t\tknapsack(winSet, CC, i, NN);\n\t\t}// end for\n\n\t}", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "private void setAllTablesMaxSeat() {\n ArrayAdapter<String> myAdapter = new ArrayAdapter<String>(getActivity(),\n android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.max_seat_all_tables));\n myAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mSetMaxSeatAllTables.setAdapter(myAdapter);\n\n mSetMaxSeatAllTables.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {\n Object item = adapterView.getItemAtPosition(position);\n String numOfSeats = item.toString();\n mPresenter.setTableMaxSeat(item, position, numOfSeats);\n\n adapterView.setSelection(0); // reset selection\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }\n });\n }", "public void setData(List<E> newDataSet) {\n\t\tdata.addAll(newDataSet);\n\t}", "protected void reset() {\n\t\tadaptees.clear();\n\t}", "protected void setStateToLowestEnergy() {\n\tpoints = bestEverPoints;\n\n\t// make a copy of the best points\n\tbestEverPoints = getPoints();\n\n\tbuildEnergyMatrix();\n\tstateEnergy();\n }", "public DataResourceBuilder _contractOffer_(List<ContractOffer> _contractOffer_) {\n this.dataResourceImpl.setContractOffer(_contractOffer_);\n return this;\n }", "private void setUsedValuesByBox(int startRow, int endRow, int startColumn, int endColumn) {\n\n List<Number> box = numbers.stream()\n .filter(n -> n.getRow() >= startRow)\n .filter(n -> n.getRow() <= endRow)\n .filter(n -> n.getColumn() >= startColumn)\n .filter(n -> n.getColumn() <= endColumn)\n .collect(Collectors.toList());\n\n box.forEach(n -> {\n if (n.getValue() == 0){\n List<Integer> usedNumbers = box.stream().filter(num -> num.getValue() > 0)\n .map(Number::getValue)\n .collect(Collectors.toList());\n \n //Figure out where the numbers are different\n if (n.getUsedValues() == null){\n n.setUsedValues(usedNumbers);\n }\n else {\n n.setUsedValues(\n CollectionUtils.union(n.getUsedValues(), usedNumbers)\n .stream().collect(Collectors.toList()));\n }\n }\n });\n }", "public final void setBestFit() {\r\n setZoom(ZOOM_BEST_FIT);\r\n }", "@NotNull public Builder offers(@NotNull Offer.Builder offer) {\n putValue(\"offers\", offer.build());\n return this;\n }", "public void assignMatingProportions() {\n\t\tdouble totalAverageSpeciesFitness = 0.0;\r\n\r\n\t\t// hold the proportion of offspring each species should generate\r\n\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ttotalAverageSpeciesFitness += s.getAverageAdjustedFitness();\r\n\t\t}\r\n\r\n\t\t// set map values to be a proportion of the total adjusted\r\n\t\t// fitness\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ts.assignProp(totalAverageSpeciesFitness);\r\n\t\t}\r\n\t}", "public void prepareForSpeciation() {\n\t\tfor (Species s : speciesList) {\r\n\t\t\ts.assignRep();\r\n\t\t}\r\n\r\n\t\t// clear the old species list\r\n\t\tfor (Species s : speciesList) {\r\n\t\t\ts.clearMembers();\r\n\t\t}\r\n\t}", "@Override\n public void autoSetInternal() {\n // stupid irregular table... grr.\n switch ((int) weight) {\n // H, CT,TSO,ARM,LEG\n case 10:\n setInternal(3, 4, 3, 1, 2);\n break;\n case 15:\n setInternal(3, 5, 4, 2, 3);\n break;\n case 20:\n setInternal(3, 6, 5, 3, 4);\n break;\n case 25:\n setInternal(3, 8, 6, 4, 6);\n break;\n case 30:\n setInternal(3, 10, 7, 5, 7);\n break;\n case 35:\n setInternal(3, 11, 8, 6, 8);\n break;\n case 40:\n setInternal(3, 12, 10, 6, 10);\n break;\n case 45:\n setInternal(3, 14, 11, 7, 11);\n break;\n case 50:\n setInternal(3, 16, 12, 8, 12);\n break;\n case 55:\n setInternal(3, 18, 13, 9, 13);\n break;\n case 60:\n setInternal(3, 20, 14, 10, 14);\n break;\n case 65:\n setInternal(3, 21, 15, 10, 15);\n break;\n case 70:\n setInternal(3, 22, 15, 11, 15);\n break;\n case 75:\n setInternal(3, 23, 16, 12, 16);\n break;\n case 80:\n setInternal(3, 25, 17, 13, 17);\n break;\n case 85:\n setInternal(3, 27, 18, 14, 18);\n break;\n case 90:\n setInternal(3, 29, 19, 15, 19);\n break;\n case 95:\n setInternal(3, 30, 20, 16, 20);\n break;\n case 100:\n setInternal(3, 31, 21, 17, 21);\n break;\n case 105:\n setInternal(4, 32, 22, 17, 22);\n break;\n case 110:\n setInternal(4, 33, 23, 18, 23);\n break;\n case 115:\n setInternal(4, 35, 24, 19, 24);\n break;\n case 120:\n setInternal(4, 36, 25, 20, 25);\n break;\n case 125:\n setInternal(4, 38, 26, 21, 26);\n break;\n case 130:\n setInternal(4, 39, 27, 21, 27);\n break;\n case 135:\n setInternal(4, 41, 28, 22, 28);\n break;\n case 140:\n setInternal(4, 42, 29, 23, 29);\n break;\n case 145:\n setInternal(4, 44, 31, 24, 31);\n break;\n case 150:\n setInternal(4, 45, 32, 25, 32);\n break;\n case 155:\n setInternal(4, 47, 33, 26, 33);\n break;\n case 160:\n setInternal(4, 48, 34, 26, 34);\n break;\n case 165:\n setInternal(4, 50, 35, 27, 35);\n break;\n case 170:\n setInternal(4, 51, 36, 28, 36);\n break;\n case 175:\n setInternal(4, 53, 37, 29, 37);\n break;\n case 180:\n setInternal(4, 54, 38, 30, 38);\n break;\n case 185:\n setInternal(4, 56, 39, 31, 39);\n break;\n case 190:\n setInternal(4, 57, 40, 31, 40);\n break;\n case 195:\n setInternal(4, 59, 41, 32, 41);\n break;\n case 200:\n setInternal(4, 60, 42, 33, 42);\n break;\n }\n }", "void setLocationCells(ArrayList<String> loc){\r\n locationCells = loc;\r\n }", "public void setVisibilities (Collection<Integer> visibleLayers)\n {\n for (int ii = 0, nn = _vis.size(); ii < nn; ii++) {\n _vis.set(ii, visibleLayers.contains(ii));\n }\n fireTableDataChanged();\n // update every damn entry\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n setVisibility(entry);\n }\n }", "@Override\n public SignalSet getFitData() {\n return this.datFit;\n }", "public void setAllTransformable() {\n for (Iterator<TransformLayer> itr =tLayerPool.values().iterator(); itr.hasNext(); ) {\n TransformLayer layer = itr.next();\n layer.setAllTransformable();\n }\n }", "private static void setSurfaces(final Cell3D[] aCells, final ImageStack aInputStack, final int[] aLables, final double[] aResol)\r\n\t{\r\n\t\tfinal double[] surfaces = GeometricMeasures3D.surfaceAreaCrofton(aInputStack, aLables, aResol, surfaceAreaDirs);\r\n\t\tfor (int i = 0; i < aCells.length; i++)\r\n\t\t{\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.SURFACE_AREA, surfaces[i]);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setAxioms() {\n\t\tthis.addTypeAxiom(vocabulary_ELSEWEB.getOWLClass_WCSCoverageSet());\n\t\taddDatasets();\n\t}", "public void setAvailNumComps(int availNumComps){\n this.mFarm.setAvailNumComps(availNumComps);\n }", "void setNilMultipleBetMinimum();", "private void fit(int slotIndex, Stack<String> bindSlot, Stack<RecognizerPrimitive> bindObj,\n List<RecognizedItem> results) {\n String topSlot = slotNames.get(slotIndex);\n say(\"trying slot \" + slotIndex + \" (\" + topSlot + \") with slot candidates: \"\n + num(validSlotCandidates.get(topSlot), \" \"));\n bindSlot.push(topSlot);\n // Each slot might have several possible values. Iterate through them all.\n for (RecognizerPrimitive p : validSlotCandidates.get(topSlot)) {\n // avoid adding the same primitive to the slot binding if it is already present.\n say(\"1...\");\n if (!bindObj.contains(p)) {\n say(\"2...\");\n bindObj.push(p); // add this primitive to the current binding (for slot \"slotIndex\")\n // Sometimes shapes can be flipped---reversing p1 and p2. If a shape has been flipped\n // it is polite to undo that later, at the end of the fit() function.\n boolean[] revertFixedState = new boolean[bindObj.size()];\n for (int i = 0; i < revertFixedState.length; i++) {\n revertFixedState[i] = !bindObj.get(i).isFlippable();\n }\n Certainty result = evaluate(bindSlot, bindObj); // sees if the current slot binding works.\n say(\"3...\");\n if (result != Certainty.No) {\n if ((slotIndex + 1) < slotNames.size()) {\n // there are unexplored branches below here. go do the next one!\n fit(slotIndex + 1, bindSlot, bindObj, results);\n } else {\n // all slots are filled, so we've found a combination that works.\n boolean ok = true;\n for (RecognizedItem item : results) {\n if (item.containsAll(bindObj)) {\n ok = false;\n break;\n }\n }\n if (ok) {\n RecognizedItem item = makeItem(bindSlot, bindObj);\n results.add(item);\n }\n }\n }\n for (int i = 0; i < bindObj.size(); i++) {\n RecognizerPrimitive prim = bindObj.get(i);\n prim.setSubshapeBindingFixed(revertFixedState[i]);\n }\n bindObj.pop();\n }\n say(\"4...\");\n }\n bindSlot.pop();\n }", "public abstract void updateOfferComponents();", "@Test\n public void testSetOffer() {\n \n assertNull(o2.getOffer());\n o2.setOffer(\"testOffer2\");\n assertNotNull(o2.getOffer());\n assertEquals(\"testOffer2\", o2.getOffer());\n }", "private void setNeighbors() {\n\t\tfor (int i = 0; i < getNumRows(); i++) {\n\t\t\tfor (int j = 0; j < getNumCols(); j++) {\n\t\t\t\tCell c = getCurrentGrid()[i][j];\n\t\t\t\tsetNeighborsForCell(c);\n\t\t\t}\n\t\t}\n\t}", "public void setSelections(Set<Filterable> selections);", "public void setPots (int[] pots) {\r\n\t\t//TODO Ajouter les pots\r\n\t}", "public void assignCalSuites(Collection<BwCalSuite> val) {\n calSuites = val;\n }", "public void setAllMissing();", "private void internalSetPoints(List<Point3D> points) {\n if (points.size() < MINIMUM_SIZE) {\n throw new IllegalArgumentException();\n }\n mPoints = points;\n }", "private void setShips() {\n //This clears the board. To \"Invalidate\"\n for (int x = 0; x < maxN; x++) {\n for (int y = 0; y < maxN; y++) {\n ivCell[x][y].setBackgroundResource(gridID);\n }\n }\n\n for (Ship s : ships) {\n for (int i = 0; i < s.getShipSize(); i++) {\n if(player)ivCell[s.getBodyLocationPoints()[i].x][s.getBodyLocationPoints()[i].y].setBackgroundResource(s.getBodyResources()[i]);\n updateOccupiedCells(s.getBodyLocationPoints());\n }\n }\n\n }", "@NotNull public Builder offers(@NotNull Offer offer) {\n putValue(\"offers\", offer);\n return this;\n }", "protected void setSelectedCells(Cell[][] selectedCells) {\n this.selectedCells = selectedCells;\n }", "private void resetValid() {\n for (String name : slotNames) {\n if (!validSlotCandidates.containsKey(name)) {\n validSlotCandidates.put(name, new TreeSet<RecognizerPrimitive>());\n }\n validSlotCandidates.get(name).clear();\n }\n }", "public void postDeserialize(){\n\t\tif(fittings == null){\n\t\t\treturn;\n\t\t}\n\t\tfor(CutSheetInfo csi : getMainThreadedList()){\n\t\t\tpostDeserializeOne(csi);\n\t\t}\n\t\tfor(BranchInfo bi : getBranchMap().values()){\n\t\t\tfor(EdgeMultiplicity em : bi.getEdgeMultiplicity()){\n\t\t\t\tCutSheetInfo csi = em.getEdgeInfo();\n\t\t\t\tpostDeserializeOne(csi);\n\t\t\t}\n\t\t}\n\t}", "public StdVideoH264ScalingLists set(\n short scaling_list_present_mask,\n short use_default_scaling_matrix_mask,\n ByteBuffer ScalingList4x4,\n ByteBuffer ScalingList8x8\n ) {\n scaling_list_present_mask(scaling_list_present_mask);\n use_default_scaling_matrix_mask(use_default_scaling_matrix_mask);\n ScalingList4x4(ScalingList4x4);\n ScalingList8x8(ScalingList8x8);\n\n return this;\n }", "public void set(GPointsArray pts) {\n\t\tif (pts.getNPoints() == points.size()) {\n\t\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\t\tpoints.get(i).set(pts.get(i));\n\t\t\t}\n\t\t} else if (pts.getNPoints() > points.size()) {\n\t\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\t\tpoints.get(i).set(pts.get(i));\n\t\t\t}\n\n\t\t\tfor (int i = points.size(); i < pts.getNPoints(); i++) {\n\t\t\t\tpoints.add(new GPoint(pts.get(i)));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i = 0; i < pts.getNPoints(); i++) {\n\t\t\t\tpoints.get(i).set(pts.get(i));\n\t\t\t}\n\n\t\t\tpoints.subList(pts.getNPoints(), points.size()).clear();\n\t\t}\n\t}", "public void setItems() {\n if (partSelected instanceof OutSourced) { // determines if part is OutSourced\n outSourcedRbtn.setSelected(true);\n companyNameLbl.setText(\"Company Name\");\n OutSourced item = (OutSourced) partSelected;\n idTxt.setText(Integer.toString(item.getPartID()));\n idTxt.setEditable(false);\n nameTxt.setText(item.getPartName());\n invTxt.setText(Integer.toString(item.getPartInStock()));\n costTxt.setText(Double.toString(item.getPartPrice()));\n maxTxt.setText(Integer.toString(item.getMax()));\n minTxt.setText(Integer.toString(item.getMin()));\n idTxt.setText(Integer.toString(item.getPartID()));\n companyNameTxt.setText(item.getCompanyName());\n }\n if (partSelected instanceof InHouse) { // determines if part Is InHouse\n inHouseRbtn.setSelected(true);\n companyNameLbl.setText(\"Machine ID\");\n InHouse itemA = (InHouse) partSelected;\n idTxt.setText(Integer.toString(itemA.getPartID()));\n idTxt.setEditable(false);\n nameTxt.setText(itemA.getPartName());\n invTxt.setText(Integer.toString(itemA.getPartInStock()));\n costTxt.setText(Double.toString(itemA.getPartPrice()));\n maxTxt.setText(Integer.toString(itemA.getMax()));\n minTxt.setText(Integer.toString(itemA.getMin()));\n idTxt.setText(Integer.toString(itemA.getPartID()));\n companyNameTxt.setText(Integer.toString(itemA.getMachineID()));\n\n }\n }", "public void setBuffers(KType[][] newBuffers) {\n // Check they're all the same size, except potentially the last one\n int totalLen = 0;\n for (int i = 0; i < newBuffers.length - 1; i++) {\n final int currLen = newBuffers[i].length;\n assert currLen == newBuffers[i + 1].length;\n totalLen += currLen;\n }\n buffers = newBuffers;\n blockLen = newBuffers[0].length;\n elementsCount = totalLen;\n }", "private static void setInscribedSphere(final Cell3D[] aCells, final ImageStack aInputStack, final int[] aLables, final double[] aResol)\r\n\t{\r\n\t\tfinal double[][] inscribedSphere = GeometricMeasures3D.maximumInscribedSphere(aInputStack, aLables, aResol);\r\n\t\tfor (int i = 0; i < aCells.length; i++)\r\n\t\t{\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.INSCRIBED_SPHERE_CENTER_X, inscribedSphere[i][0]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.INSCRIBED_SPHERE_CENTER_Y, inscribedSphere[i][1]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.INSCRIBED_SPHERE_CENTER_Z, inscribedSphere[i][2]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.INSCRIBED_SPHERE_RADIUS, inscribedSphere[i][3]);\r\n\t\t}\r\n\t}", "public void setBestSize() { setSize(getBestWidth(), getBestHeight()); }", "public void initiateOfferQueue() {\n List<Offer> offerList = offerRepository.findAll();\n\n if (!offerList.isEmpty()) {\n\n for (Offer offer : offerList) {\n\n addOfferToOfferBook(offer);\n }\n }\n\n }", "private void setUsedValuesbyRow() {\n \n //Loop through each row.\n IntStream.rangeClosed(1,9).forEach(i -> {\n //Loop through each position in the row.\n IntStream.rangeClosed(1,9).forEach(j -> {\n //If this value is not set find all the other values in the row and set \n //the possible values of this item to those that are not currently set.\n int row = i;\n Number currentNumber = numbers.stream()\n .filter(n -> n.getRow() == row)\n .filter(n -> n.getColumn() == j)\n .findAny().get();\n //If the value is 0 it is not set\n if (currentNumber.getValue() < 1) {\n //Used numbers in this row\n List<Integer> usedNumbers = numbers.stream()\n .filter(n -> n.getValue() > 0)\n .filter(n -> n.getRow() == row)\n .filter(n -> n.getColumn() != j)\n .map(Number::getValue)\n .collect(Collectors.toList());\n\n //If position currently doesn't have used values then set them to \n //the ones that were found.\n if (currentNumber.getUsedValues() == null){\n currentNumber.setUsedValues(usedNumbers);\n }\n else {\n //Set the position's used values to the union of what it currently has and the\n //identifed used values.\n currentNumber.setUsedValues(\n CollectionUtils.union(currentNumber.getUsedValues(), usedNumbers)\n .stream().collect(Collectors.toList()));\n }\n }\n });\n });\n }", "private void setNumberMines(int setNumberMines)\n\t{\n\t\tif(setNumberMines <= 0) myNumberMines = 1;\n\t\telse if(setNumberMines > ((mySizeX * mySizeY)-9))\n\t\t\tmyNumberMines = (mySizeX * mySizeY) - 9;\n\t\telse myNumberMines = setNumberMines;\n\t}", "private void setData() {\n populateInterfaceElements();\n }", "public void setMatrixes(ButlerWeights weights) {\n\n\tnumTags = weights.getNumTags();\n\tflatShelfs = weights.getShelfs();\n\tnumShelfs = flatShelfs.size();\n\tbrain = generateBrain(numTags, numShelfs);\n\n\tbrain.getStructure().getSynapses().get(0).setMatrix(\n\t\tweights.getWeights());\n\n\tcurrentWeights = weights;\n\n\tinitialized = true;\n }", "public FitMultiExponential() {\r\n\r\n // nPoints data points, 5 coefficients, and multiexponential fitting\r\n super(5, 5);\r\n xSeries = new double[5];\r\n ySeries = new double[5];\r\n \r\n bounds = 2; // bounds = 0 means unconstrained\r\n // bounds = 1 means same lower and upper bounds for\r\n // all parameters\r\n // bounds = 2 means different lower and upper bounds\r\n // for all parameters\r\n bl = new double[5];\r\n bu = new double[5];\r\n \r\n bl[0] = -Double.MAX_VALUE;\r\n bu[0] = Double.MAX_VALUE;\r\n for (int k = 0; k < (5 - 1)/2; k++) {\r\n \tbl[2*k+1] = -Double.MAX_VALUE;\r\n \tbu[2*k+1] = Double.MAX_VALUE;\r\n \tbl[2*k+2] = -Double.MAX_VALUE;\r\n \tbu[2*k+2] = 0.0;\r\n }\r\n\r\n // The default is internalScaling = false\r\n // To make internalScaling = true and have the columns of the\r\n // Jacobian scaled to have unit length include the following line.\r\n // internalScaling = true;\r\n // Suppress diagnostic messages\r\n outputMes = false;\r\n maxIterations = 5000;\r\n testData();\r\n }", "private void setAllFields(){\n Expense retrievedExpense = db.getExpenseWithId(bundle.getInt(EXPENSE_TABLE_COLUMN_ID));\n label.setText(retrievedExpense.getLabel());\n\n // Get adapter from category array\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.expense_category, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Get position where it matches the category name retrieved with the category array\n int spinnerPosition = adapter.getPosition(retrievedExpense.getCategory());\n\n // Set category spinner\n category.setSelection(spinnerPosition);\n\n cost.setText(String.format(\"%.2f \",retrievedExpense.getCost()));\n paid.setChecked(retrievedExpense.isWasItPaid());\n dateDue.setText(retrievedExpense.getDueDate());\n\n }", "public void setOffersWithQuantity(Map<String, Integer> offersWithQuantity) {\n checkExpression(offersWithQuantity != null && !offersWithQuantity.isEmpty(), \"offersWithQuantity is required\");\n this.offersWithQuantity = offersWithQuantity;\n }", "public void randomlySetAllQR() {\n\t\tfor (int q = -3; q <=3; q++) {\r\n\t\t\tfor (int r = -3; r <=3; r++) {\r\n\t\t\t\tsetHexFromQR(q,r, new HexModel(HexModel.TileType.DesertTile));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void removeAllPartOfSet() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PARTOFSET);\r\n\t}", "void setDataIntoSuppBusObj() {\r\n supplierBusObj.setValue(txtSuppId.getText(),txtSuppName.getText(), txtAbbreName.getText(),\r\n txtContactName.getText(),txtContactPhone.getText());\r\n }", "public void presetABCDEF() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n pollOptions.add(\"D\");\n pollOptions.add(\"E\");\n pollOptions.add(\"F\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "private void initCells()\n {\n this.minesweeperCells = new MinesweeperCell[ROWS_COLUMNS][ROWS_COLUMNS];\n int k = 0;\n mines = new ArrayList<>();\n while(k < N_MINES)\n {\n int randomRow, randomColumn;\n randomRow = (int) (Math.random() *this.minesweeperCells.length);\n randomColumn = (int) (Math.random() *this.minesweeperCells[0].length);\n Point mine = new Point(randomRow, randomColumn);\n if(!mines.contains(mine))\n {\n mines.add(mine);\n k++;\n }\n }\n // init the cells\n for(int i = 0; i < this.minesweeperCells.length; i++)\n {\n for(int j = 0; j < this.minesweeperCells[i].length; j++)\n {\n this.minesweeperCells[i][j] = new MinesweeperCell(false, true, getMineCount(i,j), i, j);\n }\n }\n this.minesweeperCustomView.setArray(this.minesweeperCells);\n }", "public void setSets(List<SetMappingValue> sets) {\r\n\t\tthis.sets = sets;\r\n\t}", "private Itemsets() {\n\t\t\tfrequentItemsets = new LinkedHashMap<Itemset, Integer>();\n\t\t\tinfrequentItemsets = new LinkedHashMap<Itemset, Integer>();\n\t\t}", "public void initialize(ArrayList<Product> allProducts, ArrayList<Offer> offers) {\n this.allProducts = allProducts;\n this.allOffers = offers;\n }", "private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}", "protected abstract void setClueModels();", "public void populateChoiceBoxes() {\n subjects.setItems(FXCollections.observableArrayList(\"Select\", \"computers\", \"not-computers\", \"subjects\"));\n className.setItems(FXCollections.observableArrayList(\"Select\", \"101\", \"202\", \"303\", \"505\"));\n subjects.getSelectionModel().select(0);\n className.getSelectionModel().select(0);\n this.points.setPromptText(Integer.toString(100));\n\n }", "public void fill(List<CellIndex> cellIndices, double val) {\r\n for (CellIndex cellIndex : cellIndices) {\r\n int row = cellIndex.row;\r\n int col = cellIndex.col;\r\n this.setLogicalValue(row, col, val, false);\r\n }\r\n this.fireTableDataChanged();\r\n }", "public RandomizedSet_380() {\n elementsList = new ArrayList<>();\n valToIndex = new HashMap<>();\n }", "private static void setSphericities(final Cell3D[] aCells, final ImageStack aInputStack, final int[] aLables, final double[] aResol)\r\n\t{\r\n\t\tfinal double[] sphericities = GeometricMeasures3D.computeSphericity(getVolumes(aInputStack, aLables, aResol), getSurfaces(aInputStack, aLables, aResol));\r\n\t\tfor (int i = 0; i < aCells.length; i++)\r\n\t\t{\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.SPHERICITY_MORPHOLIBJ, sphericities[i]);\r\n\t\t}\r\n\t}", "private void applyPowers(HashSet<ElitePower> elitePowers, int availablePowerAmount) {\n\n if (availablePowerAmount < 1) return;\n\n ArrayList<ElitePower> localPowers = new ArrayList<>(elitePowers);\n\n for (ElitePower mobPower : this.powers)\n localPowers.remove(mobPower);\n\n for (int i = 0; i < availablePowerAmount; i++)\n if (localPowers.size() < 1)\n break;\n else {\n ElitePower selectedPower = localPowers.get(ThreadLocalRandom.current().nextInt(localPowers.size()));\n this.powers.add(selectedPower);\n selectedPower.applyPowers(this.eliteMob);\n localPowers.remove(selectedPower);\n if (selectedPower instanceof MajorPower)\n this.majorPowerCount++;\n if (selectedPower instanceof MinorPower)\n this.minorPowerCount++;\n }\n\n }", "public void addAll(SelectionSet newSet)\n {\n elements.addAll(newSet.elements);\n }", "public void setSettable(){\n\t\tString letter;\n\t\tletter = JOptionPane.showInputDialog(getFrame(), \"Enter the settable rate of the simulation\");\n\t\twhile(letter==null || letter.equals(\"\")){\n\t\t\tletter = JOptionPane.showInputDialog(getFrame(), \"Enter the settable rate of the simulation\");\n\t\t\t\n\t\t}\n\t\trate=Integer.parseInt(letter);\n\t}", "public abstract void setLocations(java.util.Set locations);", "public void setRemainingToScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tgrid[i][j]=new Scenery(i*grid[0].length+j);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void setTense(Tense t) {\n\t\tsuper.setTense(t);\n\n\t\tfor (SPhraseSpec s : this.coordinator.coordinates) {\n\t\t\ts.setTense(t);\n\t\t}\n\n\t}", "public static void setPartOfSet( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PARTOFSET, value);\r\n\t}", "@Before\r\n\tpublic void setList() {\r\n\t\tthis.list = new DoubleList();\r\n\t\tfor (int i = 0; i < 15; i++) {\r\n\t\t\tlist.add(new Munitions(i, i + 1, \"iron\"));\r\n\t\t}\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void setChain(Set chain) \n\t{\n\t\tfor(Object c : chain)\n\t\t{\n\t\t\tthis.cars.add(c);\n\t\t}\n\t}", "public RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "public void setBestHeight() { setHeight(getBestHeight()); }", "void setPlaces(Place[] places);", "public void setLecturers(ArrayList value);", "@Override\r\n\tpublic void setFilter(Set<SensorDescriptionUpdateRate<Measurement>> bestSensors) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void setFilter(Set<SensorDescriptionUpdateRate<Measurement>> bestSensors) {\n\t\t\r\n\t}" ]
[ "0.66839755", "0.557719", "0.54072636", "0.52550983", "0.52358574", "0.52323294", "0.51758695", "0.51423615", "0.51348525", "0.51309615", "0.512561", "0.51227015", "0.51159424", "0.510742", "0.50502187", "0.504273", "0.5030391", "0.49905723", "0.49295568", "0.4926443", "0.49237618", "0.49230474", "0.49072474", "0.4904115", "0.48976812", "0.48817974", "0.48617515", "0.48434427", "0.48071527", "0.48062944", "0.48032895", "0.47806242", "0.47792298", "0.47473827", "0.47203973", "0.47165808", "0.46951818", "0.46945477", "0.4693327", "0.46896848", "0.4689335", "0.46815816", "0.46799332", "0.46761113", "0.46743137", "0.46686712", "0.46657062", "0.4664674", "0.46638918", "0.46628332", "0.46619695", "0.4661749", "0.46498597", "0.46491063", "0.46487635", "0.46428692", "0.4626382", "0.46221384", "0.46207315", "0.46164462", "0.4615665", "0.46135378", "0.4598656", "0.45878786", "0.45851564", "0.4584202", "0.45700255", "0.4568557", "0.45610577", "0.45586532", "0.45572424", "0.45528525", "0.45513257", "0.4549188", "0.45469975", "0.45400143", "0.45309752", "0.45243156", "0.45219064", "0.45187706", "0.45099422", "0.45054227", "0.45053345", "0.45035246", "0.44937152", "0.44918963", "0.44884363", "0.44828022", "0.44809228", "0.4472926", "0.4469096", "0.4468627", "0.4467769", "0.44665283", "0.44651344", "0.4461547", "0.44518557", "0.44501716", "0.44497085", "0.44497085" ]
0.6997018
0
get gamma value correspond to the cell.
public double getNewGammaValue() { return newGammaValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getGamma() {\r\n return gamma;\r\n }", "public double getGamma()\n {\n return gamma;\n }", "double getGamma();", "public float getGamma() {\n\t\treturn gamma;\n\t}", "public double getGamma() {\n return this.gamma;\n }", "public float getGamma();", "public Expression getGammaValue();", "public double getGamma() throws Exception\n\t{\n\t\tif(gammaValue >= 1000)\n\t\t{\n\t\t\tthrow new Exception(\"UNTRUE GAMMA VALUE\");\n\t\t}\n\t\treturn gammaValue;\n\t}", "public double getLightAbsorptionCoefficient(){\n return gamma;\n }", "static public double computeBetaFromGamma(double gamma) {\n double beta = Math.sqrt(1.0 - 1.0/(gamma*gamma));\n\n return beta;\n }", "public double getValue(Cell cell) {\n\t\treturn cell.value;\n\t}", "public void setGamma(double value) {\r\n this.gamma = value;\r\n }", "public double evaluate(double x) {\n return gamma(x);\n }", "public void setGamma(float gamma) {\n\t\tthis.gamma = gamma;\n\t}", "public void gammaCorrect(double gamma) {\n\n\t\tdouble inverseGamma = 1.0 / gamma;\n\t\tthis.r = Math.pow(r, inverseGamma);\n\t\tthis.g = Math.pow(g, inverseGamma);\n\t\tthis.b = Math.pow(b, inverseGamma);\n\n\t}", "static public double computeGammaFromBeta(double beta) { \n return 1.0/Math.sqrt(1.0 - beta*beta); \n }", "public static double gamma(double x) {\n double sgngam, q, z, y, p1, q1;\n int ip, p;\n double[] pp = {1.60119522476751861407E-4, 1.19135147006586384913E-3, 1.04213797561761569935E-2, 4.76367800457137231464E-2, 2.07448227648435975150E-1, 4.94214826801497100753E-1, 9.99999999999999996796E-1};\n double[] qq = {-2.31581873324120129819E-5, 5.39605580493303397842E-4, -4.45641913851797240494E-3, 1.18139785222060435552E-2, 3.58236398605498653373E-2, -2.34591795718243348568E-1, 7.14304917030273074085E-2, 1.00000000000000000320};\n sgngam = 1;\n q = Math.abs(x);\n if(q>33.0) {\n if(x<0.0) {\n p = (int) Math.floor(q);\n ip = Math.round(p);\n if(ip%2==0) {\n sgngam = -1;\n }\n z = q-p;\n if(z>0.5) {\n p = p+1;\n z = q-p;\n }\n z = q*Math.sin(Math.PI*z);\n z = Math.abs(z);\n z = Math.PI/(z*gammastirf(q));\n } else {\n z = gammastirf(x);\n }\n y = sgngam*z;\n return y;\n }\n z = 1;\n while(x>=3) {\n x = x-1;\n z = z*x;\n }\n while(x<0) {\n if(x>-0.000000001) {\n y = z/((1+0.5772156649015329*x)*x);\n return y;\n }\n z = z/x;\n x = x+1;\n }\n while(x<2) {\n if(x<0.000000001) {\n y = z/((1+0.5772156649015329*x)*x);\n return y;\n }\n z = z/x;\n x = x+1.0;\n }\n if(x==2) {\n y = z;\n return y;\n }\n x = x-2.0;\n p1 = pp[0];\n for(int i = 1; i<7; i++) {\n p1 = pp[i]+p1*x;\n }\n q1 = qq[0];\n for(int i = 1; i<8; i++) {\n q1 = qq[i]+q1*x;\n }\n return z*p1/q1;\n }", "public double getG();", "public RowIterator getGamCell() {\n return (RowIterator) getAttributeInternal(GAMCELL);\n }", "double [] calcGamma(){\n\t\t\tgamma = new double [N];\n\t\t\tdouble [] gammaParam = new double [noLiveSites];\n\t\t\tint liveSite = 0;\n\t\t\tfor (int i = 0; i < N; i ++){\n\t\t\t\tgamma[i] = 1.0;\n\t\t\t\tif(aliveLattice[i]){\n\t\t\t\t\tdouble phi_i = 1.0 - fracDeadNbors[i];\n\t\t\t\t\tgammaParam[liveSite] = 1-phi_i*(1-alpha[i]);\n\t\t\t\t\tgamma[i] = gammaParam[liveSite];\n\t\t\t\t\tliveSite += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble ave = MathTools.mean(gammaParam);\n\t\t\tdouble var = MathTools.variance(gammaParam);\n\t\t\tdouble [] ret = new double [2];\n\t\t\tret[0] = ave;\n\t\t\tret[1] = var;\n\t\t\treturn ret;\n\t\t}", "static public double computeGammaFromEnergies(double W, double Er) {\n double gamma = W/Er + 1.0;\n \n return gamma;\n }", "public default double getFitness(Cell cell) {\n return getFitness(cell.getGenotype());\n }", "public synchronized byte getCellValue()\n {\n return cellValue;\n }", "public double breitWigner(double arg, double a, double gamma){ \r\n return (2. * gamma / Math.PI) / (4. * Math.pow(arg - a, 2.) + gamma * gamma);\r\n }", "public boolean getPerformGammaCorrection() {\n/* 178 */ return this.performGammaCorrection;\n/* */ }", "public double getFaceValue(){\n\t\t\n\t\treturn face ;\n\t}", "public abstract int getLastCageCellValue(int row, int col);", "public java.lang.Float getPuppiGammaIso() {\n return puppiGammaIso;\n }", "public native boolean gammaImage(String gamma) throws MagickException;", "public int getG();", "public float getG() {\r\n\t\treturn g;\r\n\t}", "public java.lang.Float getPuppiGammaIso() {\n return puppiGammaIso;\n }", "public float gpa() {\n\t\tif (Float.isNaN(this.gpa) || this.gpa == 0.0f) {\n\t\t\tthis.calculateGpa();\t\t\t\n\t\t}\n\t\t\n\t\treturn this.gpa;\n\t}", "public int get_cell(int row,int col)\n{\n\treturn cell[row][col] ;\t\n}", "public void setLightAbsorptionCoefficient(double gamma){\n this.gamma = gamma;\n }", "float getValue();", "float getValue();", "float getValue();", "public int getElement(Pair<Integer, Integer> cell){\n\t\treturn numbers[cell.getFirst()][cell.getSecond()];\n\t}", "private float getLogProfile(float in) {\n final float power = 1.0f / 2.2f;\n final float log_A = 0.0f;\n float out = (float) (Math.log1p(log_A * in) / Math.log1p(log_A));\n\n // apply gamma\n out = (float) Math.pow(out, power);\n //out = Math.max(out, 0.5f);\n\n return out;\n }", "public double getK(int row, int col) {\n return m_K.get(row, col);\n }", "int getG();", "public int getG() {\r\n\t\treturn g;\r\n\t}", "public double getBeta();", "private double getCellValue(Cell cell){\n\n if(cell == null){\n return 0.0;\n }\n else{\n switch (cell.getCellType()){\n case TEXT:\n // we ignore Textcells\n return 0;\n case NUMBER:\n return ((NumberCell) cell).getCellContent();\n\n case FORMULA:\n return ((FormulaCell) cell).getContent();\n default:\n System.out.println(\"ERROR: Calculation-SUM doesn't work\");\n\n }\n }\n return 0;\n }", "public float getGCRatio()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor (int i = 0; i < this.sequence.length(); i++)\r\n\t\t{\r\n\t\t\tchar a = this.sequence.charAt(i);\r\n\t\t\tif (a == 'G' || a == 'C')\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (float) count / (float) this.sequence.length();\r\n\t}", "public double getCell(int row, int col) {\n int di = row - col;\n\n if (di == 0) {\n return B[row];\n } else if (di == -1) {\n return C[row];\n } else if (di == 1) {\n return A[row];\n } else return 0;\n }", "float mo199g() throws RemoteException;", "public String getFaceValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getFaceValue Method ***************/\n\n\t// Return face value\n return faceValue;\n\n }", "public float c() {\n if (this.f3465c) {\n return BitmapDescriptorFactory.HUE_RED;\n }\n com.airbnb.lottie.g.a g2 = g();\n if (g2.d()) {\n return BitmapDescriptorFactory.HUE_RED;\n }\n return (this.f3467e - g2.b()) / (g2.c() - g2.b());\n }", "public double getValueOfSpaceActivation() {\n\t\treturn valueOfSpaceActivation;\n\t}", "double get(int row,int col);", "int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }", "private void computeLogGammaRatioCache() {\n\t\tif (logGammaRatioCache == null) {\n\t\t\tlogGammaRatioCache = new ArrayList<>();\n\t\t}\n\t\tif (0 < logGammaRatioCache.size()) {\n\t\t\tlogGammaRatioCache.set(0, 0.0f);\n\t\t} else {\n\t\t\tlogGammaRatioCache.add(0.0f);// 0 case\n\t\t}\n\t\tindexLastValidLogGammaRatio = 0;\n\t\textendLogGammaRatioCache(10);\n\t}", "public final int getG() {\n\t\treturn green;\n\t}", "public double getGpa(){\n return this.gpa;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }", "float getGt();", "public double getGpa() {\n return gpa;\n }", "public double getAlphaAt(int row) {\n if (scale == 0)\n return defaultAlpha;\n else\n return (alphaColumn.getDoubleAt(row) - amin) * scale;\n }", "private float getVal(float[] buffer, int col, int row) {\r\n float rtnVal;\r\n if (col < 0) col = 0;\r\n if (col >= xDim) col = xDim - 1;\r\n if (row < 0) row = 0;\r\n if (row >= yDim) row = yDim - 1;\r\n rtnVal = buffer[row * xDim + col];\r\n return rtnVal;\r\n }", "static double[][] calcGammaE(double[][] alpha, double[][] betha) {\n\t\tfinal int T = alpha.length;\n\t\tfinal int N = alpha[0].length;\n\n\t\tdouble[][] gamma_e = new double[T][N];\n\t\tfor (int t = 0; t < T; ++t) {\n\t\t\tdouble[] alpha_t = alpha[t];\n\t\t\tdouble[] betha_t = betha[t];\n\n\t\t\tdouble sum = Float.MIN_VALUE;\n\t\t\tdouble[] gamma_et = gamma_e[t];\n\t\t\tfor (int i = 0; i < N; ++i) {\n\t\t\t\tsum += gamma_et[i] = alpha_t[i] * betha_t[i];\n\t\t\t\tassert!Double.isNaN(gamma_et[i]);\n\t\t\t\tassert!Double.isInfinite(gamma_et[i]);\n\t\t\t}\n\n\t\t\tassert!Double.isNaN(sum);\n\t\t\tassert!Double.isInfinite(sum);\n\n\t\t\tfor (int i = 0; i < N; ++i)\n\t\t\t\tgamma_et[i] = gamma_et[i] / sum;\n\t\t}\n\n\t\t// test gamma\n\t\tassert testGammaE(gamma_e);\n\n\t\treturn gamma_e;\n\t}", "private Object getCellValue(XSSFCell cell) {\n\t\tObject cellValue = null;\n\t\tDecimalFormat df = new DecimalFormat(\"#\");\n\t\tswitch (cell.getCellType()) {\n\t\t// This case to get the data and get the value as strings.\n\t\tcase XSSFCell.CELL_TYPE_STRING:\n\t\t\tcellValue = cell.getRichStringCellValue().getString().trim();\n\t\t\tbreak;\n\t\t// This case to get the data and get the value as number.\n\t\tcase XSSFCell.CELL_TYPE_NUMERIC:\n\t\t\tcellValue = df.format(cell.getNumericCellValue()).toString();\n\t\t\tbreak;\n\t\t// This case to get the data and get the value as boolean.\n\t\tcase XSSFCell.CELL_TYPE_BOOLEAN:\n\t\t\tcellValue = String.valueOf(cell.getBooleanCellValue()).trim();\n\t\t\tbreak;\n\t\tcase XSSFCell.CELL_TYPE_FORMULA:\n\t\t\tcellValue = cell.getCellFormula();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcellValue = \"空\";\n\t\t}\n\t\treturn cellValue;\n\t}", "int getGreen(){\n return getPercentageValue(\"green\");\n }", "public Cell getCellValue(int rowNum, int columnNum) {\n\t\treturn cells[rowNum][columnNum];\n\t}", "public float getBeta() {\n\t\treturn beta;\n\t}", "public Cell getEnumCell() {\n\n\t\tString player = getNextPlayer();\n\n\t\tCell value;\n\n\t\tif(player.equals(\"X\"))\n\t\t\tvalue = Cell.X;\n\n\t\telse\n\t\t\tvalue = Cell.O;\n\n\t\treturn value;\n\t}", "private static double gcf(double a, double x) {\r\n double gammcf;\r\n double gln;\r\n int i;\r\n double an, b, c, d, del, h;\r\n \r\n gln = gammln(a);\r\n b = x + 1.0 - a;\r\n c = 1.0/FPMIN;\r\n d = 1.0/b;\r\n h = d;\r\n \r\n for(i = 1; i <= ITMAX; i++) //iterate to convergence\r\n {\r\n an = -i*(i - a);\r\n b += 2.0; //Set up for evaluating continued\r\n d = an*d + b; //fraction by modified Lentz's method with b_0 = 0.\r\n if(Math.abs(d) < FPMIN) {\r\n d = FPMIN;\r\n }\r\n c = b + an/c;\r\n if(Math.abs(c) < FPMIN) {\r\n c = FPMIN;\r\n }\r\n d = 1.0/d;\r\n del = d*c;\r\n h *= del;\r\n \r\n if(Math.abs(del - 1.0) < EPS) {\r\n break;\r\n }\r\n }\r\n if (i > ITMAX){\r\n // nerror(\"a too large, ITMAX too small in continued fraction gamma function\");\r\n }\r\n return gammcf = Math.exp(-x + a*Math.log(x) - (gln))*h; //Put factors in front\r\n \r\n }", "double getValue();", "double getValue();", "double getValue();", "public float getFloat(int row, int column) {\n return columns[column].getFloat(row);\n }", "public double getBeta() {\r\n return beta;\r\n }", "private String getCellValue(Cell cell) {\r\n String value = null;\r\n if (cell != null) {\r\n CellValue cellValue = evaluator.evaluate(cell);\r\n if (cellValue != null) {\r\n switch (cellValue.getCellType()) {\r\n case NUMERIC:\r\n value = String.valueOf(cell.getNumericCellValue());\r\n break;\r\n case STRING:\r\n value = cell.getStringCellValue();\r\n break;\r\n case BLANK:\r\n break;\r\n case ERROR:\r\n break;\r\n default:\r\n value = cell.getStringCellValue();\r\n break;\r\n }\r\n }\r\n }\r\n return value;\r\n }", "protected abstract double getCell(\r\n int row,\r\n int col);", "public float bottom_clearance_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 28, 4))); }", "public Number getValue(int row, int column) { return this.underlying.getValue(row, column + this.firstCategoryIndex); }", "public void setNewGammaValue(double newGammaValue) {\r\n\t\tthis.newGammaValue = newGammaValue;\r\n\t}", "String getValue(String column, int row);", "public int getValue(int row, int column);", "public java.math.BigInteger getGBInterval_point(){\n return localGBInterval_point;\n }", "float getA();", "public java.math.BigInteger getGibbsq()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GIBBSQ$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getBigIntegerValue();\r\n }\r\n }", "public double getValue(Hashtable positions, int[] conf) {\n\n return 0.0;\n}", "public int gcd() {\n return BigInteger.valueOf(row)\n .gcd(BigInteger.valueOf(column)).intValue();\n }", "double getValue(int alpha, int beta) {\n\tif (alpha <=0 || beta<=0) throw new IllegalArgumentException(\"alpha, beta must be positive\");\n\tif (alpha + beta <= table.length + 1) {\n\t return table[beta - 1][alpha - 1];\n\t} else {\n\t return (double)alpha/(double)(alpha+beta);\n\t}\n }", "@Override\n public double getQuick(int row, int column) {\n return base.getQuick(rowPivot[row], columnPivot[column]);\n }", "private static int get(int colour) {\r\n\t\t// If the color is incorrect (less than 0) the color is set invisible\r\n\t\tif (colour < 0) {\r\n\t\t\treturn 255;\r\n\t\t}\r\n\r\n\t\t// taking each number of the argument\r\n\t\tint r = colour / 100 % 10;\r\n\t\tint g = colour / 10 % 10;\r\n\t\tint b = colour % 10;\r\n\r\n\t\t// returning the 6*6*6 color\r\n\t\treturn r * 6 * 6 + g * 6 + b;\r\n\t}", "public byte[] getG() {\n return g;\n }", "public double getBeta()\n\t{\n\t\treturn Math.toRadians(beta);\n\t}", "@Override\n\tpublic Tetrads getType() {\n\t\treturn Tetrads.GAMMA;\n\t}", "public java.math.BigInteger getGibbmt()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GIBBMT$4, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getBigIntegerValue();\r\n }\r\n }", "BigInteger getValue();", "public float approach_x_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 41, 4))); }", "public int getGamenumber() {\n\t\treturn this.gamenumber;\n\t}", "public double getValue(int row, int col) {\n return data[row][col];\n }", "int getRed(){\n return getPercentageValue(\"red\");\n }", "abstract float getKeliling();", "public double getGz() {\n return mGz;\n }", "public Vector3 getValue() {\n\t\treturn this.value;\n\t}" ]
[ "0.7486513", "0.746863", "0.74467313", "0.7372736", "0.73695666", "0.7325164", "0.7167627", "0.6896949", "0.6153785", "0.6117676", "0.6053152", "0.59954304", "0.5920473", "0.5894195", "0.5863151", "0.5834414", "0.58051896", "0.58015835", "0.5769386", "0.572317", "0.5572998", "0.55349314", "0.5520736", "0.5509678", "0.5459786", "0.5431948", "0.54072905", "0.5396897", "0.53900194", "0.53824705", "0.5368937", "0.5364665", "0.5320476", "0.5290742", "0.5288242", "0.5277798", "0.5277798", "0.5277798", "0.52744466", "0.52675647", "0.5242685", "0.52318996", "0.52147686", "0.520972", "0.52062696", "0.51834494", "0.5182116", "0.51726735", "0.5154693", "0.51533264", "0.5140719", "0.51394564", "0.51160014", "0.51121366", "0.5108511", "0.510158", "0.50703436", "0.5060826", "0.5060818", "0.5055148", "0.50432765", "0.5039648", "0.5036207", "0.50347507", "0.5017003", "0.5001652", "0.499758", "0.49965072", "0.49790496", "0.49790496", "0.49790496", "0.49784496", "0.49770314", "0.49748993", "0.4969365", "0.49689826", "0.4948934", "0.49463946", "0.49433982", "0.49419135", "0.49395534", "0.49363655", "0.49353126", "0.4933165", "0.4926246", "0.49221236", "0.49215132", "0.49120498", "0.49046314", "0.48986822", "0.4893425", "0.48891526", "0.4876712", "0.4876657", "0.48750538", "0.48694962", "0.48601693", "0.48597032", "0.48560357", "0.48540014" ]
0.6691628
8
set gamma value correspond to the cell.
public void setNewGammaValue(double newGammaValue) { this.newGammaValue = newGammaValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setGamma(double value) {\r\n this.gamma = value;\r\n }", "public void setGamma(float gamma) {\n\t\tthis.gamma = gamma;\n\t}", "public void gammaCorrect(double gamma) {\n\n\t\tdouble inverseGamma = 1.0 / gamma;\n\t\tthis.r = Math.pow(r, inverseGamma);\n\t\tthis.g = Math.pow(g, inverseGamma);\n\t\tthis.b = Math.pow(b, inverseGamma);\n\n\t}", "public void setLightAbsorptionCoefficient(double gamma){\n this.gamma = gamma;\n }", "public double getGamma() {\r\n return gamma;\r\n }", "public double getGamma()\n {\n return gamma;\n }", "public float getGamma() {\n\t\treturn gamma;\n\t}", "public double getGamma() {\n return this.gamma;\n }", "public double getNewGammaValue() {\r\n\t\treturn newGammaValue;\r\n\t}", "public float getGamma();", "double getGamma();", "public abstract void setCellValue(int cellValue, int row, int col);", "public void setGFXCell(GFXDataCell gfxCell);", "public Expression getGammaValue();", "public void setG(double aG);", "public synchronized void setCellValue(GoLCell in_cell)\n {\n cellValue = in_cell.getCellValue();\n }", "public double getGamma() throws Exception\n\t{\n\t\tif(gammaValue >= 1000)\n\t\t{\n\t\t\tthrow new Exception(\"UNTRUE GAMMA VALUE\");\n\t\t}\n\t\treturn gammaValue;\n\t}", "@Override\n public void setQuick(int row, int column, double value) {\n base.setQuick(rowPivot[row], columnPivot[column], value);\n }", "public void setValue(int column, int row, int newValue) {\n\t\tint goodValue = newValue;\n\t\tif (goodValue < 0) {\n\t\t\tgoodValue = 0;\n\t\t}\n\t\tif (this.hasMaximumValue) {\n\t\t\tif (goodValue > this.maximumValue) {\n\t\t\t\tgoodValue = this.maximumValue;\n\t\t\t}\n\t\t}\n\n\t\tthis.bitmap[column][row] = goodValue;\n\t}", "public void setCell(Object value, int col, int row) {\n ((DefaultTableModel) getModel()).setValueAt(value, row, col);\n }", "public void setPerformGammaCorrection(boolean performGammaCorrection) {\n/* 185 */ this.performGammaCorrection = performGammaCorrection;\n/* */ }", "public void setCell(int dim, int row, int col ) {\n\n\t\tCell value = getEnumCell();\n\n\t\tif(isEmpty( dim, row, col)){\n\n\t\t\tboard[dim][row][col]= value;\n\n\t\t\tturn++;\n\t\t}\n\n\t\t//\t\telse System.out.println(value.toString() + \" cannot play there. Choose another location for\" + value.toString() + \" .\");\n\n\n\t}", "public synchronized void setCellValue(byte in_cellValue)\n {\n cellValue = (in_cellValue > DEAD) ? ALIVE : DEAD;\n }", "public void setgVal(float value){\n this.gVal = value;\n }", "public void setCell(Cell cell)\n {\n myCell = cell;\n }", "protected void set(int row, int col, Cell cell) {\n\t\tmyGrid.set(row, col, cell);\n\t}", "public void set( int row, int col, double value ) {\n ops.set(mat, row, col, value);\n }", "public void setColor(int gnum, Color col);", "public void setBeta(double aBeta);", "public void SetG(byte num) {\r\n\t\tm_numG = num;\r\n\t}", "public void setSquare(Square cell) {\n\t\tcells[cell.getRow()][cell.getColumn()] = cell; \n\t}", "public void set( int row, int column, double value )\n\t{\n\t\tmatrixData[ row - 1 ][ column - 1 ]\t= value;\n\t}", "public baconhep.TTau.Builder setPuppiGammaIso(float value) {\n validate(fields()[18], value);\n this.puppiGammaIso = value;\n fieldSetFlags()[18] = true;\n return this; \n }", "public void set(int row, int col, double value){\n \tarray[row-1][col-1] = value;\n }", "protected abstract double setCell(\r\n int row,\r\n int col,\r\n double valueToSet);", "public void setValueAt(Object value, int row, int col) {\n\t\tprescaleTable.setPrescale(row, col - 1, (Integer) value);\n\n\t\tfireTableDataChanged(); // Fire event to alert a listener at ConfDbGUI.java (bug 89524).\n\t}", "public void setCellUsed(int row, int col, boolean val) {\n used[row][col] = val;\n }", "public void setCell(int row, int col, double value) {\n int di = row - col;\n\n if (di == 0) {\n B[row] = value;\n } else if (di == -1) {\n C[row] = value;\n } else if (di == 1) {\n A[row] = value;\n } else {\n throw new IllegalArgumentException(\"Only the main, super, and sub diagonals can be set.\");\n }\n }", "public void setSpaceAt(int x, int y, int val){\n grids[x][y].setValue(val);\n }", "@Override\n public void setValueAt(Object obj, int row, int col) {\n if (isCellEditable(row,col)){\n Feature f = fc.get(row);\n LifeStageAttributesInterface atts = (LifeStageAttributesInterface) f.getAttribute(1);\n if (debug) logger.info(\"SetValue for row \"+atts.getCSV());\n atts.setValue(keys.get(col), obj);\n fireTableCellUpdated(row, col);\n }\n }", "public void setPuppiGammaIso(java.lang.Float value) {\n this.puppiGammaIso = value;\n }", "public void setCellValue(int rowNum, int columnNum, Cell value) {\n\t\tcells[rowNum][columnNum] = value;\n\t}", "public baconhep.TTau.Builder setNSignalGamma(long value) {\n validate(fields()[8], value);\n this.nSignalGamma = value;\n fieldSetFlags()[8] = true;\n return this; \n }", "public void setCellValue(int value) {\n\t\tthis.cellValue = value;\n\t}", "public void setFaceValue(double f){\n\t\tface = f ;\n\t}", "public void setColour(Colour colour);", "private void computeLogGammaRatioCache() {\n\t\tif (logGammaRatioCache == null) {\n\t\t\tlogGammaRatioCache = new ArrayList<>();\n\t\t}\n\t\tif (0 < logGammaRatioCache.size()) {\n\t\t\tlogGammaRatioCache.set(0, 0.0f);\n\t\t} else {\n\t\t\tlogGammaRatioCache.add(0.0f);// 0 case\n\t\t}\n\t\tindexLastValidLogGammaRatio = 0;\n\t\textendLogGammaRatioCache(10);\n\t}", "@Override\r\n\tpublic void setCell(Integer x, Integer y, Integer value) {\n\t\tgame[x][y] = value;\r\n\t}", "private void setCell(int x, int y, int newValue) {\n hiddenGrid[x][y] = newValue;\n }", "public void setGi(java.math.BigInteger gi)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GI$22, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(GI$22);\r\n }\r\n target.setBigIntegerValue(gi);\r\n }\r\n }", "public void setBeta(double value) {\r\n this.beta = value;\r\n }", "public void setGrid(int x ,int y,char newValue){\n\t\tGrid[x][y] = newValue;\n\t}", "public abstract void initCell(\r\n int row,\r\n int col,\r\n double valueToInitialise);", "public double getLightAbsorptionCoefficient(){\n return gamma;\n }", "public void setValueAt(Object value, int row, int col)\r\n throws IllegalStateException {\r\n\r\n if(columnsAreNum != null && columnsAreNum.length>0){\r\n\t for(int i =0; i< columnsAreNum.length; i++){\r\n\t if(col == columnsAreNum[i]){\r\n\t value = new Double(tranferStringToNum(value.toString()));\r\n\t break;\r\n\t }\r\n\t }\r\n\t}\r\n //Set value at cell\r\n ( (Vector) data.elementAt(row)).setElementAt(value, col);\r\n //Set status modify to this row.\r\n if (!(Integer.parseInt( ( (Vector) data.elementAt(row)).elementAt\r\n (numberOfcolumns).toString()) == IS_INSERTED)) {\r\n ((Vector) data.elementAt(row)).setElementAt(new Integer(IS_MODIFIED),\r\n numberOfcolumns);\r\n this.updatedStatus = true;\r\n }\r\n }", "public void setG(byte[] value) {\n this.g = ((byte[]) value);\n }", "private void setCellText(final CellsGUI the_cell) {\r\n\r\n\t\t// if (the_cell == null)\r\n\t\t// return;\r\n\t\tCell cell = cellMap.get(the_cell.getToken().toString());\r\n\t\tmyCell = cell;\r\n\t\tif (myCell == null)\r\n\t\t\treturn;\r\n\t\tif (cell != null) {\r\n\t\t\tdouble value = 0;\r\n\t\t\tvalue = roundDecimal(cell.last_value);\r\n\t\t\tthe_cell.setText(Double.toString(value));\r\n\t\t} else {\r\n\t\t\tthe_cell.setText(\"\");\r\n\t\t}\r\n\r\n\t\tdouble cellValue = roundDecimal(myCell.last_value);\r\n\t\tString textValue = String.valueOf(cellValue);\r\n\r\n\t\tif (myCell.formula == null)\r\n\t\t\tthe_cell.setText(\"\");\r\n\t\telse\r\n\t\t\tthe_cell.setText(textValue);\r\n\t}", "public void setValue(int row, int col, double value) {\n data[row][col] = value;\n }", "void setDimmer(int channel, int value) {\n\t\tint valueToSet;\n\t\tif (value < 2) {\n\t\t\tvalueToSet = 2;\n\t\t} else {\n\t\t\tvalueToSet = value;\n\t\t}\n\t\tString channelHex = channelAsHex(channel);\n\t\tString valueHex = StringUtils.leftPad(Integer.toHexString(valueToSet),\n\t\t\t\t2, \"0\");\n\t\tsendCommand(\"*C901\" + channelHex + valueHex + \"#\");\n\t}", "public void setValueAt(Object value, int row, int col)\n {\n if (col != 1)\n return;\n\n prop_map.put(row,value);\n fireTableCellUpdated(row, col);\n }", "public void setValue(float value)\n {\n \tPixelVal = value;\n }", "public void setValueAt(Object value, int row, int col) {\n\t\t\tsuper.setValueAt(value,row,col);\n\t\t\tif (DEBUG) {\n\t\t\t\tSystem.out.println(\"Changed a row at \" + row + \",\" + col\n\t\t\t\t\t\t\t\t + \" to \" + value\n\t\t\t\t\t\t\t\t + \" (an instance of \"\n\t\t\t\t\t\t\t\t + value.getClass() + \")\");\n\t\t\t}\n\n\t\t\tif (col==1 || col==2 || col==9){// length or Girth\n\t\t\t\tint bFt=0, bIn=0, breadthIn=0; double rateclass=0 ; double cft=0, amt =0.0; String wclass=\"\";\n\n\t\t\t\tStringTokenizer st = new StringTokenizer((getValueAt(row,2)).toString(),\".\");\n\t\t\t\t\t\t\t\tif (st.hasMoreTokens()) bFt= (new Integer(st.nextToken())).intValue();\n\t\t\t\t\t\t\t\tif (st.hasMoreTokens()) bIn= (new Integer(st.nextToken().trim())).intValue();\n\t\t\t\t\t\t\t\telse bIn = (new Integer(0)).intValue();\n\t\t\t\tbreadthIn = bFt *12 + bIn;\n\n\t\t\t\tdouble x = ((Double)getValueAt(row,1)).doubleValue();\n\t\t\t\tcft = (( x * breadthIn * breadthIn)/2304.0) * ((Integer)getValueAt(row,9)).intValue();\n\n\t\t\t\tConvertLobs.subTCFT((new Double((String)getValueAt(row,11))).doubleValue());\n\t\t\t\tConvertLobs.subAmount(((Double)getValueAt(row,10)).doubleValue());\n\n\t\t\t\tString cl = (String)getValueAt(row, 7);\n\t\t\t\t\t\t\tif (cl.equals(\"A\")) super.setValueAt(\" \", row, 3);\n\t\t\t\t\t\t\tif (cl.equals(\"B\")) super.setValueAt(\" \", row, 4);\n\t\t\t\t\t\t\tif (cl.equals(\"C\")) super.setValueAt(\" \", row, 5);\n\t\t\t\t\t\t\tif (cl.equals(\"D\")) super.setValueAt(\" \", row, 6);\n\n\t\t\t\tif ((breadthIn)>=Converter.classAlimit) { wclass = \"A\"; rateclass = Converter.rateA;\n\t\t\t\t\t\t\t\tamt = rateclass*cft;\n\t\t\t\t\t\t\t\tConvertLobs.subTCFTA((new Double((String)getValueAt(row,3))).doubleValue()); ConvertLobs.addTCFTA(cft);\n\t\t\t\t\t\t\t\tsuper.setValueAt(new Double(cft).toString(), row, 11);\n\t\t\t\t\t\t\t\tsuper.setValueAt(new Double(cft).toString(), row, 3);\n\t\t\t\t\t\t\t\t }\n\t\t\t\telse if ((breadthIn)>=Converter.classBlimit) {wclass = \"B\"; rateclass = Converter.rateB;ConvertLobs.addTCFTB(cft);\n\t\t\t\t\t\t\t\tamt = rateclass*cft;\n\t\t\t\t\t\t\t\tConvertLobs.subTCFTB((new Double((String)getValueAt(row,4))).doubleValue());\n\t\t\t\t\t\t\t\tsuper.setValueAt(new Double(cft).toString(), row, 11);\n\t\t\t\t\t\t\t\tsuper.setValueAt(new Double(cft).toString(), row, 4);\n\t\t\t\t\t\t\t\t}\n\t\t\t\telse if ((breadthIn)>=Converter.classClimit) {wclass = \"C\";rateclass = Converter.rateC; ConvertLobs.addTCFTC(cft);\n\t\t\t\t\t\t\t\t\t amt = rateclass*cft;\n\t\t\t\t\t\t\t ConvertLobs.subTCFTC((new Double((String)getValueAt(row,5))).doubleValue());\n\t\t\t\t\t\t\t super.setValueAt(new Double(cft).toString(), row, 11);\n\t\t\t\t\t\t\t super.setValueAt(new Double(cft).toString(), row, 5);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\telse if ((breadthIn)>=Converter.classDlimit) {wclass = \"D\";rateclass = Converter.rateD; ConvertLobs.addTCFTD(cft);\n\t\t\t\t\t\t\t\t\t\t\tamt = rateclass*cft;\n\t\t\t\t\t\tConvertLobs.subTCFTD((new Double((String)getValueAt(row,6))).doubleValue());\n\t\t\t\t\t\tsuper.setValueAt(new Double(cft).toString(), row, 11);\n\t\t\t\t\t\tsuper.setValueAt(new Double(cft).toString(), row, 6);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\tsuper.setValueAt(wclass, row, 7);\n\t\t\t\tsuper.setValueAt(new Double(rateclass), row, 8);\n\t\t\t\tConvertLobs.addAmount(amt);\n\t\t\t\tsuper.setValueAt(new Double(amt), row, 10);\n\t\t\t\tConvertLobs.addTCFT(cft);\n\n\t\t\t}\n\n\t\t\tif (col == 12){// get row vector and get tcft\n\t\t\tDouble temp= new Double((String)getValueAt(row, col-1));\n\t\t\tConvertLobs.subTCFT(temp.doubleValue());\n\t\t\tDouble temp1= new Double((String)getValueAt(row, col-2));\n\t\t\tConvertLobs.subAmount(temp1.doubleValue());\n\t\t\tInteger temp2= (Integer)getValueAt(row, col-3);\n\t\t\tConvertLobs.subQuantity(temp2.intValue());\n\t\t\tConvertLobs.sno--;\n\t\t\tfor (int i=row-1; i >= 0; i--) super.setValueAt(new Integer( ((Integer)getValueAt(i,0)).intValue() - 1 ), i, 0);\n\n\t\t\tString cl = (String)getValueAt(row, col-5);//\n\t\t\tif (cl.equals(\"A\")) ConvertLobs.subTCFTA(temp.doubleValue());\n\t\t\tif (cl.equals(\"B\")) ConvertLobs.subTCFTB(temp.doubleValue());\n\t\t\tif (cl.equals(\"C\")) ConvertLobs.subTCFTC(temp.doubleValue());\n\t\t\tif (cl.equals(\"D\")) ConvertLobs.subTCFTD(temp.doubleValue());\n\n\t\t\t\t\t\t\tremoveRow(row);\n\t\t\t}\n\t\t\tif (col == 0){\n\t\t\t\tConvertLobs.sno = ((Integer)getValueAt(row,col)).intValue();\n\t\t\t}\n\n\t\t}", "private void set(int k, PieceColor v) {\n assert validSquare(k);\n _board[k] = v;\n }", "public void setCell(\n final org.edna.mxv1.xsdata.XSDataCell cell) {\n this._cell = cell;\n }", "public FireflyOptimization(int population, int generations, double alpha, double beta0, double gamma){\n this(population, generations, alpha, beta0, gamma, 0.98, 0.05);\n }", "public void setCellForeground(int row, int col, RGB rgbColor){\n\t\tcheckRowIndex(row);\t\n\t\tcheckColumnIndex(col);\n\t\ttableViewer.getTable().getItem(row).setForeground(\n\t\t\t\tcol, CustomMediaFactory.getInstance().getColor(rgbColor));\n\t}", "public boolean setCell(int row, int col, char value) {\n if (this.cells[row][col] instanceof Cell == false) return false;\n this.cells[row][col].setValue(value);\n return true;\n }", "public void setNSignalGamma(java.lang.Long value) {\n this.nSignalGamma = value;\n }", "public void setValueAt(Object value, int row, int col) {\n if (rows != null && row >=0 && row < rows.size()) {\n PredefinedAttributeRow singleRow = (PredefinedAttributeRow) rows.get(row);\n if (singleRow != null) {\n switch (col) {\n case iColName:\n singleRow.setName((String) value); \n break;\n case iColIncluded:\n singleRow.setIncluded((String) value); \n break;\n case iColRequired:\n singleRow.setRequired((String) value); \n default:\n return;\n }\n }\n fireTableCellUpdated(row, col);\n }\n }", "public void setCell(int row, int col, String val) {\n board[row][col] = val;\n }", "private void extendLogGammaRatioCache(int upTo) {\n\t\tif (logGammaRatioCache == null) {\n\t\t\tcomputeLogGammaRatioCache();\n\t\t}\n\t\tfor (int i = indexLastValidLogGammaRatio + 1; i <= upTo; i++) {\n\t\t\tdouble val = logGammaRatioCache.get(i - 1) + FastMath.log((i - 1) + c);\n\t\t\tif (i < logGammaRatioCache.size()) {\n\t\t\t\tlogGammaRatioCache.set(i, (float) val);\n\t\t\t} else {\n\t\t\t\tlogGammaRatioCache.add((float) val);\n\t\t\t}\n\t\t}\n\t\tindexLastValidLogGammaRatio = upTo;\n\t\tlogGammaRatioCache.trimToSize();\n\t}", "protected abstract void setValue(Entity e,FloatTrait t,float value);", "public void setValueAt(Object value, int row, int col) {\r\n pvValues[row][col] = value;\r\n fireTableCellUpdated(row, col);\r\n }", "public void setVega(double value) {\r\n this.vega = value;\r\n }", "private void setFaceValue(FaceValue faceValue) {\n this.faceValue = faceValue;\n }", "public native boolean gammaImage(String gamma) throws MagickException;", "public void setExp ( float exp ) {\n\t\texecute ( handle -> handle.setExp ( exp ) );\n\t}", "public void setFloat(float data, int row, int column) {\n\t\tcolumns[column].setFloat(data, subset[row]);\n\t}", "public void setAlpha(double aAlpha);", "public final void set () {\t\n\t\tsymbol = null;\t\n\t\tmksa = underScore; factor = 1;\n\t\tvalue = 0./0.;\t\t\t// NaN\n\t\toffset = 0.;\n\t}", "public void setGene(int x, double value)\n {\n this.vectOfCoef.set(x, value);\n }", "public void setValueOf( final Object value, final R row, final C columnEnum ) {}", "public void setValueAt(Object value, int row, int col) {\r\n \tswitch(col){\r\n case 0:\r\n \tattributs.get(row).setPk((Boolean)value);\r\n \tbreak;\r\n case 1:\r\n \tSystem.out.println(value);\r\n \tattributs.get(row).setName((String)value);\r\n \tbreak;\r\n case 2:\r\n \tattributs.get(row).setType((String)value);\r\n \tbreak;\r\n case 3:\r\n \tattributs.get(row).setTaille((String)value);\r\n \tbreak;\r\n case 4:\r\n \tattributs.get(row).setNul((Boolean)value);\r\n \tbreak;\r\n case 5:\r\n \tattributs.get(row).setUk((Boolean)value);\r\n \tbreak;\r\n \t\r\n \t}\r\n fireTableCellUpdated(row, col);\r\n }", "private void aretes_aG(){\n\t\tthis.cube[31] = this.cube[14]; \n\t\tthis.cube[14] = this.cube[5];\n\t\tthis.cube[5] = this.cube[41];\n\t\tthis.cube[41] = this.cube[50];\n\t\tthis.cube[50] = this.cube[31];\n\t}", "public void setValueAt(Object value, int row, int col) {\n\t\t// data[row][col] = value;\n\t\tfireTableCellUpdated(row, col);\n\t}", "private void resetFValue(){\r\n int length = _map.get_mapSize();\r\n for(int i=0;i<length;i++){\r\n _map.get_grid(i).set_Fnum(10000);\r\n }\r\n }", "public void setValueAt(Object value, int row, int col) {\r\n this.variableData.get(row).remove(col);\r\n this.variableData.get(row).add(col, value);\r\n fireTableCellUpdated(row, col);\r\n }", "public int setCell(int value){\n int newValue;\n if (isHit(value)){\n newValue = HIT;\n }\n else {\n newValue = MISS;\n }\n return newValue;\n }", "public void setUserCell(String userCell) {\n\t\tthis.userCell = userCell;\n\t}", "void setGreen(int x, int y, int value);", "public void setValue(int row, int col, double value) throws IndexOutOfBoundsException {\r\n matrix[row][col] = value;\r\n }", "public void setMandelbrotColor(Color c) {\r\n mandelbrotColor = c;\r\n }", "public double breitWigner(double arg, double a, double gamma){ \r\n return (2. * gamma / Math.PI) / (4. * Math.pow(arg - a, 2.) + gamma * gamma);\r\n }", "public void setColor(double value) {\r\n\t\tif (value < 0) {\r\n\t\t\tpg.fill(140+(int)(100*(-value)), 0, 0);\r\n\t\t} else {\r\n\t\t\tpg.fill(0, 140+(int)(100*(value)), 0);\r\n\t\t}\r\n\t}", "public static <T extends Cell> void releaseIFNGamma(Grid<Cell> grid, T caller) {\n\t\treleaseSubstanceWithinDistance(grid, caller, M1.class, element -> element.setActive(true));\n\t\treleaseSubstanceWithinDistance(grid, caller, NKCell.class, element -> element.setActive(true));\n\t\t// releaseSubstanceWithinDistance(grid, caller, M2.class, distance, element -> element.setActive(true));\n\t}", "public void setElement(Pair<Integer, Integer> cell, int n){\n\t\tnumbers[cell.getFirst()][cell.getSecond()] = n;\n\t}", "public void setXhat(int row, double value) {\n m_xHat.set(row, 0, value);\n }", "public void setCellState(int i, int j, CellState value) {\n switch (value) {\n case ZERO_CELL: {\n int ZERO_MARK = -1;\n field[i][j] = ZERO_MARK;\n break;\n }\n case CROSS_CELL: {\n int CROSS_MARK = 1;\n field[i][j] = CROSS_MARK;\n break;\n }\n case EMPTY_CELL: {\n field[i][j] = EMPTY_MARK;\n break;\n }\n }\n }", "public void setValueAt(Object val, int row, int col) {\r\n }", "public double evaluate(double x) {\n return gamma(x);\n }" ]
[ "0.737139", "0.71274453", "0.6372475", "0.63341314", "0.6105878", "0.6015967", "0.59595793", "0.5874978", "0.5825455", "0.5816348", "0.5809665", "0.5744929", "0.5602882", "0.55379003", "0.5484628", "0.5434951", "0.5412393", "0.54106677", "0.54030496", "0.5382154", "0.53599787", "0.53583854", "0.53414226", "0.52995735", "0.5295305", "0.5292", "0.5260964", "0.52590823", "0.52457803", "0.5240094", "0.523625", "0.52254736", "0.5206554", "0.52033937", "0.51814646", "0.51530045", "0.51142424", "0.50898826", "0.5078176", "0.50762254", "0.50722426", "0.5070178", "0.5016746", "0.50045365", "0.4999493", "0.4997709", "0.4989293", "0.49869168", "0.49861294", "0.49458024", "0.49429774", "0.49328104", "0.4928015", "0.4927904", "0.49276108", "0.49275398", "0.492016", "0.48873094", "0.48808548", "0.48677146", "0.48676267", "0.48672125", "0.48652962", "0.48640168", "0.4851688", "0.484703", "0.48437572", "0.48402423", "0.48378697", "0.4806458", "0.48048177", "0.4804715", "0.47988", "0.4797651", "0.47852576", "0.47765002", "0.47733167", "0.47731963", "0.4766895", "0.4764172", "0.47621197", "0.47559443", "0.47552824", "0.47544926", "0.47522596", "0.47519785", "0.47403935", "0.47340402", "0.47216907", "0.4721465", "0.47177076", "0.471488", "0.4713402", "0.47128412", "0.47073072", "0.4706389", "0.46954334", "0.4684685", "0.4679937", "0.46794838" ]
0.57976955
11
a list of object ID's, freq list of values of probabilities Create and fill the prefix array
public static int customizedRandom(int[] a, Map<String, Integer> expectedNumbers, List<String> neighbours) { int[] prefix = new int[a.length]; prefix[0] = expectedNumbers.getOrDefault(neighbours.get(0), 0); for (int i = 1; i < a.length; i++) { prefix[i] = expectedNumbers.get(neighbours.get(i - 1)) + expectedNumbers.get(neighbours.get(i)); } //Math.random() is [0, 1) => r [prefix[0], prefix[len - 1]) int r = (int) (Math.random() * prefix[a.length - 1]) + prefix[0]; //findCeil convert the random value to index of original array. int indexCeil = findCeil(prefix, r, 0, a.length - 1); if(indexCeil>=a.length) return a[a.length-1]; else if(indexCeil<=0) return a[0]; return a[indexCeil]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "public static void getPerms(HashMap<Character,Integer> freqMap,String prefix,int length,ArrayList<String> result) {\n if(length==0) {\n result.add(prefix);\n return;\n }\n for(Character c:freqMap.keySet()){\n Integer count= freqMap.get(c);\n if(count>0){\n freqMap.put(c,count-1);\n getPerms(freqMap,prefix+c,length-1,result);\n freqMap.put(c,count);\n }\n\n }\n }", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "private void collectTripFrequencyDistribution(Map<Integer, HouseholdType> householdTypeBySampleId) {\n initializeFrequencyArrays(householdTypeBySampleId);\n fillFrequencyArrays(householdTypeBySampleId);\n }", "private CounterDistribution distribution(long... values) {\n CounterDistribution dist = CounterDistribution.empty();\n for (long value : values) {\n dist = dist.addValue(value);\n }\n\n return dist;\n }", "public static void getFreq(){\n\t\t\tint mutTotalcounter=0;\n\t\t\t\n\t\t\tfor(int i=0; i<numOfMutations.length-1; i++){\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]==numOfMutations[i+1]){\n\t\t\t\t\tfrequency[mutTotalcounter]+=1; //if number of mutation is repeated in original array, frequency is incremented\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]!=numOfMutations[i+1])\n\t\t\t\t{\n\t\t\t\t\tmutTotal[mutTotalcounter++]=numOfMutations[i]; //if number is not repeated in array, the next element in array\n\t\t\t\t\t//becomes the next number of mutations that occurred\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((i+1)==numOfMutations.length-1){\n\t\t\t\t\t//used to get the last element in original array since for loop will go out of bounds\n\t\t\t\t\tmutTotal[mutTotalcounter]=numOfMutations[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"XMut : YFreq\");\n\t\t\t//console display of mutation and frequency values\n\t\t\tfor (int i=0; i<=mutTotal.length-1;i++){\n\t\t\t\tif(mutTotal[i]==0 && frequency[i]==0) continue;\n\t\t\t\tfrequency[i]+=1;\n\t\t\t\tSystem.out.print(mutTotal[i]+\" : \");\n\t\t\t\tSystem.out.print(frequency[i]);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "public static Map mapearFreqObj(List objetos) {\r\n Map<String, Integer> contFreq = new HashMap<>();\r\n Iterator<Integer> it = objetos.iterator();\r\n while (it.hasNext()) {\r\n Object obj = it.next();\r\n int frequency = Collections.frequency(objetos, obj);\r\n contFreq.put(String.valueOf(obj), frequency);\r\n }\r\n\r\n return contFreq;\r\n\r\n }", "private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tdoc.getValue().words.forEach((w, o) -> words.add(w));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (Entry<String, Double> e : new HashMap<>(Idf).entrySet()){\r\n\t\t\tIdf.put(e.getKey(),\r\n\t\t\t\t\tMath.log(Idf.keySet().size() / e.getValue()));\r\n\t\t}\r\n\t}", "private Queue<HuffmanNode> ArrayHuffmanCodeCreator(Queue<HuffmanNode> frequencies) {\n while (frequencies.size() > 1) {\n HuffmanNode first = frequencies.poll();\n HuffmanNode second = frequencies.poll();\n HuffmanNode tempNode = new \n HuffmanNode(first.getFrequency() + second.getFrequency());\n tempNode.left = first;\n tempNode.right = second;\n frequencies.add(tempNode);\n }\n return frequencies;\n }", "public static void main(String[] args) {\n\t\tArrayList<Prefix> prefixList = PrefixUtil.readPrefixList(PrefixUtil.prefixListFile, 1);\n\t\tint numPrior = 6;\n\t\tDenseMatrix prior = new DenseMatrix(prefixList.size(), numPrior);\n\t\tint[] label1 = new int[]{5, 9, 13, 17, 21};\n\t\tint[] label2 = new int[]{21, 17, 13, 9, 5};\n\t\t\n\t\tfor(int i = 0; i < prefixList.size(); i++){\n\t\t\tif(GenerateRatingData.contains(prefixList.get(i), label1[0])){\n\t\t\t\tprior.set(i, 0, 5);\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label1[1])){\n\t\t\t\tprior.set(i, 0, 4);\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label1[2])){\n\t\t\t\tprior.set(i, 0, 3);\t\t\t\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label1[3])){\n\t\t\t\tprior.set(i, 0, 2);\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label1[4])){\n\t\t\t\tprior.set(i, 0, 1);\n\t\t\t}\n\t\t\telse\n\t\t\t\tprior.set(i, 0, 3);\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < prefixList.size(); i++){\n\t\t\tif(GenerateRatingData.contains(prefixList.get(i), label2[0])){\n\t\t\t\tprior.set(i, 1, 5);\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label2[1])){\n\t\t\t\tprior.set(i, 1, 4);\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label2[2])){\n\t\t\t\tprior.set(i, 1, 3);\t\t\t\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label2[3])){\n\t\t\t\tprior.set(i, 1, 2);\n\t\t\t}\n\t\t\telse if (GenerateRatingData.contains(prefixList.get(i), label2[4])){\n\t\t\t\tprior.set(i, 1, 1);\n\t\t\t}\n\t\t\telse\n\t\t\t\tprior.set(i, 1, 3);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < prefixList.size(); i++){\n\t\t\tif(checkBack(prefixList.get(i))){\n\t\t\t\tprior.set(i, 2, 5);\n\t\t\t\tprior.set(i, 3, 1);\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprior.set(i, 2, 1);\n\t\t\t\tprior.set(i, 3, 5);\n\t\t\t}\n\t\t\t\n\t\t\tif(checkLoop(prefixList.get(i))){\n\t\t\t\tprior.set(i, 4, 5);\n\t\t\t\tprior.set(i, 5, 1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprior.set(i, 4, 1);\n\t\t\t\tprior.set(i, 5, 5);\n\t\t\t}\n\t\t}\n\t\t\n\t\tCommonUtil.printObject(prior, \"prior.txt\");\n\t\t\n\t}", "private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){\n\t\tfor (int i = 0; i < tfMap.size(); i++) {\n\t\t\tList<Map<String,List<Double>>> gestureDocument = tfMap.get(i);\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String,List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();\n\t\t\t\t while (it.hasNext()) {\n\t\t\t\t Map.Entry<String,Integer> pairs = (Map.Entry)it.next(); \n\t\t\t\t if(getTfIDFMapGlobal().containsKey(pairs.getKey()))\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);\n\t\t\t\t else\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), 1);\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "public static int[] sample(int numOfParticles, double probabilities[], int count) {\r\n\t\tint frequency[] = new int[numOfParticles];\r\n\t\tint singletons[] = new int[numOfParticles];\r\n\t\tdouble total = 0.0;\r\n\t\tfor (int i = 0; i < numOfParticles; i++) {\r\n\t\t\tfrequency[i] = 0;\r\n\t\t\tsingletons[i] = i;\r\n\t\t\t// if (Double.isNaN(probabilities[i])) {\r\n\t\t\t// probabilities[i] = 0.0;\r\n\t\t\t// }\r\n\t\t\ttotal += probabilities[i];\r\n\t\t}\r\n\t\tif (total == 0.0) {\r\n\t\t\tfor (int i = 0; i < numOfParticles; i++)\r\n\t\t\t\tprobabilities[i] = 1.0 / numOfParticles;\r\n\t\t}\r\n\t\tEnumeratedIntegerDistribution distribution = new EnumeratedIntegerDistribution(singletons, probabilities);\r\n\t\tfor (int i = 0; i < count; i++) {\r\n\t\t\tint x = distribution.sample();\r\n\t\t\tfrequency[x] += 1;\r\n\t\t}\r\n\r\n\t\treturn frequency;\r\n\t}", "private void genProbes(int numProbes) {\n if (numProbes == 0) {\n return;\n }\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n float ratio = (float) numProbes / size;\n\n layoutPanel.probedNList = getRegularPointsIndex(ratio);\n }", "public void setFrequencies(Set<Frequency> arg0) {\n \n }", "public static void getOriginalFrequencies(double[] f)\n {\n f[0] = 0.0866;\n f[1] = 0.0440;\n f[2] = 0.0391;\n f[3] = 0.0570;\n f[4] = 0.0193;\n f[5] = 0.0367;\n f[6] = 0.0581;\n f[7] = 0.0833;\n f[8] = 0.0244;\n f[9] = 0.0485;\n f[10] = 0.0862;\n f[11] = 0.0620;\n f[12] = 0.0195;\n f[13] = 0.0384;\n f[14] = 0.0458;\n f[15] = 0.0695;\n f[16] = 0.0610;\n f[17] = 0.0144;\n f[18] = 0.0353;\n f[19] = 0.0709;\n }", "public static void docWtgArray() {\n int docCount = 0;\n\n while(docCount<totaldocument) {\n List<Double> pass = new ArrayList();\n for(Entry<String,List<Double>> entry : wtgMap.entrySet()) {\n List<Double> docList = new ArrayList();\n docList = entry.getValue();\n double temp = docList.get(docCount);\n pass.add(temp);\n }\n\n double answer = CosineSimilarity(pass,query);\n if(answer >= alpha) {\n DocID.put(docCount,answer);\n }\n docCount++;\n }\n }", "public static List<MutFreqDetailRecord> create(List<MutationFrequency> freqList) {\n double maxFrequency = freqList.get(0).getFrequency();\n List<MutFreqDetailRecord> recordList = new ArrayList<MutFreqDetailRecord>(freqList.size());\n\n for (MutationFrequency freq : freqList) {\n long mutationIndex = freq.getMutation().getIndex();\n double rawFrequency = freq.getFrequency();\n double normFrequency = rawFrequency / maxFrequency;\n\n recordList.add(new MutFreqDetailRecord(mutationIndex, rawFrequency, normFrequency));\n }\n\n return recordList;\n }", "private void buildProbTree() {\n\t\tif (probArray_ == null)\n\t\t\tprobArray_ = new double[elementArray_.length];\n\t\t// Iterate through the items\n\t\tdouble sumProb = 0;\n\t\tfor (int i = 0; i < elementArray_.length; i++) {\n\t\t\tif (sumProb >= 1)\n\t\t\t\tbreak;\n\n\t\t\tsumProb += itemProbs_.get(elementArray_[i]);\n\t\t\tprobArray_[i] = sumProb;\n\t\t}\n\t\trebuildProbs_ = false;\n\t}", "private void CreateFreq(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr) {\n for (int key : freqY.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FY.append(\"/\");\n FY.append(auxs);\n auxs = Integer.toBinaryString(freqY.get(key));\n FY.append(\"/\");\n FY.append(auxs);\n }\n\n for (int key : freqCb.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCB.append(\"/\");\n FCB.append(auxs);\n auxs = Integer.toBinaryString(freqCb.get(key));\n FCB.append(\"/\");\n FCB.append(auxs);\n }\n\n for (int key : freqCr.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCR.append(\"/\");\n FCR.append(auxs);\n auxs = Integer.toBinaryString(freqCr.get(key));\n FCR.append(\"/\");\n FCR.append(auxs);\n }\n FCR.append(\"/\");\n }", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "protected static Object[] calcGainRatios(InstanceList ilist, int[] instIndices, int minNumInsts)\n {\n int numInsts = instIndices.length;\n Alphabet dataDict = ilist.getDataAlphabet();\n LabelAlphabet targetDict = (LabelAlphabet) ilist.getTargetAlphabet();\n double[] targetCounts = new double[targetDict.size()];\n\n // Accumulate target label counts and make sure\n // the sum of each instance's target label is 1\n for (int ii = 0; ii < numInsts; ii++) {\n Instance inst = ilist.get(instIndices[ii]);\n Labeling labeling = inst.getLabeling();\n double labelWeightSum = 0;\n for (int ll = 0; ll < labeling.numLocations(); ll++) {\n int li = labeling.indexAtLocation(ll);\n double labelWeight = labeling.valueAtLocation(ll);\n labelWeightSum += labelWeight;\n targetCounts[li] += labelWeight;\n }\n assert(Maths.almostEquals(labelWeightSum, 1));\n }\n\n // Calculate the base entropy Info(D) and the the \n // label distribution of the given instances\n double[] targetDistribution = new double[targetDict.size()];\n double baseEntropy = 0;\n for (int ci = 0; ci < targetDict.size(); ci++) {\n double p = targetCounts[ci] / numInsts;\n targetDistribution[ci] = p;\n if (p > 0)\n baseEntropy -= p * Math.log(p) / log2;\n }\n\n LabelVector baseLabelDistribution = new LabelVector(targetDict, targetDistribution);\n double infoGainSum = 0;\n int totalNumSplitPoints = 0;\n double[] passTestTargetCounts = new double[targetDict.size()];\n // Maps feature index -> Hashtable, and each table \n // maps (split point) -> (info gain, split ratio)\n HashMap[] featureToInfo = new HashMap[dataDict.size()]; \n \n // Go through each feature's split points in ascending order\n for (int fi = 0; fi < dataDict.size(); fi++) {\n \n if ((fi+1) % 1000 == 0)\n logger.info(\"at feature \" + (fi+1) + \" / \" + dataDict.size());\n \n featureToInfo[fi] = new HashMap();\n Arrays.fill(passTestTargetCounts, 0);\n // Sort instances on this feature's values\n instIndices = sortInstances(ilist, instIndices, fi);\n\n // Iterate through the sorted instances\n for (int ii = 0; ii < numInsts-1; ii++) {\n Instance inst = ilist.get(instIndices[ii]);\n Instance instPlusOne = ilist.get(instIndices[ii+1]);\n FeatureVector fv1 = (FeatureVector) inst.getData();\n FeatureVector fv2 = (FeatureVector) instPlusOne.getData();\n double lower = fv1.value(fi);\n double higher = fv2.value(fi);\n\n // Accumulate the label weights for instances passing the test\n Labeling labeling = inst.getLabeling();\n for (int ll = 0; ll < labeling.numLocations(); ll++) {\n int li = labeling.indexAtLocation(ll);\n double labelWeight = labeling.valueAtLocation(ll);\n passTestTargetCounts[li] += labelWeight;\n }\n\n if (Maths.almostEquals(lower, higher) || inst.getLabeling().toString().equals(instPlusOne.getLabeling().toString()))\n continue;\n\n // For this (feature, spilt point) pair, calculate the \n // info gain of using this pair to split insts into those \n // with value of feature <= p versus > p\n totalNumSplitPoints++;\n double splitPoint = (lower + higher) / 2;\n double numPassInsts = ii+1;\n \n // If this split point creates a partition \n // with too few instances, ignore it\n double numFailInsts = numInsts - numPassInsts;\n if (numPassInsts < minNumInsts || numFailInsts < minNumInsts)\n continue;\n \n // If all instances pass or fail this test, it is useless\n double passProportion = numPassInsts / numInsts;\n if (Maths.almostEquals(passProportion, 0) || Maths.almostEquals(passProportion, 1))\n continue; \n \n // Calculate the entropy of instances passing and failing the test\n double passEntropy = 0;\n double failEntropy = 0;\n double p;\n \n for (int ci = 0; ci < targetDict.size(); ci++) {\n if (numPassInsts > 0) {\n p = passTestTargetCounts[ci] / numPassInsts;\n if (p > 0)\n passEntropy -= p * Math.log(p) / log2;\n }\n if (numFailInsts > 0) {\n double failTestTargetCount = targetCounts[ci] - passTestTargetCounts[ci];\n p = failTestTargetCount / numFailInsts;\n if (p > 0)\n failEntropy -= p * Math.log(p) / log2;\n }\n }\n \n // Calculate Gain(D, T), the information gained \n // by testing on this (feature, split-point) pair\n double gainDT = baseEntropy \n - passProportion * passEntropy\n - (1-passProportion) * failEntropy; \n infoGainSum += gainDT;\n // Calculate Split(D, T), the split information\n double splitDT = \n - passProportion * Math.log(passProportion) / log2\n - (1-passProportion) * Math.log(1-passProportion) / log2;\n // Calculate the gain ratio\n double gainRatio = gainDT / splitDT;\n featureToInfo[fi].put(Double.valueOf(splitPoint),\n new Point2D.Double(gainDT, gainRatio));\n } // End loop through sorted instances\n } // End loop through features\n\n // For each feature's split point with at least average gain, \n // get the maximum gain ratio and the associated split point\n // (using the info gain as tie breaker)\n double[] gainRatios = new double[dataDict.size()];\n double[] splitPoints = new double[dataDict.size()];\n int numSplitsForBestFeature = 0;\n\n // If all feature vectors are identical or no splits are worthy, return all 0s\n if (totalNumSplitPoints == 0 || Maths.almostEquals(infoGainSum, 0))\n return new Object[] {gainRatios, splitPoints, Double.valueOf(baseEntropy), \n baseLabelDistribution, Integer.valueOf(numSplitsForBestFeature)};\n\n double avgInfoGain = infoGainSum / totalNumSplitPoints;\n double maxGainRatio = 0;\n double gainForMaxGainRatio = 0; // tie breaker\n \n int xxx = 0;\n \n \n for (int fi = 0; fi < dataDict.size(); fi++) {\n double featureMaxGainRatio = 0;\n double featureGainForMaxGainRatio = 0;\n double bestSplitPoint = Double.NaN;\n\n for (Iterator iter = featureToInfo[fi].keySet().iterator(); iter.hasNext(); ) {\n Object key = iter.next();\n Point2D.Double pt = (Point2D.Double) featureToInfo[fi].get(key);\n double splitPoint = ((Double) key).doubleValue();\n double infoGain = pt.getX();\n double gainRatio = pt.getY();\n\n if (infoGain >= avgInfoGain) {\n if (gainRatio > featureMaxGainRatio || (gainRatio == featureMaxGainRatio && infoGain > featureGainForMaxGainRatio)) {\n featureMaxGainRatio = gainRatio;\n featureGainForMaxGainRatio = infoGain;\n bestSplitPoint = splitPoint;\n }\n }\n else {\n xxx++;\n }\n \n }\n assert(! Double.isNaN(bestSplitPoint));\n gainRatios[fi] = featureMaxGainRatio;\n splitPoints[fi] = bestSplitPoint;\n\n if (featureMaxGainRatio > maxGainRatio || (featureMaxGainRatio == maxGainRatio && featureGainForMaxGainRatio > gainForMaxGainRatio)) {\n maxGainRatio = featureMaxGainRatio;\n gainForMaxGainRatio = featureGainForMaxGainRatio;\n numSplitsForBestFeature = featureToInfo[fi].size();\n }\n }\n \n logger.info(\"label distrib:\\n\" + baseLabelDistribution);\n logger.info(\"base entropy=\" + baseEntropy + \", info gain sum=\" + infoGainSum + \", total num split points=\" + totalNumSplitPoints + \", avg info gain=\" + avgInfoGain + \", num splits with < avg gain=\" + xxx);\n \n return new Object[] {gainRatios, splitPoints, Double.valueOf(baseEntropy), \n baseLabelDistribution, Integer.valueOf(numSplitsForBestFeature)};\n }", "public static String generateID(String prefix) {\n if(prefix.length()!=3){\n prefix = prefix.substring(0,3);\n }\n /*Solo en el caso de que queramos reciclar los IDs\n for (ID a : EmptyIDs) {\n if (a.getType().equals(prefix)) {\n EmptyIDs.remove(a);\n return prefix+\"#\" + a.getNumVal();\n }\n }*/\n //Tenemos guardado el id mas alto y lo incrementamos cada vez que creamos uno nuevo (asumiendo que no se recicla)\n for (ID max : MaxIDs) {\n if (max.getType().equals(prefix)) {\n max.increment();\n return prefix +\"#\"+ max.getNumVal();\n }\n }\n return prefix + \"#1\";\n }", "public static void createArrays() {\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint size = rand.nextInt(5) + 5;\r\n\t\t\tTOTAL += size;\r\n\t\t\tArrayList<Integer> numList = new ArrayList<>();\r\n\t\t\tfor (int j = 0; j < size; j++) {\r\n\t\t\t\tint value = rand.nextInt(1000) + 1;\r\n\t\t\t\tnumList.add(value);\r\n\t\t\t}\r\n\t\t\tCollections.sort(numList);\r\n\t\t\tarrayMap.put(i + 1, numList);\r\n\t\t}\r\n\t}", "public void resetProbs() {\n\t\t// Set all probabilities to one.\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\titemProbs_.put(element, 1.0 / itemProbs_.size());\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}", "AdaptiveProbMap(int n, int rate) \n {\n this.rate = rate;\n this.data = new int[n*33];\n\n for (int i=0, k=0; i<n; i++, k+=33)\n {\n for (int j=0; j<33; j++)\n this.data[k+j] = (i == 0) ? Global.squash((j-16)<<7) << 4 : this.data[j];\n }\n }", "void fillLabelHash() {\n log.debug(\" begin fillLabelHash\");\n for (int v = 0; v < vertices.length; v++) {\n log.debug(\" ---- process vertex \" + v);\n System.err.println(\" ---- process vertex \" + v);\n\n HammingVertex vertex = vertices[v];\n\n // all users of the array MUST use exactly the same algorithm lookup sequence\n int missingBitsVertexMapsIndex = 0;\n\n for (int i = 0; i < (labelSize - 1); i++) {\n for (int j = (i + 1); j < labelSize; j++) {\n\n Map missingBitsVertexMap = missingBitsVertexMaps[missingBitsVertexMapsIndex];\n if (missingBitsVertexMap == null) {\n missingBitsVertexMap = new HashMap<Integer, List<Integer>>();\n missingBitsVertexMaps[missingBitsVertexMapsIndex] = missingBitsVertexMap;\n }\n int compressedLabel = vertex.labelWithoutMissingBitsAsInt(i, j);\n List<Integer> list = (List<Integer>) missingBitsVertexMap.get(compressedLabel);\n if (list == null) {\n list = new LinkedList<Integer>();\n missingBitsVertexMap.put(compressedLabel, list);\n }\n list.add(vertex.vertexNumber);\n\n // next missing bit hashMap in sequence\n missingBitsVertexMapsIndex++;\n }\n }\n }\n }", "private Countable[] generateArray(int rank){\n var numbers = new Countable[rank];\n for (int i = 0; i < rank; i++) {\n numbers[i] = getRandomCountable();\n }\n return numbers;\n }", "private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "static void sortByFreq(int arr[], int n){\n Map<Integer, Integer> map = new HashMap<>(); \n List<Integer> outputArray = new ArrayList<>(); \n \n // Assign elements and their count in the list and map \n for (int current : arr) { \n int count = map.getOrDefault(current, 0); \n map.put(current, count + 1); \n outputArray.add(current); \n } \n \n // Compare the map by value \n SortComparator comp = new SortComparator(map); \n \n // Sort the map using Collections CLass \n Collections.sort(outputArray, comp); \n \n // Final Output \n for (Integer i : outputArray) { \n System.out.print(i + \" \"); \n }\n }", "public static void couponNumber(long arr[])\n\t{\n\n\t\tfor(int i=0;i<arr.length;i++) \n\t\t{\n\t\t\tarr[i]=(int)(Math.random()*1000000000+1000000000);\n\t\t}\n\t\tfor(int i=0;i<arr.length;i++) \n\t\t{\n\t\t\tSystem.out.println(arr[i]+\" \");\n\t\t}\n\t}", "private void setBondFrequencyAttributes( IBond hsBond, IBond newBond, boolean increment ) {\n\t\t\n\t\tif( hsBond != null /*&& hsBond.getProperty(bondFrequencyType) != null*/ ) { \n\t\t\t\n\t\t\tif( increment ) {\n\t\t\t\tint freq = (Integer) hsBond.getProperty(bondFrequencyType);\n\t\t\t\tnewBond.setProperty(bondFrequencyType, freq + 1 );\n\t\t\t\thsBond.setProperty(bondFrequencyType, freq + 1 );\n\t\t\t} else {\n\t\t\t\tnewBond.setProperty(bondFrequencyType, (Integer) hsBond.getProperty(bondFrequencyType) );\n\t\t\t}\n\t\t} else {\n\t\t\tnewBond.setProperty(bondFrequencyType, 1 );\n\t\t\t//System.err.println(\"HSB null freq\");\n\t\t}\n\t\t\n\n\t\t//newBond.setProperty( topologyType, bondTopologyType );\n\n\t\tif( queryMolId > 0 ) {\n\t\t\tList<Integer> molOrigins = null;\n\t\t\t\n\t\t\tif( hsBond != null && hsBond.getProperty(bondMolOriginType) != null ) {\n\t\t\t\tmolOrigins = (List<Integer>) hsBond.getProperty(bondMolOriginType);\n\t\t\t\t\n\t\t\t\tif( increment )\n\t\t\t\t\tmolOrigins.add( queryMolId );\n\t\t\t\t//System.out.println(\"molOrigins - \" + molOrigins);\n\t\t\t} else {\n\t\t\t\tmolOrigins = new ArrayList<Integer>(10);\n\t\t\t\tmolOrigins.add( queryMolId );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tnewBond.setProperty(bondMolOriginType, molOrigins);\n\t\t}\n\t}", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);", "private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}", "public static int[] f_fill_vector_age_people(int N){\n int[] v_vector_age= new int[N];\n for(int i=0; i<N; i++){\n\n v_vector_age[i]= (int) (Math.random()*100)+1;\n\n }\n return v_vector_age;\n }", "@Override\n \tpublic double[] getdata(List<Pair<String, String>> alin, MoleculeManager manager, GapManager gap) {\n \n \n \tdouble S_max;\n \tdouble[][] p;\n \tdouble[] data;\n \tint N;\n \tint Len;\n \tint n_seqs=0;\n \n \tn_seqs = alin.size();\n \t\n \tLen = alin.get(0).getSecond().length();\n \tN = manager.alphabetSize();\n \t\n \tp = new double[Len][N];\n \t\n \tS_max = Math.log(N)/Math.log(2);\n \t\n \tp = getFreq(p,alin,n_seqs, manager.alphabet()); \n \n \tdata = new double[Len];\n \t\n \tfor (int i = 0; i < data.length; i++) {\n \t\t\n \t\tdouble s_obs=0;\n \t\t\n \t\tdouble freqSum = 0; \n \n \t\tfor (int j = 0; j < N; j++) {\n \t\t\t\n \t\t\tif (p[i][j]!= 0 ) { \n \t\t\t\t\n \t\t\t\ts_obs = s_obs + p[i][j] * Math.log(p[i][j]) / Math.log(2);\n \t\t\t\t\n \t\t\t\tfreqSum = gap.attempToSumFreq(freqSum, p[i][j]) ;\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[i] = (S_max + s_obs) * freqSum / S_max;\n \t}\n \n \treturn data;\n }", "public GraphResultNormalPrefix(int ID, int prefixID, int[][] suffix, IndexSearcherPrefix index){\n\t\tsuper(ID, null);\n\t\tthis.prefixID = prefixID;\n\t\tthis.suffix = suffix;\n\t\tif(prefixID!=-1){\n\t\t\tint[][] prefix = index.getTotalLabel(prefixID);\n\t\t\tif(suffix!=null){\n\t\t\t\tint[][] gString = new int[prefix.length + suffix.length][];\n\t\t\t\tfor(int i = 0; i< prefix.length; i++)\n\t\t\t\t\tgString[i] = prefix[i];\n\t\t\t\tfor(int j = 0; j< suffix.length; j++)\n\t\t\t\t\tgString[prefix.length + j] = suffix[j];\n\t\t\t\tthis.g = MyFactory.getDFSCoder().parse(gString, MyFactory.getGraphFactory());\n\t\t\t}\n\t\t\telse this.g =MyFactory.getDFSCoder().parse(prefix, MyFactory.getGraphFactory()); \n\t\t}\n\t\telse{\n\t\t\tif(suffix!=null)\n\t\t\t\tthis.g = MyFactory.getDFSCoder().parse(suffix, MyFactory.getGraphFactory());\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Exception: both prefix & suffix are null\");\n\t\t\t\tthis.g = null;\n\t\t\t}\n\t\t}\n\t}", "void createIndex(){\n int index=0;\n for(int i=0;i<ancogs.size();i++)\n if(!cogToIndex.containsKey(ancogs.get(i).getValue2()))\n cogToIndex.put(ancogs.get(i).getValue2(), index++);\n}", "protected static double[] getFrequencies(List<Sequence> sequences) {\n return getFrequenciesMaybeSafe(sequences, false);\n }", "private int[] assign(List<T> medoids, List<T> data) {\n\t\tint[] out = new int[data.size()];\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tdouble bestDistance = dm.measure(data.get(i), medoids.get(0));\n\t\t\tint bestIndex = 0;\n\t\t\tfor (int j = 1; j < medoids.size(); j++) {\n\t\t\t\tdouble tmpDistance = dm.measure(data.get(i), medoids.get(j));\n\t\t\t\tif (tmpDistance < bestDistance) {\n\t\t\t\t\tbestDistance = tmpDistance;\n\t\t\t\t\tbestIndex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout[i] = bestIndex;\n\n\t\t}\n\t\treturn out;\n\n\t}", "private HashMap<Integer, HashMap<String,String>> getAllFrequencies() {\n HashMap<Integer,HashMap<String,String>> freq\n = dbController.getAllFrequencies();\n if (freq == null)\n return null;\n HashMap<Integer, HashMap<String, String>> response = new HashMap<Integer, HashMap<String, String>>();\n int i = 2;\n //Passing on any frequency and creates a message to send\n for (Map.Entry<Integer,HashMap<String,String>> objs : freq.entrySet()){\n HashMap<String,String> obj = objs.getValue();\n\n response.put(i, new HashMapBuilder<String, String>().put(\"name\", obj.get(\"name\"))\n .put(\"frequency\",obj.get(\"frequency\")).build());\n i++;\n }\n return response;\n }", "private void extendTable() {\n\n FreqNode[] freqTable = frequencyTable;//create temp table\n numNodes = 0; //set nodes to 0 \n FreqNode tmpNode; //temp variable\n frequencyTable = new FreqNode[frequencyTable.length * 2];//doubles the size \n\n //for every element in the table \n for (FreqNode node : freqTable) {\n //set the node \n tmpNode = node;\n while (true) {\n //if the node currently has a value \n if (tmpNode == null) {\n break;\n }//else \n else {\n //place the key and value at the current position\n this.put(tmpNode.getKey(), tmpNode.getValue());\n tmpNode = tmpNode.getNext();\n }//end else\n }//end while \n }//end for \n }", "public HuffmanCode(int[] frequencies) {\n Queue<HuffmanNode> nodeFrequencies = new PriorityQueue<HuffmanNode>();\n for (int i = 0; i < frequencies.length; i++) {\n if (frequencies[i] > 0) {\n nodeFrequencies.add(new HuffmanNode(frequencies[i], (char) i));\n }\n }\n nodeFrequencies = ArrayHuffmanCodeCreator(nodeFrequencies);\n this.front = nodeFrequencies.peek();\n }", "public void fill(ArrayList<LottoDay> list)\n\t{\n\t\tint[] numF = new int [48];//store occurrences for lotto numbers\n\t\tint [] megaF = new int [28]; //store occurrences for mega numbers\n\t\tint[] check = new int [5]; // stores each objects 5 numbers\n\t\tint counter =0; //counts occurrences\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i); //get object\n\t\t\tcheck = one.getWNum(); //gets 5 numbers of the object\n\t\t\tfor(int j=0; j<numF.length;j++)\n\t\t\t{\n\t\t\t\tfor(int k =0; k<check.length;k++)\n\t\t\t\t{\n\t\t\t\t\t//if number equals index\n\t\t\t\t\tif(check[k]==j)\n\t\t\t\t\t{\n\t\t\t\t\t\tcounter++; //add one to count\n\t\t\t\t\t\tnumF[j]=counter+numF[j]; //add one to occurrence\n\t\t\t\t\t\tcounter=0;//reset counter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get object\n\t\t\tmega= one.getMega();//get mega number\n\t\t\tfor(int j=0; j<megaF.length;j++)\n\t\t\t{\n\t\t\t\t// if mega number equals index\n\t\t\t\tif(mega==j)\n\t\t\t\t{\n\t\t\t\t\tcounter++;//add one to count\n\t\t\t\t\tmegaF[j]=counter+megaF[j]; //add one to occurrence\n\t\t\t\t\tcounter=0;//reset counter\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\tfor(int i=0; i<numF.length; i++)\n\t\t{\n\t\t\tnumber.put(i,numF[i]);//put all lotto numbers with occurrences\n\n\t\t}\n\t\tfor(int i=0; i<megaF.length; i++)\n\t\t{\n\t\t\tmegaN.put(i, megaF[i]);//put all mega numbers with occurrences\n\t\t}\n\t}", "public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static List<MeanWithClusterProbAggregator> map(GmmPartitionData data, int countOfComponents) {\n List<MeanWithClusterProbAggregator> aggregators = new ArrayList<>();\n for (int i = 0; i < countOfComponents; i++)\n aggregators.add(new MeanWithClusterProbAggregator());\n\n for (int i = 0; i < data.size(); i++) {\n for (int c = 0; c < countOfComponents; c++)\n aggregators.get(c).add(data.getX(i), data.pcxi(c, i));\n }\n\n return aggregators;\n }", "private static int[][] defGenesOrder(int size) {\r\n int[][] order = new int[1][size];\r\n for (int i=0; i<order[0].length; i++) {\r\n order[0][i] = i;\r\n }\r\n return order;\r\n }", "public void fillBins() {\n\t\t// grab our current data and then transpose it\n\t\tList<List<String>> currentData = dc.getDataFold().get(currentFold);\n\t\tList<List<String>> tranData = dc.transposeList(currentData);\n\t\tfor (int row = 0; row < tranData.size(); row++) {\n\t\t\t// for each row of attribute values, discretize it\n\t\t\tList<Double> procData = new ArrayList<>();\n\t\t\t// for each String of raw data, convert it into a value to place into a bin\n\t\t\tfor (String rawData : tranData.get(row)) {\n\t\t\t\tif (rawData.chars().allMatch(Character::isDigit) || rawData.contains(\".\")) {\n\t\t\t\t\tprocData.add(Double.parseDouble(rawData));\n\t\t\t\t} else {\n\t\t\t\t\t// not perfect, but useable in the small domain of values we use for data\n\t\t\t\t\tprocData.add((double) rawData.hashCode());\n\t\t\t\t} // end if-else\n\t\t\t} // end for\n\n\t\t\t// for each value we have, place it into a corresponding bin\n\t\t\tfor (double value : procData) {\n\t\t\t\tfor (Bin bin : attribBins.get(row)) {\n\t\t\t\t\tif (bin.binContains(value)) {\n\t\t\t\t\t\tbin.incrementFreq();\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\t}", "public void expand(ArrayList<Integer> ids) {\n \n arrAttInfos = new ArrayList<ArrayAttributeInfo>();\n for (int i = 0; i < ids.size(); i++) {\n ArrayAttributeInfo aai = new ArrayAttributeInfo(ids.get(i));\n arrAttInfos.add(aai);\n }\n \n }", "NoteCircle(Tone[] id, Prefix[] prefixes) {\n assert id.length == prefixes.length;\n this.notes = new LinkedHashMap<>();\n for (int i = 0; i < id.length; i++) {\n this.notes.put(id[i], prefixes[i]);\n }\n }", "final void randomizePrefix() {\n byte[] cb = new byte[preLen];\n\n // Use SecureRandom for prefix only\n SRAND.nextBytes(cb);\n\n for (int i = 0; i < preLen; i++) {\n pre[i] = digits[(cb[i] & 0xFF) % base];\n }\n }", "public static void main(String args[]){\r\n\t\t\r\n\t\t\r\n\t\tint arr[] = {2,5,2,8,5,6,8,8};\r\n\t\t\r\n\t\tMap<Integer, Integer> freqMap = new LinkedHashMap<Integer,Integer>();\r\n\t\t\r\n\t\tfor(int i = 0; i< arr.length;i++){\r\n\t\t\tif(freqMap.containsKey(arr[i])){\r\n\t\t\t\tint count = freqMap.get(arr[i]);\r\n\t\t\t\tfreqMap.put(arr[i],count + 1);\r\n\t\t\t}else{\r\n\t\t\t\tfreqMap.put(arr[i], 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//2-2,5-2,6-1,8-3\r\n\t\t\r\n\t\tMap<Integer,ArrayList<Integer>> sortedList = new TreeMap<Integer, ArrayList<Integer>>(new Comparator<Integer>(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn arg1.compareTo(arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tfor(Entry<Integer, Integer> entry : freqMap.entrySet()){\r\n\t\t\tint key = entry.getKey();\r\n\t\t\tint val = entry.getValue();\r\n\t\t\tif(sortedList.containsKey(val)){\r\n\t\t\t\tArrayList<Integer> list = sortedList.get(val);\r\n\t\t\t\tfor(int j = 0; j<val ; j++)\r\n\t\t\t\t\tlist.add(key);\r\n\t\t\t}else{\r\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\t\t\tfor(int j = 0; j<val ; j++)\r\n\t\t\t\t\tlist.add(key);\r\n\t\t\t\tsortedList.put(val, list);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(sortedList.values());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private HuffmanTreeNode[] heapify(int freq[][]) {\n\t\tHuffmanTreeNode[] heap = new HuffmanTreeNode[freq.length];\n\t\tfor (int i = 0; i < freq.length; i++)\n\t\t{\n\t\t\theap[i] = new HuffmanTreeNode(freq[i][1], freq[i][0], null, null);\n\t\t}\n\t\t\n\t\theap = heapSort(heap);\n\n\t\treturn heap;\n\t}", "public static void main(String[] args) {\n\n int response [] = {1, 2, 5, 4, 3, 5, 2, 1, 3, 3, 1, 4, 3, 3, 3, 1 ,2, 3, 3, 2, 2};\n int frequency []=new int [6];\n\n for(int counter = 1; counter < response.length; counter++)\n {\n try\n {\n ++frequency[response[counter]];\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n System.out.println(e);\n\n System.out.printf(\" response[%d] = %d\\n\", counter, response[counter]);\n }\n }\n\n System.out.printf(\"%s%10s\\n\", \"Rating\", \"Frequency\");\n\n for(int rating = 1; rating < frequency.length; rating++)\n System.out.printf(\"%5d%10d\\n\", rating, frequency[rating]);\n }", "private static List<String[]> fingerprint_simple(String prefix, int[][] image, int jitter) {\n\n List<String[]> fingerprint = Lists.newArrayList();\n for (int x = 0; x < image.length; x++) {\n for (int y = 0; y < image[x].length; y++) {\n\n String fieldName = prefix + \"_\" + x + \"_\" + y;\n int n = 0;\n if (image[x][y] > 0) {\n n = (int) ((image[x][y] / 255.0) * 8) + 1;\n }\n fingerprint.add(new String[] { fieldName, String.valueOf(n) });\n if (n != 0 && jitter > 0) {\n for (int i = Math.min(1, n - jitter); i < Math.max(9, n + jitter); i++) {\n if (i != n) {\n fingerprint.add(new String[] { fieldName, String.valueOf(i) });\n }\n }\n }\n }\n }\n return fingerprint;\n }", "private void apriori(){\n HashMap<BitSet, Integer> frequentItemsBit = new HashMap<>();\n HashMap<BitSet, Integer> allAssociations = new HashMap<>();\n \n // Put all the 1-itemsets in frequent item hashmap. It will be scanned\n // for getting k-itemsets and cleared iteratively. \n for (int i = 0; i < frequentItemListSetLenOne.size(); i++) {\n BitSet bitSet = new BitSet(bitsetLen);\n bitSet.set(i, true);\n frequentItemsBit.put(bitSet, frequentItemListSetLenOne.get(i).getValue());\n }\n\n int currentK = 1;\n boolean emptyFrequentSet = false;\n \n while (!emptyFrequentSet) {\n \n // create candidates\n if(currentK > 1){\n HashMap<BitSet, Integer> frequentItemsBitT = (HashMap)frequentItemsBit.clone();\n frequentItemsBit.clear();\n frequentItemsBit = candidate_gen(frequentItemsBitT, currentK);\n }\n \n // If no frequent itemSet in current level break\n if(frequentItemsBit.isEmpty())\n break;\n \n // if currentK >= minimumK insert into final list\n if (currentK >= min_itemset_size_K) {\n for (Map.Entry<BitSet, Integer> entry : frequentItemsBit.entrySet()) {\n allAssociations.put(entry.getKey(), entry.getValue());\n }\n }\n currentK++;\n }\n \n printAssociations(allAssociations);\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public HashMap<String, ArrayList<Instance>> generateData(HashMap<String, ArrayList<Instance>> dataInstance,ArrayList<String> classList,int numberOfBin , int avgNumBin){\n //HashMap<String, ArrayList<Instance>> data = new HashMap();\n DescriptiveStatistics stats = new DescriptiveStatistics();\n for (int i = 0; i < classList.size(); i++) {\n String classlab = classList.get(i);\n ArrayList<Instance> instList = dataInstance.get(classlab);\n for (int j = 0; j < instList.size(); j++) {\n Instance inst = instList.get(j);\n stats.addValue(inst.getNumOfWord());\n }\n ArrayList<Bin> binlist = this.getBin(stats, numberOfBin);\n for (int j = 0; j < instList.size(); j++) {\n Instance inst = instList.get(j);\n for (int k = 0; k < binlist.size(); k++) {\n Bin bin = binlist.get(k);\n if(inst.getNumOfWord()>=bin.getStart()&& inst.getNumOfWord()<bin.getEnd()){\n bin.getInstList().add(inst);\n }\n }\n }\n\n //ArrayList<Bin> binlist = this.getBin(stats, numberOfBin);\n ArrayList<Instance> newInstList = new ArrayList<Instance>();\n int numOfItemEachBin = avgNumBin/numberOfBin;\n for (int j = 0; j < binlist.size(); j++) {\n Bin bin = binlist.get(j);\n ArrayList<Instance> binInstList = bin.getInstList();\n Collections.shuffle(binInstList, new Random(100000)); \n if(numOfItemEachBin>binInstList.size()){\n numOfItemEachBin = binInstList.size()-1;\n }\n for (int k = 0; k < numOfItemEachBin; k++) {\n try {\n Instance inst = binInstList.get(k);\n newInstList.add(inst);\n //binInstList.remove(k);\n //k--;\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n \n }\n dataInstance.put(classlab,newInstList);\n }\n for (Map.Entry<String, ArrayList<Instance>> entry : dataInstance.entrySet()) {\n String key = entry.getKey();\n ArrayList<Instance> value = entry.getValue();\n System.out.println(key+\"\\t\"+value.size());\n }\n return dataInstance;\n }", "public final int[][] reconstructedLabels() {\n \tint[][] labels = new int[nmgdm][nx*ny*nz];\n \tfor (int n=0;n<nmgdm;n++) {\n \t\tfor (int xyz=0; xyz<nx*ny*nz; xyz++) {\n \t\t\tif (mgdmlabels[n][xyz]>-1) {\n\t\t\t\t\tlabels[n][xyz] = objLabel[mgdmlabels[n][xyz]];\n\t\t\t\t}\n\t\t\t}\n \t}\n \treturn labels;\n }", "public static void main(String[] args) {\n\t\tint arr[] = {1,5,3,1,2,5,7};\r\n\t\t//all elements are in range 1 to N (7 here)\r\n\t\t//find frequency of each element in O(N) and space complexity 1.\r\n\t\tfor(int i = 0; i < arr.length; i++) {\r\n\t\t\t//add any random number (say 10, greater than length)\r\n\t\t\t//to index 1 less than arr[i]\r\n\t\t\t//%10 to prevent overflow in case value comes out to be greater than allowed length\r\n\t\t\tarr[arr[i]%10 - 1] += 10;\r\n\t\t}\r\n\t\tfor(int i = 0; i < arr.length; i++) {\r\n\t\t\tSystem.out.println(\"Frequency of \" +(i+1) +\" is \"+ (arr[i]/10));\r\n\t\t}\r\n\t}", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "public Frequency(ArrayList<LottoDay> list) {\n\n\t\tfill(list);//fill the maps\n\t}", "public void populate(IntegerArray realized) {\r\n\t\tif (realized.d.length != no_goods)\r\n\t\t\tthrow new RuntimeException(\"length of realized price vector must == no_goods\");\r\n\r\n\t\tlog.add(realized);\r\n\t\t\r\n\t\t// for each good\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++) {\t\t\t\r\n\t\t\t// create array with binned conditional prices only\r\n\t\t\tIntegerArray r = r_tmp[i];\r\n\t\t\tfor (int j = 0; j<i; j++) \r\n\t\t\t\tr.d[j] = realized.d[j];\r\n\r\n\t\t\t// get the distribution conditioned on earlier prices\r\n\t\t\tdouble[] p = prob[i].get(r);\r\n\t\t\t\t\t\t\r\n\t\t\tif (p == null) {\r\n\t\t\t\t// this is our first entry into the distribution; create it\r\n\t\t\t\tp = new double[no_bins];\r\n\t\t\t\r\n\t\t\t\tp[realized.d[i]]++;\r\n\t\t\t\t\r\n\t\t\t\t// Make a copy of IntegerArray since we are PUTing a new copy to the HashMap.\r\n\t\t\t\tr = new IntegerArray(Arrays.copyOf(r.d, r.d.length));\r\n\t\t\t\t\r\n\t\t\t\tprob[i].put(r, p);\r\n\t\t\t\tsum[i].put(r, 1);\r\n\t\t\t} else {\r\n\t\t\t\tp[realized.d[i]]++;\r\n\t\t\t\t\r\n\t\t\t\t// We don't need to make a copy of IntegerArray here because when put() overwrites an existing entry\r\n\t\t\t\t// in the HashMap, it keeps the existing key.\r\n\t\t\t\tsum[i].put(r, sum[i].get(r) + 1);\r\n\t\t\t}\r\n\r\n\t\t\t// record unconditional probability\r\n\t\t\tmarg_prob[i][realized.d[i]]++;\r\n\t\t}\r\n\r\n\t\tmarg_sum++;\r\n\t\r\n\t}", "static void sortByFreq(int arr[], int n)\r\n {\n int[] hash = new int[61];\r\n for (int x : arr) {\r\n hash[x]++;\r\n }\r\n HashMap<Integer, ArrayList<Integer>> valueHash = new HashMap<Integer, ArrayList<Integer>>();\r\n \r\n for (int i = 0; i<hash.length; i++) {\r\n int x = hash[i];\r\n if (x != 0) {\r\n if (valueHash.containsKey(x)) {\r\n valueHash.get(x).add(i);\r\n } else {\r\n ArrayList<Integer> list = new ArrayList<>();\r\n list.add(i);\r\n valueHash.put(x, list);\r\n }\r\n }\r\n }\r\n Set<Integer> keys = valueHash.keySet();\r\n List<Integer> list = new ArrayList<Integer>(keys); \r\n Collections.sort(list, new Comparator<Integer>()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2)\r\n\t\t\t{\r\n\t\t\t\tif (o1 > o2) return -1;\r\n\t\t\t\t\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t});\r\n StringBuffer buff = new StringBuffer();\r\n for (int x : list) {\r\n \tArrayList<Integer> numList = valueHash.get(x);\r\n \tCollections.sort(numList);\r\n \tfor (int num : numList) {\r\n \t\tint y = x;\r\n \t\twhile (y > 0) {\r\n \t\t\tbuff.append(num + \" \");\r\n \t\t\ty--;\r\n \t\t}\r\n \t}\r\n }\r\n System.out.print(buff);\r\n }", "public void processList(String[] list) {\n Arrays.asList(list).forEach(e -> {\n productCountMap.put(e, productCountMap.getOrDefault(e, 0L) + 1);\n });\n }", "List<Pair<String, byte[]>> generateSample(Object descriptor);", "private List<Integer> createData() {\r\n\t\tList<Integer> data = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "private void genFillNamespacePrefixes(ArrayList nss, MethodBuilder mb) {\n if (nss != null) {\n for (int i = 0; i < nss.size(); i++) {\n mb.appendDUP();\n mb.appendLoadConstant(i);\n String prefix = ((NamespaceDefinition)nss.get(i)).getPrefix();\n if (prefix == null) {\n prefix = \"\";\n }\n mb.appendLoadConstant(prefix);\n mb.appendAASTORE();\n }\n }\n }", "void setGivenByOrder(int[] gbo);", "private List<Key> createSequenceKeys(int count) {\n\t\tList<Key> keys = new ArrayList<Key>();\n\t\tdouble id = new Date().getTime();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tdouble id2 = id + (i / count);\n\t\t\tdouble random = Math.random();\n\t\t\tid2 += random / count;\n\t\t\tlong id3 = (long) (id2 * (1 << 18));\n\t\t\tKey key = Datastore.createKey(UserItemMeta.get(), id3);\n\t\t\tkeys.add(key);\n\t\t}\n\t\treturn keys;\n\t}", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "private double fillPercent() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (percent / myBuckets.size()) * 100;\n\t}", "private static void computeIDF()throws Exception{\r\n\t\tidfArray = new double[nounList.size()];\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(NOUN_DF));\r\n\t\tString line = null;\r\n\t\tline = br.readLine();\r\n\t\tint cnt = 0;\r\n\t\tdocumentSize = Integer.parseInt(line);\r\n\t\twhile((line = br.readLine())!=null){\r\n\t\t\tdouble df = Double.parseDouble(line.split(\":\")[1]);\r\n\t\t\tif(df == 0.0){\r\n\t\t\t\tidfArray[cnt++] = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdouble idf = Math.log10(documentSize / df);\r\n\t\t\t\tidfArray[ cnt++ ] = idf;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t}", "void initiateProbabilityMatrix( int numberOfDocs ) {\r\n double jTransition = 1 / (double)numberOfDocs;\r\n for (int i = 0; i < numberOfDocs; i++) {\r\n //Determine probability of going to a link\r\n double prob;\r\n if (out[i] == 0) prob = jTransition;\r\n else prob = 1 / (double)out[i];\r\n //Set a valid link to prob\r\n for (int j = 0; j < numberOfDocs; j++) {\r\n double pTransition = 0;\r\n if (p[i][j] == LINK) pTransition = prob;\r\n if (out[i] == 0) pTransition = jTransition;\r\n //Calculate transition value in p matrix\r\n p[i][j] = (1 - BORED) * pTransition + BORED * jTransition;\r\n }\r\n }\r\n }", "private byte[] gapEncode (List<Integer> list) {\n\t if (list == null || list.size() == 0) {\n\t return null;\n }\n\t\tIterator<Integer> p = list.iterator();\n\t\tInteger docId = popNextOrNull(p);\n\t\tbyte[] firDocId = vBNumber(docId);\n\t\tbyte[] bytes = new byte[VBNUM_SIZE * list.size()];\n int index;\n for (index = 0; index < firDocId.length; index++) {\n bytes[index] = firDocId[index];\n }\n\n\t while (docId != null) {\n\t Integer nextDocId = popNextOrNull(p);\n\t if (nextDocId == null) {\n\t break;\n }\n\t byte[] gap = vBNumber(nextDocId - docId);\n\t for (int i = 0; i < gap.length; i++) {\n\t bytes[index] = gap[i];\n\t index++;\n }\n\t docId = nextDocId;\n }\n\n byte[] result = new byte[index];\n for (int i = 0; i < index; i++) {\n result[i] = bytes[i];\n }\n\n\n\n /*System.out.println(\"......gap encode inside......\");\n\n for (byte t : result) {\n for (int i = 0; i < Byte.SIZE; i++) {\n int n = t & (1 << (7 - i));\n n = n >> (7 - i);\n System.out.print(n);\n }\n System.out.println();\n }*/\n\n return result;\n\t}", "int getFreq();", "private void fillConditionalProb(\tfloat[] conditionalTable,\r\n\t\t\t\t\t\t\t\t\t\tFile trainDir) \r\n\t{\r\n\t\t// Let nCharLanguage be the total number of characters (including \r\n\t\t// multiple occurrences of the same unique character, including spaces) \r\n\t\t// contained in all training documents, \r\n\t\t// For each of the 27 unique characters, ci, compute conditional prob:\r\n\t\t// P(ci | Language) = countLanguage(ci) / nCharLanguage,\r\n\t\t// where countLetter(ci) is the number of times character ci occurs \r\n\t\t// in all documents in the training set. \r\n\t\t\r\n\t\t// GET OVERALL COUNT OF ALL LETTERS IN THIS TRAINING DIRECTORY\r\n\t\tfloat nCharLanguage = (float) getTotalLetters(trainDir);\r\n\t\t\t\t\r\n\t\t// FILL IN THE CONDITIONAL TABLE\r\n\t\tfor(int i = 0; i < 26; i++){\r\n\t\t\tchar currentLetter = (char) ('a' + i);\r\n\t\t\tconditionalTable[i] = \r\n\t\t\t\t\tcountLetter(currentLetter, trainDir) / nCharLanguage;\r\n\t\t}\r\n\t\tconditionalTable[26] = \r\n\t\t\t\tcountLetter(' ', trainDir) / nCharLanguage;\r\n\t}", "void randomProjection(int R, double percent_mask, int sax_len) {\r\n\t\tHashMap<Integer, HashSet<Integer>> Hash_Mark = new HashMap<>();\r\n\t\tint word, mask_word, new_word;\r\n\t\tHashSet<Integer> obj_set, ptr;\r\n\r\n\t\tint num_mask = (int) Math.ceil(percent_mask * sax_len);\r\n\r\n\t\tfor (int r = 0; r < R; r++) {\r\n\t\t\tmask_word = createMaskWord(num_mask, sax_len);\r\n\r\n\t\t\t// / random projection and mark non-duplicate object\r\n\t\t\tfor (Map.Entry<Integer, USAX_elm_type> entry : USAX_Map.entrySet()) {\r\n\t\t\t\tword = entry.getKey();\r\n\t\t\t\tobj_set = entry.getValue().obj_set;\r\n\r\n\t\t\t\t// put the new word and set combo in the hash_mark\r\n\t\t\t\tnew_word = word | mask_word;\r\n\r\n\t\t\t\tptr = Hash_Mark.get(new_word);\r\n\r\n\t\t\t\tif (ptr == null) {\r\n\t\t\t\t\tHash_Mark.put(new_word, new HashSet<>(obj_set));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// add onto our ptr, rather than overwrite.\r\n\t\t\t\t\tptr.addAll(obj_set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// / hash again for keep the count\r\n\t\t\tfor (Map.Entry<Integer, USAX_elm_type> entry : USAX_Map.entrySet()) {\r\n\t\t\t\tword = entry.getKey();\r\n\t\t\t\tnew_word = word | mask_word;\r\n\t\t\t\tobj_set = Hash_Mark.get(new_word);\r\n\t\t\t\t// increase the histogram\r\n\t\t\t\tfor (Integer o_it : obj_set) {\r\n\t\t\t\t\tInteger count = entry.getValue().obj_count.get(o_it);\r\n\t\t\t\t\tcount = count == null ? 1 : count + 1;\r\n\t\t\t\t\tentry.getValue().obj_count.put(o_it, count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tHash_Mark.clear();\r\n\t\t}\r\n\t}", "public static void initOneD(int[] array) {\n for (int i = 0; i < array.length; i++) {\n array[i] = (int) (Math.random() * 100);\n }\n }", "private void setupStuff() {\n\t\tm_seenNumbers = new double[featureArray.length][];\n\t\tm_Weights = new double[featureArray.length][];\n\t\tm_NumValues = new int[featureArray.length];\n\t\tm_SumOfWeights = new double[featureArray.length];\n\t\tfeatureTotals = new int[featureArray.length];\n\n\t\tfor (int i = 0; i < featureArray.length; i++) {\n\t\t\tm_NumValues[i] = 0;\n\t\t\tm_seenNumbers[i] = new double[100];\n\t\t\tm_Weights[i] = new double[100];\n\t\t}\n\n\t\t/*\n\t\t * initialize structures for probabilities of each class and of each\n\t\t * feature\n\t\t */\n\t\tclassCounts = new double[MLearner.NUMBER_CLASSES];\n\t\tprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tRealprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tfor (int i = 0; i < MLearner.NUMBER_CLASSES; i++) {\n\t\t\tfor (int j = 0; j < featureArray.length; j++) {\n\t\t\t\tif (featureArray[j]) {//only create if we are using that\n\t\t\t\t\t// feature\n\t\t\t\t\tprobs[i][j] = new HashMap();\n\t\t\t\t\tif (EmailInternalConfigurationWindow.isFeatureDiscrete(j)) {\n\t\t\t\t\t\tprobs[i][j].put(\"_default\", new Double(0));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclassCounts[i] = 0;\n\t\t}\n\n\t}", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public Solution(int[] w) {\n // get a Random instance\n random = new Random();\n\n // fulfill weightPrefixSum array\n int len = w.length;\n weightPrefixSum = new int[len];\n weightPrefixSum[0] = w[0];\n for(int i = 1; i < w.length; i++){\n weightPrefixSum[i] = weightPrefixSum[i-1] + w[i];\n }\n }", "public static int fastClassify(Model M, int[][] x){\n //dont call other classes\n\t //look out for terms that you can take out\n//\t int d =0;\n//\t double joint;\n//\t double t= 1.0;\n//\t\tdouble high;\n//\t\t//Double tot1;\n//\t\tdouble higher;\n//\t\tdouble tot =1.0;\n//\t\tdouble tot1= 1.0;\n//\t int digit =0;\n//\t for(int i=0; i<x.length; i++){\n//\t\tfor(int j=0;j<x[i].length; j++){\n//\n//\t\t//probability at 0;\n//\t\t\ttot*=conditionalProbabilityXijgD(M,i,j,x[i][j],0); \n//\t\t \n//\t\t high = M.getPD(0)*tot;\n//\t\t\twhile(d<10){\n//\t\t\t\ttot1*=conditionalProbabilityXijgD(M,i,j,x[i][j],d); \n//\t\t\t\thigher = M.getPD(d)*tot1;\n//\t\t\t\t\n//\t\t\t\tif(high <higher){\n//\t\t\t\t\thigh = higher;\n//\t\t\t\t\tdigit =d;\n//\t\t\t\t}\n//\t\t\t\td++;\n//\t\t\t}\n//\t\t \n//\t }\n//\t \n//\t }\n\t double high=0.0;\n\t int digit =0;\n\t int i=0;\n\t while(i<10){\n\t\t double tot =jointProbabilityXD(M,x,i);\n\t \t\n\t if(high<tot){\n\t\t high=tot;\n\t \t\tdigit =i; \n\t \t}\n\t\t i++;\n\t \t//System.out.println(0.988809344056389 < 0.011080326918292818);\n\t \n\t\t// System.out.println(tot);\n\t }\n\t return digit;\n\t \n \n}", "public void generateIDs() {\n Random randomGenerator = new Random();\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n identificationNumbers[i][j] = randomGenerator.nextInt(2);\n }\n }", "public int getFreq(){ return frequency;}", "private List<Float> nucleotideFrequencies() {\n\t\tList<Float> freqs = new ArrayList<Float>();\n\t\tfreqs.add((float) 0.3);\n\t\tfreqs.add((float) 0.5);\n\t\tfreqs.add((float) 0.8);\n\t\tfreqs.add((float) 1.0);\n\t\treturn freqs;\n\t}", "public Generator() {\n identificationNumbers = new int[100][31];\n }", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "public SampleHapCount( String filePath, String target ) {\n\t\t// TODO Auto-generated constructor stub\n\t\tsh = new SampleHap( filePath, target );\t// re-sue this code from MS\n\t\tfrequency = new HashMap<String, Double>();\n\t\tparentHapCount = 0;\n\t\tnextLastRank = 0;\t\t// in case we need to add the last rank number\n\t\t\t\t\n\t\tList<Integer> intList = new ArrayList<Integer>();\t// hold parent count\t\t\t\t\n\t\tMap<String, Integer> hapCount = new HashMap<String, Integer>();\t\n\t\t\n\t\t// capture only parent hap count\n\t\tMap<String, List<Integer>> hapCountList = new HashMap<String, List<Integer>>();\n\t\t\n\t\tfor (String hap : sh.getHaplotypes().getList()) {\t// go through unique haplotype\n\t\t\tif (!hap.contains(\"NT\")) {\n\t\t\t\tint parentCount = 0;\t// how many times haplotype appeared, homozygous => 2\n\t\t\t\tint childCount = 0;\n\t\t\t\t// hold list parentCount, familyCount, sampleCount\n\t\t\t\tList<Integer> countList = new ArrayList<Integer>();\n\t\t\t\tNonRedundantList family = new NonRedundantList();\n\t\t\t\tfor (String sample : sh.getSampleList()) {\n\t\t\t\t\tif (!sh.getSampleRelation().get(sample).equals(\"child\")) {\t// parents\n\t\t\t\t\t\tfor (String str : sh.getSampleHap().get(sample)) {\t// go through list to count homozygous\n\t\t\t\t\t\t\tif (str.equals(hap)) {\n\t\t\t\t\t\t\t\tparentCount++;\t// parent haplotype count\n\t\t\t\t\t\t\t\tparentHapCount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sh.getSampleHap().get(sample).contains(hap)) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfamily.addNonRedundantList(sh.getSampleFam().get(sample));\t// add family\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\t// child\n\t\t\t\t\t\tif (sh.getSampleHap().get(sample).contains(hap)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String str : sh.getSampleHap().get(sample)) {\t// go through list to count homozygous\n\t\t\t\t\t\t\t\tif (str.equals(hap)) {\n\t\t\t\t\t\t\t\t\tchildCount++;\n\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\t\t\t\t\t\n\t\t\t\t\t\t\tfamily.addNonRedundantList(sh.getSampleFam().get(sample));\t// add family\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\tif (parentCount != 0) {\n\t\t\t\t\tintList.add( parentCount );\t// parental hap count\n\t\t\t\t\t\n\t\t\t\t\tcountList.add( family.getList().size() );\t// family count\n\t\t\t\t\tcountList.add( parentCount + childCount );\t// sample count\n\t\t\t\t\thapCount.put( hap, parentCount );\n\t\t\t\t\thapCountList.put( hap, countList );\t// not including parent here\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t// ranking largest count to the lowest count\n\t\tCollections.sort(intList, Collections.reverseOrder());\t// sore descending order\n\t\tnextLastRank = intList.size();\t// to add rank for 0 incidence of small group\n\t\t\t\t\n\t\thapCountRank = new HashMap<String, List<Integer>>();\n\t\tfor (String hap : hapCountList.keySet()) {\t// go through haplotype\n\t\t\tList<Integer> tmpList = new ArrayList<Integer>();\t// list to hold values\n\t\t\ttmpList.add(hapCount.get(hap));\t// parent count => index of 0\n\t\t\ttmpList.add(intList.indexOf(hapCount.get(hap)) + 1);\t// ranking => index of 1\n\t\t\ttmpList.addAll(hapCountList.get(hap));\t// family & sample count => index of 2,3\n\t\t\t\n\t\t\thapCountRank.put(hap, tmpList);\t\t\n\t\t\tdouble count = (double)hapCount.get(hap);\n\t\t\tdouble total = (double)parentHapCount;\n\t\t\tdouble freq = count / total;\t\t// no conversion to %\n\t\t\tfrequency.put(hap, freq);\t// haplotype frequency\n\t\t}\t\t\n\t}", "private double[] computeHistrogram(ArrayList<Feature> freature, String keyID) {\r\n\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n ArrayList<Double> values = FeatureOps.getSpecifiedFeatureNumericalPropertyAsArrayList(freature, keyID);\r\n double[] d1 = List2Prims.doubleFromDouble(values);\r\n\r\n double[] hist = new double[nBins];\r\n\r\n int bin;\r\n for (int i = 0; i < d1.length; i++) {\r\n bin = (int) Math.floor((double) nBins * (d1[i] / hismax));// \r\n bin = Math.min(nBins - 1, bin);\r\n hist[bin]++;\r\n }\r\n return hist;\r\n }", "private HashMap<String, TObjectDoubleHashMap<String>> getNGramPRFScores(List<Document> initial, int size) {\n FieldLanguageModel flm = new FieldLanguageModel(size);\n for (Document d : initial) {\n if (d.terms != null && d.terms.size() > 0) {\n flm.addDocument(d);\n }\n }\n HashMap<String, TObjectDoubleHashMap<String>> outer = new HashMap<String, TObjectDoubleHashMap<String>>();\n List<String> grams = getGrams(size);\n for (String gram : grams) {\n TObjectDoubleHashMap<String> inner = new TObjectDoubleHashMap<String>();\n double normalizer = 0.0;\n\n for (String field : fields) {\n double fieldprob = flm.getTermProbGivenField(gram, field);\n inner.put(field, fieldprob);\n normalizer += fieldprob;\n }\n\n // Now normalize\n for (String field : fields) {\n inner.put(field, inner.get(field) / normalizer);\n }\n // Have to map to a single term\n String key = (size == 1) ? gram : gram.split(\" \")[size - 1];\n outer.put(key, inner);\n }\n return outer;\n }", "private void initializeAndShuffle() {\r\n\t\t\tsuffixes = new byte[256];\r\n\t\t\tfor (int i = 0; i < ALL_BYTE_VALUES.length; i++) {\r\n\t\t\t\tint j = RAND.nextInt(i + 1);\r\n\t\t\t\tif (j != i) {\r\n\t\t\t\t\tsuffixes[i] = suffixes[j];\r\n\t\t\t\t}\r\n\t\t\t\tsuffixes[j] = ALL_BYTE_VALUES[i];\r\n\t\t\t}\r\n\t\t}", "public List<GenPolynomial<C>> \n GB( List<GenPolynomial<C>> F ) { \n return GB(0,F);\n }", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "private void permutation(String prefix, String str) {\n \r\n int n = str.length();\r\n if (n == 0)\r\n {\r\n \r\n ls.add(prefix);\r\n System.out.print(prefix+\",\");\r\n if(ls.isEmpty()==true)\r\n {\r\n ls.remove(ls.indexOf(n)); \r\n }\r\n \r\n al.add(ls);\r\n calc(al);\r\n \r\n }\r\n\r\n else {\r\n \r\n //System.out.print(ls);\r\n \r\n for (int i = 0; i < n; i++)\r\n permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n));\r\n \r\n \r\n }\r\n \r\n \r\n \r\n}", "public static List<Integer> countingSort(List<Integer> arr) {\n // Write your code here\n int[] frequencyArray = new int[100];\n for (int i = 0; i < arr.size(); i++) {\n int arrValue = arr.get(i);\n int frequency = frequencyArray[arrValue];\n frequencyArray[arrValue] = frequency + 1;\n }\n return Arrays.stream(frequencyArray).boxed().collect(Collectors.toList());\n }", "void initialize() {\n for (Map.Entry<String, Gauge<Long>> entry : gaugeList.entrySet()) {\n registerWithSuffix(entry.getKey(), 0, entry.getValue());\n }\n }", "public HashMap<String, ArrayList<Counter<String>> > makeVectors(HashMap<String, ArrayList< List<String> > > hm) { \n HashMap<String, ArrayList<Counter<String>> > retHM = new HashMap<String, ArrayList<Counter<String>> >();\n for(String ID : hm.keySet() ){\n ArrayList<Counter<String>> tempVectList=new ArrayList<Counter<String>>();\n for(List<String> sentence : hm.get(ID) ){//loop through the list of sentences for that specific ID \n Counter<String> tempVect = new Counter<String>(); \n for(String word : sentence){//loop through the sentence\n tempVect.incrementCount(word,1.0);\n }\n tempVectList.add(tempVect);\n } \n retHM.put(ID,tempVectList);\n }\n return retHM;\n }", "public abstract double samplingFrequency();", "public int[] CreatePermutations(int[] seq){\n \n return seq;\n }" ]
[ "0.5712382", "0.554581", "0.5333398", "0.5231929", "0.5200518", "0.511228", "0.51082164", "0.5097193", "0.50911933", "0.5042616", "0.5040465", "0.5038802", "0.5015918", "0.49888897", "0.4981277", "0.49779925", "0.49731678", "0.49700058", "0.49510115", "0.49385393", "0.49077103", "0.4903074", "0.4878696", "0.48554698", "0.48516226", "0.48510933", "0.48353508", "0.48325616", "0.48053804", "0.4765753", "0.476509", "0.47623745", "0.475006", "0.474644", "0.47310492", "0.47298947", "0.4725655", "0.47155306", "0.47033015", "0.47000536", "0.46992052", "0.46973392", "0.4695204", "0.46911016", "0.46849477", "0.46807346", "0.4660704", "0.46588275", "0.4640016", "0.46352857", "0.46249777", "0.46067837", "0.45957413", "0.45929915", "0.45895487", "0.45817572", "0.45803165", "0.4579637", "0.45780006", "0.45694047", "0.45667493", "0.45596594", "0.4559408", "0.455468", "0.45539534", "0.45513487", "0.45360473", "0.45291325", "0.45277804", "0.45271868", "0.45257932", "0.45243216", "0.4509927", "0.45041794", "0.4503672", "0.45025724", "0.45008782", "0.44850218", "0.44818637", "0.44794208", "0.4478056", "0.4478044", "0.44772846", "0.4474399", "0.44730297", "0.44724447", "0.44641346", "0.44625595", "0.44585395", "0.44552508", "0.44549012", "0.4451955", "0.44481227", "0.44454822", "0.44399774", "0.44370198", "0.44293034", "0.44276977", "0.44270843", "0.44159538", "0.44105947" ]
0.0
-1
Sets the current instantiation according to the truth value tv
public void setCurrentInst(boolean tv){ if (tv) currentInst = 1; else currentInst = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected BooleanValue(Boolean bv) {\n boolValue = bv;\n }", "public HomeState(TV tv) {\n this.tv = tv;\n }", "@Test\n public void testSetHasTemperaturaVariation() {\n System.out.println(\"setHasTemperaturaVariation\");\n boolean value = true;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setHasTemperaturaVariation(value);\n }", "public void setT(boolean t) {\n\tthis.t = t;\n }", "public void setNewInstance(boolean newInstance) {\n\t\tthis.newInstance = newInstance;\n\t}", "public TrueValue (){\n }", "public BooleanStateValue( boolean value, boolean isImmortal) {\n\t\tsuper( isImmortal);\n\t\t_storage = value;\n\t}", "public static void setInsta(boolean i) {\n insta = i;\n }", "public BooleanType(final boolean val) {\n\t\tthis.b = new Boolean(val);\n\t}", "public T(int val) {\n this.val = val;\n }", "public BooleanType(final Boolean val) {\n\t\tthis.b = val;\n\t}", "public BooleanStateValue( boolean value, long duration) {\n\t\tsuper( duration);\n\t\t_storage = value;\n\t}", "public void setTallied(java.lang.Boolean value);", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "InstTernary createInstTernary();", "public void setV(boolean v) {\n\tthis.v = v;\n }", "abstract void setIsInit(boolean b);", "public void setVivant(boolean vivant)\r\n\t{\r\n\t\tthis.vivant = vivant;\r\n\t}", "public abstract boolean setValue(Value value, boolean asAssignment);", "public void set_state(boolean etat) {\r\n this.etat = etat;\r\n }", "public void setActual(boolean value) {\n this.actual = value;\n }", "public TV() {\r\n\t}", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "private void initInstance() {\n init$Instance(true);\n }", "public abstract boolean create(T newInstance);", "public Node(T value, boolean isCurrent) \n\t\t//PRE: T and isCurrent are initialized\n\t\t//POST: A node is created with value t and current flag set to true\n\t\t{\n\t\t\tthis(value);\n\t\t\tthis.isCurrent = isCurrent;\n\t\t}", "public abstract void setCheck(Boolean check);", "public void setHolder(boolean value) {\n this.holder = value;\n }", "public void instantiateEvidence(Configuration evid) {\n ProbabilityTree tree, twig;\n Configuration conf;\n PTreeCredalSet pot, pot2;\n FiniteStates variable;\n int i, j, v;\n \n conf = new Configuration(evid,new NodeList(variables));\n if (conf.size() != 0) {\n pot = (PTreeCredalSet)copy();\n for (i=0 ; i<conf.size() ; i++) {\n variable = conf.getVariable(i);\n v = conf.getValue(i);\n \n // building a tree for variable\n tree = new ProbabilityTree(variable);\n for (j=0 ; j<tree.child.size() ; j++) {\n twig = (ProbabilityTree) tree.child.elementAt(j);\n twig.label = 2;\n if (j == v)\n twig.value = 1.0;\n tree.leaves++;\n }\n // building the potential for the variable\n pot2 = new PTreeCredalSet();\n pot2.variables.addElement(variable);\n pot2.setTree(tree);\n // combination\n \n pot = (PTreeCredalSet)pot.combine(pot2);\n }\n this.setTree(pot.getTree());\n }\n }", "public Node(T val) {\r\n\t\tthis.val = val;\r\n\t}", "private Node(T value) {\n\t\t\tthis.value = value;\n\t\t}", "public Variable(boolean vInitialized, boolean vFinal, Keywords.Type Vtype) {\n\t\tisInitialized = vInitialized;\n\t\tisFinal = vFinal;\n\t\ttype = Vtype;\n\t}", "private void instantiate(Predicate singlePred, Heuristic heuristic) {\n\n\t\tList<Predicate> compatiblePredicates = new ArrayList<>();\n\t\tfor (Predicate currPred : this.currentState.getPredicates().toList()) {\n\t\t\t// find all compatible predicates in current state:\n\t\t\tif (currPred.isCompatibleTo(singlePred)) {\n\t\t\t\tcompatiblePredicates.add(currPred);\n\t\t\t}\n\t\t}\n\n\t\tif (compatiblePredicates.isEmpty()) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"There was no compatible predicate found to resolve the predicate \" + singlePred);\n\t\t}\n\n\t\t// Heuristic chooses one candidate from compatiblePredicates\n\t\tPredicate chosenPred = heuristic.choosePredicateForInstantiation(compatiblePredicates, currentState);\n\n\t\t// instantiate with singlePred with constants of chosenPred\n\t\tfor (int i = 0; i < chosenPred.getValence(); i++) {\n\t\t\tif (!singlePred.getArgument(i).isInstantiated()) {\n\t\t\t\t// Update the Java object of the variable.\n\t\t\t\t// All references to this variable in other predicates\n\t\t\t\t// will now reference to the instantiated variable.\n\t\t\t\tsinglePred.getArgument(i).instantiate(chosenPred.getArgument(i).getValue());\n\t\t\t}\n\t\t}\n\n\t}", "private ModalityState(int value) { this.value = value; }", "void set(boolean value);", "private ExplorationTypes(int type_val) \n { \n this.type_val = type_val; \n }", "public Number(final T theVal)\n {\n if (theVal instanceof Integer) {\n myInt = (Integer) theVal;\n isInt = true;\n } else if (theVal instanceof Double) {\n myDouble = (Double) theVal;\n isDouble = true;\n } else if (theVal instanceof Float) {\n myFloat = (Float) theVal;\n isFloat = true;\n } else if (theVal instanceof Long) {\n myLong = (Long) theVal;\n isLong = true;\n }\n }", "public Value.Builder setAktif(boolean value) {\n validate(fields()[6], value);\n this.aktif = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "@objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);", "public void setAlive(boolean x){\n \talive = x;\r\n }", "Reproducible newInstance();", "public static void setInstance(SymTypeExpressionDeSer theInstance) {\n if (null == theInstance) { //in this case, \"reset\" to default type\n instance = new SymTypeExpressionDeSer();\n }\n else {\n instance = theInstance;\n }\n }", "static SibillaValue of(boolean v) {\n if (v) {\n return SibillaBoolean.TRUE;\n } else {\n return SibillaBoolean.FALSE;\n }\n }", "private FanState() {\n\t\tinstance = this;\n\t}", "void set(boolean on);", "protected void initialize() {\n\t\tif (type == switchType.True) {\n\t\t\tVariables.platformStatus = true;\n\t\t}\n\t\telse if (type == switchType.False) {\n\t\t\tVariables.platformStatus = false;\n\t\t}\n\t\telse {\n\t\t\tVariables.platformStatus = !Variables.platformStatus;\n\t\t}\n\t\tgo.start();\n\t}", "public void setTON(int value) {\r\n this.ton = value;\r\n }", "@Test\n public void testSetVer() {\n System.out.println(\"setVer\");\n String ver = \"\";\n VM instance = null;\n instance.setVer(ver);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public Number(int v)\n {\n val = v;\n }", "@Override\n\tprotected void setValue(String name, TipiValue tv) {\n\t}", "public void setEngineOn();", "public void victorTest(){\n\n victorTestController.set(0.5);\n }", "void setVisivel(boolean visivel);", "public Builder setAlive(boolean value) {\n copyOnWrite();\n instance.setAlive(value);\n return this;\n }", "void setAlive(boolean isAlive);", "private BooleanValueProvider() {\n this.state = true;\n }", "public Builder setIsStatic(boolean value) {\n\n isStatic_ = value;\n onChanged();\n return this;\n }", "public BooleanStateValue( boolean value) {\n\t\tthis( value, false);\n\t}", "void setQuick(boolean quick);", "private void initSimulateModeView() {\n simulateMode = new Label(\"SIMULATE\");\n simulateMode.setPrefSize(200, 100);\n simulateMode.setFont(Font.font(null, FontWeight.BOLD, 30));\n simulateMode.setTextFill(Color.ORANGE);\n simulateMode.setEffect(getDropShadow());\n }", "private void setChangeHeadpicRelay(\n ChangeHeadpic.RelayToFriend.Builder builderForValue) {\n rsp_ = builderForValue.build();\n rspCase_ = 21;\n }", "public static ConversionUtils setInstance(ConversionUtils newInstance) {\n ConversionUtils instance = newInstance;\n if (instance == null) {\n instance = new ConversionUtils();\n instance.singleton = true;\n }\n ConversionUtils.timesCreated++;\n instanceStorage = new SoftReference<ConversionUtils>(instance);\n return instance;\n }", "public static VariableValue createValueObject(boolean value) {\n\t\treturn new BooleanValue(value);\n\t}", "private void setAlive(boolean value) {\n \n alive_ = value;\n }", "public ConsoleTTT(){\n\t\tttt = new TicTacToe();\n\t}", "public void setLivePlant(boolean value) {\r\n this.livePlant = value;\r\n }", "@Test\r\n\tpublic final void testSetSpeed() {\n\t\t a=new airConditioner(\"ON\",33);\r\n\t\tassertEquals(33,a.getSpeed());\r\n\t}", "public State(T state) {\r\n\t\tthis.state = state;\r\n\t}", "public void setNew();", "public interface ITVFactory {\n ITV createTV();\n}", "public abstract void setInput(boolean value);", "public void setAlive() {\n\t\tif (this.alive == true) {\n\t\t\tthis.alive = false;\n\t\t} else {\n\t\t\tthis.alive = true;\n\t\t}\n\t}", "public Builder setInstance(\n com.google.cloud.networkmanagement.v1beta1.InstanceInfo.Builder builderForValue) {\n if (instanceBuilder_ == null) {\n stepInfo_ = builderForValue.build();\n onChanged();\n } else {\n instanceBuilder_.setMessage(builderForValue.build());\n }\n stepInfoCase_ = 5;\n return this;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }", "public boolean Init(int v_Age, int v_Salary, boolean v_Married){\n\tAge = v_Age ;\n\tSalary = v_Salary ;\n\tMarried = v_Married ;\n\treturn true ;\n }" ]
[ "0.5793291", "0.5719404", "0.5681186", "0.5511774", "0.5392222", "0.5377241", "0.53283876", "0.5313905", "0.5287766", "0.52744085", "0.52606255", "0.52539325", "0.5248619", "0.52050024", "0.5194276", "0.51699984", "0.51579165", "0.51442826", "0.5136771", "0.5069587", "0.5060919", "0.5051232", "0.5036257", "0.5036257", "0.5036257", "0.5036257", "0.5031442", "0.50181", "0.49941462", "0.49926674", "0.4958395", "0.49556702", "0.49457976", "0.4943637", "0.49434337", "0.49332723", "0.49223107", "0.4914947", "0.49061725", "0.49026915", "0.48994797", "0.48893058", "0.48802593", "0.48787615", "0.48681673", "0.48646066", "0.48641998", "0.48637882", "0.48556936", "0.48528117", "0.4851074", "0.48402148", "0.48394153", "0.4827295", "0.4826294", "0.48143792", "0.4807269", "0.48048428", "0.48012707", "0.47949368", "0.47913778", "0.47897688", "0.4789031", "0.47872058", "0.47785413", "0.47776225", "0.4777241", "0.47737184", "0.47716755", "0.47715494", "0.47671616", "0.47597757", "0.47595844", "0.47595084", "0.47574362", "0.47574076", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438", "0.47531438" ]
0.6934008
0
Resets the currentInst field to 1, i.e. node becomes uninstantiated
public void unset(){ currentInst = -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetCurrentElement() {\r\n\t\tcurrentNode = firstNode;\r\n\t}", "public void setUnlabeledInstance(Instance inst){\n\t\tthis._unlabeledInstance = inst;\n\t}", "public static void resetInstance() {\n\t\tinstance = null;\n\t}", "public static void reset() {\n\t\tnodes.clear();\n\t\tid = 0;\n\t}", "public void resetCurrent(){\r\n curr = head;\r\n }", "public void setCurrentInst(boolean tv){\n\t\tif (tv)\n\t\t\tcurrentInst = 1;\n\t\telse\n\t\t\tcurrentInst = 0;\n\t}", "@VisibleForTesting\n static void resetInstance() {\n sInstance = null;\n }", "public void resetCurrent() {\r\n\t\tif(head != null)\r\n\t\t\tcurr = head;\r\n\t}", "protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }", "public static void markInstanceStale() {\n instance = null;\n }", "void reset() {\n synchronized (instances) {\n instances.clear();\n }\n }", "SELLbeholder() {\n listehode = new Node(null, null);\n }", "public void reset(){\n\t\tthis.currentIndex = 0;\n\t}", "public void restart() {\n\t\telements[currentElement - 1].turnOff();\n\t\tstart();\n\t}", "public static void reset()\n\t\t{\n\t\t\tfeatureSet = new THashMap();\n\t\t\tfeatureIds = new TObjectIntHashMap();\n\t\t\tnextID = 1;\t\t\t\n\t\t}", "public void resetFirstRegisterNumber() {\n firstRegisterNumber = 2;\n maxRegisterUsed = 2;\n }", "public static void resetCount() {\n count = 1;\n }", "public static void resetId() {\r\n nextid=1;\r\n }", "public void setLabeledInstance(Instance inst){\n\t\tthis._labeledInstance = inst;\n\t}", "public void destroiInstancia()\n {\n // Libera a variavel instancia para ser limpa pelo garbage collection\n //instancia = null;\n }", "void setUnused(){\n assert this.used == true;\n\n //let the parent pointer remain\n this.hf = 0;\n this.used = false;\n\n }", "@Override\n\tpublic void initNode() {\n\t\tEFMonitorUtil.cleanAllInstance(false);\t\t\t\n\t}", "private void clearPreviousInstances() {\n DiscardedCards.clearInstance();\n Fireworks.clearInstance();\n History.clearInstance();\n SelectedSymbol.clearInstance();\n Tokens.clearInstance();\n HanabiCards.initDeck();\n }", "void reset() {\n this.pointer = 0;\n }", "public static void clear(){\r\n instance = null;\r\n }", "public void destroy()\r\n\t{\r\n\t\tsetRoot(null);\r\n\t\tsetCounter(0);\r\n\t}", "@Override\n public void clear() {\n root = new Node ('i', false, 256);\n }", "private void reIndex()\n {\n for(int i = 0; i < NodeList.size(); i++)\n NodeList.get(i).setID(i);\n ID = NodeList.size();\n }", "public void reset() {\n index = 0;\n }", "public void reset()\n {\n\tcurrent = targetHead.next(0);\n }", "public void unsetRegular()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REGULAR$2, 0);\n }\n }", "@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}", "public final void Reset()\n\t{\n\t\t_curindex = -1;\n\t}", "public void reset ()\n {\n final String METHOD_NAME = \"reset()\";\n this.logDebug(METHOD_NAME + \" 1/2: Started\");\n super.reset();\n this.lid = null;\n this.refId = Id.UNDEFINED;\n this.fromDocType = DocType.UNDEFINED;\n this.logDebug(METHOD_NAME + \" 2/2: Done\");\n }", "public void unKingMe() {\r\n this.type = Type.SINGLE;\r\n }", "public void resetIdentificadorODE()\r\n {\r\n this.identificadorODE = null;\r\n }", "public void resetIdentificadorODE()\r\n {\r\n this.identificadorODE = null;\r\n }", "public synchronized void resetCurrentIndex()\n {\n // Reset the current index to start from 1 (speechgen0001.mp3)\n currentIndex = 1;\n }", "public void resetNodo()\r\n {\r\n this.nodo = null;\r\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "protected void NewIdentity()\n\t{\n\t\tthis.identity=0L;\n\t\tNodeReference nodeRef = getNodeReference();\n\t\tnodeRef.appendSubscript(0L);\n\t\tnodeRef.appendSubscript(\"id\");\n\t\tthis.identity=nodeRef.increment(1);\n\t}", "public void setInstNo(Integer instNo) {\n\t\tthis.instNo = instNo;\n\t}", "public void reset() {\n firstUpdate = true;\n }", "public static void resetValidID() {\n nextId = 0;\n }", "public void reset() {\n this.setIndex(0);\n }", "public void clear() {\n\t\thead.setNext(null);\n\t\tmodcount++;\n\t\tnodeCount = 0;\n\t}", "public void setCurrent(Node current) {\n this.current = current;\n }", "public void resetCount() {\n\t\tresetCount(lineNode);\n\t}", "public void restart() {\n ReadOnlyAssignmentList currentState = assignmentListStateList.get(currentStatePointer);\n assignmentListStateList.clear();\n assignmentListStateList.add(currentState);\n currentStatePointer = 0;\n }", "public static void resetIdCounter(){\n idCounter = 0;\n }", "public void reset() {\n\t\tcount = 0;\n\t}", "public void resetRegisterCount() {\n currentNumberOfRegisterPushed = 0;\n maxNumberOfRegisterPushed = 0;\n }", "public void setInstType(Integer instType) {\n this.instType = instType;\n }", "public void reset() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}", "protected abstract AnimationFX resetNode();", "private void resetCurrentMemoryIndex() throws Exception {\n // by using the globalParameters, the memory index can startup counters etc.\n // we set the documentCount to ensure all documents are given a unique number.\n tupleFlowParameters.getJSON().set(\"documentNumberOffset\", this.globalDocumentCount);\n currentMemoryIndex = new MemoryIndex(tupleFlowParameters);\n }", "public void reset() {\n\t\tthis.count = 0;\n\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public void resetCount() {\n count = 0;\n }", "public void unReset () {\n count = lastSave;\n }", "public void Reset() \r\n {\r\n _index = -1;\r\n }", "public void markAllNodesAsUnvisited() {\r\n visitedToken++;\r\n }", "public void reset() {\n\t\treset(ModSettings.currentContext);\n\t}", "public void reset() {\n next = 0;\n renderList.clear();\n viewList.clear();\n }", "protected void incrementCurrent() {\n current++;\n }", "public State() {\n resetTransitions();\n id = next_id++;\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public static void reInitialize() {\r\n\t\tThread houseKeeperTemp = theInstance.houseKeeper;\r\n\t\ttheInstance.houseKeeper = null;\t\t// shuts down the housekeeper thread\r\n\t\thouseKeeperTemp.interrupt();\r\n\t\ttheInstance = new GroupManager();\t\t\r\n\t}", "public void fjernAlle() {\n listehode.neste = null;\n antall = 0;\n }", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "public void reset() {\n this.state = null;\n }", "public void reset() {\n next = 1000;\n }", "protected void reset(){\n inited = false;\n }", "public void ResetCounter()\r\n {\r\n counter.setCurrentValue(this.startValue);\r\n }", "public Integer getInstNo() {\n\t\treturn instNo;\n\t}", "public void firstElement() {\r\n \t\tcurrentObject = 0;\r\n \t}", "private void resetCounter() {\n // Obtain the most recent changelist available on the client\n String depot = parent.getDepot();\n Client client = Client.getClient();\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Reset the Perforce counter value\n String counterName = parent.getCounter();\n Counter.setCounter(counterName, toChange.getNumber());\n }", "static void insAuxR(){\r\n\t\tObj aux2=aux;\r\n\t\twhile(aux2.next!=null){\r\n\t\t\taux2=aux2.next;\r\n\t\t}\r\n\t\taux2.next=lt.link;\r\n\t\tlt.link=aux;\r\n\t\t//aux=null; //Reseteamos la lista de variables!!\r\n\t}", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "protected void reset()\n {\n super.reset();\n m_seqNum = 1;\n }", "public final synchronized void reset() {\n\t\tnumTypes = numCoords = 0;\n\t}", "void setInstId(String instId);", "public void reset()\n {\n handler = new StackDynamic<T>(restart);\n }", "void clearCurrent();", "public void restartDataset() {\n data = new Instances(initialData);\r\n loadInstancesData(data);\r\n RequestContext.getCurrentInstance().update(\"IdFormDialogsSelection:IdPanelSelection\");\r\n }", "public void resetIdentificador()\r\n {\r\n this.identificador = null;\r\n }", "public void clearSupervised() {\n supervisedNodes.clear();\n }", "private Node() {\n \tthis.data = null;\n \tthis.pred = this;\n \tthis.succ = this;\n }", "public void dies(){\n currentNode.deleteAnt(this);\n \n }", "public void resetCount() {\n\t\tcount = 0;\n\t}", "public void removeCurrent( )\n {\n // Implemented by student.\n }", "@Override\n public void nullstill() {\n Node<T> curr= hode;\n while (curr!=null){\n Node<T> p= curr.neste;\n curr.forrige=curr.neste= null;\n curr.verdi= null;\n curr= p;\n }\n hode= hale= null;\n endringer++;\n antall=0;\n }", "protected void reinitialize() {\n \t\t\tfStart= fEnd= -1;\n \t\t\tfText= fPreservedText= null;\n \t\t\tfUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;\n \t\t\tfRedoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;\n \t\t}", "public void clear() {\n\t\tmSize = 0;\n\t\tmHead = new Node(null, null);\n\t\tmTail = new Node(null, null);\n\t\tmHead.next = mTail;\n\t\tmodCount++;\n\t}", "private void reinit() {\n init();\n }", "public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}", "public final void invalidateSelf() {\n this.mOwner.invalidateSelf(false);\n }", "public void unsetGi()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GI$22, 0);\r\n }\r\n }", "public synchronized void reset(){\n \t\teverbie = null;\n \t}" ]
[ "0.6452986", "0.6214252", "0.6196586", "0.6091187", "0.6055629", "0.6039774", "0.58175254", "0.5799593", "0.56620544", "0.56567585", "0.56453645", "0.5644426", "0.5491065", "0.54625577", "0.5461172", "0.54484344", "0.5437331", "0.5436554", "0.542177", "0.54129267", "0.53779435", "0.53699255", "0.53520024", "0.53511757", "0.5328962", "0.5310111", "0.52973044", "0.5277841", "0.52696735", "0.5253034", "0.5242464", "0.523983", "0.52282304", "0.522671", "0.52232", "0.52177125", "0.52177125", "0.5209656", "0.5209433", "0.52089506", "0.51996547", "0.5199192", "0.5195961", "0.5191253", "0.5171923", "0.5163025", "0.5154902", "0.5147954", "0.5137123", "0.5135073", "0.5133568", "0.51312447", "0.5121115", "0.5110934", "0.5102545", "0.5101825", "0.5098948", "0.5089652", "0.5089652", "0.5084936", "0.5084223", "0.5083209", "0.50813663", "0.50773424", "0.5076835", "0.5072867", "0.50726116", "0.507021", "0.50660324", "0.50639415", "0.50636554", "0.50557023", "0.5055428", "0.50523746", "0.5045692", "0.5037084", "0.5033655", "0.5029183", "0.5023432", "0.5023346", "0.50221777", "0.502173", "0.502066", "0.5019674", "0.50153685", "0.5014821", "0.50140905", "0.50129104", "0.500505", "0.4996283", "0.49922937", "0.49803603", "0.49770874", "0.49769032", "0.49763525", "0.49619207", "0.49617732", "0.49561414", "0.49484596", "0.49425346" ]
0.73378825
0
Stream.iterate(1, i > i + 3).limit(10)./ filter(i > i % 2 == 0). /forEach(i > System.out.println(i));
public static void main(String[] args) { List<De> d = new ArrayList<De>(); d.add(new De(1, "A", 10.2f)); d.add(new De(2, "B", 33.2f)); d.add(new De(3, "C", 55.2f)); d.add(new De(4, "D", 166.2f)); d.add(new De(5, "E", 18.2f)); d.forEach(k -> System.out.println(k.id)); Map<Integer, String> m = d.stream().collect(Collectors.toMap(i -> i.id, v -> v.name)); System.out.println(m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void streamIterate(){\n Stream.iterate(new int[]{0, 1},t -> new int[]{t[1], t[0]+t[1]})\n .limit(20)\n .forEach(t -> System.out.println(\"(\" + t[0] + \",\" + t[1] +\")\"));\n /*\n In Java 9, the iterate method was enhanced with support for a predicate.\n For example, you can generate numbers starting at 0 but stop the iteration once the number is greater than 100:\n * */\n IntStream.iterate(0, n -> n < 100, n -> n + 4)\n .forEach(System.out::println);\n }", "public static void main(String[] args) {\n System.out.println(IntStream.rangeClosed(1, 70).filter(t->t%7==0).sum());\n\n\t\t\n\t\t//2.yol\n\t\tSystem.out.println(IntStream.iterate(7, t->t+7).limit(10).sum());\n\t\t\n\t}", "@Test\n public void streamApiTest(){\n Collection<Integer> myCollection=initializeIntCollection(3,5);\n\n long sumOfOddValues3times=myCollection.stream().\n filter(o -> o % 2 ==1). // for all odd numbers\n mapToInt(o -> o*3). // multiply their value on 3\n sum(); // and return their sum (reduce operation)\n Assert.assertEquals((3+5+7)*3, sumOfOddValues3times);\n\n Optional<Integer> sumOfModulesOn3= myCollection.stream().\n filter( o -> o % 3 ==0).\n reduce((sum, o) -> sum = sum + o);\n Assert.assertEquals(new Integer(3+6), sumOfModulesOn3.get());\n\n\n\n Collection<Integer> evenCollection=new ArrayList<>();\n myCollection.\n stream().\n filter(o -> o % 2 == 0).\n forEach((i) -> evenCollection.add(i));\n }", "private static void functionStream() {\n\t\tStream.iterate(0, n -> n + 2).limit(10).forEach(System.out::println);\n\t\tStream.generate(Math::random).limit(4).forEach(System.out::println);\n\n\t}", "public static void findFirstMultipleOfSixViaStreams(List<Integer> numbers){\n\n int abc = 9;\n numbers.stream().filter(x -> {\n System.out.println(\"x = \" + x);\n return x % 6 == 0;\n }).map(x -> x + abc).findFirst();\n// Optional<Integer> firstSixMultiple = numbers.stream()\n// .filter(x -> {\n// System.out.println(\"x = \" + x);\n// return x % 6 == 0;\n// })\n// .findFirst();\n\n// int ans = firstSixMultiple.orElse(-1);\n\n// System.out.println(ans);\n }", "public static void main(String [] args) {\n Stream.of(1,17,2,6).filter(n -> n > 6).forEach(s -> System.out.println(s));\n }", "public static void main(String[] args) {\n IntStream.range(0, 10)\n .forEach(System.out::print);\n\n System.out.println();\n\n // print the range of elements but skip first 5\n IntStream.range(0, 10)\n .skip(5)\n .forEach(System.out::print);\n\n // Integer stream with sum\n System.out.println(\n IntStream\n .range(0, 10)\n .sum());\n\n }", "public static void runExercise3() {\n students.stream().filter(student -> student.getAge() > 22).limit(5).forEach(y -> System.out.println(y.getName() + \" \" + y.getAge()));\n }", "public static void main(String...args){\n\t\tIntStream.rangeClosed(2, 5).forEach(x -> System.out.println(x));\n\t\tSystem.out.println(IntStream.rangeClosed(2, 5).forEach(x -> System.out.println(x)));\n\t}", "static int multipleOf3And4_streams(int n) {\n return IntStream.range(0, n)\n .filter(value -> value % 3 == 0 || value % 5 == 0)\n .sum();\n }", "public static void main(String[] args) {\n\t\n\t\tm(\"Iterate\", () -> {\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSupplier<IntStream>[] sArr = (Supplier<IntStream>[])new Supplier[] {\n\t\t\t\t() -> IntStream.iterate(2, i -> 2 * i),\n\t\t\t\t() -> IntStream.iterate(10, i -> i - 1),\n\t\t\t\t() -> IntStream.iterate(10, i -> i),\n\t\t\t\t() -> IntStream.iterate(10, i -> 2),\n\t\t\t\t() -> IntStream.iterate(42, IntUnaryOperator.identity()),\n\t\t\t\t() -> IntStream.iterate(42, IntUnaryOperator.identity().andThen(IntUnaryOperator.identity())),\n\t\t\t};\n\t\t\tStream.of(sArr).forEach(supplier -> supplier.get().limit(10).forEach(System.out::println));\n\t\t});\n\t\t\n\t\t\n\t\t//Various IntStream generations. generate produces elements without input => it uses an IntSupplier.\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------\");\n\t\t\n\t\tm(\"Generate\", () -> {\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSupplier<IntStream>[] sArr = (Supplier<IntStream>[])new Supplier[] {\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt()),\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt()).filter(n -> n >= 0),\n\t\t\t\t() -> IntStream.generate(() -> 10),\n\t\t\t\t() -> IntStream.generate(() -> new Random().nextInt() % 20).filter(n -> n >= 0)\n\t\t\t};\n\t\t\tStream.of(sArr).forEach(supplier -> {supplier.get().limit(10).forEach(System.out::println); System.out.println(\"--------------------------------\");});\n\t\t});\n\t\t\n\t\t\n\t\t//Iterate and generate for DoubleStream, LongStream and Stream<T>\n\t\t\n\t\t\n\t\tm(\"DoubleStream iterate and generate\", () -> {\t\t\n\t\t\tDoubleStream.iterate(1, d -> d + d / 2).limit(20).forEach(System.out::println); //Uses DoubleUnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tDoubleStream.generate(() -> new Random().nextDouble()).limit(5).forEach(System.out::println); //Uses DoubleSupplier\n\t\t});\n\t\t\n\t\tm(\"LongStream iterate and generate\", () -> {\t\t\n\t\t\tLongStream.iterate(2, n -> n * n).limit(4).forEach(System.out::println); //Uses LongUnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tDoubleStream.generate(() -> new Random().nextLong()).limit(5).forEach(System.out::println); //Uses LongSupplier\n\t\t});\n\t\t\n\t\tm(\"Stream iterate and generate\", () -> {\t\t\n\t\t\tStream.<List<Object>>iterate(new ArrayList<Object>(), l -> {l.add(1); return l;}).limit(4).forEach(System.out::println); //Uses UnaryOperator\n\t\t\tSystem.out.println(\"-------------------------\");\n\t\t\tStream.<List<Object>>generate(() -> new ArrayList<Object>()).limit(4).forEach(System.out::println); //Uses Supplier\n\t\t});\n\t\t\n\t\tm(\"noneMatch\", () -> {\t\t\n\t\t\tStream<String> stream = Stream.<String>iterate(\"-\", s -> s + s);\n\t\t\tPredicate<String> predicate = s -> s.length() > 3;\n\t\t\tSystem.out.println(stream.noneMatch(predicate)); //Note: this is not infinite. None match will fail as soon as one element is found\n\t\t});\n\t\t\n\t\tm(\"allMatch\", () -> {\t\t\n\t\t\tStream<String> stream = Stream.<String>iterate(\"-\", s -> s + s);\n\t\t\tPredicate<String> predicate = s -> s.length() > 0;\n\t\t\tPredicate<String> predicate2 = s -> s.length() > 3;\n\t\t\t//System.out.println(stream.allMatch(predicate)); //Note: This is infinite and will fail with OOM error\n\t\t\tSystem.out.println(stream.allMatch(predicate2)); //Note how this will return as the first element does not match so false can be returned\n\t\t});\n\t\t\n\t}", "public static void main(String[] args) {\n range(1, 1000).sum();\n range(1, 1000).reduce(0, Integer::sum);\n Stream.iterate(0, i -> i + 1).limit(1000).reduce(0, Integer::sum);\n IntStream.iterate(0, i -> i + 1).limit(1000).reduce(0, Integer::sum);\n }", "public static void calculateSumViaStreams(List<Integer> numbers){\n int sum = numbers.stream()\n .filter(x -> x % 2 == 0)\n .map(y -> y * y)\n .reduce(0, (x, y) -> x + y);\n\n System.out.println(sum);\n }", "public static void main(String[] args) {\n\t\tDoubleStream doubleSt = DoubleStream.empty();\n\t\tDoubleStream doubleSt1 = DoubleStream.of(3.14);\n\t\tdoubleSt1.forEach(System.out::println);\n\t\tdoubleSt.forEach(System.out::println);\n\t\tdoubleSt = DoubleStream.iterate(0,n->n+1);\n\t\tSystem.out.println(\"Iterate Stream Limit\");\n\t\tdoubleSt.limit(7).forEach(System.out::println);\n\t\tdoubleSt = DoubleStream.generate(Math::random);\n\t\tSystem.out.println(\"Generate Stream Limit\");\n\t\tdoubleSt.limit(7).forEach(System.out::println);\n\t\tdoubleSt = DoubleStream.iterate(0,n->n+1);\n\t\tSystem.out.println(\"Avarage Stream Limit:\");\n\t\tdoubleSt = DoubleStream.iterate(0, n->n+1).limit(10);\t\n\t\tOptionalDouble optional = doubleSt.average();\t\n\t\tSystem.out.print(optional.getAsDouble());\n\t}", "@Test\n public void intermediateAndTerminalOperations() throws Exception {\n System.out.println(\n MockData.getCars()\n // Here we go to \"abstraction\" of strams\n .stream()\n // This is an intermediate op because we stay in the abstraction\n .filter(car -> {\n System.out.println(\"filter car \" + car);\n return car.getPrice() < 10000;\n })\n // This is intermediate too, we still working with streams \"abstraction\"\n .map(car -> {\n System.out.println(\"mapping car \" + car);\n return car.getPrice();\n })\n // same as before, still intermediate, still in streams abstraction\n .map(price -> {\n System.out.println(\"mapping price \" + price);\n return price + (price * .14);\n })\n // ok, this is a terminal operation and give you back the \"concrete type\" result of the operations\n .collect(Collectors.toList())\n );\n\n // Q: If you comment this line, no result is printed, you got only stram reference, why?\n // A: STREAMS are LAZY initialized\n\n // Q: What's the order of execution in the above code?\n // A: See the console print to understand order of execution:\n // The mappings are executed as soon as the first car passes the filter\n // so to get some results, stream don't need to filter ALL the list before\n\n }", "private void streamsMinDemo() {\n IntStream.of(numbers).min().ifPresent(System.out::println);\n IntStream.of(numbers).max().ifPresent(System.out::println);\n IntStream.of(numbers).average().ifPresent(System.out::println);\n System.out.println(IntStream.of(numbers).count());\n System.out.println(IntStream.of(numbers).sum());\n }", "@Test\n public void findFirstSquareThatIsDivisibleBy5() {\n // HINT: IntStream.range(1, 100) creates a stream 1, 2, ... 99\n final int first = 0; // TODO\n\n assertEquals(25, first);\n }", "private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }", "public static void show(){\n IntStream.rangeClosed(1,5)\n .forEach(System.out::println);\n }", "public static void main(String[] args) {\n\r\n\t\tList<Integer> ls= Arrays.asList(3,9,7,0,10,20);\r\n\t\tls.forEach(consumerWrapper(i-> System.out.println(50/i),Exception.class));\r\n\t\t\r\n\t}", "public static void runExercise5() {\n long count = students.stream().filter(student -> student.getAge() > 22).count();\n System.out.println(count);\n }", "public static void main(String[] args) {\n\t\tint i = 20;\ndo { if (i%2==0)\n\tSystem.out.println(i);\n\ti--;\n}while (i>1); \n\t\n}", "public static void main(String[] args) {\n IntStream\n .range(1, 10) //loops 1-9\n .forEach(System.out::println); //for each element print them\n System.out.println();\n\n }", "public static IntStream primeStream(){\n return IntStream.iterate(2, PrimeFactory::getNextHigherPrime);\n }", "@Benchmark\r\n\tpublic void withoutStream(Blackhole bh) {\r\n\t\tList<Double> result = new ArrayList<Double>(DATA_FOR_TESTING.size() / 2 + 1);\r\n\t\tfor (Integer i : DATA_FOR_TESTING) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tresult.add(Math.sqrt(i));\r\n\t\t\t\tbh.consume(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void terminalOperations() {\n // count\n assertEquals(4, TestData.getBooks().stream().count());\n // findFirst\n Optional<Book> gangOfFour = TestData.getBooks().stream()\n .filter(book -> book.name.equals(\"Design Patterns: Elements of Reusable Object-Oriented Software\"))\n .findFirst();\n assertTrue(gangOfFour.isPresent());\n assertEquals(4, gangOfFour.get().authors.size());\n }", "public static void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }", "void milestone3(){\n for(int i = 2; i <= 100; i++){\n int count = 0;\n for(int j = 1; j <= i; j++)\n if(i % j == 0) count += 1;\n if(count > 2) continue;\n else System.out.print(i + \" \");\n }\n System.out.println();\n }", "private int factorialUsingStreams(int n) {\r\n return IntStream.rangeClosed(1, n).reduce(1, (int x, int y) -> x * y);\r\n }", "@Test\n public void lab6() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n long count = students.stream()\n .filter(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS) > 20)\n .collect(counting());\n\n }", "@Test\n public void terminalOperationsIndeed() {\n Stream<Book> bookStream = TestData.getBooks().stream();\n assertEquals(4, bookStream.count());\n\n try {\n bookStream.count();\n fail(\"No expection got?\");\n } catch(IllegalStateException e) {\n // We got exception as expected\n }\n }", "public static void main(String[] args) {\n Random r = new Random();\n Map<Boolean, List<Integer>> boxed = r.ints(0, 101)\n .limit(10)\n .boxed()\n .collect(Collectors.partitioningBy(i -> i % 2 == 0));\n System.out.println(boxed.get(true));\n System.out.println(boxed.get(false));\n // r.ints returns an IntStream (stream of primitive ints which requires boxing/unboxing\n // can we improve?\n }", "@Test\n void doubleEvenNumbers() {\n Flux<Integer> source = Flux.range(1, 10)\n .filter(n -> n % 2 == 0)\n .map(n -> n * 2);\n\n // FIXME: Verify Flux source using StepVerifier\n }", "public static int p(int i)\n {\n return (i - 1) / 2;\n }", "public static <T> Stream<T> streamIterate(T seed, UnaryOperator<T> unaryOperator, int limit) {\n return Stream.iterate(seed, unaryOperator).limit(limit);\n }", "@Override\n\tpublic void run() {\n\t\tresult =\n\t\t\tStream.iterate(new int[]{0, 1}, s -> new int[]{s[1], s[0] + s[1]})\n\t\t\t\t.limit(limit)\n\t\t\t\t.map(n -> n[0])\n\t\t\t\t.collect(toList());\n\n\t}", "@Test\r\n void limitMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().limit(2);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", 2, afterStreamList.size());\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tList<Integer> list = Arrays.asList(1,5,8,9,8,5);\n\t\tConsumer<Integer> consumer = (index)-> System.out.println(list.get(index)*2);\n\t\tfilter(list, consumer);\n\t}", "public static void main(String[] args) {\n\t\tPredicate<Integer> even=x->x%2==0;\n\t\tList<Integer> li=Arrays.asList(1,2,3,4,5,6,7,8);\n\t\tList<Integer> Leven=li.stream().filter(even).collect(Collectors.toList());\n\t\tSystem.out.println(Leven);\n\t\tList<Integer> Lodd=li.stream().filter(even.negate()).collect(Collectors.toList());\n\t\tSystem.out.println(Lodd);\n\t}", "private static boolean isPrimeLambda(int number) {\t\t\n\t\treturn number > 1 && IntStream.range(2, number).noneMatch(index -> number % index == 0);\n\t}", "public static void main(String[] args) {\n\n\t\tArrayList<Integer> numbers = new ArrayList<Integer> ();\n\t\t\n\t\tfor(int i=1; i<=10; i++) {\n\t\t\tnumbers.add(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"numbers \" + numbers);\n\t\t\n\t\tnumbers.stream().filter(num-> num%2==0).forEach(s->System.out.println(s));\n\t\tSystem.out.println(\"=========after map==========\");\n\t\tnumbers.stream().map(num->num+5).forEach(s->System.out.println(s));\n\t}", "public void smallestMultiple(){\n outerLoop: for( int i = 2; i < Integer.MAX_VALUE; i++ ){\n for( int j = 3; j <= 20; j++ )\n if( i % j != 0 )\n continue outerLoop;\n System.out.println( i );\n break;\n }\n }", "public static void main(String[] args) {\n\n Multi.createFrom().range(0, 100)\n .select().where(n -> n % 2 == 0)\n .skip().first(40)\n .onItem().transform(n -> \"@\" + n)\n .subscribe().with(System.out::println);\n }", "public static void main(String[] args) {\n List<Integer> numbers = Arrays.asList(1, 9, -9, -32234, 8932489);\n\n //vytvorim si dalsi list integerov a priradim mu .stream Array List numbers\n List<Integer> squeredNumbers = numbers.stream()\n // .filter ako for loop, prejde arrayom numbers ak je cislo vacsie ako tri\n // podmienka pokracuje\n .filter(i -> i > 3)\n // .map zobere hodnotu i ( je to cislo z mapy) a vynasoby ju rovnakou hodnotou\n .map(i -> i * i)\n // .cllect(Collectors.toList();\n .collect(Collectors.toList());\n // vytlacime stream funkciu\n System.out.println(squeredNumbers);\n }", "@Test\n public void streamsExample() {\n List<Integer> list = asList(1, 2, 3, 4, 5);\n \n list.stream().forEach(out::println);\n \n out.println();\n \n list.stream().parallel().forEachOrdered(out::println);\n \n \n }", "public static void main(String[] args) {\nint i =1;\r\nfor(i=1; i<=20; i++)\r\n{\r\n\tif(i % 2 == 1)\r\nSystem.out.println(i);\r\n}\r\nSystem.out.println(\"Printing only the odd numbers from 1 to 20\");\r\n\t}", "public abstract Stream<E> streamBlockwise();", "public static void main(String[] args) {\n\t\tList<Integer> numberList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\r\n\t\t\t\t\r\n\t\t//Stampa il doppio di ogni numero\r\n\t\tSystem.out.println(\"Stampa il doppio di ogni numero\");\r\n\t\tnumberList.forEach((i)-> System.out.print(numberList.get(i-1)*2+ \" \"));\r\n\t\t\r\n\t\t//Recupera lo stream a partire dalla lista\r\n\t\tStream<Integer> streamInt = numberList.stream();\r\n\t\tSystem.out.println(\"\");\r\n\t\t//Stampa il quadrato di ogni numero\r\n\t\tSystem.out.println(\"Stampa il quadrato di ogni numero\");\r\n\t\tstreamInt.forEach((p)->System.out.print(p*p +\" \"));\r\n\t\t\r\n\t\t//Stampa i numeri Dispari\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Stampa i numeri Dispari\");\t\t\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach(System.out::print); \t\t\r\n\t\tSystem.out.println(\"\");\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach((n)->System.out.print(n));\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tList<String> stringList = Arrays.asList(\"a1\", \"c6\", \"a2\", \"b1\", \"c2\", \"c1\", \"c5\", \"c3\");\r\n\t\tstringList.stream().filter(s -> s.startsWith(\"c\")).map(String::toUpperCase).sorted().forEach(System.out::println);\r\n\t\t\t\t\r\n\t\t//Stampa le donne della mia famiglia\r\n\t\tMyFamily myFamily = new MyFamily();\r\n\t\tSystem.out.println(\"Stampa le donne della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Stampa gli uomini della mia famiglia\r\n\t\tSystem.out.println(\"Stampa gli uomini della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->!p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Calcola la somma dell'eta dei maschi della mia famiglia\r\n\t\tInteger anniMaschi = myFamily.getMyFamily().stream().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\r\n\t\t\r\n\t\t//These reduction operations can run safely in parallel with almost no modification:\r\n\t\tInteger anniMaschi2 = myFamily.getMyFamily().stream().parallel().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\t\t\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi);\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi2);\r\n\r\n\t\t\r\n\t}", "private void usingPrimitiveStream() {\n IntStream.range(1, 4).forEach(System.out::println);\n DoubleStream.of(2.3, 4.3).forEach(System.out::println);\n LongStream.range(1, 4).forEach(System.out::println);\n }", "private void verifyNumbersPrimeWitStream(){\n\t\tList<Integer> primeList = IntStream.range(2, Integer.MAX_VALUE)\n\t\t\t\t.filter(n -> isPrime(n))\n\t\t\t\t.limit(primes.length)\n\t\t\t\t.boxed()\n\t\t\t\t.collect(Collectors.toList());\n\t\tprimes = primeList.stream().mapToInt(i->i).toArray();\n\t}", "public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }", "public static long compute(long limit) {\n return Stream.iterate(new long[]{1, 2}, p -> new long[]{p[1], p[0] + p[1]})\n .limit(100)\n .filter(e -> e[0] < limit && e[0] > 0)\n .mapToLong(e -> e[0])\n .filter(e -> e % 2 == 0)\n .sum();\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public static void main(String[] args) {\n\r\n\t\tfinal Stream<BigInteger> primes = Stream.iterate(new BigInteger(\"2\"), BigInteger::nextProbablePrime).limit(100);\t\t\r\n\t\tprimes.forEach(System.out::println);\r\n\r\n\t}", "public static void scan() {\n Observable.range(1, 10)\n .scan((previous, current) -> {\n System.out.println(\"previous = \" + previous);\n System.out.println(\"current = \" + current);\n return previous + current;\n }).subscribe(new MyObserver<>());\n }", "public int solution(int[] A) {\n Map<Integer, Integer> map = new HashMap<>();\n\n// for (int i = 0; i < A.length; i++) {\n// map.computeIfPresent(A[i], (key, value) -> ++value);\n// map.putIfAbsent(A[i], 1);\n// }\n IntStream.range(0, A.length)\n .forEach(i -> {\n map.computeIfPresent(A[i], (key, value) -> ++value);\n map.putIfAbsent(A[i], 1);\n });\n\n // TODO: case01. entrySet 2021/04/22 2:03 오후\n map.entrySet().stream()\n .filter(key -> (map.get(key.getKey()) % 2) == 1)\n .forEach(entry -> {\n System.out.println(entry.getKey());\n });\n\n // TODO: case02. entrySet 2021/04/22 2:03 오후\n map.entrySet().stream()\n .map(Map.Entry::getKey)\n .filter(key -> map.get(key) % 2 == 1)\n .forEach(System.out::println);\n\n // TODO: case03. keySet 2021/04/22 2:04 오후\n map.keySet().stream()\n .filter(value -> map.get(value) % 2 == 1)\n .forEach(System.out::println);\n\n // TODO: case04. keySet 2021/04/22 2:04 오후\n return map.keySet().stream()\n .filter(value -> map.get(value) % 2 == 1)\n .findFirst()\n .get();\n\n\n// int result = 0;\n// for (Integer i : map.keySet()) {\n// int value = map.get(i);\n//\n// System.out.println(value);\n// if (value % 2 == 1) {\n// result = i;\n// break;\n// }\n// }\n//\n// return result;\n }", "int getMinimalIterationCount();", "public static void main(String[] args) {\n\t\tint i = 2;\n\t\twhile(i<10) {\n\t\t\tif(isDivisible(20*i)){\n\t\t\t\tSystem.out.println(\"Final: \"+20*i+\" with i= \"+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti=i+2;\n\t\t}\n\t}", "public static void main(String[] args) {\n Iterable<Integer> integers = Lists.newArrayList();\n ArrayList<Integer> integers1 = Lists.newArrayList(Iterables.filter(integers, integer -> integer != 1));\n System.out.println(integers1.toString());\n int size = Iterables.size(integers);\n System.out.println(\"size:\"+size);\n Integer last = Iterables.getLast(integers);\n System.out.println(\"last:\"+last);\n }", "public static void main(String[] args){\r\n int i=100;\r\n while (i>0) { \r\n if (i%2!=0) {\r\n System.out.print(i+\"\\n\");\r\n }\r\n i--;\r\n } \r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tIntStream.range(0, 10).forEach(i -> System.out.println(i));\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(1);\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tlist.add(7);\n\t\t\n\t\tIterator<Integer> it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()) {\n\t\t\tint element = it.next();\n\t\t\tSystem.out.println(\"element \"+element);\n\t\t\tif(element == 1) {\n\t\t\t\tit.remove();\n\t\t\t\tit.next();\n\t\t\t\tit.remove();\n\t\t\t\t//it.forEachRemaining(Filter::add);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(\"list \"+list);\n\t\t\n\t\t//forEach\n\t//\tlist.forEach(System.out::println);\n\t\t//list.forEach(Filter::filter);\n\t//\tlist.forEach(new Filter());\n\t}", "private void streamsMinDemoOptimized() {\n IntSummaryStatistics stats = IntStream.of(numbers).summaryStatistics();\n System.out.println(stats.getMin());\n System.out.println(stats.getMax());\n System.out.println(stats.getAverage());\n System.out.println(stats.getCount());\n System.out.println(stats.getSum());\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tnumbers.add(5);\n\t\tnumbers.add(50);\n\t\tnumbers.add(10);\n\t\tnumbers.add(60);\n\t\tnumbers.add(15);\n\t\tnumbers.add(70);\n\t\t\n\t\tSystem.out.println(numbers);\n\t\t\n\t\tList<Integer> evenNumbers = numbers.stream().filter(I -> I%2==0).collect(Collectors.toList());\n\t\tSystem.out.println(evenNumbers);\n\t}", "@Test\r\n public void allNumbersAreEven() {\r\n it = new EvenIterator(new int[]{2, 4, 6, 8});\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(2));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(4));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(6));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(8));\r\n }", "@Test\n public void lab5() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n //List<Long> listOfAges = students.stream()\n Set<Long> listOfAges = students.stream()\n .filter(s -> s.getStatus() == Student.Status.HIBERNATING)\n .map(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS))\n .collect(toSet());\n\n\n }", "public static void main(String[] args) {\n\n\n int i = 0;\n while (i < 10) {\n i++;\n if (i%2==0) {\n System.out.println(i);\n }\n }\n }", "@Test\n public void when1To49ThenB() {\n Student a = new Student(49);\n Student b = new Student(50);\n Student c = new Student(102);\n Student d = new Student(0);\n Student e = new Student(140);\n Predicate<Student> predicate = s -> s.getScore() > 0 && s.getScore() < 50;\n List<Student> expected = List.of(a, c, e);\n List<Student> students = List.of(a, b, c, d, e);\n List<Student> result = new School().collect(students, predicate);\n assertThat(result, equalTo(expected));\n }", "StandardFilterBuilder standardFilter(int count);", "public void scan(){\r\n\t\tObservable<Integer> range = Observable.range(1,5);\r\n\t\trange.scan((t1,t2)->t1+t2).subscribe(t->System.out.println(\"scan \"+t));\r\n\t}", "public static void main(String[] args) {\n\t\tfor(int i = 1; i<=20;i++) {\n\t\t\tif(i>=5 && i<=10)\n\t\t\t\tcontinue;\n\t\t\tSystem.out.println(i);\n\t\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n IntStream intStream = IntStream.generate(()->(int)(Math.random()*10)).limit(100000);\n\n ArrayList<Integer> array = new ArrayList<>();\n\n for(int i=0;i<10;i++)\n array.add(i);\n\n Main main = new Main();\n\n double average = main.average(array);\n System.out.println(\"Średnia: \"+average);\n\n double streamAverage = IntStream.generate(()->(int)(Math.random()*10)).limit(100000).average().getAsDouble();\n System.out.println(\"Średnia stream: \"+streamAverage);\n\n }", "public void callLazystream()\n {\n\n Stream<String> stream = list.stream().filter(element -> {\n wasCalled();\n System.out.println(\"counter in intermediate operations:\" + counter);\n return element.contains(\"2\");\n });\n\n System.out.println(\"counter in intermediate operations:\" + counter);\n }", "@Test public void hofCont() {\n check(\"declare function local:f($n) { if($n eq 0) then 42 else local:f($n - 1) };\" +\n \"distinct-values(fn:for-each((1 to 10) ! 1000, function($x) { local:f($x) }))\",\n\n 42\n );\n }", "public void multiplesOfFive()\n {\n int index = 10;\n int max = 95;\n\n while (index <= 95) {\n System.out.println(index);\n index += 5;\n }\n }", "private int p(K k, int i) {\r\n return i/2 + (i*i)/2 + (i%2);\r\n }", "public static void main(String[] args)\r\n {\n int sum=0;\r\n for (int i=1; i<=10; i++)\r\n sum += i;\r\n System.out.printf(\"The sum was: %d%n\", sum);\r\n \r\n //new way using Streams\r\n System.out.printf(\"The sum with streams is: %d%n\", IntStream.rangeClosed(1,10)\r\n .sum());\r\n \r\n \r\n }", "public static void hasNext() {\n\tLinkedList<Integer> list = new LinkedList<>();\n\t\n\tfor (int i = 0; i< 100; i++)\n\t\tif (i % 2 == 0) \n\t\t\tlist.add(i);\n\t\n\tIterator<Integer> g = list.iterator();\n\t\n\t// loop controlled by hasNext\n\twhile(g.hasNext())\n\t\tInteger x = g.next();\n\t \n\t\t//use x .....\n\t\n\n}", "public static void runExercise4() {\n students.stream().mapToInt(student -> student.getAge()).average().ifPresent(System.out::println);\n }", "public static void main(String[] args) {\n\n int n = 0;\n for(int i=0; i<100; i++){\n if(i%2==1){\n n =i;\n } else\n n =i;\n }\n System.out.println(n);\n }", "public static void main(String[] args){\n for(int i = 1 ;i < 1000; i++){\n int x = i / 100;\n int y = (i % 100) / 10;\n int z = i % 10;\n int sum = x*x*x + y*y*y +z*z*z;\n if(i == sum || i < 10)\n System.out.println(i);\n }\n }", "public static void main(String[] args) {\n\tint count = 99 ;\t\n\tint ten = 0 ;\n\tSystem.out.println(\"Counting from 100 to 200\") ; \n\tSystem.out.println(\"Divisible by 5 or 6, but not both\") ;\n\tSystem.out.println(\"_______________________________________\") ;\n\t\t\n\t\t//Display all the numbers between 100 and 200\n\t\tdo {\n\t\t\tif (count % 5 == 0 ^ count % 6 == 0) {\n\t\t\t\tSystem.out.print(count + \" \") ;\n\t\t\t\tten++;\n\t\t\t}//display only 10 per line\n\t\t\tif (ten == 10){\n\t\t\t\tSystem.out.println() ;\n\t\t\t\tten = 0 ;\n\t\t\t}\n\t\t\tcount++ ;\n\t\t} while (count <= 200);\t\n\t\t\t\n\t}", "private static boolean isPrimeInFunctionalApproach1(int num) {\n \n return num > 1 &&\n IntStream.range(2, num)\n .noneMatch(divisor -> num % divisor == 0);\n }", "private static void ejercicio1() {\n List<Integer> numeros = Arrays.asList(1, 2, 3, 4, 5);\n numeros.stream().map(numero -> Main.calculaCubo(numero)).forEach(numero -> System.out.print(numero + \" \"));\n System.out.println();\n numeros.stream().map(Main::calculaCubo).forEach(numero -> System.out.print(numero + \" \"));\n }", "private static void testStreamFormList() {\n\n Integer[] ids = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};\n\n/*\n Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .collect(Collectors.toList())\n .forEach(System.out::println);\n*/\n/*\n Random r = new Random();\n Integer integer = Stream.of(ids)\n .filter(i -> i % 2 == 0)\n .filter(i -> i % 3 == 0)\n .filter(i -> i % 5 == 0)\n .findFirst()\n// .orElse(0);\n .orElseGet(()->r.nextInt());\n System.out.println(integer);\n*/\n Stream.of(ids)\n .filter(i -> i % 2 == 0)\n .filter(i -> i % 3 == 0)\n .skip(2)\n .limit(1)\n .forEach(System.out::println);\n\n/*\n Optional<Employee2> first = Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .findFirst();\n System.out.println(first);\n*/\n/*\n OptionalDouble average = Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .mapToInt(Employee2::getSalary)\n .average();\n System.out.println(average);\n*/\n\n List<List<Employee2>> departments = new ArrayList<>();\n departments.add(employeeList);\n departments.add(secondList);\n\n/*\n departments.stream().flatMap(l -> l.stream()\n .map(e -> e.getFirstName())).forEach(System.out::println);\n*/\n\n/*\n Stream.of(ids).map(e -> String.format(\"%,3d\", e)).forEach(System.out::print);\n System.out.println();\n Stream.of(ids)\n// .peek(e -> e = e * 2)\n .map(e -> String.format(\"%,3d\", e * 2))\n .forEach(System.out::print);\n System.out.println();\n*/\n/*\n Consumer<Integer> c = e -> e = e * 2;\n Stream.of(ids).forEach(c);\n System.out.println(c);\n*/\n }", "public static void main(String args[] ) throws Exception {\n \n Scanner s = new Scanner(System.in);\n List<String> inputList = new ArrayList<String>(); \n int limit = Integer.parseInt(s.nextLine());\n while (s.hasNextLine()) {\n \n String scanValue = s.nextLine();\n inputList.add(scanValue); \n } \n\n List<Integer> intList = getAllValuesArr(inputList);\n \n intList.stream().forEach(i -> {\n\n IntStream.range(1, i+1).forEach(num -> { \n printRangeNumbers(num); \n });\n });\n \n\n\n }", "public static void main(String[] args) {\n Consumer<Integer> consumer = x ->{\n System.out.println(\"Number is :\"+x);\n };\n consumer.accept(55);\n //Supplier\n Supplier<String> str = () -> \"Implementation of Supplier \";\n System.out.println(str.get());\n //Predicate\n int a=37;\n Predicate<Integer> isOddPredicate = x -> x%2 != 0;\n System.out.println(\"Is \"+a+\" Odd Number :\"+isOddPredicate.test(a));\n //Function\n int b=7;\n Function<Integer,Integer> squareFunction = x -> x*x;\n System.out.println(\"Square of \"+b+\" is \"+squareFunction.apply(b));\n\n //Example\n List<Integer> list = List.of(12,9,13,4,6,2,4);\n Consumer<Integer> con = System.out::println;\n System.out.println(\"Example(Square of odd no.) : \");\n list.stream()\n .filter(isOddPredicate)\n .map(squareFunction)\n .forEach(con);\n\n\n\n }", "public static void main(String[] args) {\n\n int N = Integer.MAX_VALUE;\n\n\n for (int n = 2; n < N ; n++) {\n boolean prost = true;\n for (int i = 2; i < n; i++) {\n\n if (n % i == 0) {\n prost = false;\n\n }\n }\n if (prost) {\n System.out.println(n);\n }\n }\n\n\n }", "@Test\n public void when50To69ThenB() {\n Student a = new Student(40);\n Student b = new Student(70);\n Student c = new Student(101);\n Student d = new Student(58);\n Student e = new Student(69);\n Predicate<Student> predicate = s -> s.getScore() >= 50 && s.getScore() < 70;\n List<Student> expected = List.of(d, e);\n List<Student> students = List.of(a, b, c, d, e);\n List<Student> result = new School().collect(students, predicate);\n assertThat(result, equalTo(expected));\n }", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tSystem.out.println(\"-------1. Stream filter() example---------\");\r\n\t\t//We can use filter() method to test stream elements for a condition and generate filtered list.\r\n\t\t\r\n\t\tList<Integer> myList = new ArrayList<>();\r\n\t\tfor(int i=0; i<100; i++) myList.add(i);\r\n\t\tStream<Integer> sequentialStream = myList.stream();\r\n\r\n\t\tStream<Integer> highNums = sequentialStream.filter(p -> p > 90); //filter numbers greater than 90\r\n\t\tSystem.out.print(\"High Nums greater than 90=\");\r\n\t\thighNums.forEach(p -> System.out.print(p+\" \"));\r\n\t\t//prints \"High Nums greater than 90=91 92 93 94 95 96 97 98 99 \"\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-------2. Stream map() example---------\");\r\n\t\t//We can use map() to apply functions to an stream\r\n\t\tStream<String> names = Stream.of(\"aBc\", \"d\", \"ef\");\r\n\t\tSystem.out.println(names.map(s -> {\r\n\t\t\t\treturn s.toUpperCase();\r\n\t\t\t}).collect(Collectors.toList()));\r\n\t\t//prints [ABC, D, EF]\r\n\t\t\r\n\t\tSystem.out.println(\"-------3. Stream sorted() example---------\");\r\n\t\t//We can use sorted() to sort the stream elements by passing Comparator argument.\r\n\t\tStream<String> names2 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> reverseSorted = names2.sorted(Comparator.reverseOrder()).collect(Collectors.toList());\r\n\t\tSystem.out.println(reverseSorted); // [ef, d, aBc, 123456]\r\n\r\n\t\tStream<String> names3 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> naturalSorted = names3.sorted().collect(Collectors.toList());\r\n\t\tSystem.out.println(naturalSorted); //[123456, aBc, d, ef]\r\n\t\t\r\n\t\tSystem.out.println(\"-------4. Stream flatMap() example---------\");\r\n\t\t//We can use flatMap() to create a stream from the stream of list.\r\n\t\tStream<List<String>> namesOriginalList = Stream.of(\r\n\t\t\t\tArrays.asList(\"Pankaj\"), \r\n\t\t\t\tArrays.asList(\"David\", \"Lisa\"),\r\n\t\t\t\tArrays.asList(\"Amit\"));\r\n\t\t\t//flat the stream from List<String> to String stream\r\n\t\t\tStream<String> flatStream = namesOriginalList\r\n\t\t\t\t.flatMap(strList -> strList.stream());\r\n\r\n\t\t\tflatStream.forEach(System.out::println);\r\n\r\n\t}", "public static void main(String[] args) {\n List<Employee> employees = List.of(\n new Employee(\"laptop\", 1, 1000),\n new Employee(\"laptop\", 1, 8000),\n new Employee(\"laptop\", 2, 2000),\n new Employee(\"laptop\", 3, 3000),\n new Employee(\"laptop\", 4, 4000),\n new Employee(\"laptop\", 5, 5000),\n new Employee(\"laptop\", 6, 6000)\n );\n\n IntStream.range(3, 6).forEach(index -> System.out.println(employees.get(index)));\n\n employees.stream().skip(3).forEach(System.out::println);\n\n IntStream generate = IntStream.generate(() -> 1);\n //generate.forEach(System.out::println);\n\n Map<Integer, Integer> map = employees.stream().collect(Collectors.toMap(Employee::dept, employee -> employee.salary()));\n System.out.println(map.values());\n\n }", "public static void main(String[] args){\n int i = 0;\n int sum = 0;\n while (sum <= 10){\n i++;\n sum += i;\n System.out.println(i+ \",\" + sum);\n }\n }", "@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }", "public static void runExercise7() {\n students.stream().filter(student -> student.getAge()>20).map(student -> student.getLastName() + \" \" + student.getFirstName()).sorted().forEach(System.out::println);\n }", "private static boolean isPrimeInFunctionalApproach2(int num) {\n \n return num > 1 &&\n IntStream.rangeClosed(2, (int) Math.sqrt(num))\n .noneMatch(divisor -> num % divisor == 0);\n }", "@Test\n public void iterate0() {\n runAndWait(() -> {\n int err = 0;\n RBTree<Integer> tree = new RBTree<>();\n List<Integer> list = new ArrayList<>(List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));\n Collections.shuffle(list);\n tree.addAll(list);\n Collections.sort(list);\n int i = 0;\n for (int val : tree) {\n if (i >= list.size()) {\n fail(\"The tree iterated over more elements than the initial list!\");\n }\n if (val != list.get(i)) {\n System.err.println(\"Expected the value \" + list.get(i) + \", but found \" + val);\n err++;\n }\n i++;\n }\n assertEquals(\"There were \" + err + \" errors!\", 0, err);\n }, 64, 1000);\n \n }", "int getMaximalIterationCount();", "public void testConsumer ()\n {\n\n List<String> list = new ArrayList<>();\n list.add(\"ccc\");\n list.add(\"bbb\");\n list.add(\"ddd\");\n list.add(\"DDDD\");\n list.add(\"ccc\");\n list.add(\"aaa\");\n list.add(\"eee\");\n\n// Collections.sort(list);\n// Collections.sort(list, (s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.sort((s, s2) -> s.compareTo(s2));\n// list.sort((s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.forEach(s -> System.out.println(s));\n// list.forEach(s -> System.out.println(s));\n\n\n// Predicate<String> predicate2 = s -> s.length()>3;\n// System.out.println(\"predicate2.test(\\\"DDDD\\\") = \" + predicate2.test(\"DDDD\"));\n\n// Stream<String> stringStream = list.stream();\n// stringStream.forEach(s -> System.out.println(s));\n// stringStream.forEach(s -> System.out.println(s));//会报错\n\n// list.stream().forEach(s -> System.out.println(s));\n// list.stream().forEach(s -> System.out.println(s));\n\n //并行流是无序的\n// list.parallelStream().forEach(s -> System.out.println(s));\n// list.parallelStream().forEach(s -> System.out.println(s));\n\n// list.stream().skip(3).forEach(s -> System.out.println(s));\n// list.stream().distinct().forEach(s -> System.out.println(s));\n// System.out.println(\"list.stream().count() = \" + list.stream().count());\n// list.stream().limit(2).forEach(s -> System.out.println(s));\n\n// list.stream().filter(s -> s.length()<4).forEach(s -> System.out.println(s));\n\n// BiFunction<Integer, String, Person> bf = Person::new;\n// BiFunction<Integer, String, Person> bf = (n, s) -> new Person(s);\n\n// Person aaa = bf.apply();\n\n// System.out.println(\"aaa = \" + bf.apply(0, \"aaa\"));\n \n }", "static void problemEight() {\n int i = 0;\n int prevNum = 1;\n System.out.println(i);\n while (i < 50) {\n int temp = i + prevNum;\n if (temp < 50) System.out.println(temp);\n prevNum = i;\n i = temp;\n }\n }", "public static void main(String []args) {\n\t\tList<String> numbers = Arrays.asList(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\",\"7\",\"8\",\"9\");\r\n\t\t//Generate numbers from 1 to 9\r\n\t\tSystem.out.println(IntStream.range(1,10).mapToObj(String::valueOf).collect(Collectors.toList()));\r\n//\t\tSystem.out.println(\"Original list \" + numbers);\r\n\t\t\r\n\t\tList<Integer> even = numbers.stream()\r\n\t\t\t\t//gets the integer value from the string\r\n//\t\t\t\t.map(s ->Integer.valueOf(s))\r\n\t\t\t\t.map(Integer::valueOf) // Another way to do the top line(line 18)\r\n\t\t\t\t//checking if it is even\r\n\t\t\t\t.filter(number -> number % 2 ==1)// Odd numbers\r\n//\t\t\t\t.filter(number -> number % 2 ==0)// Even numbers\r\n\t\t\t\t//Collects results in to list call even.\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\tSystem.out.println(even);\r\n\r\n\t\tList<String> strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\", \"\", \"jkl\", \"\", \"\");\r\n\t\tSystem.out.println(strings);\r\n\t\t\r\n\t\tList<String> filtered = strings.stream()\r\n\t\t\t\t// checking each item and we check it is empty\r\n\t\t\t\t.filter(s-> !s.isEmpty())\r\n//\t\t\t\t.filter(s-> s.isEmpty())\r\n\t\t\t\t// add the remaining element to the list\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\tSystem.out.println(filtered);\r\n\t\t\r\n\t\t// Known as a method reference \r\n//\t\tforEach(System.out::println)\r\n\t\t \r\n\t}" ]
[ "0.712569", "0.63256335", "0.6201333", "0.59979314", "0.59899855", "0.5971149", "0.5829756", "0.57908726", "0.5772725", "0.5751812", "0.5690259", "0.5682964", "0.5612929", "0.55413395", "0.5508597", "0.5477983", "0.54697573", "0.54657096", "0.5412092", "0.53878164", "0.53622806", "0.5323258", "0.53077024", "0.5301653", "0.52967924", "0.52920014", "0.52662873", "0.5260608", "0.5246315", "0.52342033", "0.52341646", "0.5215581", "0.5196542", "0.51951206", "0.5180971", "0.5175862", "0.5170229", "0.51672864", "0.51623875", "0.51565623", "0.51425445", "0.51298964", "0.5129695", "0.51164997", "0.5078623", "0.5065123", "0.5056257", "0.50525475", "0.5051308", "0.5033554", "0.50242984", "0.50217503", "0.5019764", "0.50105214", "0.50027037", "0.4998788", "0.4988663", "0.4982738", "0.49787945", "0.49716562", "0.49589407", "0.4936577", "0.49237305", "0.49169323", "0.4913131", "0.49120873", "0.4905962", "0.49056572", "0.49054143", "0.4892142", "0.48832977", "0.48773998", "0.48628467", "0.48614863", "0.48572925", "0.48480377", "0.4845605", "0.48406655", "0.48350793", "0.4829291", "0.48186988", "0.4818517", "0.48165306", "0.48150513", "0.47992164", "0.47991458", "0.4798157", "0.47963107", "0.4765328", "0.475497", "0.47497088", "0.47481254", "0.4745161", "0.47398496", "0.47340712", "0.4727194", "0.47212675", "0.47138622", "0.4706068", "0.47031948", "0.46997717" ]
0.0
-1
An interface for distribution components that need to do receiving from the transport.
public interface Receiving { /** * This method is called just after a message * has been received from some underlying transport * at a particular multicast address. */ public void received(ByteArrayInputStream bis, MetaData metaData) throws IOException, TypeException, ReflectiveOperationException; /** * This method is called just after there has been an error * in received from some underlying transport. * This passes the exception into the Receiving object. */ public void error(Exception e); /** * This method is called just after there has been EOF * in received from some underlying transport. */ public void eof(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}", "public interface Transport {\r\n /**\r\n * Prepares connection to server and returns connection output stream.\r\n * \r\n * @param info\r\n * connection information object containing target URL, content encoding, etc.\r\n * @return connection output stream\r\n * @throws TransportException\r\n */\r\n OutputStream prepare(ConnectionInfo info) throws TransportException;\r\n \r\n \r\n // this method used for wsg request -- by felix\r\n /**\r\n * Prepares connection to server and returns connection output stream.\r\n * \r\n * @param info\r\n * connection information object containing target URL, content encoding, etc.\r\n * @return connection output stream\r\n * @throws TransportException\r\n */\r\n void prepare(ConnectionInfo info,byte[] reqXml) throws TransportException;\r\n\tpublic InputStream configPrepare(ConnectionInfo info) throws TransportException;\r\n public InputStream prepareAndConnect(ConnectionInfo info) throws TransportException ;\r\n public void prepareWsgPost(ConnectionInfo info,byte[] reqXml) throws TransportException ;\r\n \r\n\r\n /**\r\n * Sends request to server and receives a response.\r\n * <em>{@link #prepare(ConnectionInfo)} should be called prior to performing an exchange.</em>\r\n * \r\n * @return input stream containing server response\r\n * \r\n * @throws TransportException\r\n */\r\n InputStream exchange() throws TransportException;\r\n\r\n /**\r\n * Closes any pending connections and frees transport resources.\r\n */\r\n void close();\r\n}", "@Override\n\tpublic void receiveProduct(Product product) {\n\t\t\n\t}", "public interface Provider {\n public Sender produce();\n}", "public abstract Pipe deliver( Pipe sink );", "public interface TransportSender {\n\n /**\n * Send messages using the underlying transport protocol.\n *\n * @param message The message to send\n */\n void send(String message);\n\n /**\n * Send messages to a particular uri using the underlying transport protocol.\n * Might not be implemented in case the underlying transport doesn't support it.\n *\n * @param message The message to send\n * @param uri The uri to send messages to\n */\n void send(String message, String uri);\n\n /**\n * Shutdowns the transport sender, which means typically to release resources, like sockets.\n */\n void shutdown();\n}", "public interface TransportAdapterClient {\r\n \r\n /**\r\n * Initializes instance. Configuration parameters are specific\r\n * to Transport Adapter implementation.\r\n * @param configuration\r\n */\r\n public void init(Map<String, String> configuration);\r\n \r\n /**\r\n * Submits batch to server side.\r\n * @param batch\r\n */\r\n public void submit(Batch batch);\r\n \r\n /**\r\n * Submits batch to server side applying operation filter if specified\r\n * i.e. only those batch units will be submitted which have operation\r\n * equal to provided operation filter.\r\n * \r\n * @param batch\r\n * @param opFilter\r\n */\r\n public void submit(Batch batch, BatchOperation opFilter); \r\n\r\n /**\r\n * Tests specified store alive.\r\n * @param storeName\r\n * @return\r\n */\r\n public boolean isAlive(String storeName);\r\n \r\n \r\n /**\r\n * Returns stream on content specified by content Id from store\r\n * specified by store Name.\r\n * \r\n * FIXME Providing OutputStream here implies that CSPCache must be capable\r\n * to provide either File as a future content placeholder or a OutputStream itself\r\n * \r\n * @param storeName\r\n * @param contentId\r\n * @param target is output stream to which content should be written\r\n */\r\n public void get(String storeName, Long jcrContentId, OutputStream target);\r\n \r\n \r\n}", "public interface Channel {\n\n\t/**\n\t * Call this to send an article to its destination.\n\t * @param article the article to send\n\t */\t\n\tvoid accept(Article article);\n}", "public interface DistributorConnector {\n\n /**\n * Lets the factory know what the current demand of the distributor is.\n *\n * @param demandPerType the demand of the distributer by type\n */\n public void setDemand(Map<ClockType, Integer> demandPerType);\n\n /**\n * Registers a listener for clock updates in the distributor stock.\n *\n * @param listener the listener to be registered\n * @return a subscription for the registration that can be cancelled\n */\n public Subscription subscribeForDistributorDeliveries(ClockListener listener);\n\n /**\n * Removes the given clock from the distributor stock.\n *\n * @param removedClock the clock to be removed.\n */\n public void removeClockFromStock(Clock removedClock);\n}", "public interface Sendable {\n\n}", "@Override\n\tpublic void receive() {\n\t}", "public interface ReceiverService {\n void process(String message);\n}", "public interface IDelivery {\n /**\n * Distribution request response result\n * \n * @param request\n * @param response\n */\n public void postRequestResponse(Request<?> request, Response<?> response);\n\n /**\n * Distribute Failure events\n * \n * @param request\n * @param error\n */\n public void postError(Request<?> request, HttpException error);\n\n /**\n * Distribution to read the cached results response\n * @param request\n * @param cacheData\n */\n public <T>void postCacheResponse(Request<?> request, T cacheData);\n \n /**\n * Prepare events at the start of the request\n * @param request\n */\n public void postRequestPrepare(Request<?> request);\n \n /**\n * Distribution to retry event\n * @param request\n * @param previousError An exception before\n */\n public void postRequestRetry(Request<?> request, int currentRetryCount, HttpException previousError);\n \n /**\n * Delivered current progress for request\n * @param request\n * @param transferredBytesSize\n * @param totalSize\n */\n public void postRequestDownloadProgress(Request<?> request, long transferredBytesSize, long totalSize);\n \n /**\n * Delivered upload progress for request\n * @param request\n * @param transferredBytesSize\n * @param totalSize\n * @param currentFileIndex The subscript is currently being uploaded file\n * @param currentFile Is currently being uploaded files\n */\n\tpublic void postRequestUploadProgress(Request<?> request, long transferredBytesSize, long totalSize, int currentFileIndex, File currentFile);\n\n}", "public interface DataReceiver {\n LogReplicationEntry receive(LogReplicationEntry message);\n}", "public interface UMOMessageReceiver extends Lifecycle, UMOConnectable\n{\n /**\n * @return the receivers endpoint\n */\n UMOImmutableEndpoint getEndpoint();\n\n /**\n * @param message\n * @param exception\n */\n // void handleException(Object message, Throwable exception);\n /**\n * @return the component associated with the receiver\n */\n UMOComponent getComponent();\n\n /**\n * @param endpoint the endpoint to listen on\n * @see UMOImmutableEndpoint\n */\n void setEndpoint(UMOImmutableEndpoint endpoint);\n\n /**\n * @param component the component to associate with the receiver. When data is\n * received the component <code>dispatchEvent</code> or\n * <code>sendEvent</code> is used to dispatch the data to the\n * relivant UMO.\n */\n void setComponent(UMOComponent component);\n\n void setConnector(UMOConnector connector);\n\n UMOConnector getConnector();\n\n /**\n * The endpointUri that this receiver listens on\n * \n * @return\n */\n UMOEndpointURI getEndpointURI();\n\n String getReceiverKey();\n\n void setReceiverKey(String key);\n\n UMOMessage routeMessage(UMOMessage message) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, boolean synchronous) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, UMOTransaction trans, boolean synchronous)\n throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, OutputStream outputStream) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, boolean synchronous, OutputStream outputStream)\n throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message,\n UMOTransaction trans,\n boolean synchronous,\n OutputStream outputStream) throws UMOException;\n\n}", "public interface SendService {\n\n void send(String exchange,String routingKey,String content);\n}", "boolean deliver(CommInfrastructure busType, String topic, Object event);", "protected RemoteFactory.Agent.Provides<Msg, Ref> provides() {\n assert this.selfComponent != null: \"This is a bug.\";\n if (!this.init) {\n \tthrow new RuntimeException(\"provides() can't be accessed until a component has been created from this implementation, use start() instead of the constructor if provides() is needed to initialise the component.\");\n }\n return this.selfComponent;\n }", "protected RemoteFactory.Provides<Msg, Ref> provides() {\n assert this.selfComponent != null: \"This is a bug.\";\n if (!this.init) {\n \tthrow new RuntimeException(\"provides() can't be accessed until a component has been created from this implementation, use start() instead of the constructor if provides() is needed to initialise the component.\");\n }\n return this.selfComponent;\n }", "public interface ProducerService {\n}", "@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}", "public interface BrokerInterface extends Remote {\n /**\n * Subscribes to a game\n * @param subscriber the interface on which the broker calls the dispatch message method\n * @param clientId the unique id of the client to find in which game it belongs\n * @throws RemoteException\n */\n public void subscribe(SubscriberInterface subscriber, UUID clientId) throws RemoteException;\n}", "public interface ITransportHandler {\n\n /**\n * Processing device returned messages\n * \n * @author\n * @param devReplyStr Message information returned by the device\n */\n void handlePacket(String devReplyStr);\n\n /**\n * Error information processing apparatus returns <br>\n * \n * @author\n * @param devReplyErr Error messages returned by the device\n */\n void handleError(String devReplyErr);\n\n /**\n * Device interaction with the end of the glyph packets <br>\n * \n * @author\n * @return End glyph packets\n */\n String getPacketEndTag();\n\n /**\n * Encoding packets\n * \n * @author\n * @return Encoding packets\n */\n String getCharsetName();\n\n}", "public interface SubscriptionTransport\n{\n\tpublic static interface Callback\n\t{\n\n\t\tpublic abstract void onConnected();\n\n\t\tpublic abstract void onFailure(Throwable throwable);\n\n\t\tpublic abstract void onMessage(OperationServerMessage operationservermessage);\n\t}\n\n\tpublic static interface Factory\n\t{\n\n\t\tpublic abstract SubscriptionTransport create(Callback callback);\n\t}\n\n\n\tpublic abstract void connect();\n\n\tpublic abstract void disconnect(OperationClientMessage operationclientmessage);\n\n\tpublic abstract void send(OperationClientMessage operationclientmessage);\n}", "public interface NettyTransportRequestProcessor {\n\n /**\n * process transport request\n *\n * @param ctx context\n * @param request request\n * @return response packet\n */\n Packet process(final ChannelHandlerContext ctx, final Packet request);\n}", "public interface AbstractBroker {\n\n public void connect() throws Exception;\n\n public void subscribe(String queue, String topic) throws Exception;\n\n public void unSubscribe(String topic, String clientId) throws Exception;\n\n public void getMessageWithOutAck(byte[] body, long deliverTag, Consumer consumer);\n}", "public abstract void publishSelf (SubscriberInterface subscriber);", "@Override\n\tpublic void receiveRequest() {\n\n\t}", "public interface SendOutService {\n\n String BEAN_NAME = \"SendOutService\";\n\n /**\n * Returns all the sendInfo nodes associated with given document.\n *\n * @param document document NodeRef\n * @return list of sendInfo nodes associated with given document\n */\n List<SendInfo> getDocumentSendInfos(NodeRef document);\n\n /**\n * Update searchable send info properties according to document's sendInfo child nodes\n *\n * @param document document NodeRef\n */\n void updateSearchableSendInfo(NodeRef document);\n\n /**\n * Build searchable send info data from document's sendInfo child nodes\n *\n * @param document document NodeRef\n * @return Map with documents properties populated with document's sendInfo values\n */\n Map<QName, Serializable> buildSearchableSendInfo(NodeRef document);\n\n /**\n * Sends out document.\n * Inspects all the given recipients and based on send mode sends out the document through DVK to those who support it (based on addressbook) and through email to others.\n * Registers sendInfo child entries under document and checks if given document is a reply outgoing letter and updates originating document info if needed.\n *\n * @param document subject document for sending out\n * @param names list of recipient names\n * @param emails list of recipient email addresses\n * @param modes list of recipient send modes\n * @param idCodes TODO\n * @param fromEmail from email address\n * @param subject mail subject\n * @param content mail content text\n * @param zipIt if attachments should be zipped into single file, or sent as separate files\n * @param fileNodeRefs list of file node refs as strings to match those files which should be sent out as attachments from given document\n * @return true\n */\n boolean sendOut(NodeRef document, List<String> names, List<String> emails, List<String> modes, List<String> idCodes, List<String> encryptionIdCodes, List<X509Certificate> allCertificates, \n \t\tString fromEmail, String subject, String content, List<NodeRef> fileRefs, boolean zipIt);\n\n /** @return {@code List<Pair<recipientName, recipientRegistrationNr>> } */\n List<Pair<String, String>> forward(NodeRef document, List<String> names, List<String> emails, List<String> modes, String fromEmail, String content, List<NodeRef> fileRefs);\n\n NodeRef addSendinfo(NodeRef document, Map<QName, Serializable> props);\n\n /**\n * If updateSearchableSendInfo is false then updateSearchableSendInfo() must manually be called later\n */\n NodeRef addSendinfo(NodeRef document, Map<QName, Serializable> props, boolean updateSearchableSendInfo);\n\n List<ContentToSend> prepareContents(NodeRef document, List<NodeRef> fileRefs, boolean zipIt) throws Exception;\n \n List<ContentToSend> prepareContents(List<EmailAttachment> attachments);\n\n void addSapSendInfo(Node document, String dvkId);\n\n boolean hasDocumentSendInfos(NodeRef document);\n\n Long sendForInformation(List<String> authorityIds, Node docNode, String emailTemplate, String subject, String content);\n\n Date getEarliestSendInfoDate(NodeRef docRef);\n\n}", "@Override\n\tpublic boolean isDeliverable() {\n\t\treturn true;\n\t}", "public interface Sender {\r\n public void send();\r\n}", "public interface Sender {\n public void send();\n}", "public interface Sender {\n\n public void send();\n}", "public interface Sender {\n\n public void send();\n}", "public interface Sendable {\n /**\n * Raw message to send\n */\n String getRawMessage();\n}", "@Override\n\tpublic void invoke() {\n\t\t\n\t\tIBuffer b = Buffer.getBuffer();\n\t\tint r = b.getRemainingCapacity();\n\t\t\n\t\t// the buffer is empty - this means that invoke was called after a grid was removed\n\t\t// and we need to fill it up to prevent starvation. Ideally the only way this could\n\t\t// happen is if the buffer size was 1\n\t\tif (r == 0) {\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (r < b.getCapacity())\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\n\t\tif (r > 0)\n\t\t\tPublisher.getInstance().send(new ConsumeMessage());\n\t\t\n\t}", "public interface Publisher {\n public void subscribe(Product.Type t, Subscriber s);\n public void unsubscribe(Product.Type t, Subscriber s);\n public void notifySubscribers(Product.Type eventType);\n}", "public interface MessageTransceiver {\n\n public void shutdown();\n\n public void send(Serializable message) throws MessageException;\n\n public void addMessageListener(MessageListener l);\n\n public void removeMessageListener(MessageListener l);\n\n}", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "public interface BusDistributorService extends Services<BusDistributor,Long> {\r\n}", "public interface Delivery {\n\n void postDelivery(PlusRequest<?> plusRequest, Response<?> response);\n}", "public interface ToNetworkProcessor {\n\n /**\n * Send message.\n *\n * @param message the message\n */\n void sendMessage(String message);\n}", "public interface LeecherDistributionAlgorithm extends DistributionAlgorithm {\n\n /**\n * This method is called by the framework internally at\n * undefined intervals and can be triggered by network metrics,\n * timers and events randomly.\n * <p>\n * This method is thread-safe.\n * <p>\n * The purpose of this method is to implement distribution strategies.\n * In other words: To request downloads in the most effective way.\n *\n * @param leecher\n * @return A list of download transfers.\n * The framework will take care that you do not download\n * from the same peer in parallel different chunks.\n */\n List<Transfer> requestDownloads(Leecher leecher);\n}", "public interface Receiver extends Serializable {\n\n /**\n * Invoked when a new upload arrives.\n *\n * @param filename the desired filename of the upload, usually as specified\n * by the client.\n * @param mimeType the MIME type of the uploaded file.\n * @return Stream to which the uploaded file should be written.\n */\n OutputStream receiveUpload(String filename, String mimeType);\n }", "boolean deliver(CommInfrastructure busType, String topic, String event);", "public interface EventBusProducer {\n void post(final Answer answer);\n}", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "public interface IExchange {\r\n}", "public interface MessageSender {\n boolean handle(Context context, MessageResponse response);\n}", "public interface MessageServiceInjector {\n public Consumer getConsumer() ;\n}", "public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}", "public interface TransportService {\n\n /**\n * Create and persist a new transport.\n *\n * @param request the new transport data\n *\n * @return the new transport object, if successful\n */\n Transport storeTransport(@NotNull EezerStoreTransportRequest request);\n\n /**\n * Remove an existing transport by it's transportId.\n *\n * !!! NOTE: USUALLY WE DON'T DO THIS !!!\n *\n * @param transportId the transportId to remove\n */\n void removeTransport(@NotNull String transportId);\n\n /**\n * Fetch all existing transports in the system.\n * We don't return coordinates here, there is a\n * separate call for that.\n *\n * @return a list of all existing transports\n */\n List<Transport> getTransports();\n\n /**\n * Fetch all coordinates associated with a\n * specific transport.\n *\n * @param transportId the transportId\n *\n * @return a list of all coordinates\n */\n List<Coordinate> getCoordinates(@NotNull String transportId);\n\n}", "public interface StreamReceiver{\r\n\t/**\r\n\t * Writes an array of bytes to the object holding one end of the pipe.\r\n\t * \r\n\t * @param b The byte array to be written.\r\n\t */\r\n\tpublic abstract void write(byte[] b);\r\n\t\r\n}", "@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\n\t\t\r\n\t}", "protected RemoteFactory.Provides<Msg, Ref> eco_provides() {\n assert this.ecosystemComponent != null: \"This is a bug.\";\n return this.ecosystemComponent;\n }", "public interface INetworkHandler<T> extends Runnable {\n\n /**\n * The main method which starts the protocol implementation.\n * <p>\n * {@inheritDoc}\n */\n void run();\n\n /**\n * Sends the request of the network handler to all online peers of the node.\n *\n * @throws ConnectionFailedException If the other online clients can not be determined\n */\n void sendRequest(IRequest request)\n throws ConnectionFailedException;\n\n /**\n * Blocks until all notified clients have responded\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await()\n throws InterruptedException;\n\n /**\n * Blocks for the given timeout.\n *\n * @param timeout The timeout to wait\n * @param timeUnit The time unit which qualifies the timeout\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await(long timeout, TimeUnit timeUnit)\n throws InterruptedException;\n\n /**\n * Returns true once all notified clients have responded.\n *\n * @return True, if all notified clients have responded, false otherwise.\n */\n boolean isCompleted();\n\n /**\n * Returns the progress until this handler's communication\n * is considered complete (See {@link INetworkHandler#isCompleted()}).\n *\n * Returns values between 100 and 0 (inclusive).\n *\n * @return The progress\n */\n int getProgress();\n\n\n /**\n * Returns the final result of the exchange.\n * Note, that the result may be null before all clients have responded.\n *\n * @return The result once the all necessary clients responded. May be null before all clients have responded\n */\n T getResult();\n}", "public interface AsynchChannelsGateway {\n\n public Message<String> send(Message<String> message);\n\n}", "public interface FastTransportable extends Transportable\n{\n// Stream unique identifier\n// public final static long SUID = ..;\n\n// Bisogna far generare in maniera automatica questi due metodi\n// Serializza l'oggetto\n public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;\n// inizializza l'istanza dell'oggetto\n public void readObject( Container.ContainerInputStream cis ) throws SerializationException;\n\n// ...insieme a questo, dipende dal tipo effettivo dell'oggetto.\n public int sizeOf(); // dimensione dell'oggetto.\n\n}", "public interface ProvDomainMgr extends ReqMsgClient\n{\n\n /**\n * Returns the message model type that this domain manager provides. The\n * return value is one of the types defined in\n * {@linkplain com.reuters.rfa.rdm.RDMMsgTypes}.\n * \n * @return the message model type that this domain manager provides.\n */\n short getMsgModelType();\n\n /**\n * Returns the name of service that this domain manager provides.\n * \n * @return the name of service that this domain manager provides.\n */\n String getServiceName();\n\n /**\n * Returns an OMMPool used by this domain manager.\n * \n * @return an OMMPool used by this domain manager.\n */\n OMMPool getPool();\n\n /**\n * Sends an OMM message to a client.\n * \n * @param token the client request token\n * @param encmsg the OMM message to submit\n */\n void submit(Token token, OMMMsg encmsg);\n\n}", "public interface EventPublisher<T> {\r\n\r\n\t/**\r\n\t * Publish to the ring buffer. Use a Event Translator.\r\n\t * \r\n\t * @param t\r\n\t */\r\n\tvoid publish(T t);\r\n\t\r\n\t/**\r\n\t * Set the DisruptorConfig spring bean.\r\n\t * \r\n\t * @param disruptorConfig\r\n\t */\r\n\tvoid setDisruptorConfig(DisruptorConfig<T> disruptorConfig);\r\n}", "@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\r\n\t\t//CHECK WHICH END BUNDLE TO BE CALLED THAT I MANAGE\r\n\t\tif (payload instanceof CalcBean){ \r\n\t\t\tCalcBean messageBean = (CalcBean)payload;\r\n\t\t\tLOG.debug(\"*** Message Recieved by ExampleCommMgr: \" + messageBean.getMessage());\r\n\t\t}\r\n\t}", "public interface OnSendListener {\n void onSend();\n}", "public interface IServiceDriverCommunication {\n\n /**\n * This method is called when a network message is received.\n *\n * @param message\n * Network message.\n * @param <T>\n * Message object type.\n */\n <T> void onNetworkMessage(NetworkMessage<T> message) throws NetworkDriverException;\n\n /**\n * This method is called when a network event is received.\n *\n * @param event\n * Network event.\n */\n void onNetworkEvent(NetworkEvent event);\n}", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "public interface MessageSender {\n /**\n * @return This sender's topic.\n */\n String getTopic();\n\n /**\n * Sends a message.\n *\n * @param message The message to send.\n * @throws MessagingException If there is a message transport problem.\n */\n void sendMessage(byte[] message) throws MessagingException;\n}", "public interface MessageComponent {\n}", "RequestSender onRefuse(Consumer<Message> consumer);", "public CanaryDistributionProvider.Distribution getDistribution()\n {\n return _distribution;\n }", "public interface MovilizerDistributionService {\n\n // ---------------------------------------------------------------------- Webservice interaction\n\n /**\n * Set systemd Id and password for the request and erases the replies from next response.\n *\n * @param systemId the system id to be set in the request.\n * @param password the password to be set in the request.\n * @param request request to be modified for upload.\n * @return the same request entered in the method parameters but with the credentials and number\n * of replies changed.\n * @since 12.11.1.0\n */\n MovilizerRequest prepareUploadRequest(Long systemId, String password, MovilizerRequest request);\n\n /**\n * Set systemd Id and password for the request and set the number of replies replies from next\n * response.\n *\n * @param systemId the system id to be set in the request.\n * @param password the password to be set in the request.\n * @param numResponses the number of responses to receive in the response.\n * @param request request to be modified for upload.\n * @return the same request entered in the method parameters but with the credentials and number\n * of replies changed.\n * @since 12.11.1.0\n */\n MovilizerRequest prepareDownloadRequest(Long systemId, String password, Integer numResponses,\n MovilizerRequest request);\n\n /**\n * Perform a synchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @return the response coming from the cloud with the corresponding acknowledgements, errors,\n * replies and datacontainers.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @since 12.11.1.0\n */\n MovilizerResponse getReplyFromCloudSync(MovilizerRequest request);\n\n /**\n * Perform a synchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @param connectionTimeoutInMillis connection timeout to be used in the call.\n * @param receiveTimeoutInMillis receive timeout to be used in the call.\n * @return the response coming from the cloud with the corresponding acknowledgements, errors,\n * replies and datacontainers.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @since 12.11.1.0\n */\n MovilizerResponse getReplyFromCloudSync(MovilizerRequest request,\n Integer connectionTimeoutInMillis,\n Integer receiveTimeoutInMillis);\n\n /**\n * Perform an asynchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @return A completable future with the response.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see CompletableFuture\n * @since 15.11.2.2\n */\n CompletableFuture<MovilizerResponse> getReplyFromCloud(MovilizerRequest request);\n\n /**\n * Perform an asynchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @param connectionTimeoutInMillis connection timeout to be used in the call.\n * @param receiveTimeoutInMillis receive timeout to be used in the call.\n * @return A completable future with the response.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see CompletableFuture\n * @since 12.11.2.2\n */\n CompletableFuture<MovilizerResponse> getReplyFromCloud(MovilizerRequest request,\n Integer connectionTimeoutInMillis,\n Integer receiveTimeoutInMillis);\n\n /**\n * Indicate if the response java instance has errors.\n *\n * @param response the response to be analyzed.\n * @return true in case response has errors else false.\n * @since 12.11.1.3\n */\n Boolean responseHasErrors(MovilizerResponse response);\n\n /**\n * Generate a string with errors.\n *\n * @param response the response that contains the errors.\n * @return string represantion of the errors to use in messages.\n * @since 12.11.1.3\n */\n String responseErrorsToString(MovilizerResponse response);\n\n /**\n * Send all files that has .mxml extension in a folder and subfolders collecting all cloud\n * responses.\n *\n * @param folder to walk for the request files.\n * @return a list with all the cloud responses.\n * @since 15.11.1.5\n */\n List<MovilizerResponse> batchUploadFolderSync(Path folder);\n\n // ----------------------------------------------------------------------------- Document upload\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see UploadResponse\n * @since 12.11.1.0\n */\n UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey);\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n * @see UploadResponse\n * @since 12.11.1.0\n */\n UploadResponse uploadDocumentSync(Path documentFilePath, long systemId, String password,\n String documentPool, String documentKey, String language,\n String ackKey);\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see UploadResponse\n * @since 12.11.1.2\n */\n UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey,\n Integer connectionTimeoutInMillis);\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n * @see UploadResponse\n * @since 12.11.1.2\n */\n UploadResponse uploadDocumentSync(Path documentFilePath, long systemId, String password,\n String documentPool, String documentKey, String language,\n String ackKey, Integer connectionTimeoutInMillis);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(InputStream documentInputStream,\n String filename, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(Path documentFilePath, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection problems.\n *\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(InputStream documentInputStream,\n String filename, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey,\n Integer connectionTimeoutInMillis);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n *\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(Path documentFilePath, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey,\n Integer connectionTimeoutInMillis);\n\n // ----------------------------------------------------------------------------------- XML utils\n\n /**\n * Read a Movilizer element from the webservice name space (MovilizerMovelet, MovilizerReply,\n * etc...) and creates a java object instance of the class indicated.\n *\n * @param elementString string value of the serialization of the object.\n * @param movilizerElementClass class of the Movilizer object to create from the string.\n * @param <T> Movilizer object class\n * @return the java instance parsed from the string.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there are parsing\n * problems.\n * @since 12.11.1.3\n */\n <T> T getElementFromString(final String elementString, final Class<T> movilizerElementClass);\n\n /**\n * Print a Movilizer element from the webservice name space (MovilizerMovelet, MovilizerReply,\n * etc...) to string.\n *\n * @param movilizerElement java instance of the Movilizer element.\n * @param movilizerElementClass class of the Movilizer element to use.\n * @param <T> Movilizer object class\n * @return XML string representation for the Movilizer element given.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there are parsing\n * problems.\n * @since 12.11.1.3\n */\n <T> String printMovilizerElementToString(final T movilizerElement,\n final Class<T> movilizerElementClass);\n\n // ------------------------------------------------------------------------------ File XML utils\n\n /**\n * Read and parses a Movilizer Request file (.mxml) from the file system.\n *\n * @param filePath path to the request file.\n * @return the java instance parsed from the file.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there's parsing or\n * file access problems.\n * @since 12.11.1.0\n */\n MovilizerRequest getRequestFromFile(Path filePath);\n\n /**\n * Read and parses a Movilizer Request from the given String.\n *\n * @param requestString non null string with a valid xml request.\n * @return the java instance parsed from the file.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there's parsing or\n * string problems.\n * @since 12.11.1.1\n */\n MovilizerRequest getRequestFromString(String requestString);\n\n /**\n * Persist a request java instance to a file.\n *\n * @param request the request to be persisted.\n * @param filePath the path to the file.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there's parsing or\n * file access problems.\n * @since 12.11.1.0\n */\n void saveRequestToFile(MovilizerRequest request, Path filePath);\n\n /**\n * Generate a string from a request java instance.\n *\n * @param request the request to be transformed into string.\n * @return the string representation of the request.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException if there's parsing\n * problems.\n * @since 12.11.1.0\n */\n String requestToString(MovilizerRequest request);\n\n /**\n * Generate a string from a response java instance.\n *\n * @param response the response to be transformed into string.\n * @return the string representation of the response.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException if there's parsing\n * problems.\n * @since 12.11.1.0\n */\n String responseToString(MovilizerResponse response);\n\n // ------------------------------------------------------------------------------ MAF Management\n\n /**\n * Read a file into an MAF source file for latter source uploading.\n *\n * @param sourceFile file to read\n * @return MafSource with the source and the metadata\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerMAFManagementException when having\n * troubles reading the file.\n * @see com.movilizer.mds.webservice.models.maf.MafEventScript\n * @see com.movilizer.mds.webservice.models.maf.MafLibraryScript\n * @see com.movilizer.mds.webservice.models.maf.MafGenericScript\n * @since 15.11.2.1\n */\n MafSource readSource(File sourceFile);\n\n /**\n * Deploy a MAF source to the cloud.\n *\n * @param systemId where to deploy the file\n * @param password for the system id given\n * @param token for MAF access\n * @param source file to upload\n * @return MafResponse with the result of the operation\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerMAFManagementException when having\n * troubles uploading the file.\n * @see com.movilizer.mds.webservice.models.maf.communications.MafEventResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafLibraryResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafGenericResponse\n * @since 15.11.2.1\n */\n MafResponse deploySourceSync(long systemId, String password, String token, MafSource source);\n\n /**\n * Deploy a MAF source to the cloud.\n *\n * @param systemId where to deploy the file\n * @param password for the system id given\n * @param token for MAF access\n * @param sourceFile file to upload\n * @return MafResponse with the result of the operation\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerMAFManagementException when having\n * troubles uploading the file.\n * @see com.movilizer.mds.webservice.models.maf.communications.MafEventResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafLibraryResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafGenericResponse\n * @since 15.11.2.1\n */\n MafResponse deploySourceSync(long systemId, String password, String token, File sourceFile);\n}", "@Override\n public void onReceive(Object message) throws Exception {\n }", "public interface IPacketTransporter {\n\n DataInputStream getReceiveStream();\n\n DataOutputStream getSendStream();\n\n /**\n * Blocks until a packet is available. The packet identifier is returned, \n * and the packet is available for reading on the Receive stream.\n */\n int ReceivePacket();\n\n /**\n * Returns the oldest packet in the received packet queue.\n * If no packet is available this function immediately returns -1;\n * The packet identifier is returned, \n * and the packet is available for reading on the Receive stream.\n */\n int ReceiveAvailablePacket();\n\n /**\n * Sends a packet with given identifier. (non-blocking)\n * The data written to the SendStream since the last call to SendPacket is sent.\n */\n void SendPacket(int packetIdentifier);\n \n \n \n \n \n \n \n \n void onPacketReceived(int packetIdentifier, byte[] dgram, int offset, int length);\n \n \n \n}", "@Override\n\tpublic void handleDelivery(String arg0, Envelope arg1,\n\t\t\tBasicProperties arg2, byte[] arg3) throws IOException {\n\t\t Object msg;\n\t try {\n\t System.out.println(\"【body length:】\" + bytes2kb(arg3.length));\n\t msg = decodeMsg(arg3);\n\t //subImpl.handlerReceiveMsg(this, msg);\n\t System.out.println(msg);\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}", "protected abstract void receive() throws IOException;", "public interface Channel\r\n{\r\n /**\r\n * Get a duplex connection for this channel. This method must be called for each request-response message exchange.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n DuplexConnection getDuplex(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a send-only connection for this channel. This method must be called for each message to be sent without a\r\n * response.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n OutConnection getOutbound(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a receive-only connection for this channel. This method must be called for each message to be received, and\r\n * will wait for a message to be available before returning.\r\n * \r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n InConnection getInbound() throws IOException, WsConfigurationException;\r\n \r\n /**\r\n * Close the channel. Implementations should disconnect and free any resources allocated to the channel.\r\n * @throws IOException on I/O error\r\n */\r\n void close() throws IOException;\r\n}", "public interface RunningSpeedReceiver {\n\n void onRunningSpeedReceived(int connectionState, int speed, int cadence, int stride, int total);\n}", "public interface NegotiationTransmission {\n\n /**\n * The method <code>getTransmissionId</code> returns the transmission id of the negotiation transmission\n * @return an UUID the transmission id of the negotiation transmission\n */\n UUID getTransmissionId();\n\n /**\n * The method <code>getTransactionId</code> returns the transaction id of the negotiation transmission\n * @return an UUID the transaction id of the negotiation transmission\n */\n UUID getTransactionId();\n\n /**\n * The method <code>getNegotiationId</code> returns the negotiation id of the negotiation transmission\n * @return an UUID the negotiation id of the negotiation\n */\n UUID getNegotiationId();\n\n /**\n * The method <code>getNegotiationTransactionType</code> returns the transaction type of the negotiation transmission\n * @return an NegotiationTransactionType of the transaction type\n */\n NegotiationTransactionType getNegotiationTransactionType();\n\n /**\n * The method <code>getPublicKeyActorSend</code> returns the public key the actor send of the negotiation transaction\n * @return an String the public key of the actor send\n */\n String getPublicKeyActorSend();\n\n /**\n * The method <code>getActorSendType</code> returns the actor send type of the negotiation transmission\n * @return an PlatformComponentType of the actor send type\n */\n PlatformComponentType getActorSendType();\n\n /**\n * The method <code>getPublicKeyActorReceive</code> returns the public key the actor receive of the negotiation transmission\n * @return an String the public key of the actor receive\n */\n String getPublicKeyActorReceive();\n\n /**\n * The method <code>getActorReceiveType</code> returns the actor receive type of the negotiation transmission\n * @return an PlatformComponentType of the actor receive type\n */\n PlatformComponentType getActorReceiveType();\n\n /**\n * The method <code>getTransmissionType</code> returns the type of the negotiation transmission\n * @return an NegotiationTransmissionType of the negotiation type\n */\n NegotiationTransmissionType getTransmissionType();\n\n /**\n * The method <code>getTransmissionState</code> returns the state of the negotiation transmission\n * @return an NegotiationTransmissionStateof the negotiation state\n */\n NegotiationTransmissionState getTransmissionState();\n\n /**\n * The method <code>getNegotiationXML</code> returns the xml of the negotiation relationship with negotiation transmission\n * @return an NegotiationType the negotiation type of negotiation\n */\n NegotiationType getNegotiationType();\n\n void setNegotiationType(NegotiationType negotiationType);\n /**\n * The method <code>getNegotiationXML</code> returns the xml of the negotiation relationship with negotiation transmission\n * @return an String the xml of negotiation\n */\n String getNegotiationXML();\n\n /**\n * The method <code>getTimestamp</code> returns the time stamp of the negotiation transmission\n * @return an Long the time stamp of the negotiation transmission\n */\n long getTimestamp();\n\n /**\n * The method <code>isPendingToRead</code> returns if this pending to read the negotiation transmission\n * @return an boolean if this pending to read\n */\n boolean isPendingToRead();\n\n /**\n * The method <code>confirmRead</code> confirm the read of the negotiation trasmission\n */\n void confirmRead();\n\n /**\n * The method <code>setNegotiationTransactionType</code> set the negotiation transaction type\n */\n void setNegotiationTransactionType(NegotiationTransactionType negotiationTransactionType);\n\n /**\n * The method <code>setTransmissionType</code> set the Transmission Type\n */\n void setTransmissionType(NegotiationTransmissionType negotiationTransmissionType);\n\n /**\n * The method <code>setTransmissionState</code> set the Transmission State\n */\n void setTransmissionState(NegotiationTransmissionState negotiationTransmissionState);\n\n public boolean isFlagRead();\n\n public void setFlagRead(boolean flagRead);\n\n public int getSentCount();\n\n public void setSentCount(int sentCount);\n\n public UUID getResponseToNotificationId();\n\n public void setResponseToNotificationId(UUID responseToNotificationId);\n\n public boolean isPendingFlag();\n\n public void setPendingFlag(boolean pendingFlag);\n\n public String toJson();\n\n}", "public interface Communicator {\n void respond(int data);\n void respond(int data, int source);\n long getDiff();\n}", "public interface NettyProxyService {\n /**\n * 心跳\n *\n * @param msg\n * @throws Exception\n */\n void processHeartbeatMsg(HeartbeatMsg msg) throws Exception;\n\n /**\n * 上传位置\n *\n * @param msg\n * @throws Exception\n */\n void processLocationMsg(LocationMsg msg) throws Exception;\n\n /**\n * 离线\n *\n * @param deviceNumber\n */\n void processInactive(String deviceNumber);\n}", "public void deliver() {\n try {\n if (null != this.listener) {\n ContentObject pending = null;\n CCNInterestListener listener = null;\n synchronized (this) {\n if (null != this.data && null != this.listener) {\n pending = this.data;\n this.data = null;\n listener = (CCNInterestListener) this.listener;\n }\n }\n if (null != pending) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback (\" + pending + \" data) for: {0}\", this.interest.name());\n synchronized (this) {\n this.deliveryPending = false;\n }\n manager.unregisterInterest(this);\n Interest updatedInterest = listener.handleContent(pending, interest);\n if (null != updatedInterest) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback: updated interest to express: {0}\", updatedInterest.name());\n manager.expressInterest(this.owner, updatedInterest, listener);\n }\n } else {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback skipped (no data) for: {0}\", this.interest.name());\n }\n } else {\n synchronized (this) {\n if (null != this.sema) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Data consumes pending get: {0}\", this.interest.name());\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINEST)) Log.finest(Log.FAC_NETMANAGER, \"releasing {0}\", this.sema);\n this.sema.release();\n }\n }\n if (null == this.sema) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback skipped (not valid) for: {0}\", this.interest.name());\n }\n }\n } catch (Exception ex) {\n _stats.increment(StatsEnum.DeliverContentFailed);\n Log.warning(Log.FAC_NETMANAGER, \"failed to deliver data: {0}\", ex);\n Log.warningStackTrace(ex);\n }\n }", "public interface BOSHClientResponseListener\n{\n\n public abstract void responseReceived(BOSHMessageEvent boshmessageevent);\n}", "PayloadCommunicator getPayloadCommunicator();", "public interface ResponseReceiverInterface<V> {\n\n /**\n * Method is called on receiver to end him response\n */\n void receiveResponse(V response);\n\n}", "@Override\n\tpublic void onResourceDelivered(ResourceResponse arg0) {\n\t\t\n\t}", "@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }", "public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}", "public interface UdpReceiverService {\n\n public void start() throws IOException, TimeoutException;\n\n public void setCompress(boolean compress);\n}", "public Subscription subscribeForDistributorDeliveries(ClockListener listener);", "protected CommunicationsHandler(){}", "public interface EventSink {\n\n /**\n * Generate event, that a new peer has been discovered for some torrent.\n *\n * @since 1.5\n */\n void firePeerDiscovered(TorrentId torrentId, Peer peer);\n\n /**\n * Generate event, that a new connection with some peer has been established.\n *\n * @since 1.9\n */\n void firePeerConnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that a connection with some peer has been terminated.\n *\n * @since 1.9\n */\n void firePeerDisconnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that local information about some peer's data has been updated.\n *\n * @since 1.9\n */\n void firePeerBitfieldUpdated(TorrentId torrentId, ConnectionKey connectionKey, Bitfield bitfield);\n\n /**\n * Generate event, that processing of some torrent has begun.\n *\n * @since 1.5\n */\n void fireTorrentStarted(TorrentId torrentId);\n\n /**\n * Generate event, that torrent's metadata has been fetched.\n *\n * @since 1.9\n */\n void fireMetadataAvailable(TorrentId torrentId, Torrent torrent);\n\n /**\n * Generate event, that processing of some torrent has finished.\n *\n * @since 1.5\n */\n void fireTorrentStopped(TorrentId torrentId);\n\n /**\n * Generate event, that the downloading and verification\n * of one of torrent's pieces has been finished.\n *\n * @since 1.8\n */\n void firePieceVerified(TorrentId torrentId, int pieceIndex);\n}", "Consumer getConsumer();", "public interface RxIBus<T> {\n\n void register(Object object);\n\n void unregister(Object object);\n\n void postEvent(Object obj);\n\n <T>Flowable<T> receiveEvent(Class<T> clz);\n\n}", "public abstract void Listen() throws TransportLayerException;", "public interface EventChannel {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: The system metadata relating to Event Channel resource.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the source property: Source of the event channel. This represents a unique resource in the partner's\n * resource model.\n *\n * @return the source value.\n */\n EventChannelSource source();\n\n /**\n * Gets the destination property: Represents the destination of an event channel.\n *\n * @return the destination value.\n */\n EventChannelDestination destination();\n\n /**\n * Gets the provisioningState property: Provisioning state of the event channel.\n *\n * @return the provisioningState value.\n */\n EventChannelProvisioningState provisioningState();\n\n /**\n * Gets the partnerTopicReadinessState property: The readiness state of the corresponding partner topic.\n *\n * @return the partnerTopicReadinessState value.\n */\n PartnerTopicReadinessState partnerTopicReadinessState();\n\n /**\n * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this timer expires\n * while the corresponding partner topic is never activated, the event channel and corresponding partner topic are\n * deleted.\n *\n * @return the expirationTimeIfNotActivatedUtc value.\n */\n OffsetDateTime expirationTimeIfNotActivatedUtc();\n\n /**\n * Gets the filter property: Information about the filter for the event channel.\n *\n * @return the filter value.\n */\n EventChannelFilter filter();\n\n /**\n * Gets the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any\n * ambiguity of the origin of creation of the partner topic for the customer.\n *\n * @return the partnerTopicFriendlyDescription value.\n */\n String partnerTopicFriendlyDescription();\n\n /**\n * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.EventChannelInner object.\n *\n * @return the inner object.\n */\n EventChannelInner innerModel();\n\n /** The entirety of the EventChannel definition. */\n interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }\n /** The EventChannel definition stages. */\n interface DefinitionStages {\n /** The first stage of the EventChannel definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the EventChannel definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, partnerNamespaceName.\n *\n * @param resourceGroupName The name of the resource group within the user's subscription.\n * @param partnerNamespaceName Name of the partner namespace.\n * @return the next definition stage.\n */\n WithCreate withExistingPartnerNamespace(String resourceGroupName, String partnerNamespaceName);\n }\n /**\n * The stage of the EventChannel definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }\n /** The stage of the EventChannel definition allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel definition allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel definition allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel definition allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel definition allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n WithCreate withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Begins update for the EventChannel resource.\n *\n * @return the stage of resource update.\n */\n EventChannel.Update update();\n\n /** The template for EventChannel update. */\n interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }\n /** The EventChannel update stages. */\n interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n EventChannel refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n EventChannel refresh(Context context);\n}", "public interface ProvaAgent {\n\n void receive(ProvaList terms) throws Exception;\n\n void send(String dest, ProvaList terms) throws Exception;\n\n String getAgentName();\n\n}", "public interface EntityCollector {\n\n /**\n * Add httpContent to the queue.\n * @param httpContent httpContent\n */\n void addHttpContent(HttpContent httpContent);\n\n /**\n * Get the first httpContent from the queue.\n * @return HttpContent\n */\n HttpContent getHttpContent();\n\n /**\n * Get the first ByteBuffer version of the HttpContent from the queue.\n * @return ByteBuffer\n */\n ByteBuf getMessageBody();\n\n /**\n * Add the ByteBuffer version the httpContent to the queue.\n * @param msgBody ByteBuffer version of the httpContent.\n */\n void addMessageBody(ByteBuffer msgBody);\n\n /**\n * Check if the queue is empty.\n * @return true or false\n */\n boolean isEmpty();\n\n /**\n * Get the full message length.\n * @return message length\n */\n long getFullMessageLength();\n\n /**\n * Count the message length till the given message length and returns.\n * If the message length is shorter than the given length it returns with the\n * available message size. This method is blocking function. Hence, use with care.\n *\n * @param maxLength is the maximum length to count\n * @return counted length\n * @throws IllegalStateException if illegal state occurs in the absence of content\n */\n long countMessageLengthTill(long maxLength) throws IllegalStateException;\n\n /**\n * Complete the message.\n */\n void completeMessage();\n\n /**\n * This is need to release content before GC.\n */\n void waitAndReleaseAllEntities();\n}", "public interface TransportResponse<T>\n{\n /**\n * Returns the underlying value for this response. If this response has an error then this method\n * will return {@code null}.\n *\n * @return the value for this response or {@code null} if this response has an error.\n */\n T getResponse();\n\n /**\n * Returns {@code true} if this response has an error. Use {@link #getError()} to get the error.\n *\n * @return {@code true} if this response has an error.\n */\n boolean hasError();\n\n /**\n * If this response has an error, this method returns the error. Otherwise {@code null} is\n * returned.\n *\n * @return the response for this error or {@code null} if there is no error.\n */\n Throwable getError();\n\n /**\n * @return the wire attributes for this response.\n */\n Map<String, String> getWireAttributes();\n}", "void receive(String watcher) throws ProtocolExecutionException;", "public interface ConsumerService extends AbstractService<Consumer> {\n String sayHello(String name);\n}", "public interface Subject {\r\n void request();\r\n}", "boolean deliver(String busType, String topic, Object event);" ]
[ "0.67622757", "0.6525154", "0.6406596", "0.6206432", "0.62032235", "0.61891246", "0.6118752", "0.6103629", "0.60776246", "0.6049744", "0.60372657", "0.60092854", "0.59488904", "0.59349793", "0.5911659", "0.58788097", "0.5856738", "0.58453405", "0.5840343", "0.5830381", "0.5805826", "0.5793223", "0.5773802", "0.5766245", "0.57580614", "0.5751726", "0.5732398", "0.57096916", "0.5698976", "0.569182", "0.56781787", "0.56414086", "0.56280476", "0.56280476", "0.56202865", "0.5613679", "0.5606945", "0.5606103", "0.56026465", "0.5596484", "0.5591463", "0.5587206", "0.5582966", "0.5568722", "0.556009", "0.5544999", "0.5540459", "0.5538762", "0.5538686", "0.5513837", "0.5513191", "0.5500058", "0.5495447", "0.54851496", "0.5475369", "0.5467279", "0.54657054", "0.5464948", "0.54616594", "0.54549354", "0.54403865", "0.543442", "0.54343975", "0.5433289", "0.5432565", "0.54267544", "0.5409819", "0.5408688", "0.5408506", "0.5408215", "0.54053587", "0.540455", "0.54009944", "0.5400257", "0.53995854", "0.5390389", "0.53808", "0.53703773", "0.5363147", "0.53613174", "0.5360346", "0.5354954", "0.53461754", "0.53333044", "0.5329627", "0.5328962", "0.5328867", "0.53236157", "0.5323167", "0.5323101", "0.53195924", "0.5315573", "0.5313221", "0.53084147", "0.53009826", "0.5295106", "0.5292473", "0.52918047", "0.52907467", "0.52890027" ]
0.5859566
16
This method is called just after a message has been received from some underlying transport at a particular multicast address.
public void received(ByteArrayInputStream bis, MetaData metaData) throws IOException, TypeException, ReflectiveOperationException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void afterReceive() {\n\t}", "public interface Receiving {\n /**\n * This method is called just after a message\n * has been received from some underlying transport\n * at a particular multicast address.\n */\n public void received(ByteArrayInputStream bis, MetaData metaData) throws IOException, TypeException, ReflectiveOperationException;\n\n /**\n * This method is called just after there has been an error\n * in received from some underlying transport.\n * This passes the exception into the Receiving object.\n */\n public void error(Exception e);\n\n /**\n * This method is called just after there has been EOF\n * in received from some underlying transport.\n */\n public void eof();\n\n\n\n}", "void received() throws ImsException;", "public void messageReceived() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesRecieved, this.getClass()), this\n\t\t.getMessageType(), 1);\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.bytesRecieved, this.getClass()), this\n\t\t.getMessageType(), TrackedMessage.objectSize(this));\n }", "@Override\n\tpublic void messageArrived(String topic, MqttMessage message)\n\t throws Exception {\n\t\t\n\t}", "public void messageReceived(Message m) {\n\t\t\r\n\t}", "abstract public boolean onMessageReceived(MMXMessage message);", "private static void multicast(String msg) {\n \tfor(int id : IPs.keySet()) {\n \t\ttry {\n \t\t\tunicast_send(id, msg);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t}\n }", "private synchronized void processMessage(Message m) throws JMSException {\n\n\t\t// get message counter. this value is set by the FailoverQSender.\n\t\tint ct = m.getIntProperty(FailoverQSender.MESSAGE_COUNTER);\n\t\t// log the message\n\t\t//log(\"received message: \" + ct +\", current connected broker: \" + this.getCurrentConnectedBrokerAddress());\n\t\t\n\t\t// saved the data in data holder.\n\t\tdata.addElement(new Integer(ct));\n\t}", "protected void receive() {\n // System.out.println(\"in MessageSocketUDP::Receive\");\n try {\n DatagramPacket p = new DatagramPacket(receiveBuffer.buffer, receiveBuffer.offset(), receiveBuffer.available());\n datagramSocket.receive(p);\n int nbRead = p.getLength();\n if (nbRead == 0) {\n System.out.println(\"MessageSocketUDP::receive (read=0)\");\n connected = false;\n } else {\n receiveBuffer.received(nbRead);\n receiveBuffer.process();\n }\n } catch (IOException e) {\n System.out.println(\"MessageSocketUDP::receive Error\");\n e.printStackTrace();\n connected = false;\n }\n }", "void sendMulticast(String message);", "@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n public void receiveMessage(Message m) {\n commReceiver.receiveMessage(m);\n }", "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "@Override\n public void messageArrived(String s, MqttMessage mqttMessage) throws Exception {\n deleveryMessage(s, mqttMessage.getPayload(), null);\n }", "@Override\n\t\t\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\t\t\tSystem.out.println(\"接收消息主题 : \" + topic);\n\t\t\t\tSystem.out.println(\"接收消息Qos : \" + message.getQos());\n\t\t\t\tSystem.out.println(\"接收消息内容 : \" + message.toString());\n\t\t\t\tjas.decry(message.toString());\n\t\t\t}", "abstract protected void receiveMessage(Message m);", "private void onMessageTimeout(int expectedMessage) {\n switch (expectedMessage) {\n\n case MeshService.MESSAGE_GROUP_MODEL_GROUPID:\n if (mGroupAcksWaiting > 0) {\n if (mGroupAckListener != null) {\n // Timed out waiting for group update ACK.\n mGroupAckListener.groupsUpdated(mSendDeviceId, false,\n stActivity.getString(R.string.group_timeout));\n }\n mGroupAcksWaiting = 0;\n }\n break;\n case MeshService.MESSAGE_DEVICE_ASSOCIATED:\n // Fall through.\n case MeshService.MESSAGE_CONFIG_MODELS:\n // If we couldn't find out the model support for the device then we have to report association failed.\n if (mAssListener != null) {\n mAssListener.deviceAssociated(false);\n }\n if (mInfoListener!= null) {\n mInfoListener.onDeviceConfigReceived(false);\n }\n break;\n case MeshService.MESSAGE_FIRMWARE_VERSION:\n if (mInfoListener != null) {\n mInfoListener.onFirmwareVersion(0, 0, 0, false);\n }\n break;\n case MeshService.MESSAGE_GROUP_NUM_GROUPIDS:\n if (mGroupAckListener != null) {\n mGroupAckListener.groupsUpdated(mSendDeviceId, false, stActivity.getString(R.string.group_query_fail));\n }\n break;\n case MeshService.MESSAGE_CONFIG_DEVICE_INFO:\n\n // if we were waiting to get the configModels once we associate the device, we just assume we couldn't get the models\n // that the device support, but the association was successful.\n if (mDeviceIdtoUuidHash.size() > 0) {\n\n Device device =mDeviceStore.getDevice(mDeviceIdtoUuidHash.keyAt(0));\n mDeviceIdtoUuidHash.removeAt(0);\n if (device != null) {\n //Toast.makeText(stActivity, device.getName() + \" \" + stActivity.getString(R.string.added),Toast.LENGTH_SHORT).show();\n }\n if (mAssListener != null) {\n mAssListener.deviceAssociated(true);\n }\n }\n if (mInfoListener!= null) {\n mInfoListener.onDeviceConfigReceived(false);\n }\n if (mInfoListener != null) {\n mInfoListener.onDeviceInfoReceived(new byte[0], new byte[0], new byte[0], 0, false);\n }\n break;\n\n }\n }", "public void sendFinished(LinkLayerMessage message) {\n\t\t\n\t}", "public void setMessageAddress(String address);", "public void processMessage(DeviceMateMessage m);", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile (keepListening) {\n\t\t\tbyte[] buffer = new byte[SocketMessengerConstants.MESSAGE_SIZE];\n\t\t\tDatagramPacket packet = new DatagramPacket(buffer, SocketMessengerConstants.MESSAGE_SIZE);\n\t\t\ttry {\n\t\t\t\tmulticastSocket.receive(packet);\n\t\t\t} catch (InterruptedIOException e) {\n\t\t\t\tcontinue;\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString message = new String(packet.getData());\n\t\t\tSystem.out.println(\"Receiving a message: \" + message);\n\t\t\tmessage = message.trim();\n\t\t\tStringTokenizer tokenizer = new StringTokenizer(message, SocketMessengerConstants.MESSAGE_SEPARATOR);\n\t\t\tif (tokenizer.countTokens() == 2)\n\t\t\t\tmessageListener.messageReceived(tokenizer.nextToken(), tokenizer.nextToken());\n\t\t}\n\t\ttry {\n\t\t\tmulticastSocket.leaveGroup(multicastGroup);\n\t\t\tmulticastSocket.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings(\"WeakerAccess\")\n\tprotected abstract void onMessageReceived(@NonNull BroadcastMessage message);", "@Override\n public void onReceive(Object message) throws Exception {\n }", "@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}", "public void multicast() throws IOException {\n try {\n InetAddress multicastAddress = InetAddress.getByName(\"239.255.255.250\");\n // multicast address for SSDP\n final int port = 1900; // standard port for SSDP\n MulticastSocket socket = new MulticastSocket(port);\n socket.setReuseAddress(true);\n socket.setSoTimeout(15000);\n socket.joinGroup(multicastAddress);\n\n // send discover\n byte[] txbuf = DISCOVER_MESSAGE.getBytes(\"UTF-8\");\n DatagramPacket hi = new DatagramPacket(txbuf, txbuf.length,\n multicastAddress, port);\n socket.send(hi);\n System.out.println(\"SSDP discover sent\");\n\n do {\n byte[] rxbuf = new byte[8192];\n DatagramPacket packet = new DatagramPacket(rxbuf, rxbuf.length);\n socket.receive(packet);\n dumpPacket(packet);\n } while (true); // should leave loop by SocketTimeoutException\n } catch (SocketTimeoutException e) {\n System.out.println(\"Timeout\");\n }\n }", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }", "public final void broadcast()\n\t{\n\t\ttopic.broadcast(originalMessage);\n\t}", "public void messageArrived(final Message msg) {\n final EndpointAddress srcAddr \n = extractEndpointAddress(msg, \n EndpointServiceImpl.MESSAGE_SOURCE_NS, \n EndpointServiceImpl.MESSAGE_SOURCE_NAME,\n \"source\");\n\n final EndpointAddress dstAddr \n = extractEndpointAddress(msg,\n EndpointServiceImpl.MESSAGE_DESTINATION_NS, \n EndpointServiceImpl.MESSAGE_DESTINATION_NAME,\n \"destination\");\n\n if(srcAddr == null || isLoopback(srcAddr) || dstAddr == null) {\n return;\n }\n\n ExecutorService executorService = endpointService.getGroup().getTaskManager().getExecutorService();\n executorService.execute(new Runnable() {\n public void run() {\n endpointService.processIncomingMessage(msg, srcAddr, dstAddr);\n }\n });\n }", "@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}", "public void m23076a(RemoteMessage remoteMessage) {\n }", "void messageReceived(IMSession session, Message message);", "public void onMessage(Message message) {\n lastMessage = message;\n\n }", "@Override\n public void onMessage(Message message) {\n try {\n // Generate data\n QueueProcessor processor = getBean(QueueProcessor.class);\n ServiceData serviceData = processor.parseResponseMessage(response, message);\n\n // If return is a DataList or Data, parse it with the query\n if (serviceData.getClientActionList() == null || serviceData.getClientActionList().isEmpty()) {\n serviceData = queryService.onSubscribeData(query, address, serviceData, parameterMap);\n } else {\n // Add address to client action list\n for (ClientAction action : serviceData.getClientActionList()) {\n action.setAddress(getAddress());\n }\n }\n\n // Broadcast data\n broadcastService.broadcastMessageToUID(address.getSession(), serviceData.getClientActionList());\n\n // Log sent message\n getLogger().log(QueueListener.class, Level.DEBUG,\n \"New message received from subscription to address {0}. Content: {1}\",\n getAddress().toString(), message.toString());\n } catch (AWException exc) {\n broadcastService.sendErrorToUID(address.getSession(), exc.getTitle(), exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n } catch (Exception exc) {\n broadcastService.sendErrorToUID(address.getSession(), null, exc.getMessage());\n\n // Log error\n getLogger().log(QueueListener.class, Level.ERROR, \"Error in message from subscription to address {0}. Content: {1}\", exc,\n getAddress().toString(), message.toString());\n }\n }", "@Override\r\n\tpublic void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\tSystem.out.println(\"-------------------------------------------------\");\r\n\t\tSystem.out.println(\"| Topic:\" + topic);\r\n\t\tSystem.out.println(\"| Message: \" + new String(message.getPayload()));\r\n\t\tSystem.out.println(\"-------------------------------------------------\");\r\n\t}", "public void onMessage(Message message, URI replyTo) throws MMPMessageException;", "public void decodeFinishedReceiving(ByteBuffer buffer,\n SessionSequenceAttributes sessionSequenceAttributes) {\n\n }", "public void receiveMessage(int messageNo, IMessage message, String fromAddr) {\n this.messageDispatch.handleMessage(messageNo, message, fromAddr);\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n }", "private static void unicast_recv(String sourceIdAndMsg, ConcurrentLinkedQueue<String> sharedRecbuf) {\n \tsynchronized(chatter3.class) { \n \t\tsharedRecbuf.add(sourceIdAndMsg + \" \" + new Timestamp(System.currentTimeMillis()).toString());\n \t}\n\t}", "@Override\n public void run() {\n //gets messages\n byte[] b = new byte[65000];\n try {\n multicastSocket = new MulticastSocket(mcastPort);\n multicastSocket.joinGroup(InetAddress.getByName(mscastAdress));\n\n while (true) {\n try {\n DatagramPacket received = new DatagramPacket(b, b.length);\n multicastSocket.receive(received);\n DealWithPacketBackup deal = new DealWithPacketBackup(received , multicastSocket , Peer.getPeerId());\n Peer.getExecutor().execute(deal);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void deliveryComplete(IMqttDeliveryToken arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise promise) {\n/* 469 */ return leaveGroup(multicastAddress.getAddress(), networkInterface, (InetAddress)null, promise);\n/* */ }", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t}", "@Override\n\t\t\t\t\tpublic void completed(Integer result, AsynchronousSocketChannel channel) {\n\n\t\t\t\t\t\t//AsyncSocketTransport.this.transportListeners.forEach(l -> l.onReceived(buf));\n\t\t\t\t\t\tsubscriber.onNext(new Packet(session, buf));\n\n\t\t\t\t\t\t// start to read next message again\n\t\t\t\t\t\tstartRead(channel);\n\t\t\t\t\t}", "@Override\n public void messageArrived(String string, MqttMessage mm) throws Exception {\n System.out.println(\"Topic==\" + string);\n System.out.println(\"message==\" + mm.toString());\n }", "@Override\n\t\t\tpublic void messagesRemoved(MessageCountEvent arg0) {\n\t\t\t}", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\n\t}", "@Override\n public void messageArrived(String topic, MqttMessage message)\n throws Exception {\n\n String time = new Timestamp(System.currentTimeMillis()).toString();\n\n Log.d(TAG,\"MQTT messageArrived\");\n Log.d(TAG,\"MQTT Time:\\t\" +time +\n \" Topic:\\t\" + topic +\n \" Message:\\t\" + new String(message.getPayload()) +\n \" QoS:\\t\" + message.getQos());\n }", "void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }", "void systemMessageReceived(IMSession session, Message message);", "public void decodeFinishedSending(ByteBuffer buffer,\n SessionSequenceAttributes sessionSequenceAttributes) {\n\n }", "@Override\n public void onMessageReceived(String message, String deviceAddress) {\n boolean meantForMe = _deviceAddress.equals(deviceAddress);\n if (_debug) Log.d(TAG, \"onMessageReceived: message = \" + message + \", meantForMe = \" + meantForMe + \", messageHandler = \" + _messageHandler);\n\n if (meantForMe && (_messageHandler != null)) {\n _messageHandler.onMessageReceived(message);\n }\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken imdt) {\n //System.out.println(\"Pub complete\" + new String(token.getMessage().getPayload()));\n }", "@Override\r\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\r\n\t}", "void onReceive(Message message) throws IOException {\n server.onReceive(message);\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n\n }", "public void reQueueMessage(AndesMessageMetadata metadata) throws AndesException {\n QueueDeliveryWorker.QueueDeliveryInfo queueDeliveryInfo = QueueDeliveryWorker.getInstance().\n getQueueDeliveryInfo(metadata.getDestination());\n if (log.isDebugEnabled()) {\n log.debug(\"Re-Queueing message \" + metadata.getMessageID() + \" to readButUndeliveredMessages map\");\n }\n queueDeliveryInfo.readButUndeliveredMessages.add(metadata);\n }", "@Override\n\tpublic void onAfterDecoded(ChannelContext channelContext, Packet packet, int packetSize) throws Exception {\n\t\t\n\t}", "@Override\n public void receiveMessage(String message) {\n }", "default void onMessageReceived(Group group, Message message, Ordering ordering) {}", "SourceMessage onNewMessageReceived(PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer);", "@Override public void onMessageReceived(RemoteMessage remoteMessage) {\n FCMManager.getInstance(getApplicationContext()).onMessage(remoteMessage);\n }", "@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}", "@Override\n public synchronized Void onCallback(final Deferred<ByteBuffer> deferred, final ByteBuffer readBuffer) {\n receiveBuffer = readBuffer;\n parsePacket();\n return null;\n }", "@Override\n public void processMessage(int type, String receivedMsg) {\n }", "public interface Multicast {\n\t/**\n\t * Multicast message m\n\t * @param m message to be multicasted.\n\t */\n\tpublic void multicast(Message m);\n\t\n\t/**\n\t * Register application with the multicast.\n\t * @param appliation application to be registered.\n\t * @return true if successfully registered.\n\t */\n\tpublic boolean registerApplication(Application application);\n}", "@Override\n\t\t\t\tpublic void notifyReceived(LinphoneCore lc, LinphoneCall call,\n\t\t\t\t\t\tLinphoneAddress from, byte[] event) {\n\t\t\t\t\t\n\t\t\t\t}", "void setDiscovery(final MulticastDiscovery multicastDiscovery) {\n discovery = multicastDiscovery;\n }", "private Message onPingMessageReceived(PingMessage m, DecentSocket origin) {\n\t\treturn null;\n\t}", "public void newADMsg(OL_Message msg) {\n socket.appmsgArrived(msg, socket.callback);\n setADMsg(msg);\n myState = HavePayload;\n messageStore.setTimer(this, DELETE_TIMER_INDEX, delete);\n }", "@Override\r\n\tpublic void packetLost(Connection connection, BaseDatagram lostDatagram)\r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void onMessage(Message msg) {\n\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Received ACL message in QueueMDB\");\n\t\ttry {\n\t\t\tACLMessage receivedMessage = (ACLMessage) ((ObjectMessage) msg).getObject();\n\t\t\tAID[] receivers = receivedMessage.getReceivers();\n\t\t\tSet<String> ipAddresses = new HashSet<String>();\n\t\t\t\n\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Forwarding messages to agents on this host\");\n\t\t\tfor (AID a: receivers) {\n\t\t\t\tif(a.getHost().getIpAddress().equals(this.hostManagerBean.getCurrentSlaveHost().getIpAddress())) {\n\t\t\t\t\tAgent at = HostService.findAgentWithAID(this.hostManagerBean.getRunningAgents().get(this.hostManagerBean.getCurrentSlaveHost().getIpAddress()), a);\n\t\t\t\t\tat.handleMessage(receivedMessage);\n\t\t\t\t} else {\n\t\t\t\t\tipAddresses.add(a.getHost().getIpAddress());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Forwarding messages to agents on other hosts\");\n\t\t\tfor(String receivingHostIp: ipAddresses) {\n\t\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] Forwarding message to {\" + receivingHostIp + \"}\");\n\t\t\t\tRestHostBuilder.sendACLMessageBuilder(this.hostManagerBean.getCurrentSlaveHost(), receivingHostIp, receivedMessage);\n\t\t\t}\n\t\t\t\n\t\t\t//TODO Update socket\n\t\t\t//TODO kad se sve poruke posalju, potrebno je azurirati spisak ACL poruka\n\t\t\t\n\t\t\tSystem.out.println(\"[INFO] [HANDLE ACL MSG] FINISHED\");\n\t\t\t//ws.echoTextMessage(tmsg.getText());\n\t\t} catch (JMSException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected abstract UMOMessage doReceive(long timeout) throws Exception;", "static void masterDownInform(String groupAddress, int port) throws IOException {\n byte[] request = \"152\".getBytes();\n\n MulticastSocket socket = new MulticastSocket(port);\n socket.setBroadcast(true);\n socket.send(new DatagramPacket(request, request.length, InetAddress.getByName(groupAddress), port));\n socket.close();\n }", "void finishPacket(ByteBuffer buffer) {\n addTlv(buffer, DHCP_MESSAGE_TYPE, DHCP_MESSAGE_TYPE_DISCOVER);\n addTlv(buffer, DHCP_CLIENT_IDENTIFIER, getClientId());\n addCommonClientTlvs(buffer);\n addTlv(buffer, DHCP_PARAMETER_LIST, mRequestedParams);\n addTlvEnd(buffer);\n }", "@Override\n public void receiverAddressChanged(String receiver) {\n }", "@Override\r\n public void onReceiveResult(Message message) {\r\n switch (message.what) {\r\n //TODO\r\n }\r\n }", "public void handleMessage(Message message, DatagramSocket socket) throws HandlingException, IOException, ClassNotFoundException;", "MessageDto dequeueMessage(MessageQueryInfoDto messageQueryInfo) throws IOException, MlmqException;", "private void messageRecv(M msg) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"messageRecv = {}\", msg);\n } else if (LOG.isDebugEnabled()) {\n LOG.debug(\"messageRecv = {}\", msg.getClass().getName());\n }\n\n synchronized (_subscribers) {\n for (SubscriberImpl subscriber : _subscribers) {\n subscriber.message(msg);\n }\n }\n }", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\tSystem.out.println(\"deliveryComplete\");\n\t\t\t}", "@Override\n\t\tpublic void messageArrived(String topic, MqttMessage mqttMessage)\n\t\t\t\tthrows Exception {\n\t\t\tsuper.messageArrived(topic, mqttMessage);\n\n\t\t\tMatcher matcher = pattern.matcher(topic);\n\t\t\tif (matcher.matches()) {\n\t\t\t\tString deviceid = matcher.group(1);\n\t\t\t\tString payload = new String(mqttMessage.getPayload());\n\t\t\t\t\n\t\t\t\t//Parse the payload in Json Format\n\t\t\t\tJSONObject jsonObject = new JSONObject(payload);\n\t\t\t\tJSONObject contObj = jsonObject.getJSONObject(\"d\");\n\t\t\t\tint count = contObj.getInt(\"count\");\n\t\t\t\tSystem.out.println(\"Receive count \" + count + \" from device \"\n\t\t\t\t\t\t+ deviceid);\n\n\t\t\t\t//If count >=4, start a new thread to reset the count\n\t\t\t\tif (count >= 4) {\n\t\t\t\t\tnew ResetCountThread(deviceid, 0).start();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void recvSocket(String mServerMessage) {\n // if not started by Activity, prolong the pingStamp to keep running\n // until we have nothing else to do\n if (!serviceStartNormalMethod) {\n pingStamp = System.currentTimeMillis();\n }\n\n if (mServerMessage != null) {\n CtrlMessage msg = new CtrlMessage(mServerMessage);\n if (msg.getIsExtracted()) {\n if (ctrlAuthenticated) {\n if (msg.getIsAck()) {\n Log.i(TAG, \"Processing ACK to our TXsender: \" + msg.getTXsender());\n\n dataSource.ackTxClient2Server(msg.getTXsender());\n Log.i(TAG, \" ...acked in DB.\");\n\n if (msg.getIsOutOfSync()) {\n Log.i(TAG, \" ...ACKed but server told me OUT-OF-SYNC!\");\n if (outOfSyncCnt >= 5) {\n Log.i(TAG, \" ...will flush queue and re-connect the socket!\");\n\n stopQueuedItemsSender();\n\n dataSource.flushTxClient2Server();\n\n // close the socket, and ctrlConnMaintainer will\n // re-connect ASAP\n restartCtrlSocket();\n }\n else {\n outOfSyncCnt++;\n Log.i(TAG, \" ...will re-send unacknowledged queue items. Increased flush-counter to: \" + outOfSyncCnt + \"/\" + 5 + \"!\");\n\n stopQueuedItemsSender();\n\n Log.i(TAG, \" ...marking all unacknowledged items as unsent...\");\n dataSource.unsendAllUnackedTxClient2Server();\n\n Log.i(TAG, \" ...starting queued items sender of all unacknowledged items...\");\n startQueuedItemsSender();\n }\n }\n }\n else {\n Log.i(TAG, \"Processing Server's data...\");\n\n // acknowledge immediatelly (but only if\n // client is authorized and if this is not a\n // notification)\n CtrlMessage msgAck = new CtrlMessage();\n msgAck.setIsAck(true);\n msgAck.setTXsender(msg.getTXsender());\n\n if (!msg.getIsNotification()) {\n if (msg.getTXsender() <= TXserver) {\n msgAck.setIsProcessed(false);\n Log.w(TAG, \" ...Warning: re-transmitted command, not processed!\");\n }\n else if (msg.getTXsender() > (TXserver + 1)) {\n // SYNC PROBLEM! Server sent higher\n // than we expected! This means we\n // missed some previous Message!\n // This part should be handled on\n // Servers side.\n // Server should flush all data (NOT\n // A VERY SMART IDEA) and\n // re-connect. Re-sync should\n // naturally occur\n // then in auth procedure as there\n // would be nothing pending in queue\n // to send to Client.\n\n msgAck.setIsOutOfSync(true);\n msgAck.setIsProcessed(false);\n Log.e(TAG, \" ...Error: Client sent out-of-sync data! Expected: \" + (TXserver + 1) + \", but I got: \" + msg.getTXsender());\n }\n else {\n msgAck.setIsProcessed(true);\n // next package we will receive\n // should be +1 of current value, so\n // lets ++\n TXserver++;\n\n // instead of saving TXserver value to our local\n // DB, we can also save it to Server!\n /*\n dataSource.savePubVar(\"TXserver\", String.valueOf(TXserver));\n */\n JSONObject ooo = new JSONObject();\n try {\n ooo.put(\"TXserver\", TXserver);\n msgAck.setData(ooo);\n msgAck.setIsSaveTXserver(true);\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n sendSocket(msgAck.buildMessage());\n Log.i(TAG, \" ...ACK sent back for TXsender: \" + msg.getTXsender());\n }\n else {\n // we need this for bellow code to\n // execute\n msgAck.setIsProcessed(true);\n Log.i(TAG, \" ...didn't ACK because this was a notification.\");\n }\n\n if (msgAck.getIsProcessed()) {\n if (msg.getIsSystemMessage()) {\n Log.i(TAG, \" ...system message received, parsing...\");\n\n // we must parse and extract stuff\n // from msg.data object\n JSONObject data = (JSONObject) msg.getData();\n\n try {\n if (data.has(\"type\") && data.getString(\"type\").equals(\"base_connection_status\") && data.has(\"connected\") && data.has(\"baseid\") && data.has(\"basename\")) {\n // this is a Base status\n // notification, we get this for\n // each Base associated to our\n // Client account\n\n Log.i(TAG, \" ...got Base Status Notification. BaseID=\" + data.getString(\"baseid\") + \", connected=\" + data.getBoolean(\"connected\"));\n\n // update base's last activity only if\n // the status has changed since last\n // update\n boolean lastConnectedState = dataSource.getBaseStatus(data.getString(\"baseid\"));\n if (lastConnectedState != data.getBoolean(\"connected\")) {\n dataSource.updateBaseLastActivity(data.getString(\"baseid\"));\n }\n\n dataSource.saveBaseConnectedStatus(context, data.getString(\"baseid\"), data.getBoolean(\"connected\"), data.getString(\"basename\"));\n broadcastNewBaseConnectionStatus(data.getString(\"baseid\"), data.getBoolean(\"connected\"));\n\n // Call appropriate BaseDataParser that\n // will possibly show notifications and\n // stuff if Activity for this BaseID is\n // in background\n callBaseDataParserWhenBackgrounded(data.getString(\"baseid\"), null, (lastConnectedState != data.getBoolean(\"connected\")), data.getBoolean(\"connected\"));\n }\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n else {\n Log.i(TAG, \" ...fresh data from Base \" + msg.getBaseIds());\n Log.i(TAG, \" ...Data: \" + msg.getData());\n\n dataSource.saveBaseData(msg.getBaseIds().get(0), msg.getData().toString());\n dataSource.updateBaseLastActivity(msg.getBaseIds().get(0));\n broadcastNewBaseDataArrival(msg.getBaseIds().get(0), msg.getData().toString());\n\n // Call appropriate BaseDataParser that will\n // possibly show notifications and stuff if\n // Activity for this BaseID is in background\n callBaseDataParserWhenBackgrounded(msg.getBaseIds().get(0), msg.getData().toString(), false, false);\n }\n }\n }\n }\n else {\n // if not authenticated, whatever we receive\n // should be response to our auth request, so\n // lets parse it\n try {\n // we must parse and extract stuff from\n // msg.data object\n if (msg.getData() instanceof JSONObject) {\n JSONObject data = (JSONObject) msg.getData();\n\n if (data.has(\"type\") && data.get(\"type\") != null && data.getString(\"type\").equals(\"authentication_response\") && data.has(\"result\") && data.get(\"result\") != null && data.has(\"TXserver\")) {\n // authorized?\n if (data.getInt(\"result\") == 0) {\n ctrlAuthenticated = true;\n\n if (msg.getIsSync()) {\n TXserver = 0;\n }\n else {\n // instead reading TXserver from local\n // storage, we can now read the value\n // Server sends us, because we are\n // storing it on Server now:\n // (Server-Stored TXServer value)\n /*\n String sTXserver = dataSource.getPubVar(\"TXserver\");\n try {\n TXserver = Integer.parseInt(sTXserver);\n }\n catch (NumberFormatException e) {\n TXserver = 0;\n }\n */\n try {\n TXserver = data.getInt(\"TXserver\");\n }\n catch (JSONException jse) {\n TXserver = 0;\n }\n }\n\n // update our GCM regID to Server\n manageRegID(false);\n\n // we have pending items in DB to send to\n // Server?\n if (dataSource.countUnackedTxClient2Server() > 0) {\n Log.i(TAG, \"WE HAVE UNACKED ITEMS TO SEND NOW\");\n startQueuedItemsSender();\n }\n else {\n Log.i(TAG, \"NO UNACKED ITEMS TO SEND NOW\");\n }\n\n ctrlError = CtrlErrors.NONE;\n broadcastCtrlStatus();\n }\n else if (data.getInt(\"result\") == 1) {\n ctrlError = CtrlErrors.WRONG_AUTH_TOKEN;\n broadcastCtrlStatus();\n closeCtrlSocket();\n }\n else {\n ctrlError = CtrlErrors.TOO_MANY_AUTH_ATTEMPTS;\n broadcastCtrlStatus();\n closeCtrlSocket();\n }\n }\n }\n else {\n Log.e(TAG, \"Response to AUTH should have been JSON Object! Ignored.\");\n }\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }", "@Override\n\tpublic void onMessageReceived(ACLMessage message) {\n\n\t}", "public boolean after(Message message, MessageResult messageResult, ExecutionContext executionContext) throws Xdi2MessagingException {\n\r\n\t\t\tfor (int i=0; i<CompoundMessagingTarget.this.messagingTargets.size(); i++) {\r\n\r\n\t\t\t\tAbstractMessagingTarget messagingTarget = CompoundMessagingTarget.this.messagingTargets.get(i);\r\n\r\n\t\t\t\tfor (MessageInterceptor messageInterceptor : messagingTarget.getMessageInterceptors()) {\r\n\r\n\t\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Executing message interceptor \" + messageInterceptor.getClass().getSimpleName() + \" (after).\");\r\n\r\n\t\t\t\t\tif (messageInterceptor.after(message, messageResult, executionContext)) {\r\n\r\n\t\t\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Message has been fully handled by interceptor \" + messageInterceptor.getClass().getSimpleName() + \".\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}", "@Override\n\t\t\t\tpublic void messageArrived(MqttTopic topicName,\n\t\t\t\t\t\tMqttMessage message) throws Exception {\n\t\t\t\t\tSystem.out.println(\"messageArrived----------\");\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 1;\n\t\t\t\t\tmsg.obj = message.toString();\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}", "@Override\n public void onLost(final Message message) {\n mNearbyDevicesArrayAdapter.remove(\n DeviceMessage.fromNearbyMessage(message).getMessageBody());\n }", "@Override\n public void run()\n {\n try\n {\n MulticastSocket multicastSocket = new MulticastSocket(55559);\n //My chosen multicast ip.\n String multicastIP = \"224.0.159.82\";\n multicastSocket.joinGroup(InetAddress.getByName(multicastIP));\n //Receiver on continuous loop.\n while (receiverOn)\n {\n //Check network flag.\n if (frame.getSelectPanel().network())\n {\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n multicastSocket.receive(receivePacket);\n byte[] b = receivePacket.getData();\n System.out.println(\"Receive: \" + b.length);\n ByteArrayInputStream bis = new ByteArrayInputStream(b);\n ObjectInput in = new ObjectInputStream(bis);\n\n try\n {\n int[] data = (int[]) in.readObject();\n System.out.println(\"This: \" + frame.getId() + \"\\tFrom: \" + data[0]);\n //Exclude messages that originated at this peer.\n if (data[0] != frame.getId())\n {\n //Action based on int at data[1]\n switch (data[1])\n {\n case Draw.CLEAR:\n case Draw.DRAW:\n case Draw.TEXT:\n case Draw.CIRCLE:\n case Draw.IMAGE:\n frame.getDraw().put(data);\n break;\n case REQ_IP:\n int key = data[0];\n String ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n int size = frame.getPeerCache().getSize();\n frame.getPeerCount().setText(String.format(\"Peer count: %d\", size));\n int[] myIp = frame.getMyIp();\n size = frame.getActionCache().getSize();\n int[] ipAns = {frame.getId(), ANS_IP, myIp[0], myIp[1], myIp[2], myIp[3], size};\n frame.getBroadcaster().put(ipAns);\n break;\n case ANS_IP:\n /*\n * 0 = id\n * 1 = data type\n * 2,3,4,6 = IP\n */\n key = data[0];\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case LEAVE_NOTE:\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().removePeer(ip);\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case REQ_HISTORY:\n /*\n * 0 = id\n * 1 = data type\n * 2 = tarID\n * 3,4,5,6 = IP\n */\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[3], data[4], data[5], data[6]);\n System.out.println(\"History request from \" + ip);\n UdpClient historyClient = new UdpClient(ip, frame.getActionCache());\n Thread historyThread = new Thread(historyClient);\n historyThread.start();\n }\n break;\n case CLEAR_REQ:\n String reqTitle = String.format(\"Peer %d has requested a clear.\", data[1]);\n int dialogResult = JOptionPane.showConfirmDialog(frame, \"Would you like to clear?\",\n reqTitle,\n JOptionPane.YES_NO_OPTION);\n if (dialogResult == JOptionPane.YES_OPTION)\n {\n int[] clear = {frame.getId(), Draw.CLEAR};\n frame.getDraw().put(clear);\n frame.clearAll();\n }\n break;\n case IMAGE_REQ:\n System.out.print(\"IMAGE REQUEST: \");\n System.out.println(data[2] + \" vs \" + frame.getId());\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[4], data[5], data[6], data[7]);\n System.out.println(\"Image request from \" + ip);\n BufferedImage image = frame.getImageCache().get(data[3], data[7]);\n\n TcpClient tcpClient = new TcpClient(ip, image);\n Thread tcpThread = new Thread(tcpClient);\n tcpThread.start();\n }\n break;\n default:\n //Rogue packet protection.\n System.out.println(\"Received invalid packet.\");\n System.out.println(Arrays.toString(data));\n }\n }\n } catch (ClassNotFoundException | IndexOutOfBoundsException e)\n {\n //Rogue packet protection.\n //Message given, loop continues.\n System.out.println(\"Exception: Received invalid packet.\");\n e.printStackTrace();\n }\n }\n }\n } catch (IOException | InterruptedException e)\n {\n System.err.println(\"Error in Receiver class.\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "public void message(LocoNetMessage m) {\n notify(m);\n }", "public void onMessage(Message message, Session session) throws JMSException {\n }", "@Override\n public void run() {\n MulticastSocket multiSocket = null;\n try {\n MLog.i(TAG, \"[udpBroadCast] before send udp\");\n mProgress.onProgress(LanTransportHelper.TOKEN_PROGRESS, R.string.before_send_udp, null);\n\n// udpSocket = new DatagramSocket(Constant.UDP_SEND_PORT);\n multiSocket = new MulticastSocket();\n\n InetAddress address = InetAddress.getByName(Constant.UDP_MULTI_BROADCAST_ADDRESS);\n DatagramPacket dp = new DatagramPacket(data, data.length, address, Constant.UDP_MULTI_BROADCAST_PORT);\n multiSocket.send(dp);\n\n\n MLog.i(TAG, \"[udpBroadCast] after send udp\");\n mProgress.onProgress(LanTransportHelper.TOKEN_PROGRESS, R.string.after_send_udp, null);\n } catch (Exception e) {\n MLog.i(TAG, e.toString());\n mProgress.onProgress(LanTransportHelper.TOKEN_PROGRESS, R.string.exception, e.toString());\n } finally {\n if (multiSocket != null) {\n multiSocket.close();\n }\n MLog.i(TAG, \"[udpBroadCast] finally\");\n mProgress.onProgress(LanTransportHelper.TOKEN_UPD_SENDER_CLOSE, R.string.close_send_udp, null);\n }\n\n }", "@Override\n\tpublic void receive(String msg) {\n\t\t\n\t}", "public void handleMessage(Message message, DatagramSocket socket, DatagramPacket packet) throws HandlingException, IOException, ClassNotFoundException;", "final void parseUpperTransportPDU(@NonNull final Message message) throws ExtendedInvalidCipherTextException {\n try {\n switch (message.getPduType()) {\n case MeshManagerApi.PDU_TYPE_NETWORK:\n if (message instanceof AccessMessage) { //Access message\n final AccessMessage accessMessage = (AccessMessage) message;\n reassembleLowerTransportAccessPDU(accessMessage);\n final byte[] decryptedUpperTransportControlPdu = decryptUpperTransportPDU(accessMessage);\n accessMessage.setAccessPdu(decryptedUpperTransportControlPdu);\n } else {\n //TODO\n //this where control messages such as heartbeat and friendship messages are to be implemented\n }\n break;\n case MeshManagerApi.PDU_TYPE_PROXY_CONFIGURATION:\n final ControlMessage controlMessage = (ControlMessage) message;\n if (controlMessage.getLowerTransportControlPdu().size() == 1) {\n final byte[] lowerTransportControlPdu = controlMessage.getLowerTransportControlPdu().get(0);\n final ByteBuffer buffer = ByteBuffer.wrap(lowerTransportControlPdu)\n .order(ByteOrder.BIG_ENDIAN);\n message.setOpCode(buffer.get());\n final byte[] parameters = new byte[buffer.capacity() - 1];\n buffer.get(parameters);\n message.setParameters(parameters);\n }\n break;\n }\n } catch (InvalidCipherTextException ex) {\n throw new ExtendedInvalidCipherTextException(ex.getMessage(), ex.getCause(), TAG);\n }\n }", "void receiveMessage(Message<M> message) {\n long id = message.getReceiver();\n Vertex<V, E, M> receiver = vertices.get(id);\n if (receiver != null) {\n M value = message.getValue();\n synchronized (receiver) {\n numMessageReceived++;\n if (combiner != null && receiver.hasNextStepMessage()) {\n value = combiner.combine(receiver.readNextStepMessage(), value);\n }\n receiver.receiveMessage(value);\n }\n }\n }", "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n mAddressOutput = resultData.getParcelable(Constants.RESULT_DATA_KEY);\n String resultMessage;\n if (resultCode == Constants.FAILURE_RESULT) {\n resultMessage = resultData.getString(Constants.RESULT_DATA_MESSAGE);\n } else {\n resultMessage = getFormattedAddress(mAddressOutput);\n }\n mAddressResult = resultMessage;\n mView.setAddress(mAddressResult, getMarkerText(mAddressOutput));\n\n mAddressRequested = false;\n updateUIWidgets();\n }" ]
[ "0.663253", "0.6121733", "0.60380936", "0.60349625", "0.59711134", "0.5952973", "0.5923401", "0.5840867", "0.58398676", "0.5813876", "0.57510597", "0.57320106", "0.57271206", "0.57188123", "0.5714401", "0.5676671", "0.5654621", "0.5641843", "0.5621167", "0.5619451", "0.55978304", "0.5588336", "0.55862254", "0.557762", "0.55621094", "0.5560038", "0.55351186", "0.55294806", "0.5518151", "0.55137134", "0.5503272", "0.54994464", "0.54675007", "0.5464582", "0.5456882", "0.5438574", "0.54375476", "0.54232186", "0.5411548", "0.5405116", "0.53977215", "0.5396216", "0.53942114", "0.53843004", "0.5382069", "0.5365314", "0.5355709", "0.5351324", "0.534582", "0.53355634", "0.53342986", "0.5333456", "0.5324399", "0.53207207", "0.53188753", "0.530043", "0.52959764", "0.5291577", "0.5291577", "0.52889246", "0.5279267", "0.52748895", "0.5273913", "0.52658623", "0.5263292", "0.5262966", "0.5262016", "0.52606237", "0.52589506", "0.5252238", "0.5248742", "0.52444863", "0.5236425", "0.523642", "0.5218384", "0.52096695", "0.5209395", "0.5208145", "0.5204323", "0.51928645", "0.5191694", "0.5187639", "0.5178401", "0.51742566", "0.51690227", "0.51688176", "0.5165703", "0.5148735", "0.51461816", "0.51406306", "0.51372874", "0.5134025", "0.51330054", "0.5129432", "0.5128815", "0.5127665", "0.51262", "0.5119324", "0.51183605", "0.50976396", "0.5095423" ]
0.0
-1
This method is called just after there has been an error in received from some underlying transport. This passes the exception into the Receiving object.
public void error(Exception e);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "protected void connectionException(Exception exception) {}", "@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) {\n\t\tlogger.error(\"Unexpected exception from downstream.\",\n\t\t\t\te.getCause());\n\t\te.getChannel().close();\n\t}", "private void failWithExceptionOnExecutor(CronetException e) {\n mException = e;\n // Do not call into mCallback if request is complete.\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n mReadState = mWriteState = State.ERROR;\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onFailed(this, mResponseInfo, e);\n } catch (Exception failException) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception notifying of failed request\",\n failException);\n }\n mInflightDoneCallbackCount.decrement();\n }", "private void sendOldError(Exception e) {\n }", "public CommunicationException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\r\n\t}", "protected void inboundTransportError(Status errorStatus, Metadata metadata) {\n Preconditions.checkNotNull(metadata, \"metadata\");\n if (inboundPhase() == Phase.STATUS) {\n log.log(Level.INFO, \"Received transport error on closed stream {0} {1}\",\n new Object[]{id(), errorStatus});\n return;\n }\n // For transport errors we immediately report status to the application layer\n // and do not wait for additional payloads.\n transportReportStatus(errorStatus, false, metadata);\n }", "@Override\n public void exceptionCaught(\n ChannelHandlerContext ctx, ExceptionEvent e) {\n \t_LOG.warn(\"Unexpected exception from downstream.\",\n e.getCause());\n e.getChannel().close();\n }", "@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)\n\t\t\tthrows Exception {\n\t\tsuper.exceptionCaught(ctx, cause);\n\t}", "@Override\r\n public void exceptionCaught(\r\n ChannelHandlerContext ctx, ExceptionEvent e) {\n logger.log(\r\n Level.WARNING,\r\n \"Unexpected exception from downstream.\",\r\n e.getCause());\r\n e.getChannel().close();\r\n }", "public MailDeliveryException(ErrorInfo p_errorInfo) {\n\t\tsetErroInfo(p_errorInfo);\n\t}", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n if (isQuiteException(cause)) {\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"Channel:%s Error\", ctx.channel()), cause);\n }\n } else {\n logger.warn(PROTOCOL_FAILED_RESPONSE, \"\", \"\", String.format(\"Channel:%s Error\", ctx.channel()), cause);\n }\n ctx.close();\n }", "@Override\n public void exceptionCaught(final ChannelHandlerContext context, final Throwable cause) {\n log.debug(\"{} caught an exception.\", this.apnsConnection.name, cause);\n }", "@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n\t\tLog.i(\"exceptionCaught\", cause.getMessage());\n\t\tsuper.exceptionCaught(ctx, cause);\n\t}", "public void unwrap() throws Exception {\n throw getCause();\n }", "@Override\n public void errorReceived(String msg, Exception t) {\n abort();\n // abort() calls sendError() which calls unregister()\n // so don't bother\n // unregister();\n }", "public void socketException(PacketChannel pc, Exception ex);", "public void handleNetworkException(WorkerChore chore, CallNetworkException e);", "private void exceptionCaught(Throwable cause) {\n log.debug(\"Caught exception\", cause);\n closeConnection(cause);\n Handler<Throwable> exceptionHandler = this.exceptionHandler;\n if (exceptionHandler != null) {\n exceptionHandler.handle(cause);\n }\n }", "@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}", "public MailDeliveryException(Exception p_exception, ErrorInfo p_errorInfo) {\n\t\tsetErroInfo(p_errorInfo);\n\t\tsetException(p_exception);\n\t}", "@Override\n public synchronized Void onErrback(final Deferred<ByteBuffer> deferred, final Exception error) {\n deferredReceive.errback(error);\n deferredReceive = null;\n return null;\n }", "public void testAfterPropertiesSetException() throws Exception {\n\t\ttry {\n\t\t\texchangeTarget.afterPropertiesSet();\n\t\t\tfail(\"afterPropertiesSet should fail when interface, service, and uri are null.\");\n\t\t} catch (MessagingException me) {\n\t\t\t// test succeeds\n\t\t}\n\t}", "public void handleFailure(AndesMessageMetadata metadata) throws AndesException {\n long messageId = metadata.getMessageID();\n UUID channelId = metadata.getChannelId();\n if(log.isDebugEnabled()) {\n log.debug(\"message was rejected by client id= \" + messageId + \" channel= \" + channelId);\n }\n stampMessageAsRejected(channelId, messageId);\n //re-queue the message to send again\n reQueueMessage(metadata);\n }", "public void socketError(Exception arg0) {\n\t\t\r\n\t}", "public void onReceivedError();", "@Override\r\n\tpublic void handleServerException(Exception e, String commandReceived) {\r\n\t\tLoggingUtils.logError(logger, e, \"Error from the TCPServerHandler\");\r\n\r\n\t}", "protected abstract void handleRealtimeLinkCommitException(Throwable t);", "protected void serverError() throws IOException {\n cleanup();\n throw new IOException(\"Recieved error message from server:\\n\" + new String(_text_buffer));\n }", "public void handleInvocationException(\n\t\t\tMessageExchangeInvocationException exception) {\n\t\tlogger.info(\"Handliing the invocation exception( \"\n\t\t\t\t+ \"\\n\\ttargetService: \" + exception.getTargetService()\n\t\t\t\t+ \"\\n\\tsender: \" + exception.getSender() + \")\");\n\t\t// retrieve exception message\n\t\tDocument excpDoc = createInvocationExceptionDocument(exception);\n\t\t// retrieve the session\n\t\tMessageSession session = exception.getSession();\n\t\tif (session == null) {\n\t\t\tlogger.error(\"Can't get the exchange session according to exchange\");\n\t\t\t// do nothing currently\n\t\t\treturn;\n\t\t}\n\t\t// set the response document into the exchange\n\t\tMessageExchange rootExchange = session.getRootExchange();\n\n\t\ttry {\n\t\t\tNormalizedMessage outMessage = rootExchange.createMessage();\n\t\t\toutMessage.setContent(new DOMSource(excpDoc));\n\n\t\t\t// MessageExchangeImpl impl = (MessageExchangeImpl)rootExchange;\n\t\t\t// impl.setOutMessage(outMessage);\n\t\t\t((MessageExchangeImpl) rootExchange).setOutMessage(outMessage);\n\t\t\t// send the exchange\n\t\t\tthis.sendResponse(rootExchange);\n\t\t} catch (MessagingException e) {\n\t\t\tlogger.error(\"Can't create the Normalized Message!\", e);\n\t\t}\n\t}", "public void completeExceptionally(Throwable exception) {\n messageFuture.completeExceptionally(exception);\n futures.remove(this.correlationId);\n }", "@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}", "@Override\n\tpublic void exceptionCaught(IoSession arg0, Throwable arg1)\n\t\t\tthrows Exception {\n\n\t}", "private void sendInvocationException(HttpRequest request,\n\t\t\tHttpResponse response, ServiceInvocationException e) {\n\t\t// internal exception in service method\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_INTERNAL_SERVER_ERROR );\n\t\tresponse.setContentType( \"text/xml\" );\n\t\tconnector.logError(\"Exception while processing RMI: \" + request.getPath());\n\t\t\n\t\tObject[] ret = new Object[4];\n\t\tret[0] = \"Exception during RMI invocation!\";\n\t\t\n\t\tret[1] = e.getCause().getCause().getClass().getCanonicalName();\n\t\tret[2] = e.getCause().getCause().getMessage();\n\t\tret[3] = e.getCause().getCause();\n\t\tString code = ret[0]+\"\\n\"+ret[1]+\"\\n\"+ret[2]+\"\\n\"+ret[3];\n\t\tresponse.println ( code );\n\t}", "public CommunicationException() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void receiveError(Stanza stanza, XMPPError error) {\n\t\t\r\n\t}", "@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n\t\tLOGGER.error(\"server caught exception\", cause);\n\t\tctx.close();\n\t}", "@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}", "@Override\n public void onError(Throwable t, SelectableChannel channel) {\n endpointHandler.onError(t, channel);\n }", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n\t\t\tcause.printStackTrace();\n\t\t\tctx.close();\n\t\t}", "public void onUnhandledInboundException(Throwable th) {\n try {\n logger.warn(\"An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.\", th);\n } finally {\n ReferenceCountUtil.release(th);\n }\n }", "private void throwsError() throws OBException {\n }", "@Override\n\tpublic void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {\n\t\ttry {\n\t\t\tthrow e.getCause();\n\t\t} catch (ClientException ce) {\n\t\t\tif (ctx.getChannel().isOpen())\n\t\t\t\tctx.getChannel().write(ChannelBuffers.wrappedBuffer(CLIENT_ERROR.array(), ce.getMessage().getBytes(), CRLF.array()));\n\t\t} catch (ClosedChannelException e2) {\n\t\t\tlogger.info(\"ClosedChannelException\" + e.getChannel().getRemoteAddress());\n\t\t\tif (ctx.getChannel().isOpen()) {\n\t\t\t\tctx.getChannel().write(ERROR);\n\t\t\t}\n\t\t} catch (IOException e2) {\n\t\t\tStackTraceElement[] stackTraceElements = e2.getStackTrace();\n\t\t\tfor (int i = 0; i < stackTraceElements.length; i++) {\n\t\t\t\tif (stackTraceElements[i].getClassName().equals(\"sun.nio.ch.SocketDispatcher\")) {\n\t\t\t\t\tlogger.info(\"IOException:\" + e.getChannel().getRemoteAddress());\n\t\t\t\t\tif (ctx.getChannel().isOpen()) {\n\t\t\t\t\t\tctx.getChannel().write(ERROR);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlogger.error(\"error\", e2);\n\n\t\t} catch (Throwable tr) {\n\t\t\tlogger.error(\"error\", tr);\n\t\t\tif (ctx.getChannel().isOpen()) {\n\t\t\t\tctx.getChannel().write(ERROR);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void process(Exchange exchange) throws Exception {\n exchange.setException(exception);\n exchange.getIn().setBody(message);\n }", "@Override\n\tpublic void onException(JMSException arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onException(JMSException arg0) {\n\t\t\n\t}", "public void setException(Exception e)\n {\n this.exception = e;\n }", "public void handleException(Throwable e) {\r\n handleException(e, mReportingInteractionMode);\r\n }", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "public void processBlockwiseResponseTransferFailed() {\n //to be overridden by extending classes\n }", "public void connectionLost(Throwable cause) {\n\t}", "@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}", "public void onFailure(Throwable caught) {\n\t\t\t\tGWT.log(\"Mail Send Failed\", null);\r\n\t\t\t}", "public void onFailure(Throwable caught) {\n\t\t\t\tGWT.log(\"Mail Send Failed\", null);\r\n\t\t\t}", "private void onCallbackException(Exception e) {\n CallbackException streamError =\n new CallbackExceptionImpl(\"CalledByNative method has thrown an exception\", e);\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in CalledByNative method\", e);\n failWithExceptionOnExecutor(streamError);\n }", "protected abstract void messageReceived(T obj, MyBoxException exception);", "@Override\n public void handleException(final String message, final Exchange originalExchange, final Throwable exception) { send the message to the special direct:file-error endpoint, which\n // will trigger exception handling\n //\n template.send(\"direct:file-error\", new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n // set an exception on the message from the start so the\n // error handling is triggered\n exchange.setException(exception);\n exchange.getIn().setBody(message);\n }\n });\n }", "private void handleException(final Exception e) throws OsgpException {\n LOGGER.error(\"Exception occurred: \", e);\n if (e instanceof OsgpException) {\n throw (OsgpException) e;\n } else {\n throw new TechnicalException(COMPONENT_WS_PUBLIC_LIGHTING, e);\n }\n }", "void dispatchException(Throwable exception);", "protected void handleProcessingException(Exception e) throws NbaBaseException {\n unLockItems();\n if (e instanceof NbaBaseException) {\n NbaBaseException eb = (NbaBaseException) e;\n if (eb.isFatal() || eb instanceof NbaLockedException) {\n throw eb;\n }\n }\n if (result == null) {\n setWork(getOrigWorkItem());\n addComment(e.getMessage());\n changeStatus(getHostErrorStatus());\n setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getHostErrorStatus(), getHostErrorStatus()));\n }\n try {\n doUpdateWorkItem();\n } catch (NbaBaseException e1) {\n e1.forceFatalExceptionType();\n throw e1;\n }\n }", "public SMSLibException(Throwable originalE)\n/* 17: */ {\n/* 18:45 */ this.originalE = originalE;\n/* 19: */ }", "@Override\n public void msrpTransferAborted() {\n }", "public synchronized void onExceptionSend(HttpPipelineRequest p_onExceptionSend_1_, Exception p_onExceptionSend_2_) {\n/* 339 */ terminate(p_onExceptionSend_2_);\n/* */ }", "protected abstract void onException(final Exception exception);", "public void mailStoreRequestFailed(MailStoreRequest request, Throwable exception, boolean isFinal) {\n endFolderRefreshOperation(false);\r\n }", "public void endUserException() {\n if (upcallReturn_ != null) {\n Assert._OB_assert(userEx_);\n upcallReturn_.upcallEndUserException(this);\n }\n }", "protected void onConnectionError() {\n\t}", "private void gestioneDisconnessione(Exception e) {\n\t\tLOG.info(\"Client disconnesso\");\n\t\tthis.completeWithError(e);\n\t\tthis.running=false;\n\t}", "protected void handleFailure(MailAddress recipient, Mail aMail, Exception ex)\n throws MessagingException, IOException {\n String user = getUsername(recipient);\n\n MimeMessage originalMessage = aMail.getMessage();\n MimeMessage message = new MimeMessage(originalMessage);\n MimeMultipart multipart = new MimeMultipart();\n \n MimeBodyPart noticePart = new MimeBodyPart();\n noticePart.setText(\"An error was encountered while processing this mail with the active sieve script for user \\\"\"\n + user + \"\\\". The error encountered was:\\r\\n\" + ex.getLocalizedMessage() + \"\\r\\n\");\n multipart.addBodyPart(noticePart);\n \n MimeBodyPart originalPart = new MimeBodyPart();\n originalPart.setContent(originalMessage, \"message/rfc822\");\n if ((originalMessage.getSubject() != null) && (!originalMessage.getSubject().trim().isEmpty())) {\n originalPart.setFileName(originalMessage.getSubject().trim());\n } else {\n originalPart.setFileName(\"No Subject\");\n }\n originalPart.setDisposition(MimeBodyPart.INLINE);\n multipart.addBodyPart(originalPart);\n \n message.setContent(multipart);\n message.setSubject(\"[SIEVE ERROR] \" + originalMessage.getSubject());\n message.setHeader(\"X-Priority\", \"1\");\n message.saveChanges();\n \n storeMessageInbox(user, message);\n }", "@Override\r\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\r\n ctx.close();\r\n }", "@Override\r\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\r\n ctx.close();\r\n }", "protected void handleException(java.lang.Throwable exception) {\n\tsuper.handleException(exception);\n}", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {\n try {\n if (!(cause instanceof SSLHandshakeException)) {\n messageListener.onException(ctx, cause);\n }\n if (isNoisyException(cause)) {\n if (logger.isDebugEnabled()) {\n logger.info(format(\"closing\"), cause);\n } else {\n logger.info(format(\"closing (\" + cause.getMessage() + \")\"));\n }\n } else {\n final Throwable realCause = extractCause(cause, 0);\n if (logger.isDebugEnabled()){\n logger.info(format(\"Handling exception: \" + cause + \" (caused by: \" + realCause + \")\"), cause);\n } else {\n logger.info(format(\"Handling exception: \" + cause + \" (caused by: \" + realCause + \")\"));\n }\n super.exceptionCaught(ctx, cause);\n }\n } finally {\n ctx.flush();\n ctx.close();\n }\n }", "@Override\r\n\tpublic void setException(Throwable throwable) {\r\n super.setException(throwable);\r\n if ( getFutureListenerProcessor() != null ) {\r\n getFutureListenerProcessor().futureSetException(this, throwable);\r\n }\r\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) {\n log.error(\"Input Stream {} : {}\", name, e.getCause());\n Channel ch = e.getChannel();\n ch.close();\n channelAtomicReference.set(null);\n }", "@Override\n public void onError(Throwable e)\n {\n if (e instanceof RestException)\n {\n promise.done(((RestException) e).getResponse());\n }\n else\n {\n promise.fail(e);\n }\n }", "private void errorProcess(CallbackContext callbackContext, Exception ex) {\n // Convierte el payLoad a JSON.\n Gson gson = new Gson();\n Map<String, String> exc_map = new HashMap<String, String>();\n exc_map.put(\"message\", ex.toString());\n exc_map.put(\"stacktrace\", getStackTrace(ex));\n // Convierte el payLoad a JSON.\n String jsonError = new Gson().toJson(exc_map);\n\n sendResultError(callbackContext, jsonError);\n ex.printStackTrace();\n if (callbackContext != null) {\n callbackContext.error(jsonError);\n }\n }", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "public void onConnectionError()\n\t\t{\n\t\t}", "void error(ProxyException e) {\n RequestContext.getCurrentContext().setThrowable(e);\n proxyRunner.error();\n logger.warn(e.getMessage(), e);\n }", "protected void afterConsume(Exception error) {\n // Do nothing\n }", "public void onException(JMSException exception)\n {\n System.err.println(\"something bad happended: \" + exception);\n }", "private void connectionFailed(ContextImpl context, Channel ch, Handler<Throwable> connectionExceptionHandler,\n Throwable t) {\n Handler<Throwable> exHandler =\n connectionExceptionHandler == null ? log::error : connectionExceptionHandler;\n\n context.executeFromIO(() -> {\n connectionClosed();\n try {\n ch.close();\n } catch (Exception ignore) {\n }\n if (exHandler != null) {\n exHandler.handle(t);\n } else {\n log.error(t);\n }\n });\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ctx.close();\n }", "void exceptionCaught(Throwable cause) throws Exception;", "void exceptionCaught(Throwable cause) throws Exception;", "@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}", "public static void handleMessageDeliveryFailure(MessageBus bus, Message message, String errorMessage, Throwable e,\n boolean disconnect) {\n String logMessage =\n \"*** Message delivery failure ***\" +\n \"\\nBus: \" + bus.toString() +\n \"\\nMessage: \" + message +\n \"\\nerrorMessage: \" + errorMessage +\n \"\\nexception: \" + e +\n \"\\ndisconnect: \" + disconnect;\n\n if (!(e instanceof MessageDeliveryFailure && ((MessageDeliveryFailure) e).isRpcEndpointException())) {\n if (e == null) {\n logger.error(logMessage);\n }\n else {\n logger.error(logMessage, e);\n }\n }\n\n try {\n if (message.getErrorCallback() != null) {\n if (!message.getErrorCallback().error(message, e)) {\n return;\n }\n }\n\n sendClientError(bus, message, errorMessage, e);\n\n // if (e != null) throw new MessageDeliveryFailure(e);\n }\n finally {\n if (disconnect)\n disconnectRemoteBus(bus, message);\n }\n }", "@Override\n public void onAcknowledgement(RecordMetadata recordMetadata, Exception e) {\n }", "private void handleInvokeException(Exception e) {\n log.warn(\"invoke()\", e);\n // Removed reset of setLegDetail - as a performance tuning we are\n // not returning leg details from train route api for the moment - SM (10/2009)\n // setLegDetail(null);\n }", "@Override\n public void connectionLost(Throwable arg0) {\n\n }", "void exceptionCaught(NextFilter nextFilter, Session session,\n Throwable cause) throws Exception;" ]
[ "0.656245", "0.656245", "0.61022085", "0.60483176", "0.6036363", "0.59937525", "0.598778", "0.59371585", "0.59344816", "0.58820695", "0.5881265", "0.5840609", "0.58327484", "0.583207", "0.5815855", "0.5810523", "0.58063835", "0.5777069", "0.57477397", "0.5747606", "0.5740836", "0.57215536", "0.5695577", "0.5674083", "0.5666398", "0.5663691", "0.56549823", "0.5627951", "0.56265086", "0.5613255", "0.56090146", "0.5592226", "0.5569305", "0.5555577", "0.55407345", "0.5533528", "0.5531315", "0.55075604", "0.5504995", "0.55006456", "0.55003005", "0.54960227", "0.54926455", "0.54878026", "0.5452649", "0.5449486", "0.54418457", "0.54418457", "0.54396677", "0.5426526", "0.54207605", "0.54149294", "0.54117537", "0.5410937", "0.5408252", "0.53991705", "0.53991705", "0.539681", "0.5393012", "0.5389549", "0.537745", "0.5373622", "0.53680074", "0.53618264", "0.5359265", "0.5335573", "0.5329729", "0.5321607", "0.53195745", "0.5317906", "0.53145987", "0.5312599", "0.53113735", "0.53113735", "0.5309769", "0.5307379", "0.53050286", "0.530457", "0.5297439", "0.5297424", "0.52885205", "0.5286029", "0.52832043", "0.5273467", "0.5270676", "0.52688867", "0.52680194", "0.52680194", "0.52680194", "0.52680194", "0.52680194", "0.52680194", "0.52680194", "0.52670634", "0.52670634", "0.5259586", "0.5258687", "0.52557945", "0.52534413", "0.52457273", "0.52436984" ]
0.0
-1
This method is called just after there has been EOF in received from some underlying transport.
public void eof();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onEndOfStream()\n {\n synchronized (f_aBuffSingleInbound)\n {\n synchronized (f_aBuffSingleOutbound)\n {\n if (f_engine.getSession().isValid())\n {\n try\n {\n f_engine.closeInbound();\n closeOutbound(false);\n }\n catch (SSLException e)\n {\n // mimicking SSLSocket\n }\n catch (IOException ignored)\n {\n // won't occur\n }\n }\n }\n }\n }", "public void exchangeComplete(final HttpServerExchange exchange) {\n final HttpServerConnection connection = (HttpServerConnection) exchange.getConnection();\n if (connection.getExtraBytes() == null || exchange.isUpgrade()) {\n performFlush(exchange, connection);\n } else {\n connection.getReadListener().exchangeComplete(exchange);\n }\n }", "public void afterReceive() {\n\t}", "public void finish() throws IOException {\n\t\tthis.writeEOFRecord();\n\t\t}", "@Override\n\tpublic boolean tryAgainOnEOF()\n\t{\n\t\treturn false;\n\t}", "protected void inboundDataReceived(ReadableBuffer frame) {\n Preconditions.checkNotNull(frame, \"frame\");\n boolean needToCloseFrame = true;\n try {\n if (inboundPhase() == Phase.STATUS) {\n return;\n }\n if (inboundPhase() == Phase.HEADERS) {\n // Have not received headers yet so error\n inboundTransportError(Status.INTERNAL\n .withDescription(\"headers not received before payload\"), new Metadata());\n return;\n }\n inboundPhase(Phase.MESSAGE);\n\n needToCloseFrame = false;\n deframe(frame, false);\n } finally {\n if (needToCloseFrame) {\n frame.close();\n }\n }\n }", "private void zzDoEOF() {\n if (!zzEOFDone) {\n zzEOFDone = true;\n\n }\n }", "protected void endProtocol()\n throws IOException\n {\n try\n {\n boolean fWrite = f_buffEncOut.hasRemaining();\n\n for (SSLSelectionKey key = m_keyFirst; key != null;\n key = key.m_keyNext)\n {\n key.setProtocolReadyOps(fWrite ? SelectionKey.OP_READ : 0);\n key.interestProtocol(fWrite ? SelectionKey.OP_WRITE : 0, 0);\n }\n }\n catch (CancelledKeyException e) {}\n\n if (!m_fValidated && f_engine.getSession().isValid())\n {\n validatePeer();\n m_fValidated = true;\n }\n }", "private void zzDoEOF() {\n if (!zzEOFDone) {\n zzEOFDone = true;\n \n }\n }", "private void zzDoEOF() {\n if (!zzEOFDone) {\n zzEOFDone = true;\n \n }\n }", "private void zzDoEOF() {\n if (!zzEOFDone) {\n zzEOFDone = true;\n \n }\n }", "private void zzDoEOF() {\n if (!zzEOFDone) {\n zzEOFDone = true;\n \n }\n }", "private void zzDoEOF() {\n if (!zzEOFDone) {\n zzEOFDone = true;\n \n }\n }", "protected void responseBodyConsumed() {\n\n // make sure this is the initial invocation of the notification,\n // ignore subsequent ones.\n responseStream = null;\n responseConnection.setLastResponseInputStream(null);\n\n if (shouldCloseConnection(responseConnection)) {\n responseConnection.close();\n }\n\n doneWithConnection = true;\n if (!inExecute) {\n ensureConnectionRelease();\n }\n }", "void cancelEof() {\n\t\tthis.eofSeen = false;\n\t}", "void scanDataBufferForEndOfData() {\n while (!allRowsReceivedFromServer() &&\n (dataBuffer_.readerIndex() != lastValidBytePosition_)) {\n stepNext(false);\n }\n }", "protected void onEnd() {}", "protected void finalize() throws Throwable {\n\t\ttry {\n\t\t\tthis.listen_socket.close();\n\t\t} catch (IOException e1) {\n\t\t}\n\t}", "@Override\n public void close() throws IOException {\n if (this.closed) {\n return;\n }\n this.closed = true;\n if (this.content.size() >= (long)this.limit) return;\n throw new ProtocolException(\"content-length promised \" + this.limit + \" bytes, but received \" + this.content.size());\n }", "@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelReadComplete\");\n\t\tsuper.channelReadComplete(ctx);\n\t}", "@Override\n public void channelReadComplete(final ChannelHandlerContext ctx) {\n ctx.flush();\n }", "private static void completedReceive(long handle, long byteCount) {\n Log.w(LogDomain.NETWORK, \"C4Socket.completedReceive() handle -> \" + handle);\n }", "@Override\n\tpublic long bytesRead() {\n\t\treturn 0;\n\t}", "public void done(byte[] data, ParseException e) {\n }", "public void done(byte[] data, ParseException e) {\n }", "public boolean endOfStream()\n {\n return false;\n }", "@Override\n\tpublic void onAfterDecoded(ChannelContext channelContext, Packet packet, int packetSize) throws Exception {\n\t\t\n\t}", "synchronized void receive(int preknownDataLength) throws EOFException, IOException {\n byte[] buffer = new byte[preknownDataLength];\n dataInput.readFully(buffer);\n pipedOutputStream.write(buffer);\n }", "@Override protected void finalize() throws Throwable {\r\n\t\tsuper.finalize();\r\n\t\tif (flusher != null) {\r\n\t\t\tflusher.stop();\r\n\t\t}\r\n\t\tflush();\r\n\t}", "public void finished() {\n\n\t\tencodeCounter = 0;\n\t}", "@Override\n\tpublic void complete(ReceiveResponseBean receiveResponseBean) {\n\n\t}", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "private void zzDoEOF() throws java.io.IOException {\n if (!zzEOFDone) {\n zzEOFDone = true;\n yyclose();\n }\n }", "public void endRead() throws ThingsException;", "private void zzDoEOF() throws java.io.IOException {\r\n if (!zzEOFDone) {\r\n zzEOFDone = true;\r\n yyclose();\r\n }\r\n }", "@DISPID(1610940417) //= 0x60050001. The runtime will prefer the VTID if present\n @VTID(23)\n boolean atEndOfStream();", "@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t\tsuper.channelReadComplete(ctx);\n\t}", "@Override\n\tpublic void onAfterReceivedBytes(ChannelContext channelContext, int receivedBytes) throws Exception {\n\t\t\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "@Override\n\tvoid endHandling() {\n\t}", "protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n bufferedWriter.flush();\n }\n\n // send the buffered response to the client\n bufferedOutputStream.writeBufferTo(getResponse().getOutputStream());\n\n }\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not flush response buffer\", e);\n }\n\n }", "@Override\n public void onRead() {\n /*\n * It should be an error that the remote send something before we\n * pre-write.\n */\n throw new IllegalStateException();\n }", "public int onEnd() {\n\t\t\t\tflushMessageQueue();\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\r\n protected void end() {\r\n\r\n }", "public void signalFinished() throws IOException {\n\t\t// signal the file is done\n\t\tbyte[] data = new byte[PACKET_SIZE];\n\t\tdata[0] = (byte) this.sequence; // set the sequence number\n\t\tdata[1] = (byte) END_BYTES; // send number of bytes read\n\t\tDatagramPacket dp = new DatagramPacket(data, data.length, this.ia, receiverPort);\n\t\tthis.logger.debug(\"Signaling the file is done transferring\");\n\t\ttry {\n\t\t\tthis.socket.send(dp);\n\t\t\tthis.socket.receive(this.in_packet);\n\t\t\tif (!this.in_packet.getAddress().equals(this.ia)) {\n\t\t\t\tthis.logger.debug(\"Not from the send address\");\n\t\t\t\tthis.signalFinished();\n\t\t\t} else {\n\t\t\t\tif (this.in_packet.getData()[0] == this.sequence) {\n\t\t\t\t\tthis.logger.debug(\"Package was ack\");\n\t\t\t\t\tthis.sequence = (this.sequence + 1) % 2; // update the sequence number\n\t\t\t\t} else {\n\t\t\t\t\tthis.logger.debug(\"Acknowledgement for wrong package\");\n\t\t\t\t\tthis.signalFinished();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(SocketTimeoutException e) {\n\t\t\tthis.logger.debug(\"Timeout occurred so resending packet\");\n\t\t\tthis.signalFinished();\n\t\t}\n\t\tthis.logger.debug(\"Done sending file\");\n\t}", "protected void connectionClosed() {}", "@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}", "public void end() {\n\t\tsigue = false;\n\t}", "@Override\r\n\tpublic void finishDecode(IoSession session, ProtocolDecoderOutput out)\r\n\t\t\tthrows Exception {\n\r\n\t}", "@Override\n public final int read() throws IOException {\n if (isClosed() || isFailed()) {\n return EOF;\n }\n if (!handshakeComplete) {\n shakeHands();\n if (!handshakeComplete) {\n failTheWebSocketConnection();\n return EOF;\n }\n }\n return nextWebSocketByte();\n }", "@Override\n protected void end() {\n }", "@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t}", "@Override\n protected void done() throws IOException {\n if (this.closeable instanceof Flushable) {\n ((Flushable)((Object)this.closeable)).flush();\n }\n if (!this.ignoreCloseExceptions) {\n this.closeable.close();\n return;\n }\n try {\n this.closeable.close();\n return;\n }\n catch (IOException iOException) {\n return;\n }\n }", "protected void afterConnect() throws IOException {\n // Empty implementation.\n }", "@Override\n public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n }", "private void m44337f() throws BaseException {\n Throwable th = this.f30622n;\n if (th != null) {\n if (th instanceof StreamClosedException) {\n throw new BaseException(1068, \"async reader closed!\");\n }\n DownloadUtils.m44505a(th, \"async_read\");\n }\n throw new BaseException(1069, \"async reader terminated!\");\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "private void maybeOnSucceededOnExecutor() {\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n if (!(mWriteState == State.WRITING_DONE && mReadState == State.READING_DONE)) {\n return;\n }\n mReadState = mWriteState = State.SUCCESS;\n // Destroy native stream first, so UrlRequestContext could be shut\n // down from the listener.\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onSucceeded(CronetBidirectionalStream.this, mResponseInfo);\n } catch (Exception e) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in onSucceeded method\", e);\n }\n mInflightDoneCallbackCount.decrement();\n }", "@Override\n\tpublic void connectionClosed() {\n\t}", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\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 void read() throws IOException {\n\t\twhile (this.in.getReadBytes() != size) {\n\t\t\tString chunkID;\n\t\t\ttry {\n\t\t\t\tchunkID = readString(4);\n\t\t\t} catch (EmptyReadException e) {\n\t\t\t\t/**\n\t\t\t\t * T4L bug 15259: Some encoders must write a byte \"0\" to signify\n\t\t\t\t * EOF?\n\t\t\t\t */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong chunkSize = readLong(4);\n\t\t\treadChunk(chunkID, chunkSize);\n\t\t}\n\t}", "void complete() {\n try {\n try {\n subscriber.onComplete();\n } catch (Throwable e) {\n Exceptions.handleUncaught(Conformance.onCompleteThrew(e));\n }\n } finally {\n // no need to remove ourselves from psm.\n terminate();\n }\n }", "@Override\n public void flush() throws IOException {\n byteBufferStreamOutput.flush();\n }", "protected void fill() throws IOException {\n ensureOpen();\n len = in.read(buf, 0, buf.length);\n if (len == -1) {\n throw new EOFException(\"Unexpected end of ZLIB input stream\");\n }\n inf.setInput(buf, 0, len);\n }", "@Override\n\tpublic void complete()\n\t{\n\t}", "@Override\n\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n\t\t\tSystem.out.println(\"Channel closed\");\n\t\t\t// @TODO if lost, try to re-establish the connection\n\t\t}", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\n\t}", "public void finalize() {\n\t\ttry {\n\t\t\tif (!socket.isClosed()) { \n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t} catch(Exception ex) {\n\t\t\tLOG.info(\"finalizedSanityCheckFailed\", ex);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void flush() throws IOException {\n checkStreamState();\n flushIOBuffers();\n }", "@Override\n\t\tpublic void done() {\n\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void deliveryComplete(IMqttDeliveryToken arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n public void flush () throws IOException\n {\n if ((null == _topParts) || (null == _mmDelimiter))\n throw new EOFException(\"No parsing in progress to flush\");\n if (null == this.out)\n throw new EOFException(\"No underlying output stream to flush\");\n this.out.flush();\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n }", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n protected int read0() throws IOException {\n if (this.delegate.hasRemaining()) {\n return this.delegate.get() & 0xFF;\n } else {\n return RESULT_EOF;\n }\n }", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\tSystem.out.println(\"deliveryComplete\");\n\t\t\t}" ]
[ "0.6917042", "0.63855326", "0.6286682", "0.62280387", "0.61811274", "0.61321115", "0.6128363", "0.6078746", "0.6058497", "0.6058497", "0.6058497", "0.6058497", "0.6058497", "0.60556835", "0.6052678", "0.6040873", "0.60372317", "0.5987098", "0.59747", "0.5972712", "0.59634584", "0.5947211", "0.5940004", "0.59380233", "0.59380233", "0.59351754", "0.58800286", "0.58723575", "0.586587", "0.5865073", "0.5863305", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.5863151", "0.58557254", "0.5854788", "0.5843106", "0.5822485", "0.57785594", "0.5774053", "0.5774053", "0.5774053", "0.5774053", "0.5764772", "0.57638973", "0.5745908", "0.5743742", "0.5732378", "0.57314944", "0.57166207", "0.57165855", "0.5709459", "0.56712824", "0.56619835", "0.5655589", "0.56555265", "0.5646212", "0.5642752", "0.5635972", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.56258506", "0.5621401", "0.56178516", "0.56173396", "0.56069374", "0.5604641", "0.5604445", "0.5602135", "0.5601676", "0.55986595", "0.5592801", "0.5590982", "0.55883807", "0.5583946", "0.55683166", "0.55654687", "0.556028", "0.5556963", "0.55459225", "0.5539656", "0.55333596", "0.55271184" ]
0.0
-1
Implementing the tree abstract methods:
public int getRowCount() { return(noOfRows); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface TreeNode{\r\n\t\r\n\t// enumerated node types\r\n\tpublic enum NodeType {\r\n\t\tMIN {\r\n\t\t\t@Override\r\n\t\t\tpublic NodeType opposite() {\r\n\t\t\t\treturn MAX;\r\n\t\t\t}\r\n\t\t}, MAX {\r\n\t\t\t@Override\r\n\t\t\tpublic NodeType opposite() {\r\n\t\t\t\treturn MIN;\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\tpublic abstract NodeType opposite();\r\n\t};\r\n\t\r\n\t// the type of node represented\r\n\tpublic NodeType getNodeType();\r\n\t\r\n\t// a possibly empty list of children\r\n\tpublic List<TreeNode> getChildrenNodes();\r\n\t\r\n\t// request a new child node after executing a move\r\n\tpublic TreeNode getChildNode(GameMove move) throws IllegalArgumentException;\r\n\t\r\n\t// the parent node of the current node\r\n\t// current Node == getParentNode for ROOT\r\n\tpublic TreeNode getParentNode();\r\n \r\n\t// whether the current node is the root node\r\n\tpublic Boolean isRootNode();\r\n \r\n\t// returns an object modeling some external state \r\n\tpublic GameState getGameState();\r\n \r\n\t// depth of node in tree\r\n\tpublic int getDepth();\r\n \r\n\t// evaluates/scores the leaf node\r\n\tpublic int scoreLeafNode();\r\n}", "TreeNode getTreeNode();", "@Override\n\tpublic void accept(TreeVisitor visitor) {\n\n\t}", "@Override\n public void accept(TreeVisitor visitor) {\n }", "public abstract TreeNode getNode(int i);", "public interface TreeNode {\r\n\r\n /**\r\n * Function to return Code of this node.\r\n *\r\n * @return Character that is the code that the node represents.\r\n */\r\n Character getCode();\r\n\r\n /**\r\n * Method to add a child to a Tree node. The method returns reference to the node that was just\r\n * added or the node with the entered code if it was already present.\r\n *\r\n * @param node a treenode with the code to be added to the intermediate node\r\n * @return an already existing tree node with given code or create a new tree node and return it.\r\n */\r\n TreeNode addChild(TreeNode node);\r\n\r\n /**\r\n * Given a node with a character code, return the node in the tree with the same code.\r\n *\r\n * @param node the node with character to be checked for in the tree.\r\n * @return the node with code equal to the code of the parameter passed.\r\n */\r\n TreeNode returnNode(TreeNode node);\r\n\r\n /**\r\n * Given a size, check if all nodes in the tree have number of children equal to the size passed.\r\n *\r\n * @param size the value to be checked against.\r\n * @return true or false according to if the check passes or fails.\r\n */\r\n boolean isCodeComplete(int size);\r\n}", "public interface Tree<E> extends Iterable<E>\r\n{\r\n //accessor methods\r\n /**\r\n * Returns the Position of the root of the tree.\r\n * @return the Position of the root of the tree\r\n */\r\n Position<E> root();\r\n \r\n /**\r\n * Returns the Position of the parent of given Position.\r\n * @param p Position to check\r\n * @return the Position of the parent of given Position (or null if p is the root). \r\n * @throws IllegalArgumentException if Position isn't valid\r\n */\r\n Position<E> parent(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Returns the number of children of given Position.\r\n * @param p Position to check\r\n * @return the number of children of given Position\r\n * @throws IllegalArgumentException if Position isn't valid\r\n */\r\n int numChildren(Position<E> p) throws IllegalArgumentException;\r\n\r\n /**\r\n * Returns the number of positions (and therefore elements) that are contained in tree.\r\n * @return the number of positions (and therefore elements) that are contained in tree\r\n */\r\n int size();\r\n \r\n \r\n //query methods\r\n /**\r\n * Tests whether given Position has at least one child.\r\n * @param p Position to check\r\n * @return true if given Position has at least one child, false otherwise\r\n * @throws IllegalArgumentException if Position isn't valid \r\n */\r\n boolean isInternal(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Tests whether given Position has any children.\r\n * @param p Position to check\r\n * @return true if given Position does not have children, false otherwise\r\n * @throws IllegalArgumentException if Position isn't valid \r\n */\r\n boolean isExternal(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Tests whether given Position is the root of the tree.\r\n * @param p Position to check\r\n * @return true if given Position is the root, false otherwise\r\n * @throws IllegalArgumentException if Position isn't valid \r\n */\r\n boolean isRoot(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Tests whether tree contains any Positions (and therefore elements).\r\n * @return true if tree doesn't contain any Positions, false otherwise\r\n */\r\n boolean isEmpty();\r\n \r\n \r\n \r\n //additional methods\r\n /**\r\n * Returns an iterable Collection containing the children of given Position.\r\n * @param p Position to check\r\n * @return an iterable Collection containing the children of given Position\r\n * @throws IllegalArgumentException if Position isn't valid\r\n */\r\n Iterable<Position<E>> children(Position<E> p) throws IllegalArgumentException;\r\n \r\n /**\r\n * Returns an iterable Collection of all Positions of the tree.\r\n * @return an iterable Collection of all Positions of the tree.\r\n */\r\n Iterable<Position<E>> positions(); \r\n \r\n /**\r\n * Returns an iterator for all elements in the tree.\r\n * Ensures tree itself is iterable.\r\n * @return an iterator for all elements in the tree\r\n */\r\n @Override\r\n Iterator<E> iterator(); \r\n}", "public interface Tree {\n\n //查找节点\n Node find(int val);\n\n //插入新节点\n boolean insert(int val);\n\n //中序遍历\n void infixOrder(Node current);\n\n //前序遍历\n void preOrder(Node current);\n\n //后序遍历\n void postOrder(Node current);\n\n //找到最大值\n Node findMax();\n\n //找到最小值\n Node findMin();\n\n //删除节点\n boolean delete(int val);\n\n}", "@Override\n\tpublic void visitTdetree(Tdetree p) {\n\n\t}", "public interface TreeNode {\n Collection<TreeNode> getChildren();\n boolean isDirectory();\n}", "public interface INode {\n INode[] children();\n INode getParent();\n void setParent(INode parent);\n INode copySubTree();\n INode copyWholeTree();\n String getNodeChar();\n void setChildren(INode[] newKids);\n void setNodeChar(String c);\n INode getRoot();\n boolean isRoot();\n Bit getBit();\n void setBit(Bit bit);\n void tellChildAboutParent();\n INode addBrackets();\n INode removeBrackets();\n String toPlainText();\n}", "public abstract List<Node> getChildNodes();", "public abstract TreeNode copy();", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "protected abstract void traverse();", "public TreeNode getLeft(){ return leftChild;}", "public abstract int getNodeType();", "public interface Node {\n public int arityOfOperation();\n public String getText(int depth) throws CalculationException;\n public double getResult() throws CalculationException;\n public boolean isReachable(int depth);\n public List<Node> getAdjacentNodes();\n public String getTitle();\n public void setDepth(int depth);\n}", "@Override\n\tpublic void visit(OracleHierarchicalExpression arg0) {\n\t\t\n\t}", "public static TreeNode getTree() {\n\t\tTreeNode a = new TreeNode(\"a\", 314);\n\t\tTreeNode b = new TreeNode(\"b\", 6);\n\t\tTreeNode c = new TreeNode(\"c\", 271);\n\t\tTreeNode d = new TreeNode(\"d\", 28);\n\t\tTreeNode e = new TreeNode(\"e\", 0);\n\t\tTreeNode f = new TreeNode(\"f\", 561);\n\t\tTreeNode g = new TreeNode(\"g\", 3);\n\t\tTreeNode h = new TreeNode(\"h\", 17);\n\t\tTreeNode i = new TreeNode(\"i\", 6);\n\t\tTreeNode j = new TreeNode(\"j\", 2);\n\t\tTreeNode k = new TreeNode(\"k\", 1);\n\t\tTreeNode l = new TreeNode(\"l\", 401);\n\t\tTreeNode m = new TreeNode(\"m\", 641);\n\t\tTreeNode n = new TreeNode(\"n\", 257);\n\t\tTreeNode o = new TreeNode(\"o\", 271);\n\t\tTreeNode p = new TreeNode(\"p\", 28);\n\t\t\n\t\ta.left = b; b.parent = a;\n\t\tb.left = c; c.parent = b;\n\t\tc.left = d;\t d.parent = c;\n\t\tc.right = e; e.parent = c;\n\t\tb.right = f; f.parent = b;\n\t\tf.right = g; g.parent = f;\n\t\tg.left = h; h.parent = g;\n\t\ta.right = i; i.parent = a;\n\t\ti.left = j; j.parent = i;\n\t\ti.right = o; o.parent = i;\n\t\tj.right = k; k.parent = j;\n\t\to.right = p; p.parent = o;\n\t\tk.right = n; n.parent = k;\n\t\tk.left = l; l.parent = k;\n\t\tl.right = m; m.parent = l;\n\t\t\n\t\td.childrenCount = 0;\n\t\te.childrenCount = 0;\n\t\tc.childrenCount = 2;\n\t\tb.childrenCount = 6;\n\t\tf.childrenCount = 2;\n\t\tg.childrenCount = 1;\n\t\th.childrenCount = 0;\n\t\tl.childrenCount = 1;\n\t\tm.childrenCount = 0;\n\t\tn.childrenCount = 0;\n\t\tk.childrenCount = 3;\n\t\tj.childrenCount = 4;\n\t\to.childrenCount = 1;\n\t\tp.childrenCount = 0;\n\t\ti.childrenCount = 7;\n\t\ta.childrenCount = 15;\n\t\t\n\t\treturn a;\n\t}", "public abstract T queryRootNode();", "public HIRTree(){\r\n\t\t\r\n\t}", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "TreeNode returnNode(TreeNode node);", "abstract boolean isLeaf();", "public interface Node {\n\n\tLong getClsId();\n\n\tNode getParent();\n\n\tvoid setParent(Node p);\n\n\tNode[] getChildrenArray();\n\n\tList<Node> getChildrenList();\n\n\tvoid resetChildren(Node[] children);\n\n\tObject getValue(int attr);\n\n\tObject setValue(int attr, Object value);\n\n\tlong getLongValue(int attr);\n\n\tInteger getId();\n}", "RootNode getRootNode();", "public interface BPTreeNode {\n\n /*\n * Method returns the node index in the B+ tree organization.\n *\n * Returns:\n * node index in B+ tree\n * */\n public long getNodeIndex();\n\n\n /*\n * Method identifies the node as a leaf node or a child (non-leaf) node.\n *\n * Returns:\n * true, if leaf node; false if child node\n * */\n public boolean isLeaf();\n\n /*\n * Method inserts the node item appropriate to the item's key value.\n *\n * Returns:\n * Node item inserted successfully.\n * */\n public boolean insertItem(BPTreeNodeItem item);\n\n /*\n * Method deletes the node item appropriate to the item's index.\n *\n * Returns:\n * Node item deleted successfully.\n * */\n public boolean deleteItem(int index);\n\n /*\n * Method returns the number of items assigned to the node.\n *\n * Returns:\n * Count of node items contained in the node\n * */\n public int getItemCount();\n\n /*\n * Method returns the indexed node item.\n *\n * Returns:\n * Indexed node item.\n * */\n public BPTreeNodeItem getItem(int index);\n\n /*\n * Method returns the lowest chromosome name key belonging to the node.\n *\n * Returns:\n * Lowest contig/chromosome name key; or null for no node items.\n * */\n public String getLowestChromKey();\n\n /*\n * Method returns the highest chromosome name key belonging to the node.\n *\n * Returns:\n * Highest contig/chromosome name key; or null for no node items.\n * */\n public String getHighestChromKey();\n\n /*\n * Method returns the lowest chromosome ID belonging to the node.\n *\n * Returns:\n * Lowest contig/chromosome ID; or -1 for no node items.\n * */\n public int getLowestChromID();\n\n /*\n * Method returns the highest chromosome ID belonging to the node.\n *\n * Returns:\n * Highest contig/chromosome ID; or -1 for no node items.\n * */\n public int getHighestChromID();\n\n /*\n * Method prints the nodes items and sub-node items.\n * Node item deleted successfully.\n * */\n public void printItems();\n\n}", "public interface GNode{\n\n\tpublic String getName();\n\tpublic GNode[] getChildren();\n\tpublic ArrayList<GNode> walkGraph(GNode parent);\n\tpublic ArrayList<ArrayList<GNode>> paths(GNode parent);\n\n}", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "public abstract Type treeCopy();", "public void work(RootNode root) throws Exception;", "public interface TreeBuilder {\r\n\r\n\t/**\r\n\t * Creates the relationship for the give persons in the provided family with given relationshiptype.\r\n\t * @param rt\r\n\t * @param parentId\r\n\t * @param childId\r\n\t * @param familyId\r\n\t * @return - Relationship created with the given type in the given family for the given persons\r\n\t * @throws Exception\r\n\t */\r\n\tpublic Relationship createRelationship(RelationshipType rt, String parentId, String childId, String familyId) throws Exception;\r\n\t/**\r\n\t * Creates a family with given name.\r\n\t * @param name\r\n\t * @return - Family ID of the created family\r\n\t */\r\n\tpublic String createFamily(String name);\r\n\t/**\r\n\t * Provides any one person from the given family.\r\n\t * @param familyId\r\n\t * @return - Person ID from the given family\r\n\t */\r\n\tpublic String getFamilyPerson(String familyId);\r\n\t/**\r\n\t * Provides the Person Id of the root member of this family.\r\n\t * @param familyId\r\n\t * @return - Person ID of the root member in the family.\r\n\t */\r\n\tpublic String getFamilyRoot(String familyId);\r\n\t/**\r\n\t * Checks if the family exists with given ID.\r\n\t * @param familyId\r\n\t * @return boolean\r\n\t */\r\n\tpublic boolean isFamily(String familyId);\r\n}", "public abstract Node getNode();", "public myBinaryTree<T> my_left_tree() throws myException;", "public interface TreeProcessor<N extends TreeNode<N>> {\n\n /**\n * Will start the processing at the originating node\n * @param origin the node from which the processing will originate\n * @param processor the processor to run on each node\n */\n void process(N origin, TreeNodeProcessor<N> processor);\n\n}", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "public FamilyTree(){\r\n super();\r\n }", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "public abstract boolean isBinarySearchTree();", "public interface TreeModel {\n\n double checkAccuracy(DataSource d);\n void crossValidate(DataSource testdata);\n void pessimisticPrune(double z);\n void printTree();\n\n}", "public void treeOrder ()\n {\n treeOrder (root, 0);\n }", "private TreeItem(StringBuffer text, int level) throws DataFormatException, IOException {\n\t\tboolean debug = false;\n\t\t// is input the head of a tree?\n\t\tMatcher nodeMatch = nodePat.matcher(text.toString());\n\t\tif (nodeMatch.lookingAt()) {\n\t\t\tif (debug) Debug.debug(debug, level, \"matched \"+text+\" against node pattern\");\n\t\t\tString labStr = nodeMatch.group(2);\n\t\t\tint totalLength = nodeMatch.group(1).length();\n\t\t\tif (debug) Debug.debug(debug, level, \"Consuming [\"+nodeMatch.group(1)+\"]\");\n\t\t\tif (debug) Debug.debug(debug, level, \"label set to \"+labStr);\n\t\t\tlabel = SymbolFactory.getSymbol(labStr);\n\t\t\ttext.delete(0, totalLength);\n\t\t\t// temporary holding place for children\n\t\t\tVector<TreeItem> kids = new Vector<TreeItem>();\n\t\t\t// add children until we reach the end pattern\n\t\t\tMatcher endMatch = endPat.matcher(text.toString());\n\t\t\twhile (!endMatch.lookingAt()) {\n\t\t\t\tTreeItem kid = new TreeItem(text, level+1);\n\t\t\t\tif (debug) Debug.debug(debug, level, \"adding child \"+kid);\n\t\t\t\tkids.add(kid);\n\t\t\t\tendMatch = endPat.matcher(text.toString());\n\t\t\t}\n\t\t\ttotalLength = endMatch.group(1).length();\n\t\t\tif (debug) Debug.debug(debug, level, \"Consuming end group [\"+endMatch.group(1)+\"]\");\n\t\t\ttext.delete(0, totalLength);\n\t\t\tMatcher weightMatch = weightPat.matcher(text.toString());\n\t\t\tif (weightMatch.matches()) {\n\t\t\t\tif (weightMatch.group(2) != null) {\n\t\t\t\t\tif (debug) Debug.debug(debug, \"Reading weight \"+weightMatch.group(1));\n\t\t\t\t\tweight = Double.parseDouble(weightMatch.group(2));\n\t\t\t\t}\n\t\t\t\ttext.delete(0, weightMatch.group(1).length());\n\t\t\t}\n\t\t\tchildren = new TreeItem[kids.size()];\n\t\t\tnumChildren = children.length;\n\t\t\tkids.toArray(children);\n\t\t\treturn;\n\t\t}\n\t\t// is input a leaf?\n\t\tMatcher leafMatch = leafPat.matcher(text.toString());\n\t\tif (leafMatch.lookingAt()) {\n\t\t\tif (debug) Debug.debug(debug, level, \"matched \"+text+\" against label pattern\");\n\t\t\tString labStr = leafMatch.group(2);\n\t\t\tint totalLength = leafMatch.group(1).length();\n\t\t\tif (debug) Debug.debug(debug, level, \"Consuming [\"+leafMatch.group(1)+\"]\");\n\t\t\tlabel = SymbolFactory.getSymbol(labStr);\n\t\t\tif (debug) Debug.debug(debug, level, \"TLT label set to \"+labStr);\n\t\t\ttext.delete(0, totalLength);\n\t\t\treturn;\n\t\t}\n\t\tthrow new DataFormatException(\"Couldn't match any pattern to \"+text);\n\t}", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "public void treeEdge(Edge e) {}", "public String treeType();", "public void root(Node n) {}", "public TtreeNode() {\n\t numberOfNodes++;\n\t }", "public interface Tree<T extends Comparable<T>> {\n public boolean isEmpty();\n\n public int size();\n\n public T min();\n\n public T max();\n\n public boolean contains(T element);\n\n public boolean add(T element);\n\n public boolean remove(T element);\n\n public Iterator<T> traverse(TreeTraversalOrder order);\n}", "public String getTreeType();", "public TreeNode(Object e) {\n element = e;\n //this.parent = null;\n left = null;\n right = null;\n }", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "public interface TreeNodeValueModel<T>\r\n\textends WritablePropertyValueModel<T>\r\n{\r\n\r\n\t/**\r\n\t * Return the node's parent node; null if the node\r\n\t * is the root.\r\n\t */\r\n\tTreeNodeValueModel<T> parent();\r\n\r\n\t/**\r\n\t * Return the path to the node.\r\n\t */\r\n\tTreeNodeValueModel<T>[] path();\r\n\r\n\t/**\r\n\t * Return a list value model of the node's child nodes.\r\n\t */\r\n\tListValueModel<TreeNodeValueModel<T>> childrenModel();\r\n\r\n\t/**\r\n\t * Return the node's child at the specified index.\r\n\t */\r\n\tTreeNodeValueModel<T> child(int index);\r\n\r\n\t/**\r\n\t * Return the size of the node's list of children.\r\n\t */\r\n\tint childrenSize();\r\n\r\n\t/**\r\n\t * Return the index in the node's list of children of the specified child.\r\n\t */\r\n\tint indexOfChild(TreeNodeValueModel<T> child);\r\n\r\n\t/**\r\n\t * Return whether the node is a leaf (i.e. it has no children)\r\n\t */\r\n\tboolean isLeaf();\r\n\r\n}", "public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}", "@Override\r\n\tpublic void buildTree() {\r\n\t\t\r\n\t\t// root level \r\n\t\trootNode = new TreeNode<String>(\"\");\r\n\t\t\r\n\t\t//first level\r\n\t\tinsert(\".\", \"e\");\r\n\t\tinsert(\"-\", \"t\");\r\n\t\t\r\n\t\t//second level\r\n\t\t\r\n\t\tinsert(\". .\", \"i\");\r\n\t\tinsert(\".-\", \"a\");\r\n\t\tinsert(\"-.\", \"n\"); \r\n\t\tinsert(\"--\", \"m\");\r\n\t\t\r\n\t\t//third level\r\n\t\tinsert(\"...\", \"s\");\r\n\t\tinsert(\"..-\", \"u\");\r\n\t\tinsert(\".-.\", \"r\");\r\n\t\tinsert(\".--\", \"w\");\r\n\t\tinsert(\"-..\", \"d\");\r\n\t\tinsert(\"-.-\", \"k\");\r\n\t\tinsert(\"--.\", \"g\");\r\n\t\tinsert(\"---\", \"o\");\r\n\t\t\r\n\t\t//fourth level\r\n\t\tinsert(\"....\", \"h\");\r\n\t\tinsert(\"...-\", \"v\");\r\n\t\tinsert(\"..-.\", \"f\");\r\n\t\tinsert(\".-..\", \"l\");\r\n\t\tinsert(\".--.\", \"p\");\r\n\t\tinsert(\".---\", \"j\");\r\n\t\tinsert(\"-...\", \"b\");\r\n\t\tinsert(\"-..-\", \"x\");\r\n\t\tinsert(\"-.-.\", \"c\");\r\n\t\tinsert(\"-.--\", \"y\");\r\n\t\tinsert(\"--..\", \"z\");\r\n\t\tinsert(\"--.-\", \"q\");\r\n\t\t\r\n\t}", "TreeStorage getTreeStorage();", "public TreeNode() {\n }", "public abstract MetricTreeNode getRoot();", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "public abstract void addChild(Node node);", "public interface ITreeObject {\r\n\r\n\tpublic static final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; \r\n\t/**\r\n\t * Returns immediate parent of this item\r\n\t * @return immediate parent item or null if this item has no parent or parent is unknown \r\n\t */\r\n\tObject getParent();\r\n\r\n\t/**\r\n\t * Tells if item has children \r\n\t * @return true if this item has children \r\n\t */\r\n\tboolean hasChildren();\r\n\t\r\n\t/**\r\n\t * Returns number of children \r\n\t * @return child count \r\n\t */\r\n\tint getChildCount();\r\n\t\r\n\t/**\r\n\t * Returns array of child items as generic Objects\r\n\t * @return array of child items or empty array if item has no children \r\n\t */\r\n\tObject[] getChildArray();\r\n}", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "public TreeNode getRight(){ return rightChild;}", "@jdk.Supported\npublic interface Tree {\n\n /**\n * Enumerates all kinds of trees.\n */\n @jdk.Supported\n public enum Kind {\n\n /**\n * Used for instance of {@link ExtendedASTAnnotationTree}\n * representing AST-level tree annotation \"@@\"\n */\n AST_ANNOTATION(null, \"ASTAnnotation\"), // ExtendedASTAnnotationTree.class ... break API compatility with visitor ...\n\n ANNOTATED_TYPE(AnnotatedTypeTree.class, \"AnnotatedType\", \"AtType\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing declaration annotations.\n */\n ANNOTATION(AnnotationTree.class, \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing type annotations.\n */\n TYPE_ANNOTATION(AnnotationTree.class, \"TypeAnnotation\", \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link ArrayAccessTree}.\n */\n ARRAY_ACCESS(ArrayAccessTree.class, \"ArrayAccess\"),\n\n /**\n * Used for instances of {@link ArrayTypeTree}.\n */\n ARRAY_TYPE(ArrayTypeTree.class, \"ArrayType\"),\n\n /**\n * Used for instances of {@link AssertTree}.\n */\n ASSERT(AssertTree.class, \"Assert\", \"assert\"),\n\n /**\n * Used for instances of {@link AssignmentTree}.\n */\n ASSIGNMENT(AssignmentTree.class, \"Assign\", \"Eq\", \"=\"),\n\n /**\n * Used for instances of {@link BlockTree}.\n */\n BLOCK(BlockTree.class, \"Block\", \"{}\"),\n\n /**\n * Used for instances of {@link BreakTree}.\n */\n BREAK(BreakTree.class, \"Break\", \"break\"),\n\n /**\n * Used for instances of {@link CaseTree}.\n */\n CASE(CaseTree.class, \"Case\", \"case\"),\n\n /**\n * Used for instances of {@link CatchTree}.\n */\n CATCH(CatchTree.class, \"Catch\", \"catch\"),\n\n /**\n * Used for instances of {@link ClassTree} representing classes.\n */\n CLASS(ClassTree.class, \"Class\", \"class\"),\n\n /**\n * Used for instances of {@link CompilationUnitTree}.\n */\n COMPILATION_UNIT(CompilationUnitTree.class, \"CompilationUnit\", \"cu\"),\n\n /**\n * Used for instances of {@link ConditionalExpressionTree}.\n */\n CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class, \"ConditionalExpression\", \"?\"),\n\n /**\n * Used for instances of {@link ContinueTree}.\n */\n CONTINUE(ContinueTree.class, \"Continue\", \"continue\"),\n\n /**\n * Used for instances of {@link DoWhileLoopTree}.\n */\n DO_WHILE_LOOP(DoWhileLoopTree.class, \"DoWhile\", \"do\"),\n\n /**\n * Used for instances of {@link EnhancedForLoopTree}.\n */\n ENHANCED_FOR_LOOP(EnhancedForLoopTree.class, \"EnhancedForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link ExpressionStatementTree}.\n */\n EXPRESSION_STATEMENT(ExpressionStatementTree.class, \"ExpressionStatement\", \"expr;\", \"e;\"),\n\n /**\n * Used for instances of {@link MemberSelectTree}.\n */\n MEMBER_SELECT(MemberSelectTree.class, \"MemberSelect\", \".\"),\n\n /**\n * Used for instances of {@link MemberReferenceTree}.\n */\n MEMBER_REFERENCE(MemberReferenceTree.class, \"MemberReference\", \"#\"),\n\n /**\n * Used for instances of {@link ForLoopTree}.\n */\n FOR_LOOP(ForLoopTree.class, \"ForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link IdentifierTree}.\n */\n IDENTIFIER(IdentifierTree.class, \"Identifier\", \"id\", \"name\"),\n\n /**\n * Used for instances of {@link IfTree}.\n */\n IF(IfTree.class, \"If\", \"if\"),\n\n /**\n * Used for instances of {@link ImportTree}.\n */\n IMPORT(ImportTree.class, \"Import\", \"import\"),\n\n /**\n * Used for instances of {@link InstanceOfTree}.\n */\n INSTANCE_OF(InstanceOfTree.class, \"InstanceOf\", \"instanceof\"),\n\n /**\n * Used for instances of {@link LabeledStatementTree}.\n */\n LABELED_STATEMENT(LabeledStatementTree.class, \"LabeledStatement\", \"label\"),\n\n /**\n * Used for instances of {@link MethodTree}.\n */\n METHOD(MethodTree.class, \"Method\", \"method\"),\n\n /**\n * Used for instances of {@link MethodInvocationTree}.\n */\n METHOD_INVOCATION(MethodInvocationTree.class, \"MethodInvocation\", \"invoke\", \"call\"),\n\n /**\n * Used for instances of {@link ModifiersTree}.\n */\n MODIFIERS(ModifiersTree.class, \"Modifiers\"),\n\n /**\n * Used for instances of {@link NewArrayTree}.\n */\n NEW_ARRAY(NewArrayTree.class, \"NewArray\", \"new\"),\n\n /**\n * Used for instances of {@link NewClassTree}.\n */\n NEW_CLASS(NewClassTree.class, \"NewClass\", \"new\"),\n\n /**\n * Used for instances of {@link LambdaExpressionTree}.\n */\n LAMBDA_EXPRESSION(LambdaExpressionTree.class, \"Lambda\", \"lambda\"),\n\n /**\n * Used for instances of {@link ParenthesizedTree}.\n */\n PARENTHESIZED(ParenthesizedTree.class, \"Parenthesized\"), // should not use prefix with \"(e)\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link PrimitiveTypeTree}.\n */\n PRIMITIVE_TYPE(PrimitiveTypeTree.class, \"PrimitiveType\", \"type\"),\n\n /**\n * Used for instances of {@link ReturnTree}.\n */\n RETURN(ReturnTree.class, \"Return\", \"return\"),\n\n /**\n * Used for instances of {@link EmptyStatementTree}.\n */\n EMPTY_STATEMENT(EmptyStatementTree.class, \"EmptyStatement\", \"empty\"),\n\n /**\n * Used for instances of {@link SwitchTree}.\n */\n SWITCH(SwitchTree.class, \"Switch\", \"switch\"),\n\n /**\n * Used for instances of {@link SynchronizedTree}.\n */\n SYNCHRONIZED(SynchronizedTree.class, \"Synchronized\", \"synchronized\"),\n\n /**\n * Used for instances of {@link ThrowTree}.\n */\n THROW(ThrowTree.class, \"Throw\", \"throw\"),\n\n /**\n * Used for instances of {@link TryTree}.\n */\n TRY(TryTree.class, \"Try\", \"try\"),\n\n /**\n * Used for instances of {@link ParameterizedTypeTree}.\n */\n PARAMETERIZED_TYPE(ParameterizedTypeTree.class, \"ParameterizedType\", \"type<>\", \"type\"),\n\n /**\n * Used for instances of {@link UnionTypeTree}.\n */\n UNION_TYPE(UnionTypeTree.class, \"UnionType\", \"union\", \"|\", \"uniontype\", \"type\"),\n\n /**\n * Used for instances of {@link IntersectionTypeTree}.\n */\n INTERSECTION_TYPE(IntersectionTypeTree.class, \"IntersectionType\", \"intersectiontype\", \"type\"),\n\n /**\n * Used for instances of {@link TypeCastTree}.\n */\n TYPE_CAST(TypeCastTree.class, \"TypeCast\", \"cast\"), // should not use prefix with \"()\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link TypeParameterTree}.\n */\n TYPE_PARAMETER(TypeParameterTree.class, \"TypeParameter\", \"type\"),\n\n /**\n * Used for instances of {@link VariableTree}.\n */\n VARIABLE(VariableTree.class, \"Variable\", \"var\", \"vardecl\"),\n\n /**\n * Used for instances of {@link WhileLoopTree}.\n */\n WHILE_LOOP(WhileLoopTree.class, \"WhileLoop\", \"while\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * increment operator {@code ++}.\n */\n POSTFIX_INCREMENT(UnaryTree.class, \"PostfixIncrement\", \"e++\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * decrement operator {@code --}.\n */\n POSTFIX_DECREMENT(UnaryTree.class, \"PostfixDecrement\", \"e--\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * increment operator {@code ++}.\n */\n PREFIX_INCREMENT(UnaryTree.class, \"PrefixIncrement\", \"++e\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * decrement operator {@code --}.\n */\n PREFIX_DECREMENT(UnaryTree.class, \"PrefixDecrement\", \"--e\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary plus\n * operator {@code +}.\n */\n UNARY_PLUS(UnaryTree.class, \"UnaryPlus\", \"+e\", \"+\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary minus\n * operator {@code -}.\n */\n UNARY_MINUS(UnaryTree.class, \"UnaryMinus\", \"-e\", \"-\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing bitwise\n * complement operator {@code ~}.\n */\n BITWISE_COMPLEMENT(UnaryTree.class, \"BitwiseComplement\", \"~\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing logical\n * complement operator {@code !}.\n */\n LOGICAL_COMPLEMENT(UnaryTree.class, \"LogicalComlement\", \"!\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * multiplication {@code *}.\n */\n MULTIPLY(BinaryTree.class, \"Multiply\", \"mult\", \"*\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * division {@code /}.\n */\n DIVIDE(BinaryTree.class, \"Divide\", \"div\", \"/\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * remainder {@code %}.\n */\n REMAINDER(BinaryTree.class, \"Remainder\", \"rem\", \"%\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * addition or string concatenation {@code +}.\n */\n PLUS(BinaryTree.class, \"BinaryPlus\", \"e+e\", \"+\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * subtraction {@code -}.\n */\n MINUS(BinaryTree.class, \"BinaryMinus\", \"e-e\", \"-\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * left shift {@code <<}.\n */\n LEFT_SHIFT(BinaryTree.class, \"LeftShift\", \"<<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * right shift {@code >>}.\n */\n RIGHT_SHIFT(BinaryTree.class, \"RightShift\", \">>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * unsigned right shift {@code >>>}.\n */\n UNSIGNED_RIGHT_SHIFT(BinaryTree.class, \"UnsignedRightShift\", \">>>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than {@code <}.\n */\n LESS_THAN(BinaryTree.class, \"LessThan\", \"lt\", \"<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than {@code >}.\n */\n GREATER_THAN(BinaryTree.class, \"GreaterThan\", \"gt\", \">\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than-equal {@code <=}.\n */\n LESS_THAN_EQUAL(BinaryTree.class, \"LessThanEqual\", \"le\", \"<=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than-equal {@code >=}.\n */\n GREATER_THAN_EQUAL(BinaryTree.class, \"GreaterThanEqual\", \"ge\", \">=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * equal-to {@code ==}.\n */\n EQUAL_TO(BinaryTree.class, \"Equals\", \"equals\", \"==\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * not-equal-to {@code !=}.\n */\n NOT_EQUAL_TO(BinaryTree.class, \"NotEquals\", \"notequals\", \"!=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"and\" {@code &}.\n */\n AND(BinaryTree.class, \"And\", \"and\", \"&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"xor\" {@code ^}.\n */\n XOR(BinaryTree.class, \"Xor\", \"xor\", \"^\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"or\" {@code |}.\n */\n OR(BinaryTree.class, \"Or\", \"or\", \"|\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-and {@code &&}.\n */\n CONDITIONAL_AND(BinaryTree.class, \"ConditionalAnd\", \"&&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-or {@code ||}.\n */\n CONDITIONAL_OR(BinaryTree.class, \"ConditionalOr\", \"||\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * multiplication assignment {@code *=}.\n */\n MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class, \"MultiplyAssignment\", \"*=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * division assignment {@code /=}.\n */\n DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class, \"DivideAssignment\", \"/=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * remainder assignment {@code %=}.\n */\n REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class, \"RemainderAssignment\", \"%=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * addition or string concatenation assignment {@code +=}.\n */\n PLUS_ASSIGNMENT(CompoundAssignmentTree.class, \"PLusAssignment\", \"+=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * subtraction assignment {@code -=}.\n */\n MINUS_ASSIGNMENT(CompoundAssignmentTree.class, \"MinusAssignment\", \"-=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * left shift assignment {@code <<=}.\n */\n LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"LeftShiftAssignment\", \"<<=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * right shift assignment {@code >>=}.\n */\n RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"RightShiftAssignment\", \">>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * unsigned right shift assignment {@code >>>=}.\n */\n UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"UnsignedRightShiftAssignment\", \">>>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"and\" assignment {@code &=}.\n */\n AND_ASSIGNMENT(CompoundAssignmentTree.class, \"AndAssignment\", \"&=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"xor\" assignment {@code ^=}.\n */\n XOR_ASSIGNMENT(CompoundAssignmentTree.class, \"XorAssignment\", \"^=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"or\" assignment {@code |=}.\n */\n OR_ASSIGNMENT(CompoundAssignmentTree.class, \"OrAssignment\", \"|=\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code int}.\n */\n INT_LITERAL(LiteralTree.class, \"IntLiteral\", \"int\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code long}.\n */\n LONG_LITERAL(LiteralTree.class, \"LongLiteral\", \"long\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code float}.\n */\n FLOAT_LITERAL(LiteralTree.class, \"FloatLiteral\", \"float\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code double}.\n */\n DOUBLE_LITERAL(LiteralTree.class, \"DoubleLiteral\", \"double\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a boolean literal expression of type {@code boolean}.\n */\n BOOLEAN_LITERAL(LiteralTree.class, \"BooleanLiteral\", \"boolean\", \"bool\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a character literal expression of type {@code char}.\n */\n CHAR_LITERAL(LiteralTree.class, \"CharLiteral\", \"char\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a string literal expression of type {@link String}.\n */\n STRING_LITERAL(LiteralTree.class, \"StringLiteral\", \"string\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * the use of {@code null}.\n */\n NULL_LITERAL(LiteralTree.class, \"NullLiteral\", \"null\", \"literal\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an unbounded wildcard type argument.\n */\n UNBOUNDED_WILDCARD(WildcardTree.class, \"UnboundedWildcard\", \"?\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an extends bounded wildcard type argument.\n */\n EXTENDS_WILDCARD(WildcardTree.class, \"ExtendsWildcard\", \"?extends\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * a super bounded wildcard type argument.\n */\n SUPER_WILDCARD(WildcardTree.class, \"SuperWildcard\", \"?super\"),\n\n /**\n * Used for instances of {@link ErroneousTree}.\n */\n ERRONEOUS(ErroneousTree.class, \"Erroneous\", \"ERROR\", \"error\"),\n\n /**\n * Used for instances of {@link ClassTree} representing interfaces.\n */\n INTERFACE(ClassTree.class, \"Interface\", \"interface\"),\n\n /**\n * Used for instances of {@link ClassTree} representing enums.\n */\n ENUM(ClassTree.class, \"Enum\", \"enum\"),\n\n /**\n * Used for instances of {@link ClassTree} representing annotation types.\n */\n ANNOTATION_TYPE(ClassTree.class, \"AnnotationType\", \"At\"),\n\n /**\n * An implementation-reserved node. This is the not the node\n * you are looking for.\n */\n OTHER(null, \"Other\");\n\n\n\t\tKind(Class<? extends Tree> intf, String displayName, String... prefixAliases) {\n associatedInterface = intf;\n this.displayName = displayName;\n this.preferredPrefix = (displayName != null)? displayName : toString();\n this.preferredPrefixLowerCase = preferredPrefix.toLowerCase();\n if (prefixAliases == null) prefixAliases = new String[0];\n this.prefixAliases = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(prefixAliases)));\n Set<String> tmpPrefixAliasesLowerCase = new HashSet<String>();\n for(String e : prefixAliases) {\n \ttmpPrefixAliasesLowerCase.add(e.toLowerCase());\n }\n this.prefixAliasesLowerCase = Collections.unmodifiableSet(tmpPrefixAliasesLowerCase);\n }\n\n private final Class<? extends Tree> associatedInterface;\n \n private final String displayName;\n \n private final String preferredPrefix;\n\n private final String preferredPrefixLowerCase;\n\n private final Set<String> prefixAliases;\n \n private final Set<String> prefixAliasesLowerCase;\n\n\n public Class<? extends Tree> asInterface() {\n return associatedInterface;\n }\n\n public String getDisplayName() {\n\t\t\treturn displayName;\n\t\t}\n\n\t\tpublic String preferredPrefix() {\n \treturn preferredPrefix;\n }\n\n public boolean hasAliasPrefix(String prefix) {\n \treturn prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefix(String prefix) {\n \tif (prefix == null) return false;\n \treturn preferredPrefix.equals(prefix)\n \t\t\t|| prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefixIgnoreCase(String prefix) {\n \tif (prefix == null) return false;\n \tString prefixLowerCase = prefix.toLowerCase();\n \treturn preferredPrefixLowerCase.equals(prefixLowerCase)\n \t\t\t|| prefixAliasesLowerCase.contains(prefixLowerCase);\n }\n\n }\n\n /**\n * Gets the kind of this tree.\n *\n * @return the kind of this tree.\n */\n Kind getKind();\n\n /**\n * Accept method used to implement the visitor pattern. The\n * visitor pattern is used to implement operations on trees.\n *\n * @param <R> result type of this operation.\n * @param <D> type of additional data.\n */\n <R,D> R accept(TreeVisitor<R,D> visitor, D data);\n\n /**\n * @since jdk1.8-ARN\n */\n List<? extends ASTExtensionTree> getASTExtensions();\n\n /**\n * @since jdk1.8-ARN\n */\n List<ASTAnnotationTree> getASTAnnotations();\n \n \n}", "private static interface Node {\n\t\t/**\n\t\t * Set value to child node identified by given ID.\n\t\t * \n\t\t * @param childID child ID is a field name or array/list index.\n\t\t * @param value node value.\n\t\t * @throws ConverterException if value is primitive and fail to convert to field type.\n\t\t * @throws IllegalAccessException this exception is required by reflective field signature but never thrown.\n\t\t */\n\t\tvoid setValue(String childID, Object value) throws ConverterException, IllegalAccessException;\n\n\t\t/**\n\t\t * Returns child node identified by its ID or null if not found. A child ID is the field name or array/list index.\n\t\t * \n\t\t * @param childID child ID is a field name or array/list index.\n\t\t * @return child node or null.\n\t\t * @throws IllegalAccessException this exception is required by reflective field signature but never thrown.\n\t\t */\n\t\tNode getChild(String childID) throws IllegalAccessException;\n\t}", "public interface Node {\n @Override\n String toString();\n\n void setValue(String value);\n\n void addAttribiute(String key1, String value);\n\n void addChild(Node child1);\n}", "private TreeNode traverseTree(Instance i) {\n TreeNode next = root;\n while (next != null && !next.isLeafNode()) {\n Attribute a = next.split.attribute;\n if (a.isNominal()) {\n next = next.nominals()[(int) i.value(a)];\n } else {\n if (i.value(a) < next.split.splitPoint) {\n next = next.left();\n } else {\n next = next.right();\n }\n }\n }\n return next;\n }", "public MyTree getTree() {\r\n\t\treturn tree;\r\n\t}", "@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }", "Node[] getChildren(Node node);", "protected PhraseTree() {}", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}", "public Tree(){\n root = null;\n }", "public void treeStructureChanged(TreeModelEvent e) {\n //To change body of implemented methods use Options | File Templates.\n }", "public JdbNavTree() {\r\n super(new Object [] {});\r\n commonInit();\r\n }", "public JdbTree(TreeModel treeModel) {\r\n super(treeModel);\r\n commonInit();\r\n }", "Node<T> parent();", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }", "public JTree getTree(){\n return tree;\n }", "void createTree() throws IOException {\n\n // create root\n rootTreeItem = createTreeRoot();\n\n // create tree structure recursively\n createTree(rootTreeItem);\n\n // sort tree structure by name\n rootTreeItem.getChildren()\n .sort(Comparator.comparing(new Function<TreeItem<FilePath>, String>() {\n @Override\n public String apply(TreeItem<FilePath> t) {\n return t.getValue().toString().toLowerCase();\n }\n }));\n\n }", "public Tree()\n\t{\n\t\tsuper(\"Tree\", \"tree\", 0);\n\t}", "@Test\n\tpublic void testInsert4() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\tT.insert(new Long(55), \"Fifty-Five\");\n\t\tT.insert(new Long(65), \"Sixty-Five\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(1, root.keys.size());\n\t\tassertEquals(60, (long) root.keys.get(0));\n\t\tassertEquals(2, root.children.size());\n\t\t\n\t\tInnerNode<Long,String> left = (InnerNode<Long,String>) root.children.get(0);\n\t\tInnerNode<Long,String> right = (InnerNode<Long,String>) root.children.get(1);\n\t\t\n\t\tassertEquals(30, (long) left.keys.get(0));\n\t\tassertEquals(50, (long) left.keys.get(1));\n\t\t\n\t\tassertEquals(70, (long) right.keys.get(0));\n\t\t\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) left.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) left.children.get(1);\n\t\t\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) left.children.get(2);\n\t\t\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) right.children.get(0);\n\t\tLeafNode<Long, String> child4 = (LeafNode<Long, String>) right.children.get(1);\n\t\t\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\t\t\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\t\t\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(55, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(60, (long) child3.children.get(0).key);\n\t\tassertEquals(65, (long) child3.children.get(1).key);\n\t\t\n\t\tassertEquals(70, (long) child4.children.get(0).key);\n\t\tassertEquals(80, (long) child4.children.get(1).key);\n\t\t\n\t}", "public TreeNode getParent() { return par; }", "@Override\r\n\tpublic JTree getJTree() {\r\n\t\tif (jTree == null) {\r\n\t\t\tjTree = new JLagerTree();\r\n\t\t\tjTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION );\r\n\t\t\tGenericNode root = new GenericNode(null);\r\n\t\t\tjTree.setModel(getTreeModel(root));\r\n\t\t\tjTree.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\r\n//\t\t\tjTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {\r\n//\t\t\t\tpublic void valueChanged(javax.swing.event.TreeSelectionEvent e) {\r\n//\t\t\t\t\ttreeValueChanged(e,BaugruppeTreePaneView.this.getJTree());\r\n////\t\t\t\t\tSystem.out.println(\"valueChanged()\"); // TODO Auto-generated Event stub valueChanged()\r\n//\t\t\t\t}\r\n//\t\t\t});\r\n//\t\t\tjTree.addTreeSelectionListener(getTreeSelectionListner());\r\n\t\t\t//Aussehen von JTree\r\n\t\t\tjTree.setCellRenderer(new AnfoderungTreeRenderer());\r\n\t\t\tjTree.setToolTipText(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\treturn jTree;\r\n\t}", "private Node makeTree(Node currentNode, DataNode dataNode,\r\n\t\t\tint featureSubsetSize, int height) {\n\r\n\t\tif (dataNode.labels.size() < this.traineeDataSize / 25 || height > 7) {\r\n\t\t\treturn new Node(majority(dataNode));\r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\tEntropyCalculation e1 = new EntropyCalculation();\r\n\r\n\t\t\tNode n = e1.maxGainedElement(dataNode.features, dataNode.labels, featureSubsetSize); //new\r\n\r\n\r\n\t\t\tif(e1.zeroEntropy){\r\n\r\n\t\t\t\tcurrentNode = new Node(dataNode.labels.get(0));\r\n\r\n\t\t\t\t/*currentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.labels.get(0);*/\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\tcurrentNode = new Node();\r\n\r\n\t\t\t\tcurrentNode.featureIndexColumn = n.featureIndexColumn;\r\n\t\t\t\tcurrentNode.featureIndexRow = n.featureIndexRow;\r\n\r\n\t\t\t\tcurrentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.features.get(currentNode.featureIndexRow).get(currentNode.featureIndexColumn);\r\n\r\n\t\t\t\tcurrentNode.leftChild = new Node();\r\n\t\t\t\tcurrentNode.rightChild = new Node();\r\n\r\n\t\t\t\tDataNode leftNode = new DataNode();\r\n\t\t\t\tDataNode rightNode = new DataNode();\r\n\r\n\t\t\t\tfor (int i = 0; i < dataNode.features.size(); i++) {\r\n\r\n\t\t\t\t\tif(currentNode.nodeValue >= dataNode.features.get(i).get(currentNode.featureIndexColumn)) {\r\n\r\n\t\t\t\t\t\tleftNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\tleftNode.labels.add(dataNode.labels.get(i));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\trightNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\trightNode.labels.add(dataNode.labels.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif((leftNode.labels.isEmpty() || rightNode.labels.isEmpty()) && height == 0){\r\n\t\t\t\t\tSystem.out.println(\"Ghapla\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentNode.leftChild = makeTree(currentNode.leftChild, leftNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\tcurrentNode.rightChild = makeTree(currentNode.rightChild, rightNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "abstract AbstractTree<T> maximize();", "public interface RMITreeNode extends Remote {\n\n\t/**\n\t * Set the father of the RMITreeNodeImpl. If it's set to null, the RMITreeNodeImpl becomes a root.\n\t * @param father The father of the RMITreeNodeImpl. If it's null, the RMITreeNodeImpl is a root.\n\t */\n\tpublic void setFather(RMITreeNode father) throws RemoteException;\n\t\n\tpublic void addChild(RMITreeNode child) throws RemoteException;\n\t\n\tpublic void removeChild(int index) throws RemoteException;\n\t\n\tpublic void removeChild(RMITreeNode child) throws RemoteException;\n\t\n\t/**\n\t * Remove every child of the RMITreeNode so it becomes a leaf.\n\t */\n\tpublic void clearChildren() throws RemoteException;\n\t\n\tpublic RMITreeNode getFather() throws RemoteException;\n\t\n\tpublic List<RMITreeNode> getChildren() throws RemoteException;\n\t\n\tpublic RMITreeNode getChild(int index) throws RemoteException;\n\t\n\tpublic String getName() throws RemoteException;\n\t\n\t/**\n\t * Return a String containing the trace of the propogation since its beginning.\n\t * @return The trace of the propogation.\n\t * @throws RemoteException\n\t */\n\tpublic String getTrace() throws RemoteException;\n\t\n\t/**\n\t * Give data as an array of byte to the RMITreeNode in order to propagate to the leaves of the tree.\n\t * @param data The data to propagate to the leaves of the tree.\n\t * @return The trace of the entire propagation.\n\t * @throws RemoteException\n\t */\n\tpublic String propagate(byte[] data) throws RemoteException;\n\t\n\t/**\n\t * Send data as an array of byte to every children of the RMITreeNode.\n\t * If the node is a leaf, put the message in the trace.\n\t * @param data An array of byte containing the data to send to the children.\n\t * @return The trace of the children receiving the data.\n\t * @throws RemoteException\n\t */\n\tpublic String sendDataToChildren(byte[] data) throws RemoteException;\n\n}", "FractalTree() {\r\n }", "public void initTreeModel() {\n\t\t\n\t}", "public void initTreeModel() {\n\t\t\n\t}", "public TreeNode(String name) {\r\n setName(name);\r\n }", "void setLeft(TreeNode<T> left);", "public Vector<Node> GetAdditionalSubNodes();", "public abstract String getChildTitle();", "public interface Node extends TreeComponent {\n /**\n * The types of decision tree nodes available.\n */\n enum NodeType {\n Internal,\n Leaf\n }\n\n /**\n * Gets the type of this node.\n * @return The type of node.\n */\n NodeType getType();\n\n void print();\n\n String getClassLabel(DataTuple tuple);\n}", "@Test\n\tpublic void testInsert3() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(3, root.keys.size());\n\t\tassertEquals(30, (long) root.keys.get(0));\n\t\tassertEquals(50, (long) root.keys.get(1));\n\t\tassertEquals(70, (long) root.keys.get(2));\n\t\t\n\t\tassertEquals(4, root.children.size( ));\n\t\tassertTrue( root.children.get(0) instanceof LeafNode );\n\t\tassertTrue( root.children.get(1) instanceof LeafNode );\n\t\tassertTrue( root.children.get(2) instanceof LeafNode );\n\t\tassertTrue( root.children.get(3) instanceof LeafNode );\n\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) root.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) root.children.get(1);\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) root.children.get(2);\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) root.children.get(3);\n\t\t\n\t\tassertEquals(2, child0.children.size());\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\n\t\tassertEquals(2, child1.children.size());\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\n\t\tassertEquals(2, child2.children.size());\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(60, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(2, child3.children.size());\n\t\tassertEquals(70, (long) child3.children.get(0).key);\n\t\tassertEquals(80, (long) child3.children.get(1).key);\n\t}" ]
[ "0.71246016", "0.69755685", "0.69126046", "0.6894149", "0.67983925", "0.67967427", "0.6787167", "0.6768211", "0.67216516", "0.6711167", "0.6649634", "0.6531314", "0.65273875", "0.6472656", "0.64704", "0.6466673", "0.64291143", "0.6411431", "0.6408882", "0.64084053", "0.640527", "0.6395607", "0.6351832", "0.6346616", "0.63279176", "0.6316738", "0.6307164", "0.6306257", "0.62946576", "0.6269493", "0.62689686", "0.62689686", "0.62689686", "0.6264218", "0.6263558", "0.62614614", "0.62512094", "0.6222305", "0.6193264", "0.6187649", "0.61871237", "0.61823744", "0.6181628", "0.6167793", "0.6166875", "0.6163846", "0.6159449", "0.6138387", "0.6132328", "0.6116793", "0.6112046", "0.61074233", "0.60961473", "0.6094856", "0.6092379", "0.60679847", "0.6048819", "0.6037671", "0.60332966", "0.60311884", "0.60305095", "0.60277885", "0.6012139", "0.6006562", "0.6003901", "0.600333", "0.6001354", "0.5996958", "0.5996938", "0.59944713", "0.5994022", "0.5992752", "0.59880227", "0.5979799", "0.5978916", "0.59735316", "0.5970706", "0.59695446", "0.596586", "0.59509987", "0.59469336", "0.59468865", "0.5942998", "0.5942405", "0.59367687", "0.5924343", "0.592301", "0.5921695", "0.59190154", "0.59188867", "0.5917338", "0.5915659", "0.5913681", "0.59131163", "0.59131163", "0.5908359", "0.5902806", "0.5898783", "0.58956337", "0.5890244", "0.5889947" ]
0.0
-1
get the name of the column
public String getColumnName(int c){ return (new Integer(c).toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName(){\n\t\t\treturn columnName;\n\t\t}", "public String getName() {\n return columnName;\n }", "String getColumnName();", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }", "public String getColumnName();", "public String getColumnName(int col) { return columnNames[col]; }", "@Override\n public String getColumnName(int column) {\n return colName[column];\n }", "public String getColumnName(int col) {\n return columns[col] ;\n }", "@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }", "@Override\n public String getColumnName(int column) { return columnnames[column]; }", "public String getColumnName(int col) {\n\t return columnNames[col];\n }", "public java.lang.String getColumnName() {\r\n return columnName;\r\n }", "@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }", "@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }", "public String getColumnName() {\n return columnName; \n }", "@Override\n\tpublic String getColumnName(int column) {\n\t\treturn this.colunas[column];\n\t}", "@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}", "@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}", "public String getColumnName(int col) {\r\n if (columns[col] instanceof StratmasObject) {\r\n return ((StratmasObject)columns[col]).getReference().getIdentifier().trim();\r\n }\r\n else {\r\n return (String)columns[col];\r\n }\r\n }", "public String getColumnName(int col) {\r\n return columnNames[col];\r\n }", "public String getColumnName(int col) {\n return columnNames[col];\n }", "public String getColumnName(int column) {\n return columnNames[column];\n }", "public String getColumnName(int col) {\n return columnNames[col];\n }", "public String getColumnName(int columnIndex){\n return COLUMN_NAMES[columnIndex];\n }", "public String getColumnName() {\r\n return navBinder.getColumnName();\r\n }", "java.lang.String getColumn();", "public String getColumnName(int theCol) {\n return columnNameList[theCol];\n }", "@Override\n public String getColumnName(final int column) {\n return _columns.get(column);\n }", "@Override\n\tpublic String getColumnName(int column) {\n\t\treturn names[column];\n\t}", "@Override\n\tpublic String getColumnName(int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn \"Expression\";\n\t\tcase 1:\n\t\t\treturn \"Value\";\n\t\t}\n\t\treturn null;\n\t}", "public String getColumnName() {\n return this.columnName;\n }", "public String getColumnName(int theCol) {\n return this.model.getColumnName(theCol);\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "@Override\r\n public String getColumnName(int column) {\n return (String)this.columnNames.get(column);\r\n }", "@Override\n public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }", "@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }", "@Override\n\tpublic String getColumnName(int col) {\n\t\treturn NOMICOLONNE[col];\n\t}", "@Override\n\tpublic String getColumnName(int col) {\n\t\treturn columnNames.get(col);\n\t}", "public String getColumnName(int column) {\r\n if (_debugTable != null) {\r\n return _debugTable.getColumnTitle(column) ;\r\n } else {\r\n return \"\" ;\r\n }\r\n }", "@Override\n\tpublic String getColumnName(int arg0) throws SQLException {\n\t\treturn columns[arg0-1];\n\t}", "@Override\n public String getColumnName(int column) {\n if (column > colunas.length || column < 0) {\n return null;\n }\n return colunas[column];\n\n }", "protected String getTableColumn()\n\t\t{\n\t\t\treturn Column ;\n\t\t}", "public String getColumnName(int columnIndex){\r\n\t\t\tif (Person.getFieldColumn(columnIndex) != null)\r\n\t\t\t\treturn Person.getFieldColumn(columnIndex);\r\n\t\t\treturn \"\";\r\n\t\t}", "@Override\n\tpublic String getColumnName(int col)\n\t{\n\t\treturn nomColonnes[col];\n\t}", "public String getColumnName(int column)throws IllegalStateException{\n if(!connectedToDatabase)\n throw new IllegalStateException(\"Not Connected to datsbase\");\n \n //determine col name\n try{\n return metaData.getColumnName(column+1);\n }catch(SQLException sQLException){\n sQLException.printStackTrace();\n }\n return \"\"; //if problems occur above, return 0 for number of columns\n \n }", "@Override\n public String getColumnName(int column) {\n if (column == COL_ID) {\n return \"Código\";\n } else if (column == COL_NAME) {\n return \"Nome\";\n }\n return \"\";\n }", "public String getColumnName(int col) {\n\t\treturn columnNames[col];\n\t}", "public String getColumnName(int col) {\r\n\t\treturn this.columnNames[col];\r\n\t}", "String getColumn();", "public String getColumnName(int col)\n\t{\n\t\treturn columnNames[col];\n\t}", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }", "public String getColumnName(int col) {\n\t\treturn colNames.get(col);\n\t}", "@Override\n\tpublic String getColumnName(int col) throws SQLException {\n\t\tif (col <= this.width && col >= 1) {\n\n\t\t\tcol--;\n\t\t\tString str = table[0][col];\n\t\t\tStringTokenizer token = new StringTokenizer(str, \",\");\n\t\t\tString label = token.nextToken();\n\n\t\t\treturn label;\n\n\t\t} else\n\t\t\tthrow new SQLException(\"column requested out of table bounds \");\n\t}", "public String getColumn() {\n Object ref = column_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n column_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getColName() {\r\n\t\treturn colName;\r\n\t}", "public String getColumnName(int columnIndex) {\r\n return this.table.getSchema().getColumnName(columnIndex);\r\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public String getColumnName(int c) {\n\treturn columnNames[c];\n}", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}", "public String getColumnNameOne(){\n return columnNameOneLbl.getText();\n }", "public String getColumnName(int column)\n {\n if (columnNames != null)\n {\n return columnNames[column];\n \n }\n if (metaData == null)\n {\n return \"N/A\";\n }\n\n try\n {\n return metaData.getColumnName(column+1);\n\n } catch (SQLException ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n return \"N/A\";\n }\n }", "public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }", "public String getColumnName(int col) {\n\t\treturn (col == 0) ? \"Path\" : prescaleTable.prescaleColumnName(col - 1);\n\t}", "public String getColumnName(int columnIndex) {\n return resource.getString(columnNames.get(columnIndex));\n }", "public String getColumnName(int col) {\n\tif (col==0) {\n\t ArrayList<Stream> streams = smartPrescaleTable.associatedStreams();\n\t String work;\n\t if (streams.size()==0) {\n\t\twork=\"No stream\";\n\t } else if (streams.size()==1) {\n\t\twork=\"Stream: \"+streams.get(0).name();\n\t } else {\n\t\twork=\"Streams: \"+streams.get(0).name();\n\t\tfor (int i=1; i<streams.size(); ++i) work += \",\"+streams.get(i).name();\n\t }\n\t return work;\n\t} else if (col==1) {\n\t return \"SMART\";\n\t} else {\n\t return prescaleTable.prescaleColumnName(col-2);\n\t}\n }", "public String getName() {\n return ctTableColumn.getName();\n }", "@Override public String getColumnName(int iColumnIndex)\r\n {\r\n return COLUMN_NAMES[iColumnIndex];\r\n }", "@Override\n public String getColumnName(int column) {\n return cabecera[column];\n }", "public String getColumnName( int column ) throws IllegalStateException\r\n { \r\n if ( !connectedToDatabase ) \r\n throw new IllegalStateException( \"Not Connected to Database\" );\r\n\r\n try \r\n {\r\n return metaData.getColumnName( column + 1 ); \r\n }\r\n catch ( SQLException sqlException ) \r\n {\r\n sqlException.printStackTrace();\r\n }\r\n \r\n return \"\";\r\n }", "public String getFieldColumn() {\n return fieldColumn;\n }", "private String getColumnName( String propertyName ) {\r\n String[] s = StringExtend.toArray( propertyName, \".\", false );\r\n return s[s.length - 1];\r\n }", "Column getCol();", "public String getColumnName(int column) {\n return headerTitles[column];\n }", "KijiColumnName getAttachedColumn();", "public String getColumnName(int columnIdx)\r\n\t{\r\n\t\treturn columnName[columnIdx];\r\n\t}", "@Override\n public String getColumn() {\n Object ref = column_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n column_ = s;\n return s;\n }\n }", "public String getColumnName (int col)\n\t{\n\t\tif (col < 0 || col > m_data.cols.size())\n\t\t\tthrow new java.lang.IllegalArgumentException(\"Column invalid\");\n\t\tRColumn rc = (RColumn)m_data.cols.get(col);\n\t\tif (rc != null)\n\t\t\treturn rc.getColHeader();\n\t\treturn null;\n\t}", "public String getPkColumnName() {\n return featureDao.getPkColumnName();\n }", "public String getLabelColumn()\n {\n return myLabelColumn;\n }", "public String getColumnForPrimaryKey() {\n return null;\n }", "public String getColumnone() {\n return columnone;\n }", "@Override\n public String getColumnName(int column) {\n switch (column) {\n case 0:\n return \"Series Name:\";\n case 1:\n return \"X:\";\n case 2:\n return \"Y:\";\n case 3:\n return \"X (prev)\";\n case 4:\n return \"Y (prev):\";\n case 5:\n return \"X (next):\";\n case 6:\n return \"Y (next):\";\n }\n return null;\n }", "public String getColumnName(int index) {\n\t\treturn columnNames[index];\n\t}", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }" ]
[ "0.85398513", "0.8538655", "0.8449828", "0.8404668", "0.8389183", "0.8218375", "0.8217437", "0.81369084", "0.8104102", "0.804529", "0.80308336", "0.8013733", "0.8011592", "0.8011122", "0.8011122", "0.799943", "0.7998841", "0.79732615", "0.79732615", "0.7971566", "0.79484147", "0.79294914", "0.79292655", "0.7917302", "0.79087335", "0.79022616", "0.78915733", "0.7876049", "0.78744745", "0.7863431", "0.7862002", "0.7848776", "0.7836006", "0.78162944", "0.78162944", "0.7812321", "0.78078413", "0.78061706", "0.7803448", "0.77925986", "0.7787579", "0.7771949", "0.7758223", "0.7748473", "0.77405775", "0.7739335", "0.7736544", "0.77307117", "0.77245677", "0.77198213", "0.7716978", "0.77035147", "0.7667458", "0.76525724", "0.76352084", "0.7632684", "0.7628042", "0.7621892", "0.7616346", "0.76045674", "0.76045674", "0.7603676", "0.76034087", "0.758724", "0.75858945", "0.7576758", "0.7494085", "0.74825686", "0.74210453", "0.74109113", "0.7410404", "0.74062556", "0.74002653", "0.73920065", "0.73727727", "0.7370526", "0.73205185", "0.73184913", "0.72822714", "0.72723126", "0.7258376", "0.725392", "0.7241401", "0.7239618", "0.72366637", "0.7231526", "0.7217823", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869", "0.7189869" ]
0.7520836
66
get the class of the object at column c
public Class getColumnClass(int c) { return this.getValueAt(0, c).getClass(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Class getColumnClass(int c) {\r\n return getValueAt(0, c).getClass();\r\n }", "public Class getColumnClass(int c) \n {\n return getValueAt(0, c).getClass();\n }", "public Class getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }", "public Class getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }", "public Class getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }", "@Override\n public Class getColumnClass(int columnIndex) {\n Class clase = Object.class;\n\n Object aux = getValueAt(0, columnIndex);\n if (aux != null) {\n clase = aux.getClass();\n }\n\n return clase;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\t\tpublic Class getColumnClass(int c) {\r\n\t \treturn getValueAt(0, c).getClass();\r\n\t \r\n\t }", "public Class getColumnClass(int c) {\r\n return getValueAt(0, c).getClass();\r\n }", "public Class getColumnClass(int c) {\r\n return getValueAt(0, c).getClass();\r\n }", "public Class getColumnClass(int column)\n\t {\n\t return getValueAt(0, column).getClass();\n\t }", "@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tpublic Class getColumnClass(int c) {\r\n\t\t \treturn getValueAt(0, c).getClass();\r\n\t\t \r\n\t\t }", "public StrColumn getClazz() {\n return delegate.getColumn(\"class\", DelegatingStrColumn::new);\n }", "public Class getColumnClass(int c) {\n\t\t\t\t\treturn getValueAt(0, c).getClass();\n\t\t\t\t}", "public Class getColumnClass(int c) \r\n\t {\n\t \treturn getValueAt(0, c).getClass(); \r\n\t }", "public Class getColumnClass(int c) {\n \t\treturn getValueAt(0, c).getClass();\n \t}", "@Override\n public Class getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }", "public Class getColumnClass(int c)\n {\n \treturn getValueAt(0,c).getClass();\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tpublic Class getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }", "public Class getColumnClass(int c)\n\t{\n\t\treturn getValueAt(0, c).getClass();\n\t}", "@Override\r\n\t\t\tpublic Class getColumnClass(int column)\r\n\t\t\t{\r\n\t\t\t\treturn getValueAt(0, column).getClass();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic Class getColumnClass(int column)\r\n\t\t\t{\r\n\t\t\t\treturn getValueAt(0, column).getClass();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic Class getColumnClass(int column)\r\n\t\t\t{\r\n\t\t\t\treturn getValueAt(0, column).getClass();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic Class getColumnClass(int column)\r\n\t\t\t{\r\n\t\t\t\treturn getValueAt(0, column).getClass();\r\n\t\t\t}", "@Override\r\n public Class getColumnClass(int column) {\r\n return getValueAt(0, column).getClass();\r\n }", "@Override\r\n\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic Class getColumnClass(int columna) {\r\n\t\treturn getValueAt(0, columna).getClass();\r\n\t}", "@Override\n public Class<?> getColumnClass(int aColumn) {\n return model.getColumnClass(aColumn); \n }", "public Class getColumnClass(int column) throws IllegalStateException{\n \n if(!connectedToDatabase)\n throw new IllegalStateException(\"Not Connected to database\");\n \n //determine Java class of column\n try\n {\n String className = metaData.getColumnClassName(column+1);\n \n //return Class object that represents classname\n return Class.forName(className);\n \n }catch(Exception exception){\n exception.printStackTrace();\n }\n \n return Object. class;//if problems occur above, assume type Objevt \n }", "public Class<?> getColumnClass(int column) {\r\n if (_debugTable == null) {\r\n return String.class ;\r\n } else {\r\n return getValueAt(0, column).getClass();\r\n }\r\n }", "public Column.Type getType();", "@Override\n\tpublic String getColumnClassName(int arg0) throws SQLException {\n\t\treturn tMeta[0].colType(arg0-1);\n\t}", "public Class getColumnClass(int columnIndex){\n return COLUMN_CLASSES[columnIndex];\n }", "public Class getColumnClass(int col) {\n\t return columnClasses[col];\n }", "public Class getColumnClass(int c)\n {\n\tif (c==0) {\n\t return String.class;\n\t} else {\n\t return Long.class;\n\t}\n }", "public Class getColumnClass(int col) {\n return columnClasses[col];\n }", "public Class<?> getColumnClass(int column) {\r\n\tswitch (column){\r\n\t\tcase COLUMN_NAME:{\r\n\t\t\treturn String.class;\r\n\t\t}\r\n\t\tcase COLUMN_DESCRIPTION:{\r\n\t\t\treturn String.class;\r\n\t\t}\r\n\t\tcase COLUMN_UNIT:{\r\n\t\t\treturn String.class;\r\n\t\t}\r\n\t\tcase COLUMN_VALUE:{\r\n\t\t\treturn ScopedExpression.class;\r\n\t\t}\r\n\t\tdefault:{\r\n\t\t\treturn Object.class;\r\n\t\t}\r\n\t}\r\n}", "@Override\n public Class getColumnClass(int c) {\n // has any data ?\n // if not, return String class as default\n if (this.getRowCount()==0){\n return String.class;\n }\n \n return getValueAt(0, c).getClass();\n }", "@Override\n public Class<?> getColumnClass(int column) {\n return columnClasses[column];\n }", "@Override\n public Class<?> getColumnClass(int column) {\n return columnClasses[column];\n }", "public Class<?> getColumnClass (int col)\n\t{\n\t\tif (col < 0 || col > m_data.cols.size())\n\t\t\tthrow new java.lang.IllegalArgumentException(\"Column invalid\");\n\t\tRColumn rc = (RColumn)m_data.cols.get(col);\n\t\tif (rc != null)\n\t\t\treturn rc.getColClass();\n\t\treturn null;\n\t}", "private static String getColumnClassDataType (String windowName2) {\n\r\n\t\tString classType = \"@Override \\n public Class getColumnClass(int column) { \\n switch (column) {\\n\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tclassType = classType + \" case \" + i + \":\\n\";\r\n\t\t\tif(mp.getColumnDataType().equalsIgnoreCase(\"Boolean\")) {\r\n\t\t\t\tclassType = classType + \" return Boolean.class; \\n\";\r\n\t\t\t} else \tif(mp.getColumnDataType().equalsIgnoreCase(\"Integer\")) {\r\n\t\t\t\tclassType = classType + \" return Integer.class; \\n\";\r\n\t\t\t} else \t\t\tif(mp.getColumnDataType().equalsIgnoreCase(\"Double\")) {\r\n\t\t\t\tclassType = classType + \" return Double.class; \\n\";\r\n\t\t\t} else {\r\n\t\t\t\tclassType = classType + \" return String.class; \\n\";\r\n\t\t\t}\r\n\t\t\r\n \r\n\r\n\t\t}\r\n\t\tclassType = classType + \" default: \\n return String.class;\\n }\\n}\";\r\n\t\treturn classType;\r\n\t}", "public Class<?> getPropertyType(int row) {\n return tableModel.getPropertyType(row);\n }", "@Override final public Class<?> getColumnClass( int columnIndex ) { return fColumnClasses[ columnIndex ]; }", "public Class<?> getColumnClass(int column)\n {\n return classNames.size() == 0 ? (Class<?>)String.class : (Class<?>)classNames.elementAt(column);\n }", "@Override\r\n\tpublic Class<?> getColumnClass(final int column)\r\n\t{\n\t\t\r\n\t\treturn super.getColumnClass(column);\r\n\t}", "@Override\n\tpublic int getType() {\n\t\treturn _expandoColumn.getType();\n\t}", "@Override\n\t\t\tpublic Class<?> getColumnClass(int column) {\n\t\t\t\treturn super.getColumnClass(column);\n\t\t\t}", "public Class getColumnClass(int columnIdx)\r\n\t{\r\n\t\treturn columnClass[columnIdx];\r\n\t}", "RelDataType getColumnType(String sql);", "public Class<?> getColumnClass(int columnIndex) {\r\n return this.table.getSchema().getColumnType(columnIndex);\r\n }", "public Class getColumnClass(int c) {\n\t\treturn (c == 0) ? String.class : Integer.class;\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn \"column\";\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic Class getColumnClass(int col) {\n\t\treturn CLASSICOLONNE[col];\n\t}", "@Override\n public Class<?> getColumnClass(int iCol) {\n\n switch (iCol) {\n case 0:\n return AcceleratorNode.class;\n \n case 1:\n return JProgressBar.class;\n \n case 2:\n return JTextArea.class;\n \n default:\n return super.getColumnClass(iCol);\n }\n }", "public Class getColumnClass( int column ) throws IllegalStateException\r\n {\r\n if ( !connectedToDatabase ) \r\n throw new IllegalStateException( \"Not Connected to Database\" );\r\n\r\n try \r\n {\r\n String className = metaData.getColumnClassName( column + 1 );\r\n \r\n return Class.forName( className );\r\n }\r\n catch ( Exception exception ) \r\n {\r\n exception.printStackTrace();\r\n }\r\n \r\n return Object.class;\r\n }", "public Class<?> getColumnClass(int columnIndex) {\n switch(columnIndex){\n case 0:\n return String.class;\n case 1:\n return Date.class;\n case 2:\n return String.class;\n case 3:\n return BigDecimal.class;\n }\n return super.getColumnClass(columnIndex);\n }", "@Override\n\tpublic int getColumnType(int col) throws SQLException {\n\n\t\tif (col <= width && col >= 1) {\n\t\t\tcol--;\n\n\t\t\tString str = table[0][col];\n\t\t\tStringTokenizer token = new StringTokenizer(str, \",\");\n\t\t\tString name = token.nextToken();\n\t\t\tString type = token.nextToken();\n\t\t\t/*\n\t\t\t * possible errors here according . we should check accurately the\n\t\t\t * name of types returned by amr to make sure they match the words\n\t\t\t * here . anyway I wrote them now and can be modified in\n\t\t\t * logartithmic time easily :P :D\n\t\t\t */\n\n\t\t\tif (type.equals(\"double\"))\n\t\t\t\treturn java.sql.Types.DOUBLE;\n\t\t\telse if (type.equals(\"integer\"))\n\t\t\t\treturn java.sql.Types.INTEGER;\n\t\t\telse if (type.equals(\"string\"))\n\t\t\t\treturn java.sql.Types.VARCHAR;\n\t\t\telse if (type.equals(\"boolean\"))\n\t\t\t\treturn java.sql.Types.BOOLEAN;\n\t\t\telse if (type.equals(\"date\"))\n\t\t\t\treturn java.sql.Types.DATE;\n\t\t\telse\n\t\t\t\treturn java.sql.Types.NULL;\n\n\t\t} else\n\t\t\tthrow new SQLException(\"column requested out of table bounds\");\n\n\t}", "public Class getDataClass();", "ExpDataClass getDataClass(int rowId);", "public Object getExtensionType(String columnName) {\n FieldVector vector = table.getVector(columnName);\n return vector.getObject(rowNumber);\n }", "@Override\r\n\t\tpublic Class<?> getColumnClass(int column)\r\n\t\t{\r\n\t\t\tif (getColumnName(column).equals(\"Status\") || getColumnName(column).equals(\"Country\") ) {\r\n\t\t\t\treturn new ImageIcon().getClass();\r\n\t\t\t}\r\n\t\t\treturn new Object().getClass();\r\n\t\t}", "@Override public Class<?> getColumnClass(int iColumnIndex)\r\n {\r\n Class<?> cReturn = String.class;\r\n\r\n return cReturn;\r\n }", "protected String getJavaType(DbAttribute a) {\n\n DbEntity dbEntity = a.getEntity();\n DataMap dataMap = dbEntity.getDataMap();\n Collection<String> javaTypes = new HashSet<>();\n\n for(ObjEntity objEntity : dataMap.getMappedEntities(dbEntity)) {\n for (ObjAttribute oa : objEntity.getAttributes()) {\n // TODO: this won't pick up flattened attributes\n if (a.getName().equals(oa.getDbAttributePath())) {\n javaTypes.add(oa.getType());\n }\n }\n }\n\n if (javaTypes.size() != 1) {\n String javaType = TypesMapping.getJavaBySqlType(a);\n String attributeName = dbEntity.getName() + \".\" + a.getName();\n String msg = javaTypes.size() > 1 ? \"ObjAttributes with different java types\" : \"No ObjAttributes\";\n // Warn user about this problem as there is nothing else we can do\n logger.warn(msg + \" bound to DbAttribute '\" + attributeName + \"', \" + javaType + \" type will be used.\");\n return javaType;\n }\n\n return javaTypes.iterator().next();\n }", "public Class<?> getColumnClass(int columnIndex) {\n if (columnIndex == 0) {\n return Boolean.class;\n } else {\n return String.class;\n }\n }", "public final Class<? extends Attribute> getCategory() {\n/* 219 */ return (Class)SheetCollate.class;\n/* */ }", "@Override\n public Class getColumnClass(int column) {\n\n if (column == 2) {\n// return ImageIcon.class;\n }\n return Object.class;\n }", "@Override\n\t\t\tpublic Class getColumnClass(int column) {\n\t\t\t\tif (isVisible()) {\n\t\t\t\t\tif (column == SELECTION)\n\t\t\t\t\t\treturn Boolean.class;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn getValueAt(0, column).getClass();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn null;\n\t\t\t}", "public Class<DATA> getHandledClass() ;", "public TypeColis getTypeColis() {\r\n\t\treturn typeColis;\r\n\t}", "public Class getType();", "Column getCol();", "public Class<?>[] getColumnTypes();", "public static int getColumnType(String colClassName) {\n\t\tint type = 0;\n\n\t\tif (colClassName.equals(\"java.util.Date\")) {\n\t\t\treturn 3;\n\t\t}\n\t\tif (colClassName.equals(\"java.sql.Date\")) {\n\t\t\treturn 3;\n\t\t}\n\t\tif (colClassName.equals(\"java.sql.Timestamp\")) {\n\t\t\treturn 3;\n\t\t}\n\t\tif (colClassName.equals(\"java.sql.Time\")) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (colClassName.equals(\"java.lang.Number\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.math.BigDecimal\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.math.BigInteger\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.lang.Byte\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.lang.Double\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.lang.Float\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.lang.Integer\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.lang.Long\")) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (colClassName.equals(\"java.lang.Short\")) {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn type;\n\t}", "public Class getTableClass() {\n\t\treturn entityClass;\r\n\t}", "protected abstract DTDataTypes52 getDataType(C column);", "ColumnAffinityType getColumnType();", "public java.lang.String getJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public static Class classTypeOf(Object x) {\n\t\treturn x.getClass();\n\t}", "public static Class classTypeOf(Object x) {\n\t\treturn x.getClass();\n\t}", "public Class<?> getColumnClass(int column) {\n return String.class;\n }", "public Class<gDBR> getRecordClass() \n {\n return this.rcdClass;\n }", "public Class getRecyclerClass() \n\t{\n\treturn fClass;\n\t}", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TrackerTableChangeLog.class;\r\n\t}", "public Class<?> getColumnClass(int columnIndex){\n\n\t\t\t if(columnIndex == COL_RAZAO_SOCIAL){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_CNPJ){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_IE){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_IM){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_CONTATO){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_EMAIL){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_ENDERECO){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_NUMERO){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_COMPLEMENTO){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_BAIRRO){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_CEP){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_CIDADE){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_ESTADO){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_TELFONE_UM){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\telse if(columnIndex == COL_TELFONE_DOIS){\n\t\t\t\t\treturn String.class;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn null;\n\t\t\t}", "public static String getJavaDatatype(Object object){\n\t\treturn object.getClass().toString().split(\" \")[1]; \n\t}", "public StrColumn getType() {\n return delegate.getColumn(\"type\", DelegatingStrColumn::new);\n }", "public StrColumn getType() {\n return delegate.getColumn(\"type\", DelegatingStrColumn::new);\n }", "public int getColumnType(Connection con, String table) throws SQLException {\r\n if (databaseColumnType == Types.NULL) {\r\n // For the sake of compatibility, always retrieve meta data with capitalized table and column names\r\n // first and afterwards (for Postgres) with lower-cased names\r\n try {\r\n databaseColumnType = selectDataType(con, table.toUpperCase(), databaseFieldName.toUpperCase());\r\n }\r\n catch(SQLException sqlx) {\r\n databaseColumnType = selectDataType(con, table.toLowerCase(), databaseFieldName.toLowerCase());\r\n }\r\n }\r\n return databaseColumnType;\r\n }", "public Class getType();", "public String getClazz();", "private ColumnType typeOf(DataType type) {\n switch (type) {\n case _class:\n return ColumnType.nominal;\n case _float:\n return ColumnType.continuous;\n case _order:\n return ColumnType.ordinal;\n default:\n throw new IllegalArgumentException(\"Unknown type: \" + type);\n }\n }", "public String getcType() {\n return cType;\n }", "@Override\n\tpublic String getColumnTypeName(int arg0) throws SQLException {\n\t\treturn tMeta[0].colType(arg0);\n\t}", "private OBOClass getModelTerm() {\n if (!this.selectionModel.getSelected().isEmpty()) {\n CharacterI c = this.selectionModel.getSelected().get(0);\n return c.getValue(charField).getOboClass();\n } else {\n return null;\n } \n }", "public int getColumnType(int position) {\n return columns[position].getType();\n }", "public Class getTypeClass() {\r\n\t\treturn (typeClass);\r\n\t}", "public StrColumn getType() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"type\", StrColumn::new) :\n getBinaryColumn(\"type\"));\n }", "public String getColumnType(int column_id) {\n\t\t// Start of user code for method getColumnType\n\t\tString getColumnType = \"\";\n\t\treturn getColumnType;\n\t\t// End of user code\n\t}", "public org.pentaho.pms.cwm.pentaho.meta.core.CwmClassifier getType();", "public Class getAttributeType();", "public Class getIndexedClass();" ]
[ "0.7620669", "0.75502497", "0.7519872", "0.7519872", "0.7519872", "0.7510439", "0.74983793", "0.7494649", "0.7494649", "0.74766004", "0.7466272", "0.74539405", "0.74071133", "0.7407072", "0.7381057", "0.73502105", "0.73483145", "0.7338023", "0.72800654", "0.7255836", "0.7255836", "0.7255836", "0.7255836", "0.72467494", "0.7014971", "0.69848365", "0.69528186", "0.67663825", "0.67260784", "0.66984814", "0.6686396", "0.66724735", "0.66582125", "0.66097754", "0.6605051", "0.65755963", "0.65668577", "0.65668577", "0.65106153", "0.6496791", "0.64810765", "0.6449304", "0.64405906", "0.6433971", "0.6386466", "0.631121", "0.6310771", "0.627635", "0.6264228", "0.62613755", "0.6232724", "0.6214881", "0.61870825", "0.61483246", "0.6145267", "0.614484", "0.6141438", "0.6138312", "0.6115664", "0.61081237", "0.6097774", "0.60605896", "0.6008124", "0.6002801", "0.59617233", "0.5923211", "0.5889863", "0.58858955", "0.5872802", "0.58639705", "0.5862347", "0.585528", "0.58491606", "0.5833093", "0.58305246", "0.58227843", "0.5809884", "0.5809884", "0.58046496", "0.58003014", "0.5788677", "0.5785613", "0.578039", "0.57703334", "0.57691884", "0.57691884", "0.5752207", "0.574815", "0.5739966", "0.57381535", "0.57332504", "0.5717073", "0.5715444", "0.5706786", "0.56966823", "0.56924164", "0.56845546", "0.5683151", "0.56801176", "0.567709" ]
0.729418
18
update all observers in Observer list
@Override public void notifyObservers(){ for (Observer o : ol){ //iterate through GameCollection to avoid passing iterator to views Iterator iterator = gc.getIterator(); //if MapView, iterate through game list and provide new state information if (o instanceof MapView){ while(iterator.hasNext()){ GameObject g = iterator.getNext(); o.update(gwp, g); } } //if PointsView, get all point values from GameCollection and provide values else if (o instanceof PointsView){ //cast as PointsView to use overloaded update methods PointsView p = (PointsView)o; //update all point values using overloaded update method, providing string tag to PointsView to differentiate which value is which //also pass in "hard" values accessed from GameCollection to avoid giving views access directly to GameCollection p.update(gwp, "time", (600-gc.getElapsedTime())/10); p.update(gwp, "pointsForFish", gc.getPointsForFish()); p.update(gwp, "pointsFishInNet", tempPointsFishInNet); p.update(gwp, "totalPoints", gc.getTotalPoints()); p.update(gwp, "sharksScooped", gc.getSharksScooped()); //use 2nd overloaded update() method in PointsView to pass sound as a boolean p.update(gwp,gc.getSound()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}", "@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }", "@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}", "@Override\n public void notifyObservers() {\n for (Observer observer : observers){\n // observers will pull the data from the observer when notified\n observer.update(this, null);\n }\n }", "public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}", "public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }", "public void notifyObserver() {\n\r\n for (Observer observer : observers) {\r\n\r\n observer.update(stockName, price);\r\n\r\n }\r\n }", "public void notifyAllObservers() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "public void notifyObservers(){\n\t\tfor (ModelObserver c : controllers){\n\t\t\tc.update();\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tEnumeration<Observer> enumo = vector.elements();\r\n\t\twhile(enumo.hasMoreElements()){\r\n\t\t\tenumo.nextElement().update();\r\n\t\t}\r\n\t}", "private void notifyidiots() {\n\t\tfor(Observ g:obslist) {\n\t\t\tg.update();\n\t\t}\n\t}", "public void updateObserver();", "public void notifyObservers() {}", "public void notifyObservers(){\r\n\t\tif (this.lastNews != null)\r\n\t\t\tfor (Observer ob: observers){\r\n\t\t\t\tob.updateFromLobby(lastNews);\r\n\t\t\t}\r\n\t}", "public void notifyObservers(){\n for (GameObserver g: observers){\n g.handleUpdate(new GameEvent(this,\n currentPlayer,\n genericWorldMap,\n gameState,\n currentTerritoriesOfInterest,\n currentMessage));\n }\n }", "private void notifyObservers() {\n\t\tfor (Observer observer : subscribers) {\n\t\t\tobserver.update(theInterestingValue); // we can send whole object, or just value of interest\n\t\t\t// using a pull variant, the update method will ask for the information from the observer\n\t\t\t// observer.update(this)\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers(){\r\n\t\tfor(IObserver obs : observers){\r\n\t\t\tobs.update(this, selectedEntity);\r\n\t\t}\r\n\t\tselectedEntity = null;\r\n\t}", "void notifyObservers();", "void notifyObservers();", "public void notifyObservers(Object... args)\n {\n for (IObserver observer : observers)\n {\n observer.update(this, args);\n }\n }", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "static void NotifyCorrespondingObservers() {}", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "public void notifyStudentsObservers() {\n \t\tfor (IStudentsObserver so : studentsObservers) {\n \t\t\tso.updateStudents();\n \t\t}\n \t}", "@Override\n\tpublic void updateObservateur() {\n\t\tfor (Observateur obs : this.listObservateur)\n\t\t\tobs.update(hour);\n\n\t}", "private void observerStuff() {\r\n\t\tfor (PirateShip pirate : pirates) {\r\n\t\t\tship.registerObserver(pirate);\r\n\t\t}\r\n\t}", "public void notifyObservers(String info){\r\n\t\tfor (Observer ob: observers){\r\n\t\t\tob.updateFromLobby(info);\r\n\t\t}\r\n\t}", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }", "@Override\n public void notifyUnitObservers() {\n for(UnitObserver unitObserver : unitObservers){\n unitObserver.update(entities.returnUnitRenderInformation());\n entities.setUnitObserver(unitObserver);\n }\n }", "private void notifyListeners() {\n\t\tfor(ModelListener l:listeners) {\n\t\t\tl.update();\t// Tell the listener that something changed\n\t\t}\n\t}", "public void atacar() {\n notifyObservers();\n }", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}", "public void setObservers(ArrayList<Observer> observers) { \n\t\tGame.ui = observers; \n\t}", "private void notifyObservers(GameEvent<S, A> e) {\n \tfor (GameObserver<S, A> o : observers){\n\t\t\to.notifyEvent(e);\n\t\t}\n\t}", "private void notifyObservors() {\n this.obervors.forEach(Obervor::modelChanged);\n }", "void notifyObserver();", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "public void notifyAllObservers(){\n\t\tthis.notifyAllObservers(null);\n\t}", "protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }", "public void notifyObservers() {\r\n\t\tDoctorEvent evt;\r\n\t\tif (loggedIn) {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGIN, doctor);\r\n\t\t} else {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGOUT, doctor);\r\n\t\t}\r\n\t\tfor (Iterator<IObserver> it = observers.iterator(); it.hasNext();) {\r\n\t\t\tIObserver observer = (IObserver) it.next();\r\n\t\t\tobserver.onNotify(evt);\r\n\t\t}\r\n\t}", "protected void notifyObservers()\n\t{\n\t Trace.println(Trace.EXEC_PLUS);\n\n\t for (TestGroupResultObserver observer : myObserverCollection)\n\t {\n\t \tobserver.notify(this);\n\t }\n\t}", "public void notificarTodos(){\n for (Observer observer : list) {\n observer.notificar();\n }\n }", "private void notificarSensores() {\n\t\tmvmSensorsObservers.forEach(sensorObserver -> sensorObserver.update());\n\t}", "public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}", "public void addObservers(List<RegisterObserver> observers){\r\n registerObservers.addAll(observers);\r\n }", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }", "public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}", "protected void notifyObservers() {\n os.notify(this, null);\n }", "public void notifyObserver(int position, double x, double y) {\n for (Observer obs : listObserver) {\n obs.updatePoney(position, x, y);\n }\n }", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer2 has received update!\");\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer3 has received update!\");\r\n\t}", "public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}", "private void notifyObservers(int vitesse) {\n for(CapteurObserver capObserver : sesObservers) {\n capObserver.onVitesseChange(this, vitesse);\n }\n }", "public void notifyObservers() {\n\t\tfor(ElevatorObserver obs: observers) {\n\t\t\tobs.elevatorDidFinishTask(this);\n\t\t}\n\t}", "private void setCountryObservers() {\n ArrayList<String> ownedCountryNameList = curPlayer.getOwnedCountryNameList();\n CountryChangedObserver observer = curPlayer.getCountryChangedObserver();\n for (String name : ownedCountryNameList) {\n Main.graphSingleton.get(name).getCountry().getCountryObservable().deleteObservers();\n Main.graphSingleton.get(name).getCountry().getCountryObservable().addObserver(observer);\n }\n }", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "public void detachAllObservers();", "public void notifyObserver(boolean result) {\r\n\t\tfor(Observer o : observers) {\r\n\t\t\to.updateStats(result);\r\n\t\t}\r\n\t}", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "private void announce( String arg ) {\r\n for ( var obs : this.observers ) {\r\n obs.update( this, arg );\r\n }\r\n }", "public void notifyAllObservers(Object object){\n\t\tsynchronized (this) {\n\t\t\tif(!this.isChanged){return;}//if nothing changed\n\t\t\tif(this.observers.isEmpty()){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Observer ob : this.observers) {\n\t\t\t\tob.update(this, object);\n\t\t\t}\n\t\t\tthis.clearChange();\n\t\t}\n\t}", "public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }", "public interface Observer {\n //method to update the observer, used by subject\n public void update();\n\n}", "public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }", "public void notifyListeners() {\n Logger logger = LogX;\n logger.d(\"notifyListeners: \" + this.mListeners.size(), false);\n List<IWalletCardBaseInfo> tmpCardInfo = getCardInfo();\n Iterator<OnDataReadyListener> it = this.mListeners.iterator();\n while (it.hasNext()) {\n it.next().refreshData(tmpCardInfo);\n }\n }", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "public void notifyIObservers( Object observed_obj, Object reason )\n {\n // Note: The notification may cause changes to the list of observers.\n // In particular, if the notification is that the observed object\n // is being destroyed, so the observers should destroy themselves,\n // then the call to iobs.update() will probably remove iobs from\n // the the list of observers. In order to update all of the \n // observers in this case, it is necessary to step backwards through\n // the list of observers.\n for ( int i = observers.size()-1; i >= 0; i-- ) \n {\n IObserver iobs = (IObserver) observers.elementAt(i);\n iobs.update( observed_obj, reason );\n }\n }", "public void addObservers(List<BiObserver<T, V>> l){\n biObserverList.addAll(l);\n }", "private synchronized void notifyUpdatedProperty(String key, String value) {\n Observer[] observers = observersTable.get(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.updatedProperty(this, key, value);\n }\n }\n }", "public void clearObservers(){\r\n\t\tobservers.clear();\r\n\t}", "@Override\n public void addObserver(Observer o) {\n listeObservers.add(o);\n getListeMorceau();\n }", "@Override\n public void registerObserver(Observer observer) {\n observers[counterObservers++]=observer;\n\n }", "@Override\n public void update(Observable o, Object arg) {\n setChanged();\n notifyObservers();\n }", "public void clearObservers() {\r\n\t\tobservers.clear();\r\n\t}", "@Override\n public void notifyObservers(String errorMessage) {\n for (Observer observer : observers){\n // push the error message to all the observers\n observer.update(this, errorMessage);\n }\n }", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "public interface Observer {\n void update();\n}", "@Override\n public void registerObserver(Observer o) {\n list.add(o);\n \n }", "public void addObserver(Observer obs) {\n this.listObserver.add(obs);\n }", "@Override\n public void addObserver(IObserver observer) {\n observersList.add(observer);\n }", "@Override\r\n\tpublic void registerObservers(Observer o) {\n\t\tobservers.add(o);\r\n\t}", "private void notifyClassObservers(ClassDescriptor classDescriptor) {\n for (IClassObserver observer : classObserverList) {\n observer.observeClass(classDescriptor);\n }\n }", "@Override\n public void addObserver(Observer observer) {\n observers.add(observer);\n }", "protected void notifyModificationListeners() {\r\n\t\tfor (ElementModificationListener l : modificationListeners) {\r\n\t\t\tl.elementModified(current);\r\n\t\t}\r\n\t}", "public interface Observer {\n\tpublic abstract void update(ArrayList<Document> documents);\n}", "public interface Observer {\n /**\n * This method is called by observed object (Observable) when it wants to notify their observers.\n */\n void update();\n}", "@Override\n public void notifyStructureObservers() {\n for(StructureObserver structureObserver : structureObservers){\n structureObserver.update(entities.returnStructureRenderInformation());\n }\n }", "@Override\r\n\tpublic void addObserver(IObserver obs){\r\n\t\tif(obs != null){\r\n\t\t\tobservers.add(obs);\r\n\t\t}\r\n\t}", "@Override\n public void subscribe(Observer observer) {\n this.observers.add(observer);\n }", "public void setObserver (BoardObserver obs)\n {\n _observer = obs;\n if (_observer == null) {\n // observer cleared?\n return;\n }\n\n // locate all flips, balls; inform\n _observer.newBoard();\n for (int ii=0; ii < _flips.length; ii++) {\n _observer.configureFlip(_flips[ii], ii);\n if (_flips[ii].ball != null) {\n _observer.ballAdded(_flips[ii].ball);\n }\n }\n }", "@Override\n\tpublic void notifyAllObservers() {\n\t\tmyTurtle.notifyObservers();\n\t}" ]
[ "0.8631797", "0.8605111", "0.8547821", "0.852286", "0.845991", "0.8445165", "0.83526003", "0.8335992", "0.8280492", "0.828012", "0.82269543", "0.81668615", "0.7923918", "0.7874968", "0.7835659", "0.77681965", "0.7627907", "0.7529395", "0.75016147", "0.74700135", "0.745767", "0.7426257", "0.7372443", "0.73706114", "0.73706114", "0.73497015", "0.7334109", "0.73214686", "0.73214686", "0.73214686", "0.72977084", "0.72580475", "0.7174084", "0.7135244", "0.70857596", "0.7019401", "0.6958286", "0.69101155", "0.6847422", "0.6843461", "0.6808779", "0.6808533", "0.6807138", "0.6791409", "0.6787281", "0.6774087", "0.67122793", "0.67008877", "0.66981", "0.6695039", "0.6689788", "0.6666257", "0.66643274", "0.6660058", "0.6652635", "0.66338575", "0.6633142", "0.66175973", "0.6581397", "0.6574112", "0.65252686", "0.65124965", "0.6511878", "0.650809", "0.65016687", "0.64949757", "0.64795834", "0.6474862", "0.6457259", "0.64558107", "0.641065", "0.64047706", "0.6404333", "0.6380904", "0.6377611", "0.63362986", "0.6336068", "0.6329665", "0.63166124", "0.63054675", "0.6291759", "0.6287018", "0.62638104", "0.6256275", "0.6256258", "0.6256009", "0.6222821", "0.62025476", "0.62001526", "0.61685467", "0.614494", "0.613334", "0.6132504", "0.6122478", "0.6118439", "0.6114796", "0.6114363", "0.61094636", "0.6084384", "0.6082395" ]
0.66351813
55
add observers to Observer ArrayList ol
@Override public void addObserver(Observer o){ ol.add(o); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addObserver(Observer o) {\n listeObservers.add(o);\n getListeMorceau();\n }", "public void addObservers(List<BiObserver<T, V>> l){\n biObserverList.addAll(l);\n }", "public void addObserver(Observer obs) {\n this.listObserver.add(obs);\n }", "@Override\n public void registerObserver(Observer o) {\n list.add(o);\n \n }", "@Override\r\n public void addObserver(Observer o) {\r\n observers.add(o);\r\n }", "public void addObservers(List<RegisterObserver> observers){\r\n registerObservers.addAll(observers);\r\n }", "@Override\r\n\tpublic void registerObservers(Observer o) {\n\t\tobservers.add(o);\r\n\t}", "@Override\n public void addObserver(Utilities.Observer o) {\n observers.add(o);\n }", "@Override\r\n\tpublic void addObserver(IObserver obs){\r\n\t\tif(obs != null){\r\n\t\t\tobservers.add(obs);\r\n\t\t}\r\n\t}", "public void adicionarObservador (Observer observador) {\n list.add(observador);\n }", "@Override\n public void addObserver(IObserver observer) {\n observersList.add(observer);\n }", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}", "public void addObserver(jObserver observer);", "@Override\n\tpublic void addObserver(ObserverListener ob) {\n\t\tvector.add(ob);\n\t}", "@Override\n public void addObserver(Observer o) {\n Gui_producto.observadores.add(o);\n }", "@Override\n\tpublic void addObservateur(Observateur obs) {\n\t\tthis.listObservateur.add(obs);\n\t}", "@Override\n public void addObserver(Observer observer) {\n observers.add(observer);\n }", "@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }", "public void addObserver(Observer o) {\r\n\t\tif(observers == null) observers = new HashSet<>();\r\n\t\tobservers.add(o);\r\n\t}", "public synchronized void addObserver(Observer obs) {\n if (isMutable()) {\n Observer[] observers = observersTable.get(this);\n\n if (observers == null) {\n observers = new Observer[0];\n }\n\n observers = DynamicArray.append(observers, obs);\n observersTable.put(this, observers);\n }\n }", "void addObserver(Observer observer);", "void addObserver(Observer observer);", "public void registerObserver(Observer ob){\r\n\t\tobservers.add(ob);\r\n\t}", "@Override\r\n\tpublic void add(Observer observer) {\n\t\tvector.add(observer);\r\n\t}", "public void addObserver(GameObserver<S, A> o) {\n observers.add(o);\n }", "public void addIObserver( IObserver iobs )\n {\n if ( observers.indexOf( iobs ) < 0 ) // only add the observer if it's \n observers.addElement( iobs ); // NOT already there.\n }", "public void addObserver(T t){\n\t\t\n\t\tIterator<T> it = observers.iterator();\n\t\tboolean encontrado = false;\n\t\tT valor = null;\n\t\t\n\t\tobservers.contains(t);\n\t\twhile(it.hasNext() && !encontrado){\n\t\t\t\t\n\t\t\tvalor = it.next();\t\n\t\t\tencontrado = (valor.equals(t));\n\t\t}\n\t\t\n\t\tif(!encontrado){\n\t\t\t\n\t\t\tthis.observers.add(t);\n\t\t}\n\t}", "@Override\n public void registerObserver(Observer o){\n this.observers.add(o);\n }", "public abstract void addObserver(Observer observer);", "private void observerStuff() {\r\n\t\tfor (PirateShip pirate : pirates) {\r\n\t\t\tship.registerObserver(pirate);\r\n\t\t}\r\n\t}", "public void addObserver(IObserver observer)\n {\n observers.add(observer);\n }", "public abstract void addObserver(IObserver anIObserver);", "@Override\n\tpublic void attach(Observer observer) {\n\t\tobs.add(observer);\n\t}", "public void registerObserver(Observer o) {\n observers.add(o);\n }", "@Override\n void attach(Observer observer) {\n observers.add(observer);\n }", "private Observer<ArrayList<Station>> createStationListObserver() {\n return new Observer<ArrayList<Station>>() {\n @Override\n public void onChanged(@Nullable ArrayList<Station> newStationList) {\n\n }\n };\n }", "@Override\n public void subscribe(Observer observer) {\n this.observers.add(observer);\n }", "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "public void notificarTodos(){\n for (Observer observer : list) {\n observer.notificar();\n }\n }", "@Override\n public void registerObserver(Observer observer) {\n observers[counterObservers++]=observer;\n\n }", "public ArrayList<Observer> getObservers() { \n\t\treturn ui; \n\t}", "public void addSaleObserver(SaleObserver obs){\n saleObservers.add(obs);\n }", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "public void addObserver(ProcessObserver wpo){\r\n\t\tobservers.add(wpo);\r\n\t}", "public void addObserver(IObserver ob) {\n this.DecoratedSortAlgo.addObserver(ob);\r\n }", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "public void setObservers(ArrayList<Observer> observers) { \n\t\tGame.ui = observers; \n\t}", "public void addObserver(GUIObserver g){\n\t\tobservers.add(g);\n\t}", "@Override\n public void attach(IObserver observer) {\n listeners.add(observer);\n }", "public void newAddObserver(Observer o) {\n\t\t\tthis.addNotifier.addObserver(o);\n\t\t}", "@Override\n public void registerObserver(Observer ob) {\n this.observers.add(ob);\n System.out.println(\"** Sistema: Observado \" + this.getClass().getName() + \" - Observador \" + ob.getClass().getName() + \" está registrado.\");\n }", "public void notifyObserver() {\n\r\n for (Observer observer : observers) {\r\n\r\n observer.update(stockName, price);\r\n\r\n }\r\n }", "@Override\n public void notifyObservers() {\n for (Observer observer : observers){\n // observers will pull the data from the observer when notified\n observer.update(this, null);\n }\n }", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "public void addLobbyObserver(Observer obs)\r\n\t{\r\n\t\treceiver.addObserver(obs);\r\n\t}", "public void addObserver(Observer observer) {\r\n this.observers.add(observer);\r\n notifyObservers();\r\n }", "private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}", "public void addObserver(QuackObserver observer) {\n for (Quackable duck : ducks) {\n duck.addObserver(observer);\n }\n }", "public void registerObserver(Observer observer);", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}", "public void registerObs(Node obs){\r\n this.listeners.add(obs);\r\n }", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "public void addObserver(BiObserver<T, V> b){\n biObserverList.add(b);\n }", "public void notifyObservers() {}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tEnumeration<Observer> enumo = vector.elements();\r\n\t\twhile(enumo.hasMoreElements()){\r\n\t\t\tenumo.nextElement().update();\r\n\t\t}\r\n\t}", "public void notifyObservers(){\r\n\t\tif (this.lastNews != null)\r\n\t\t\tfor (Observer ob: observers){\r\n\t\t\t\tob.updateFromLobby(lastNews);\r\n\t\t\t}\r\n\t}", "public void addObserver(ElevatorObserver observer) {\n\t\tobservers.add(observer);\n\t}", "public void subscribe( Observer< S, Info > obs );", "public void addObserver(Varien_Event_Observer observer) {\n\t\t_observers.put(observer.getName(), observer);\n\t}", "public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }", "@Override\n public void addObserver(Observer obs) {\n drawingTools.addObserver(obs);\n }", "void notifyObservers();", "void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "public List<ObserverAsync<Capteur>> getListObserver() {\n\t\tList<ObserverAsync<Capteur>> ret = new ArrayList<ObserverAsync<Capteur>>();\n\t\tIterator ite = this.listObserver.iterator();\n\t\twhile(ite.hasNext()){\n\t\t\tret.add((ObserverAsync<Capteur>) ite.next());\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}", "public void addObserver(ServiceObserverPrx observer);", "public void registerObserver(Observer observer) {\n\t\tobservers.add(observer);\n\t}", "private void notifyidiots() {\n\t\tfor(Observ g:obslist) {\n\t\t\tg.update();\n\t\t}\n\t}", "public void addObservateur(Observateur o) {\r\n\t\tthis.listeObservateur.add(o);\t\t\r\n\t}", "public synchronized void addBaseObserver(BaseObserver<M, T> o) {\n if (o == null) {\n throw new NullPointerException();\n }\n if (!obs.contains(o)) {\n obs.addElement(o);\n }\n }", "static void NotifyCorrespondingObservers() {}", "public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }", "protected void registerObserver(Observer.GraphAttributeChanges observer) {\n observers.add(observer);\n }", "public List<Observer> getList() {\n return list;\n }", "void addObserver(EntityObserver observer);", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer, Ice.Callback __cb);", "public void atacar() {\n notifyObservers();\n }", "public void addObserver(Node node){\n\t\tif(null == observerNodes)\n\t\t\tobserverNodes = new ArrayList<Node>();\n\t\tobserverNodes.add(node);\n\t}", "@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}", "public void registerObserver(ModelObserver mo){\n\t\tcontrollers.add(mo);\n\t}", "public void register(Observer newObserver) {\n observers.add(newObserver);\r\n\r\n }", "@Override\r\n\tpublic void registerObserver(BeatObserver o) {\n\r\n\t}", "public void attach(Observer o);", "public void attach(Observer observer) {\n\t\tsubscribers.add(observer);\n\t}", "public void addObserver(GameObserver gameObserver){\n this.observers.add(gameObserver);\n }", "@Test\n public void testAddObserver() throws Exception {\n JCSyncObservable o1;\n JCSyncObservable o2;\n String name = \"obs_addObserver\";\n \n SharedObservableObject so_1;\n SharedObservableObject so_2;\n o1 = new JCSyncObservable();\n o1.addObserver(new Observer() {\n\n @Override\n public void update(Observable o, Object arg) {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }\n });\n so_1 = new SharedObservableObject(name, o1, core);\n so_2 = (SharedObservableObject)SharedObservableObject.getFromOverlay(name, core2);\n o2 = (JCSyncObservable) so_2.getNucleusObject();\n assertTrue(o1.countObservers()==1);\n assertTrue(o2.countObservers()==0);\n }" ]
[ "0.807924", "0.7831187", "0.7732314", "0.7726785", "0.7585369", "0.7537383", "0.7399286", "0.73887044", "0.73870015", "0.7375877", "0.7334917", "0.73144513", "0.73092186", "0.7297935", "0.72554356", "0.72082484", "0.71957165", "0.7160284", "0.7146016", "0.7143572", "0.7140953", "0.7140953", "0.7132333", "0.71101606", "0.70622647", "0.7052761", "0.7039299", "0.70278955", "0.69950145", "0.699338", "0.6868163", "0.68246955", "0.68034136", "0.6777811", "0.6753966", "0.6753332", "0.6731085", "0.6726936", "0.67231643", "0.67179734", "0.67137533", "0.66860086", "0.66831046", "0.66540354", "0.66469073", "0.664013", "0.6639307", "0.6629495", "0.66215986", "0.66194767", "0.6614239", "0.6605914", "0.6600691", "0.6579091", "0.6567094", "0.6538627", "0.6526174", "0.6521864", "0.6499251", "0.6492635", "0.64783823", "0.6476533", "0.64555883", "0.6423014", "0.6420482", "0.6419352", "0.6414983", "0.640855", "0.6406125", "0.63973415", "0.639513", "0.6395076", "0.6395076", "0.63925153", "0.63925153", "0.63925153", "0.63694006", "0.63573056", "0.635314", "0.6347658", "0.63388824", "0.633589", "0.63304985", "0.6318542", "0.6301477", "0.62931335", "0.6291297", "0.6291123", "0.62890005", "0.6286327", "0.6266301", "0.6263366", "0.6236795", "0.62324834", "0.6225458", "0.6216171", "0.62153345", "0.6212771", "0.6210342", "0.6205082" ]
0.78826064
1
create an instance of GameWorld with user input
void createWorld(Scanner console){ Random r = new Random(); // System.out.println("Welcome to Sushi Time!"); //System.out.println("Number of fish: "); int fish = r.nextInt(40)+1; //System.out.println("Number of sharks: "); int shark = r.nextInt(10)+1; //create random int for creating random number of seaweed int seaweed=r.nextInt(3)+1; //create fish, sharks, seaweed, net and sushibar, add them to GameCollection System.out.println("Creating "+fish+" fish"); for(int i=0; i<fish; i++){ System.out.println("Creating fish"); Fish f = new Fish(this); addToWorldList(f); } System.out.println("Creating "+shark+" sharks"); for(int i=0; i<shark; i++){ System.out.println("Creating shark"); Shark s = new Shark(this); addToWorldList(s); } System.out.println("Creating "+seaweed+" seaweed"); for(int i=0; i<seaweed; i++){ System.out.println("Creating seaweed"); Seaweed sw=new Seaweed(this); addToWorldList(sw); } System.out.println("Creating net"); Net n = new Net(); addToWorldList(n); System.out.println("Creating sushibar"); Sushibar sb = new Sushibar(); addToWorldList(sb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GameWorld(){\r\n\t\t\r\n\t}", "public abstract World create(World world);", "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 createWorld(){\n\n }", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "public Game createGame();", "private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }", "public MyWorld()\n { \n super(1200, 600, 1); \n prepare();\n bienvenida();\n instrucciones();\n sonido();\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 }", "@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}", "public static void main(String[] args) {\n if (args.length < 1) {\n System.out.println(\"No world argument given, shutting down.\");\n return;\n }\n try {\n Class<?> clasz = Class.forName(args[0]);\n GameWorldType gameWorldType = (GameWorldType) clasz.getConstructor().newInstance();\n GameController gameController = new GameController(gameWorldType);\n java.awt.EventQueue.invokeLater(() -> {\n new MainView(\"My Canvas Window\", gameController).show();\n });\n } catch (ClassNotFoundException | InstantiationException | InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "public World()\n\t{\n\t\tinitWorld();\t\n\t}", "public MyWorld()\n {\n super(600, 400, 1);\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }", "private GameWorld getGameWorld(){\n\t\tHashMap<String, Location> locations = new HashMap<String, Location>();\n\t\tHashMap<Avatar, Location> avatarLocations = new HashMap<Avatar, Location>();\n\t\tArrayList<Avatar> avatars = new ArrayList<Avatar>();\n\t\t\n\t\tLocation testLocation = new Location(\"Test Location\");\n\t\tAvatar testAvatar = new Avatar(\"Slim\", 1);\n\t\t\n\t\tlocations.put(\"testLocation\", testLocation);\n\t\tavatarLocations.put(testAvatar, testLocation);\n\t\tavatars.add(testAvatar);\n\t\t\n\t\treturn new GameWorld(locations, avatarLocations, avatars);\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "void createNewGame(Player player);", "private static WorldDescription createWorld() {\r\n \t\tWorldDescription world = new WorldDescription();\t \r\n \t\tworld.setPlaneSize(100);\t\t\r\n \t \tObstacleGenerator generator = new ObstacleGenerator();\r\n \t generator.obstacalize(obstacleType, world); // activate to add obstacles\r\n \t // world.setPlaneTexture(WorldDescription.WHITE_GRID_TEXTURE);\r\n \t\treturn world;\r\n \t}", "public void createGame();", "public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "public MyWorld()\n { \n // Create a new world with 600x550 cells with a cell size of 1x1 pixels.\n super(600, 550, 1);\n // Set the order in which Actors are drawn on the screen in this World\n setPaintOrder ( Counter.class, HighScore.class, Fader.class);\n // Counter\n counter = new Counter (\"Score: \");\n addObject (counter, 50, 30);\n // Initialize the player\n player = new Player ();\n addObject (player, 300, 530); \n platforms = new Platform[10]; \n startingPlatform = new Platform();\n addObject (startingPlatform, 300, 550);\n // Loop through as many Meteors as there are on this level\n for (int i = 0; i < platforms.length; i++)\n {\n // Initialize a new Platform object for each spot in the array\n platforms[i] = new Platform ();\n // Add each platform at a random position anywhere on the X axis and at intervals of 15 on the Y axis\n addObject (platforms[i], Greenfoot.getRandomNumber(600), platformCounter);\n platformCounter = platformCounter - 55;\n }\n }", "public static void main(String [] args)\n\t{\n\t\tWorld newWorld = new World();\n\n\t\t//Adding everything into the world\n\t\tnewWorld.treesShrubsToWorld();\n\t\tnewWorld.grassToWorld();\n\t\tnewWorld.caterpillarToWorld();\n\t\tnewWorld.grasshopperToWorld();\n\t\tnewWorld.deerToWorld();\n\t\tnewWorld.bluejayToWorld();\n\t\tnewWorld.squirrelToWorld();\n\t\tnewWorld.mouseToWorld();\n\t\tnewWorld.rabbitToWorld();\n\t\tnewWorld.hawkToWorld();\n\t\tnewWorld.foxToWorld();\n\t\tnewWorld.wolfToWorld();\n\n\t\t//Printing out the world onto the console\n\t\tnewWorld.printWorld();\n\t\t\n\t}", "World getWorld();", "public GameInstance(int gameID, World world) {\r\n this.gameID = gameID;\r\n this.world = world;\r\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n \n Player player = new Player();\n Point point0 = new Point();\n Point point1 = new Point();\n Point point2 = new Point();\n Point point3 = new Point();\n Point point4 = new Point();\n Danger danger0 = new Danger();\n Danger danger1 = new Danger();\n addObject(player, getWidth()/2, getHeight()/2);\n \n addObject(point0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point2,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point3,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point4,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n \n addObject(danger0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(danger1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n }", "public void create() {\n\t\trandomUtil = new RandomUtil();\n\t\t// create the camera using the passed in viewport values\n\t\tcamera = new OrthographicCamera(viewPortWidth, viewPortHeight);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tdebugRender = new Box2DDebugRenderer(true, false, false, false, false, true);\n\t\ttestWorld = new TestWorld(assetManager.blockManager(), new Vector2(0, 0f));\n\t\ttestWorld.genWorld(debugUtil);\n\t\ttestWorld.setCamera(getCamera());\n\t\tplayer.createBody(testWorld.getWorld(), BodyType.DynamicBody);\n\t\ttestWorld.getPlayers().add(player);\n\t\tworldParser = new WorldParser(testWorld, \"Test World\");\n\t\tworldParser = new WorldParser(testWorld, \"Test Write\");\n\t\tworldParser.parseWorld();\n\t\twriter = new WorldWriter(\"Test Write\", testWorld);\n\t}", "protected abstract void initializeWorld();", "public static final SpriteWorld newWorld (String name, Class<? extends SpriteWorld> type) {\n\t\tif (Top.tgame != null && !isBindedSpriteLifeCycleListener) {\n\t\t\tTop.tgame.registerLifecycleListener(SpriteLifeCycleListener);\n\t\t\tisBindedSpriteLifeCycleListener = true;\n\t\t}\n\n\t\t// create new world\n\t\tSpriteWorld world = mSpriteWorlds.get(name);\n\t\ttry {\n\t\t\tif (world == null) {\n\t\t\t\tworld = type.newInstance();\n\t\t\t\tworld.bind(name);\n\t\t\t\tmSpriteWorlds.put(name, world);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn world;\n\t}", "public void addToWorld(World world);", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "private void createGame(String name){\n\n }", "public static final SpriteWorld newWorld (String name) {\n\t\tif (Top.tgame != null && !isBindedSpriteLifeCycleListener) {\n\t\t\tTop.tgame.registerLifecycleListener(SpriteLifeCycleListener);\n\t\t\tisBindedSpriteLifeCycleListener = true;\n\t\t}\n\n\t\t// create new world\n\t\tSpriteWorld world = mSpriteWorlds.get(name);\n\t\tif (world == null) {\n\t\t\tworld = new SpriteWorld();\n\t\t\tworld.bind(name);\n\t\t\tmSpriteWorlds.put(name, world);\n\t\t}\n\t\treturn world;\n\t}", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "protected WorldWindow createWorldWindow() {\n\t\treturn new WorldWindowGLJPanel();\r\n\t\t//return new WorldWindow();\r\n\t}", "public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }", "public void startNewGame()\n {\n // Display the Banner Page.\n \n System.out.println(\"\\nWelcome to the city of Aaron.\");\n \n // Prompt for and get the user’s name.\n String name;\n System.out.println(\"\\nPlease type in your first name: \");\n name = keyboard.next();\n\n // Call the createNewGame() method in the GameControl class\n \n GameControl.createNewGame(name);\n\n // Display a welcome message\n System.out.println(\"Welcome \" + name + \" have fun!!!\");\n \n //Call the GameMenuView\n GameMenuView gmv = new GameMenuView();\n gmv.displayMenu();\n }", "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 Game()\n {\n createRooms();\n parser= new Parser();\n }", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public Game(String customMapName) {\n genericWorldMap = new GenericWorldMap(customMapName);\n players = new LinkedList<Player>();\n dice = new Dice();\n observers = new LinkedList<>();\n gameState = GameState.MESSAGE;\n }", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "public Game() {}", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "void create(GameLogic gameLogic);", "public MyAgent(World world)\n {\n w = world; \n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game(){\n new Window(800, 800, \"Survival Game\", this);\n handler = new Handler();\n camera = new Camera(0,0);\n this.addKeyListener(new KeyInput(handler));\n\n //create the map\n map = new Map(handler);\n map.generateMap();\n map.drawWorld();\n\n player = new Player(100, 100, ID.Player, handler);\n handler.addObject(player);\n handler.addObject(new Bear(600, 600, ID.Bear, player));\n handler.addObject(new Deer(400, 400, ID.Deer, player));\n\n start();\n }", "@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }", "public void initAndSetWorld() {\n\t\tHashMap<String, Location> gameWorld = new HashMap<String, Location>();\r\n\t\tthis.world = gameWorld;\r\n\t\t\r\n\t\t// CREATING AND ADDING LOCATIONS, LOCATION AND ITEM HASHES ARE AUTOMATICALLY SET BY CALLING CONSTRUCTOR\r\n\t\tLocation valley = new Location(\"valley\", \"Evalon Valley. A green valley with fertile soil.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(valley);\r\n\t\tLocation plains = new Location(\"plains\", \"West Plains. A desolate plain.\",\r\n\t\t\t\t\"You cannot go in that direction. There is nothing but dust over there.\",true);\r\n\t\tthis.addLocation(plains);\r\n\t\tLocation mountain = new Location(\"mountain\", \"Northern Mountains. A labyrinth of razor sharp rocks.\",\r\n\t\t\t\t\"You cannot go in that direction. The Mountain is not so easily climbed.\",true);\r\n\t\tthis.addLocation(mountain);\r\n\t\tLocation shore = new Location(\"shore\", \"Western Shore. The water is calm.\",\r\n\t\t\t\t\"You cannot go in that direction. There might be dangerous beasts in the water.\",true);\r\n\t\tthis.addLocation(shore);\r\n\t\tLocation woods = new Location(\"woods\", \"King's Forest. A bright forest with high pines.\",\r\n\t\t\t\t\"You cannot go in that direction. Be careful not to get lost in the woods.\",true);\r\n\t\tthis.addLocation(woods);\r\n\t\tLocation hills = new Location(\"hills\", \"Evalon hills.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(hills);\r\n\t\tLocation cave = new Location(\"cave\", \"Blood Cave. Few of those who venture here ever return.\",\r\n\t\t\t\t\"The air smells foul over there, better not go in that direction.\",true);\r\n\t\tthis.addLocation(cave);\r\n\t\tLocation innercave = new Location(\"innercave\", \"Blood Cave. This path must lead somewhere.\",\r\n\t\t\t\t\"Better not go over there.\",true);\r\n\t\t\r\n\t\tLocation westhills = new Location(\"westhills\", \"Thornhills. A great many trees cover the steep hills.\",\r\n\t\t\t\t\"You cannot go in that direction. Watch out for the thorny bushes.\",true);\r\n\t\tthis.addLocation(westhills);\r\n\t\t\r\n\t\tLocation lake = new Location(\"lake\", \"Evalon Lake. A magnificent lake with a calm body of water.\",\r\n\t\t\t\t\"You cannot go in that direction, nothing but fish over there.\",true);\r\n\t\tthis.addLocation(lake);\r\n\t\t\r\n\t\tLocation laketown = new Location(\"laketown\", \"Messny village. A quiet village with wooden houses and a dirt road.\",\r\n\t\t\t\t\"You cannot go in that direction, probably nothing interesting over there.\",true);\r\n\t\t\r\n\t\tLocation inn = new Room(\"inn\", \"Messny Inn. A small but charming inn in the centre of the village.\",\r\n\t\t\t\t\"You cannot go in that direction.\",false);\r\n\t\t\r\n\t\t// CONNECTING LOCATIONS\r\n\t\t// IT DOES NOT MATTER ON WHICH LOCATION THE METHOD ADDPATHS IS CALLED\r\n\t\tvalley.addPaths(valley, \"east\", plains, \"west\");\r\n\t\tvalley.addPaths(valley, \"north\", mountain, \"south\");\r\n\t\tvalley.addPaths(valley, \"west\", shore, \"east\");\r\n\t\tvalley.addPaths(valley, \"south\", woods, \"north\");\r\n\t\twoods.addPaths(woods, \"east\", hills, \"west\");\r\n\t\thills.addPaths(hills, \"south\", westhills, \"north\");\r\n\t\twesthills.addPaths(westhills, \"west\", lake, \"east\");\r\n\t\tlake.addPaths(woods, \"south\", lake, \"north\");\r\n\t\tlake.addPaths(lake, \"west\", laketown, \"east\");\r\n\t\tmountain.addPaths(mountain, \"cave\", cave, \"exit\");\r\n\t\tlaketown.addPaths(laketown, \"inn\", inn, \"exit\");\r\n\t\t\r\n\r\n\t\t\r\n\t\t// CREATE EMPTY ARMOR SET FOR GAME START AND UNEQUIPS\r\n\t\tBodyArmor noBodyArmor = new BodyArmor(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBodyArmor(noBodyArmor);\r\n\t\tBoots noBoots = new Boots(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBoots(noBoots);\r\n\t\tHeadgear noHeadgear = new Headgear(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultHeadgear(noHeadgear);\r\n\t\tGloves noGloves = new Gloves(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultGloves(noGloves);\r\n\t\tWeapon noWeapon = new Weapon(\"unarmored\", 0, 0, true, 5, false);\r\n\t\tthis.setDefaultWeapon(noWeapon);\r\n\t\t\r\n\t\tthis.getPlayer().setBodyArmor(noBodyArmor);\r\n\t\tthis.getPlayer().setBoots(noBoots);\r\n\t\tthis.getPlayer().setGloves(noGloves);\r\n\t\tthis.getPlayer().setHeadgear(noHeadgear);\r\n\t\tthis.getPlayer().setWeapon(noWeapon);\r\n\t\t\r\n\t\t\r\n\t\t// CREATING AND ADDING ITEMS TO PLAYER INVENTORY \r\n\t\tItem potion = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tthis.getPlayer().addItem(potion);\r\n\t\tWeapon sword = new Weapon(\"sword\", 10, 200, true, 10, false);\r\n\t\tvalley.addItem(sword);\r\n\t\t\r\n\t\tWeapon swordEvalon = new Weapon(\"EvalonianSword\", 15, 400, true, 1, 15, false);\r\n\t\thills.addItem(swordEvalon);\r\n\t\t\r\n\t\tPotion potion2 = new Potion(\"largepotion\", 2, 200, true, 25);\r\n\t\tPotion potion3 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tPotion potion4 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tlake.addItem(potion3);\r\n\t\tinn.addItem(potion4);\r\n\t\t\r\n\t\tItem potion5 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion6 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\twoods.addItem(potion6);\r\n\t\t\r\n\t\tPurse purse = new Purse(\"purse\",0,0,true,100);\r\n\t\tvalley.addItem(purse);\r\n\t\t\r\n\t\tChest chest = new Chest(\"chest\", 50, 100, false, 50);\r\n\t\tvalley.addItem(chest);\r\n\t\tchest.addItem(potion2);\r\n\t\t\r\n\t\tChest chest2 = new Chest(\"chest\", 10, 10, false, 20);\r\n\t\tinn.addItem(chest2);\r\n\t\t\r\n\t\t// ENEMY LOOT\r\n\t\tBodyArmor chestplate = new BodyArmor(\"chestplate\", 20, 200, true, 20);\r\n\t\t\r\n\t\t// ADDING NPC TO WORLD\r\n\t\tNpc innkeeper = new Npc(\"Innkeeper\", false, \"Hello, we have rooms available if you want to stay over night.\",true,1000);\r\n\t\tinn.addNpc(innkeeper);\r\n\t\t\r\n\t\tItem potion7 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion8 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tinnkeeper.addItem(potion7);\r\n\t\tinnkeeper.addItem(potion8);\r\n\t\t\r\n\t\tNpc villager = new Npc(\"Lumberjack\", false, \"Gotta get those logs back to the mill soon, but first a few pints at the inn!\",false,0);\r\n\t\tlaketown.addNpc(villager);\r\n\t\t\r\n\t\tEnemy enemy1 = new Enemy(\"Enemy\", true, \"Come at me!\", 50, chestplate, 200, 10);\r\n\t\tmountain.addNpc(enemy1);\r\n\t\t\r\n\t\tEnemyGuardian guardian = new EnemyGuardian(\"Guardian\", true, \"I guard this cave.\", 100, potion5, 600, 15, innercave, \"An entrance reveals itself behind the fallen Guardian.\", \"inwards\", \"entrance\");\r\n\t\tcave.addNpc(guardian);\r\n\t\t\r\n\t\t// ADDING SPAWNER TO WORLD\r\n\t\tthis.setNpcSpawner(new BanditSpawner()); \r\n\t\t\r\n\t\t// ADDING PLAYER TO THE WORLD\r\n\t\tthis.getPlayer().setLocation(valley);\r\n\t\t\r\n\t\t// QUEST\r\n\t\tQuest noquest = new Quest(\"noquest\",\"nodesc\",\"nocomp\",false,true,1000,0,0,0);\r\n\t\tthis.setCurrentQuest(noquest);\r\n\t\t\r\n\t\t\r\n\t\tQuest firstquest = new Quest(\"A New Journey\",\"Find the lost sword of Evalon.\",\"You have found the lost sword of Evalon!\",false,false,1,400,0,1);\r\n\t\t\r\n\t\tScroll scroll = new Scroll(\"Questscroll\",1,1,true,firstquest);\r\n\t\tmountain.addItem(scroll);\r\n\t\t\r\n\t\tSystem.out.println(\"All set up.\");\r\n\t}", "public HowToPlay()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(763, 578, 1); \n //HowToPlay play = new HowToPlay();\n }", "public WorldModel(){\t\n\t}", "public Game(){\n\n }", "public MyWorld()\n { \n // Create a new world with 1600x1200 cells with a cell size of 1x1 pixels.\n super(1125, 1125, 1);\n //Adds the Cornucopia to the center of the Arena.\n int centerX = this.getWidth()/2;\n int centerY = this.getHeight()/2;\n this.addObject(new Cornucopia(), centerX, centerY);\n \n //The following adds the main character for the game.\n int CharacterX = 1125/2;\n int CharacterY = 770;\n this.addObject(new Character(), CharacterX, CharacterY);\n \n //The following code adds 6 \"Careers\" into the arena.\n int CareerX = 405;\n int CareerY = 328;\n this.addObject(new Careers(), CareerX, CareerY);\n this.addObject(new Careers(), CareerX+310, CareerY-5);\n this.addObject(new Careers(), CareerX+90, CareerY+430);\n this.addObject(new Careers(), CareerX+290, CareerY+405);\n this.addObject(new Careers(), CareerX+190, CareerY-60);\n \n //The following code add the remaining 17 Tributes to the arena.\n //Also, I cannot add like a normal person so there will only be twenty-three tributes. The Capitol goofed this year.\n int TribX = 660;\n int TribY = 288;\n this.addObject(new Tributes(), TribX, TribY);\n this.addObject(new Tributes(), TribX-200, TribY);\n this.addObject(new Tributes(), TribX-227, TribY+443);\n this.addObject(new Tributes(), TribX-280, TribY+400);\n this.addObject(new Tributes(), TribX-34, TribY+467);\n this.addObject(new Tributes(), TribX+86, TribY+397);\n this.addObject(new Tributes(), TribX-134, TribY-22);\n this.addObject(new Tributes(), TribX+103, TribY+82);\n this.addObject(new Tributes(), TribX+139, TribY+144);\n this.addObject(new Tributes(), TribX+150, TribY+210);\n this.addObject(new Tributes(), TribX+150, TribY+280);\n this.addObject(new Tributes(), TribX+120, TribY+342);\n this.addObject(new Tributes(), TribX-338, TribY+275);\n this.addObject(new Tributes(), TribX-319, TribY+343);\n this.addObject(new Tributes(), TribX-343, TribY+210);\n this.addObject(new Tributes(), TribX-330, TribY+150);\n this.addObject(new Tributes(), TribX-305, TribY+80);\n \n //The following code should add the forest onto the map.\n int ForX = this.getWidth()/2;\n int ForY = 900;\n this.addObject(new Forest(), ForX, ForY);\n \n //The following code should add the lake to the map.\n int LakX = 790;\n int LakY = 990;\n this.addObject(new Lake(), LakX, LakY);\n \n //The following should add the cave to the map.\n int CavX = 125;\n int CavY = 110;\n this.addObject(new Cave(), CavX, CavY);\n \n \n int actorCount = getObjects(Tributes.class).size();\n if(actorCount == 17) {\n int BeastX = 200;\n int BeastY = 200;\n this.addObject(new Beasts(), BeastX, BeastY);\n this.addObject(new Beasts(), BeastX+100, BeastY+100);\n }\n }", "public void newGame();", "public void newGame();", "public void newGame();", "public static void main(String args[]) {\n BallWorld world = new BallWorld();\n }", "WorldGenerator getForWorld(World world);", "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 }", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "GameModel createGameModel(GameModel gameModel);", "public Game() {\n\n\t}", "static Game newGame(Player player1, Player player2) {\n return new GameImpl(player1, player2);\n }", "private World initWorld(InputSource currSource) {\n boolean isReadingSequence = false;\n int currIndexOfSequence = 0;\n while (currSource.possibleNextInput()) {\n char currChar = currSource.getNextKey();\n\n if (currChar == 'L' || currChar == 'l') {\n StringInputDevice load = new StringInputDevice(getSaveData());\n sourceString = \"\";\n world = initWorld(load);\n startLoop(load);\n return world;\n }\n\n if (currChar == 'N' || currChar == 'n') {\n isReadingSequence = true;\n }\n\n if (isReadingSequence) {\n if (currChar != ' ') {\n sourceString += currChar;\n currIndexOfSequence += 1;\n }\n if (currChar == 'S' || currChar == 's') {\n String seedString = sourceString.substring(1, currIndexOfSequence - 1);\n try {\n Long seed = Long.parseLong(seedString);\n return new World(seed);\n } catch (NumberFormatException e) {\n System.out.println(\"Please type a valid world generation. \"\n + \"(One that starts wit N, contains a seed, and ends with S. \"\n + \"Note: We will have to edit this later to \"\n + \"work with the gui and not just the debugger.\");\n sourceString = \"\";\n return initWorld(currSource);\n }\n }\n }\n\n }\n throw new IllegalArgumentException(\"You are no longer able to \"\n + \"provide an input and have not provided a valid world.\");\n }", "public static void main(String[] args) {\n Game game = new Game();\n }", "public World(int width, int height, int maxRoomSize) {\r\n this.width = width;\r\n this.height = height;\r\n this.rooms = new ArrayList<>();\r\n this.characters = new ArrayList<>();\r\n this.bsp = new BSPTree(width, height, 24, maxRoomSize, 8);\r\n this.turn = 1;\r\n this.player = null;\r\n }", "public EvolutionWorld(Grid<Evolver> grid)\n {\n super(grid);\n Scanner in = new Scanner(System.in);\n System.out.println(\"What Setting? (1,2,3)\");\n setting = in.nextInt();\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public MyWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n\n //could have as many RideLines as capasity dictates\n rides = new RideLines[MAX_RIDES];\n\n currentRide=0; //initially, we have 0 prisoners\n \n //Create a Load button at the top of the screen\n load = new LoadButton();\n addObject(load, 250, 20);\n \n //Create a Merge button at the top of the screen\n MergeButton merge = new MergeButton();\n addObject(merge, 350, 20);\n \n //Create a Sort By Name button at the top of the screen\n SortByName sortName = new SortByName();\n addObject(sortName, 450, 20);\n \n //Create a Sort by queue length at the top of the screen\n SortByLength sortLength = new SortByLength();\n addObject(sortLength, 600, 20);\n \n\n }", "public GameFrame(final World world) {\n this.world = world;\n }", "public World(){\r\n locations = new Location[3][3];\r\n for(int r=0; r<3; r+=1){\r\n for(int c=0; c<3; c+=1){\r\n locations[r][c] = new EmptyLocation(new Position(r,c), \"Nothing here to see.\");\r\n }\r\n }\r\n home = locations[0][0];\r\n players = new ArrayList<Player>();\r\n }", "public Level3(Game game)\n {\n super(game);\n \n // set game var\n g = game;\n \n // set world\n world = game.getWorld();\n //set player\n player = game.getPlayer();\n // set default enemy exists state\n enemyExist = true;\n // set frame\n frame = g.getFrame();\n\n }", "public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }", "public World(int width, int height)\n {\n this(width, height, AIR_EL);\n }", "public RobotWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n prepare();\n }", "Game() {\n _randomSource = new Random();\n\n _players = new Player[2];\n _input = new BufferedReader(new InputStreamReader(System.in));\n _players[0] = new HumanPlayer(BP, this);\n _players[1] = new MachinePlayer(WP, this);\n _playing = false;\n }", "public Game() {\n }", "private Game() {}", "public GameInput() {\n keyboard = new Keyboard();\n mouse = new Mouse();\n mouseWheel = new MouseWheel();\n }", "public Game() {\n parser = new Parser();\n }", "public GameManager(){\r\n init = new Initialisation();\r\n tower=init.getTower();\r\n courtyard=init.getCourtyard();\r\n kitchen=init.getKitchen();\r\n banquetHall=init.getBanquetHall();\r\n stock=init.getStock();\r\n throneHall=init.getThroneHall();\r\n vestibule=init.getVestibule();\r\n stables=init.getStables();\r\n\r\n this.player = new Player(tower);\r\n\r\n push(new IntroductionState());\r\n\t}", "private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}", "public World getWorld(String worldName);", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "public BattleWorld(String pokemonName, int level)\r\n {\r\n wildPokemon = true;\r\n isBattleOver = false;\r\n initWorld(pokemonName, level, 0);\r\n }", "public World() {\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tItemDefinition.load();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tNPCDefinition.load();\n\t\t\t\tNPCStyle.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tDegradeSystem.init();\n\t\t\t\tProjectileManager.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tShops.loadShopFile();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tGame game = new Game();\r\n\r\n\t}", "public static void main(String args[]){\n Game game = new GameImpl(new TestFactory());\n WorldStrategy worldStrategy = new ThirdPartyWorldAdapter();\n worldStrategy.createWorld(game);\n\n // Print World as it is \"seen\" by the Game\n for ( int r = 0; r < GameConstants.WORLDSIZE; r++ ) {\n String line = \"\";\n for ( int c = 0; c < GameConstants.WORLDSIZE; c++ ) {\n String type = game.getTiles().get(new Position(r,c)).getTypeString();\n\n if (type.equals(GameConstants.OCEANS)){ line += '.';}\n if (type.equals(GameConstants.PLAINS)){ line += 'o';}\n if (type.equals(GameConstants.MOUNTAINS)){ line += 'M';}\n if (type.equals(GameConstants.FOREST)){ line += 'f';}\n if (type.equals(GameConstants.HILLS)){ line += 'h';}\n }\n System.out.println(line);\n }\n\n }", "public static void main(String[] args) {\n Game game = new Game(\"Programming 2 Project\",600,600);\n game.start();\n \n }", "public GameOfLifeTest()\n {\n }", "public OrchardGame() {\n\t\t\n\t}", "public SpacetimeCLI() {\n world = new World();\n input = new Scanner(System.in);\n jsonReader = new JsonReader(JSON_STORE);\n jsonWriter = new JsonWriter(JSON_STORE);\n runApp();\n }", "public static void main(String[] args) {\n IWorldMap mapRectangular = new RectangularMap(10,5);\n Animal cat = new Animal(mapRectangular,new Vector2d(3,4));\n System.out.println(cat);\n mapRectangular.place(new Animal(mapRectangular));\n mapRectangular.place(new Animal(mapRectangular,new Vector2d(3,4)));\n\n System.out.println(mapRectangular);\n MoveDirection[] directions = new OptionsParser().parse(args);\n mapRectangular.run(directions);\n System.out.println(mapRectangular);\n\n\n IWorldMap mapGrass = new GrassField(10);\n Animal a = new Animal(mapGrass);\n Animal b = new Animal(mapGrass,new Vector2d(3,4));\n mapGrass.place(a);\n mapGrass.place(b);\n System.out.println(mapGrass);\n mapGrass.run(directions);\n System.out.println(mapGrass);\n\n }", "public static void main(String[] args) {\n\n int gridWidth, gridHeight, humanNumber, goblinNumber, positionX, positionY, strength;\n ArrayList<Player> humanList = new ArrayList<>();\n ArrayList<Player> goblinList = new ArrayList<>();\n Scanner input = new Scanner(System.in);\n\n System.out.println(\" Welcome to Human vs. Goblin\");\n System.out.println();\n\n // Get the size of the grid\n System.out.print(\"Width of the grid (1-500): \");\n gridWidth = input.nextInt();\n if (gridWidth<1 || gridWidth>500) {\n gridWidth = 10; // In case input is wrong, set 10 as default;\n }\n\n System.out.print(\"Height of the grid (1-500): \");\n gridHeight = input.nextInt();\n if (gridHeight<1 || gridHeight>500)\n gridHeight = 10; // In case input is wrong, set 10 as default;\n\n // Init Grid\n World grid = new World(gridWidth, gridHeight);\n System.out.println();\n\n // Get the number of Players\n System.out.print(\"Number of human (0-\"+grid.getArea()+\"): \");\n humanNumber = input.nextInt();\n\n if (humanNumber<0 || humanNumber>grid.getArea()){\n humanNumber = grid.getArea()/3; // In case input is wrong, set one third as default;\n }\n\n System.out.print(\"Number of goblin (0-\"+(grid.getArea())+\"): \");\n goblinNumber = input.nextInt();\n if (goblinNumber<0 || goblinNumber>grid.getArea()){\n goblinNumber = grid.getArea()/3; // In case input is wrong, set one third as default;\n }\n\n Coordinates coordinates = new Coordinates(ThreadLocalRandom.current().nextInt(grid.getArea() -1,grid.getArea()), ThreadLocalRandom.current().nextInt(grid.getArea() -1,grid.getArea()));\n // Fill Grid with creatures\n for(int i=0;i<humanNumber;i++){\n do {\n positionX = ThreadLocalRandom.current().nextInt(0,grid.getWidth()-1);\n positionY = ThreadLocalRandom.current().nextInt(0,grid.getHeight()-1);\n strength = ThreadLocalRandom.current().nextInt(1,10);\n Human human = new Human(\"human\",strength,1, coordinates);\n humanList.add(human);\n\n } while (grid.addPlayer(positionX, positionY, humanList.get(i)));\n }\n for(int i=0;i<goblinNumber;i++){\n do {\n positionX = ThreadLocalRandom.current().nextInt(0,grid.getWidth()-1);\n positionY = ThreadLocalRandom.current().nextInt(0,grid.getHeight()-1);\n strength = ThreadLocalRandom.current().nextInt(1,10);\n Goblin goblin = new Goblin(\"goblin\",strength,1, coordinates);\n goblinList.add(goblin);\n\n } while (grid.addPlayer(positionX, positionY, goblinList.get(i)));\n }\n\n System.out.println();\n System.out.print(\"You have just created Human vs Goblin grid size of \"+grid.getSizeString()+\" \");\n System.out.println(\"with \"+humanNumber+\" humans and \"+goblinNumber+\" Goblins!\");\n System.out.println();\n Timer timer = new Timer();\n timer.schedule(new PlayGame(grid, timer),0,500);\n }", "public WorldScene makeScene() {\n // WorldCanvas c = new WorldCanvas(300, 300);\n WorldScene s = new WorldScene(this.width, this.height);\n s.placeImageXY(newImg, this.width / 2, this.height / 2);\n return s;\n }" ]
[ "0.7422492", "0.7308955", "0.7308167", "0.7140528", "0.68528557", "0.68058455", "0.67013186", "0.6616512", "0.6595882", "0.657232", "0.65693545", "0.6567727", "0.65607226", "0.65597534", "0.6526284", "0.6514749", "0.6497307", "0.6418462", "0.64043", "0.6395523", "0.63789755", "0.63379574", "0.63378584", "0.6299212", "0.62794834", "0.6277197", "0.62488055", "0.6232838", "0.622807", "0.62091607", "0.6204962", "0.62007236", "0.619226", "0.6191757", "0.61844414", "0.6175007", "0.6166276", "0.6161651", "0.6159767", "0.6142315", "0.612976", "0.6117989", "0.6112704", "0.6111542", "0.60925686", "0.6091578", "0.6088586", "0.6086829", "0.60863316", "0.60848445", "0.60848445", "0.60810417", "0.6066683", "0.6062808", "0.60603267", "0.6038631", "0.6021713", "0.60216475", "0.6018235", "0.6018235", "0.6018235", "0.60171175", "0.60060453", "0.6003044", "0.5995945", "0.5968458", "0.5960534", "0.59545785", "0.59280074", "0.59200984", "0.5919993", "0.5918619", "0.5910623", "0.59061265", "0.5905173", "0.59047824", "0.5895353", "0.58863604", "0.5879386", "0.5875117", "0.58715385", "0.5871511", "0.587139", "0.58581644", "0.58544576", "0.5826757", "0.58248127", "0.5824219", "0.5817058", "0.581686", "0.5816783", "0.581503", "0.5808135", "0.57978183", "0.5788894", "0.5786431", "0.5783713", "0.57803863", "0.57781947", "0.5773909" ]
0.61115587
43
print all objects in the GameObject ArrayList
void printObjects(){ Iterator iterator = gc.getIterator(); while(iterator.hasNext()){ GameObject g = iterator.getNext(); if (!(g instanceof Bar))System.out.println(g.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printObjectList(){\n\t\tfor (int i = 0; i < gameObjectsList.size(); i++){\n\t\t\tSystem.out.println(i + \", \" + gameObjectsList.get(i).getCategory() + \" : Type:\" + gameObjectsList.get(i).getObjecttype() + \" X:\" + gameObjectsList.get(i).getX() + \" Y:\" + gameObjectsList.get(i).getY());\n\t\t}\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor(GameObject object : this.objects) {\r\n\t\t\tsb.append(object.toString() + \"\\n\");\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public void map() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tSystem.out.println(object);\n\t}", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void printAll(){\n for (Triangle triangle : triangles) {\n System.out.println(triangle.toString());\n }\n for (Circle circle : circles) {\n System.out.println(circle.toString());\n }\n for (Rectangle rectangle : rectangles) {\n System.out.println(rectangle.toString());\n }\n }", "public void display(){\r\n for(Card c: cards){\r\n System.out.println(c);\r\n }\r\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "public void dump() {\n for(Object object : results) {\n System.out.println( object );\n }\n }", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "public void printDogs(){\n System.out.println(\"Here are the dogs in the shelter:\");\n for(Dog d : dogs){\n d.printInfo();\n }\n }", "public void printWorld()\n\t{\n\t\tSystem.out.println(\"***********************World Info*************************\");\n\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < gameObj[i].size(); j++)\n\t\t\t\tSystem.out.println(gameObj[i].get(j).toString());\n\t\t}\n\t\tSystem.out.println(\"***********************World Info*************************\");\n\t}", "@Override\r\n public String toString() {\r\n String result = \"\";\r\n\r\n // Convert each sprite in each ArrayList to its string representation, then print it out.\r\n for (ArrayList<T> list : new ArrayList<ArrayList<T>>()) {\r\n for (T sprite : list) {\r\n result += sprite.toString();\r\n }\r\n result += \"\\n\";\r\n }\r\n\r\n return result;\r\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public void print() {\n for (int i = 0; i < size; i++)\n System.out.print(elements[i] + \" \");\n System.out.println();\n }", "public static void recap(ArrayList<Player> playerList){\n for (int i = 0; i < playerList.size();i++){\n System.out.println(\"Player \" + i + \" found \" + playerList.get(i).getNumEggs() + \" eggs\");\n playerList.get(i).printBasket();\n System.out.println();\n } \n }", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "public void showVehicles() {\n\t\tfor (Vehicle vehicle : vehicles) {\n\t\t\tSystem.out.println(vehicle);\n\t\t}\n\t}", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "public void printItems() {\n for (Item item1 : items) {\n System.out.println(item1.toString());\n }\n }", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "public <T extends Object> void showAll(List<T> theList){\n theList.forEach(System.out::println);\n }", "@Override\r\n public String toString(){\n \r\n for(Player player: players){\r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(player.toString());\r\n }\r\n return \"\";\r\n }", "public void outputVisualObjects ()\n\t{\n\t\toutput (\"\\n> (visual-objects)\\n\");\n\t\tif (model!=null) model.outputVisualObjects();\n\t}", "public void afficheInfos() {\n int i;\n Polygone p;\n for(i=0;i<this.list.size();i++){\n p = (Polygone) this.list.get(i);\n System.out.println(\"–––––––––––––––––––––\");\n System.out.println(\"Type : \" + p.toString());\n System.out.println(\"Sommet :\");\n System.out.print(p.texteSommets());\n System.out.println(\"Perimetre : \" + p.perimetre());\n System.out.println(\"Surface : \" + p.surface());\n System.out.println(\"–––––––––––––––––––––\");\n } \n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public void printItems();", "public void print() {\n System.out.println(\"**List of books in the library.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }", "public void print() {\r\n\t\tSystem.out.print(\"|\");\r\n\t\t//loop executes until all elements of the list are printed\r\n\t\tfor (int i=0;i<capacity;i++) {\r\n\t\t\tSystem.out.print(list[i]+\" |\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "private void displayEntity(ArrayList<Entity> entities){\n for(Entity entity : entities)\n entity.printImage();\n }", "public void printElements() {\r\n for (int i = 0; i < pageList.size(); i++) {\r\n System.out.println(i + \" : \" + pageList.get(i));\r\n }\r\n }", "void printList();", "public void displayAll(){\n System.out.println(\"guestCounter: \" + guestCounter);\n for(int i=0;i<guestCounter;i++){\n guest[i].dispGuest();\n }\n }", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}", "public List<GameObject> getObjects () {\n\t\treturn objects;\n\t}", "void showcards() {\n \tfor(String card: mycards){\n \t\tSystem.out.println(\"My card is \" + card);\n \t\t}\n\t}", "private void printList(ArrayList<String> allSongs) {\n int i=1;\n for(String s : allSongs){\n System.out.println((i++)+\". \"+s);\n }\n }", "public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}", "public void printItems()\n {\n if (getItems().size()==0){\n System.out.println(\"There are no items in this room.\");\n }\n else{\n System.out.print(\"The item(s) in this room are: \");\n int i=0;\n while(i<getItems().size()){\n if(i<getItems().size()-1){\n System.out.print(getItems().get(i).getName()+\", \");\n }\n else{\n System.out.println(getItems().get(i).getName()+\".\");\n }\n i++;\n }\n }\n }", "public void printHeroes(List<Hero> list,HeroClass heroClass) {\n\t\tSystem.out.println(heroClass.toString() + \" List\");\n\t\tprintHeroes(list);\n\t\t\n\t}", "void printBook()\r\n\t{\r\n\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tthis.get(i).printContact();\r\n\t\t}\r\n\t}", "public static void dump(List<Object[]> list) {\n\t\tif (list == null) return;\n\t\tint total = 0; int hits=0;\n\t\tfor (Object[] o : list) {\n\t\t\tboolean hit =Ciphers.realHomophone(\"\"+o[1]);\n\t\t\tif (hit) hits++;\n\t\t\tSystem.out.println(o[0] + \", \" + o[1] + \", \" + o[2] + (hit ? \" HIT \" : \" MISS \"));\n\t\t\ttotal += (Integer) o[0]; \n\t\t}\n\t\tSystem.out.println(\"Total: \" + total + \", hits \" + hits + \" ratio \" + (float)hits/list.size());\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}", "private void paintAllObjects()\n {\n for (int i = 0; i < allObjects.size(); i++)\n {\n JComponent c = (JComponent) allObjects.get(i);\n\n c.setBackground(backgroundColor);\n c.setForeground(foregroundColor);\n }\n }", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public static void showAll(List<? super Number> list) {\n\t\tfor(Object obj : list)\n\t\t\tSystem.out.println(obj);\n\t}", "public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }", "public void print() {\r\n\t\tObject tmp[] = piece.values().toArray();\r\n\t\tfor (int i = 0; i < piece.size(); i++) {\r\n\t\t\tChessPiece p = (ChessPiece)tmp[i];\r\n\t\t\tSystem.out.println(i + \" \" + p.chessPlayer + \":\" + p.position + \" \" + p.isEnabled());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(body.countComponents());\r\n\t}", "private static void printGridletList(GridletList list, String name)\r\n {\r\n int size = list.size();\r\n Gridlet gridlet = null;\r\n\r\n String indent = \" \";\r\n System.out.println();\r\n System.out.println(\"============= OUTPUT for \" + name + \" ==========\");\r\n System.out.println(\"Gridlet ID\" + indent + \"getResourceID\" + \"STATUS\" + indent +\r\n \"Resource ID\" + \" getGridletLength getGridletFileSize getGridletOutputSize getGridletOutputSize getSubmissionTime getWaitingTime getWallClockTime getExecStartTime\");\r\n\r\n // a loop to print the overall result\r\n int i = 0;\r\n for (i = 0; i < size; i++)\r\n {\r\n gridlet = (Gridlet) list.get(i);\r\n printGridlet(gridlet);\r\n \r\n\r\n System.out.println();\r\n }\r\n }", "public void printAllStages() {\n printIndex();\n printRemoval();\n }", "public void printAll() {\n\t\tSystem.out.println(mainPot);\n\t\tcurrentPlayer.printHandAndPocket();\n\t\tcurrentPlayer.printCombos();\n\t\topponentPlayer.printCombos();\n\t\tSystem.out.println();\n\t}", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "private void printAllOwners(ArrayList<String> ownerList){\n for(int i = 0; i < ownerList.size(); i++){\n System.out.println(ownerList.get(i));\n }\n }", "public void printAllPlayerHands(){\n\t\tfor(int i = 0 ; i < this.players.length; i++){\n\t\t\tplayers[i].printPlayerHand();\t\t \n\t\t}\t\n\t}", "public void printList(){\n myList.forEach(System.out::println);\n }", "public void printCoordinates ()\n\t{\n\t\tfor (int a = 0; a < object.size(); a++)\n\t\t{\n\t\t\tSystem.out.println(\"Polygon \" + (a+1) + \":\");\n\t\t\tobject.get(a).detailedPrint();\n\t\t\tSystem.out.println(\"**********\");\n\t\t}\n\t}", "public void showCards() {\n\t\tfor(int i=0;i<cards.size();i++) {\n\t\t\tSystem.out.println(cards.get(i).toString());\n\t\t}\n\t}", "public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public void print() {\n\t\tif (cs213.isEmpty()) {\n\t\t\tSystem.out.println(\"List is empty!\");\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tcs213.print();\n\t\t}\n\t\treturn;\n\t\t}", "static void printListOfWeapons(List<WeaponLM> weapons){\n for(WeaponLM weapon : weapons){\n System.out.print(weapon.getName());\n if(weapons.indexOf(weapon) != weapons.size()-1){\n System.out.print(\", \");\n }\n }\n }", "public static void mostrarVehiculos() {\n for (Vehiculo elemento : vehiculos) {\n System.out.println(elemento);\n }\n\t}", "public static void print()\n {\n ProductGUI.Display(\"\\n\");\n for(Product element: productList)\n {\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }", "public static void carlist() {\n Cars xx = new Cars();\n System.out.println(\"You have \" + String.valueOf(listcars.size())+ \" cars\");\n System.out.println(\"List of all your cars \");\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n System.out.println(xx.getBrand()+ \" \"+ xx.getModel()+ \" \"+ xx.getReference()+ \" \"+ xx.getYear()+ \" \");\n }\n }", "void print() {\t\r\n\t\tIterator<Elemento> e = t.iterator();\r\n\t\twhile(e.hasNext())\r\n\t\t\te.next().print();\r\n\t}", "public void Print() {\r\n\t\tfor(Cell2048[] a : game) {\r\n\t\t\tfor(Cell2048 b : a) {\r\n\t\t\t\tSystem.out.print(b.getValue() + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"score : \"+ score);\r\n\t}", "public String printAllInventory(){\r\n\r\n String returnString = \"Items:\";\r\n for(Item item : playerItem){\r\n returnString += \" \" + item.getName(); \r\n }\r\n return returnString;\r\n }", "public void printList() {\n\t\t//to sort list by name\n\t\tCollections.sort(list, (Contact c1, Contact c2) -> c1.getName().compareTo(c2.getName()));\n\t\t\n\t\tSystem.out.println(\"-----Contact list-----\");\n\t\tfor (Contact contact : list) {\n\t\t\tSystem.out.println(contact);\n\t\t}\n\t}", "public void printResults() {\n getUtl().getOutput().add(\"~~ Results ~~\\n\");\n for (int i = 0; i < getHeroes().size(); i++) {\n if (getHeroes().get(i).isDead()) {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" dead\\n\");\n } else {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" \"\n + getHeroes().get(i).getLevel() + \" \"\n + getHeroes().get(i).getXp() + \" \"\n + getHeroes().get(i).getHp() + \" \"\n + getHeroes().get(i).getPosX() + \" \"\n + getHeroes().get(i).getPosY() + \"\\n\");\n }\n }\n // Write output to given outputPath.\n getGameFileWriter().write(getUtl().getOutput());\n for (int i = 0; i < getUtl().getOutput().size(); i++) {\n // Write output to console as well.\n System.out.print(getUtl().getOutput().get(i));\n }\n }", "public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}", "public void print() {\r\n\t\tint size = list.size();\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"┌───────────────────────────┐\");\r\n\t\tSystem.out.println(\"│ \t\t\t성적 출력 \t\t │\");\r\n\t\tSystem.out.println(\"└───────────────────────────┘\");\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\r\n\t\t\tExam exam = list.get(i);\r\n\t\t\tint kor = exam.getKor();\r\n\t\t\tint eng = exam.getEng();\r\n\t\t\tint math = exam.getMath();\r\n\r\n\t\t\tint total = exam.total();// kor + eng + math;\r\n\t\t\tfloat avg = exam.avg();// total / 3.0f;\r\n\t\t\tSystem.out.printf(\"성적%d > 국어:%d, 영어:%d, 수학:%d\", i + 1, kor, eng, math);\r\n\t\t\tonPrint(exam);\r\n\t\t\tSystem.out.printf(\"총점:%d, 평균:%.4f\\n\", total, avg);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"─────────────────────────────\");\r\n\r\n\t}", "public void printHeroes(List<Hero> list) {\n\t\tSystem.out.println(\"ID\\tName\\t\\t\\tLevel\\tHP\\tMana\\tStrength\\tDefense\\t\\tAgility\\t\\tDex\\tMoney\\tExp\");\n\t\tSystem.out.println(\"===================================================================================================================\");\n\t\tint id = 1;\n\t\tfor(Hero h : list) {\n\t\t\n\t\t\tSystem.out.printf(id++ + \"\\t\" + h.getName());\n\t\t\tfor(int i = 0; i < 24-h.getName().length(); i++) {\n\t\t\t\tSystem.out.printf(\" \");\n\t\t\t}\n\t\t\tSystem.out.printf(h.getLevel() + \"\\t\" + h.getHp() + \"\\t\" + h.getMana() + \"\\t\"+ h.getStrength() + \"\\t\\t\" \n\t\t\t\t\t+ h.getDefense() + \"\\t\\t\"\n\t\t\t\t\t+ h.getAgility()\n\t\t\t\t\t+ \"\\t\\t\" + h.getDexterity() + \"\\t\" + h.getWallet().toString() + \"\\t\"+ h.getExp());\n\t\t\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void printStudents()\n {\n for(Student s : students)\n System.out.println(s);\n }", "public void printAllScenes() {\r\n\t\tList <Scene> allScenes = handlerBridge.loadScenes();\r\n\t\tfor (Scene scene : allScenes) {\r\n\t\t\tSystem.out.print(\"Name: \" + scene.getName());\r\n\t\t\tSystem.out.println(\" - Ident: \" + scene.getIdentifier());\r\n\t\t}\r\n\t}", "public void printGodList(List<God> gods){\n int counter = 1;\n for(God god : gods){\n System.out.println(counter+\") \"+god.toString());\n counter++;\n }\n }", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public void printAllPlayerStats(List<Player> players);", "public ArrayList<String> getObjects(){\n ArrayList<String> objs = new ArrayList<>();\n for (int i = 0; i < field.length; i++){\n objs.add(\"Asteroid\");\n }\n return objs;\n }", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "public void printAll() {\n // Sort them by parent for ease of analysis\n // copy it so that we don't mess with the actual pop\n ArrayList<Bacteria> temp = (ArrayList<Bacteria>) inds.clone();\n Collections.sort(temp, new Comparator<Bacteria>() {\n @Override\n public int compare(Bacteria o1, Bacteria o2) {\n if (o1.getParentID() > o2.getParentID()) return 1;\n else if (o1.getParentID() == o2.getParentID()) return 0;\n else return -1;\n }\n });\n\t\tSystem.out.println(\"Bacteria population:\");\n for (int i=0; i < getPopSize(); i++) {\n temp.get(i).print();\n }\n System.out.println();\n\t}", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "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}", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "public void objectIntialization(ArrayList<GameObject> gameobject)\r\n {\r\n\r\n }", "public void printMyCards() {\n System.out.print(String.format(\"%c[%d;%dfPlayer : %s\", escCode, 29, 1, getName()));// print the name\n ArrayList<Card> myCards = getMyCards();\n Iterator<Card> it = myCards.iterator();\n\n for (int i = 1; it.hasNext(); i++) { // print the cards in order\n Card tempCard = it.next();\n int x = 30;\n if (i > 10) {\n x = 40;// to go to the next line\n }\n System.out.printf(\"%c[0m\", escCode);\n tempCard.visiblePrint(x, i, \"\", i);\n System.out.printf(\"%c[0m\", escCode);\n }\n }", "public void print() {\r\n Person tmp = saf.get(0);\r\n System.out.println(\"Person name : \" + tmp.getName() +\r\n \" Entering time : \" + tmp.getTime() +\r\n \" Waiting time : \" + tmp.getExitTime());\r\n }", "private void listToString() {\n textList.clear();\n for (int x = 0; x < party.size(); x++) {\n Agent thisAgent = party.getMember(x);\n Statistics thisAgentStats = thisAgent.getStats();\n textList.add(thisAgent.getName());\n textList.add(\"HP:\" + thisAgentStats.getCurrentHP() + \"/\" + thisAgentStats.getMaxHP() + \" MP:\" + thisAgentStats.getCurrentMP() + \"/\" + thisAgentStats.getMaxMP());\n }\n }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "public static void print(ArrayList<Course> list) {\r\n\r\n\t\tif (list.isEmpty()) {\r\n\t\t\tSystem.out.println(\"Your Course list is empty :( \");\r\n\t\t}\r\n\r\n\t\tfor (Course course : list) {\r\n\t\t\tSystem.out.println(course.numberOfStudents + \" \" + course.courseName + \" \" + course.courseLecturer + \" \");\r\n\t\t}\r\n\t}" ]
[ "0.824158", "0.72368497", "0.7061916", "0.6722768", "0.65281904", "0.6447576", "0.6438541", "0.6409196", "0.6404059", "0.6335005", "0.63188577", "0.62364155", "0.6223942", "0.6213919", "0.6202227", "0.6175218", "0.6160609", "0.6157406", "0.6148928", "0.61349475", "0.61305434", "0.6125922", "0.61185133", "0.61136556", "0.6095888", "0.60905635", "0.6090268", "0.60833293", "0.60830325", "0.6079426", "0.6076575", "0.6067052", "0.6062355", "0.6054183", "0.60467315", "0.6033403", "0.5997408", "0.5994192", "0.59806913", "0.59748703", "0.5973433", "0.59593266", "0.5949948", "0.59440553", "0.5931547", "0.59212", "0.59141666", "0.5914068", "0.5910479", "0.5880198", "0.5874213", "0.58715373", "0.5859115", "0.58457565", "0.58387583", "0.5834321", "0.58197266", "0.5806681", "0.5805897", "0.5797897", "0.5777851", "0.5772738", "0.577042", "0.5770412", "0.5769608", "0.5767781", "0.5766934", "0.57657486", "0.5762536", "0.57565933", "0.5754015", "0.57489383", "0.574876", "0.57443714", "0.5740972", "0.5740465", "0.57312775", "0.5730354", "0.5727982", "0.572739", "0.57220364", "0.57214195", "0.57204473", "0.570048", "0.5700479", "0.56973433", "0.56972754", "0.5696452", "0.5696022", "0.5690676", "0.5689657", "0.56864136", "0.56768066", "0.5672684", "0.56714916", "0.5667865", "0.56677413", "0.56652355", "0.5664723", "0.5661769" ]
0.7831425
1
methods to find, grow and create baby fish from parent fish
Fish findFish(){ //step through GameCollection using iterator to find first instance of a fish Iterator iterator = gc.getIterator(); while(iterator.hasNext()){ GameObject g = iterator.getNext(); if (g instanceof Fish)return (Fish)g; } return nullFish; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Animal newChild() {\n return new Fox(0);\n }", "public BGStem rule(BGStem stem) {\n\t\t\n\t\t// Get node coordinates\n\t\tArrayList <Double> node = new ArrayList<Double>();\n\t\tnode = branch(stem);\n\t\t\n\t\t// add different child stems according to the rule\n\t\tswitch(rule) {\n\t\t\n\t\tcase 1:\n\t\t\t\n\t\t\t// Create child stem instances\n\t\t\tBGStem stm1 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() - radians, stem.getDepth() + 1);\n\t\t\tBGStem stm2 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() + radians, stem.getDepth() + 1);\n\t\t\t\n\t\t\t// Set corresponding rule\n\t\t\tstm1.setRule(1);\n\t\t\tstm2.setRule(1);\n\t\t\t\n\t\t\t// Add child stems to parent stem's childList\n\t\t\tstem.getChildlist().add(stm1);\n\t\t\tstem.getChildlist().add(stm2);\n//\t\t\tSystem.out.println(\"growing 2 child stems\");\n\t\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tBGStem stm3 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() - radians, stem.getDepth() + 1);\n\t\t\tBGStem stm4= new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection(), stem.getDepth() + 1);\n\t\t\tBGStem stm5 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() + radians, stem.getDepth() + 1);\n\t\t\t\n\t\t\tstm3.setRule(2);\n\t\t\tstm4.setRule(2);\n\t\t\tstm4.setRule(2);\n\t\t\t\n\t\t\tstem.getChildlist().add(stm3);\n\t\t\tstem.getChildlist().add(stm4);\n\t\t\tstem.getChildlist().add(stm5);\n//\t\t\tSystem.out.println(\"growing 3 child stems\");\n\t\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t\t\n\t\t\tBGStem stm6 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() - radians, stem.getDepth() + 1);\n\t\t\tBGStem stm7 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() - radians*2, stem.getDepth() + 1);\n\t\t\tBGStem stm8 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() + radians, stem.getDepth() + 1);\n\t\t\tBGStem stm9 = new BGStem(node.get(0), node.get(1), stem.getLength()*0.66, stem.getDirection() + radians*2, stem.getDepth() + 1);\n\t\t\t\n\t\t\tstm6.setRule(3);\n\t\t\tstm7.setRule(3);\n\t\t\tstm8.setRule(3);\n\t\t\tstm9.setRule(3);\n\t\t\t\n\t\t\tstem.getChildlist().add(stm6);\n\t\t\tstem.getChildlist().add(stm7);\n\t\t\tstem.getChildlist().add(stm8);\n\t\t\tstem.getChildlist().add(stm9);\n//\t\t\tSystem.out.println(\"growing 4 child stems\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn stem;\n\t}", "private Persons createFather(Persons child, String spouse)\n {\n Persons dad = new Persons();\n dad.setPersonFirstName(nameGenerator.generateMaleName());\n dad.setPersonGender(\"m\");\n dad.setPersonSpouseID(spouse);\n dad.setDescendantID(userName);\n\n if (child.getPersonGender().equals(\"m\")) {\n dad.setPersonLastName(child.getPersonLastName());\n }\n else {\n dad.setPersonLastName(nameGenerator.generateLastName());\n }\n\n return dad;\n }", "private void grow() {\n\t\tif (_growthRatio > 1 && (_age & 0x07) == 0x07 && alive && _energy >= _mass/10) {\n\t\t\t_growthRatio--;\n\t\t\tdouble m = _mass;\n\t\t\tdouble I = _I;\n\t\t\tsymmetric();\n\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\tdx *= m;\n\t\t\tdy *= m;\n\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\thasGrown = 1;\n\t\t} else {\n\t\t\tif (_growthRatio < 15 && _energy < _mass/12) {\n\t\t\t\t_growthRatio++;\n\t\t\t\tdouble m = _mass;\n\t\t\t\tdouble I = _I;\n\t\t\t\tsymmetric();\n\t\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\t\tdx *= m;\n\t\t\t\tdy *= m;\n\t\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\t\thasGrown = -1;\n\t\t\t} else\n\t\t\t\thasGrown = 0;\n\t\t}\n\t}", "public abstract void grow();", "public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }", "public int spawn() {\n int totalNumOfFryBorn = 0;\n Iterator<Guppy> it = guppiesInPool.iterator();\n ArrayList<Guppy> currentBabies = new ArrayList<>();\n\n while (it.hasNext()) {\n Guppy mother = it.next();\n ArrayList<Guppy> newBabies = mother.spawn();\n if (newBabies != null) {\n totalNumOfFryBorn += newBabies.size();\n currentBabies.addAll(newBabies);\n }\n }\n guppiesInPool.addAll(currentBabies);\n return totalNumOfFryBorn;\n }", "public static void breedAll() {\n int a, b; //Pointers to select parents\n\n //While loop to ensure full carrying capacity of population\n while (Population.size() <= maxPop) {\n //Sorts by Fitness level first\n sortByFitlvl();\n\n //Selects Two Random Parents\n a = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n b = (int) (Math.abs(Utilities.sharpGauss(4)) * Population.size());\n //System.out.println(a+\"\\t\"+b+\"\\t\"+Population.size());\n\n // Between 1-2 children\n int children = rand.nextInt(2)+1;\n for (int i = 0; i < children; i++) {\n Population.add(Breeder.breed(Population.get(a), Population.get(b), 0.1));\n }\n\n //sortByFitlvl();\n }\n\n if (debug)\n printPopulation(true);\n }", "private void add_family_tree(String personName, String motherName, String fatherName) {\n\n Person p = getPerson(personName);\n if (!motherName.equals(\"Not known\")) {\n Person mother = getPerson(motherName);\n\n if(mother == null){\n System.out.println(\"Wrong input for mother\");\n System.exit(1);\n }\n\n p.setMother(mother);\n mother.addChildren(p);\n } else\n p.setMother(new Person(\"Not known\", \"Not known\"));\n\n if (!fatherName.equals(\"Not known\")) {\n Person father = getPerson(fatherName);\n\n if(father == null){\n System.out.println(\"Wrong input for father\");\n System.exit(1);\n }\n\n p.setFather(father);\n father.addChildren(p);\n }else\n p.setFather(new Person(\"Not known\", \"Not known\"));\n }", "@Override\n\tpublic EntityAgeable createChild(EntityAgeable mate) {\n\t\treturn getReproductionHelper().createChild(mate);\n\t}", "public void growLayerDynamic(BGStem stem) {\t\t\n\t\t\n\t\t// Search\n\t\tfor (BGStem stems: stem.getChildlist()) {\n\t\t\t\n\t\t\t// if deepest stem, add child stems\n\t\t\tif (stems.getChildlist().isEmpty())\n\t\t\t\taddChildStemDynamic(stems);\n\t\t\t\n\t\t\t// else put into recursion\n\t\t\telse\n\t\t\t\tgrowLayerDynamic(stems);\n\t\t}\n\t}", "Habit createHabit(Habit habit);", "public ArrayList<Guppy> spawn() {\n if (!this.isFemale) { return null; }\n if (this.ageInWeeks < MINIMUM_SPAWNING_AGE) { return null; }\n if (Double.compare(this.randomNumberGenerator.nextDouble(), SPAWN_CHANCE) > 0) { return null; }\n\n ArrayList<Guppy> babyGuppies = new ArrayList<>();\n int babiesAmount = this.randomNumberGenerator.nextInt(MAX_BABIES_SPAWN_AMOUNT + 1);\n for (int i = 0; i < babiesAmount; i++) {\n babyGuppies.add(new Guppy(this.genus,\n this.species,\n 0,\n this.randomNumberGenerator.nextBoolean(),\n this.generationNumber + 1,\n (this.healthCoefficient + 1) / 2));\n }\n return babyGuppies;\n }", "private void fuck(int x, int y) {\n\t\tFish son = new Fish(x, y, this.environment, this.appConfig, this.scheduler);\n\t\tson.color = Color.YELLOW; // yellow when fish is a newborn\n\t\tthis.environment.addAgent(son, x, y);\n\t\tthis.scheduler.birth(son);\n\t\tthis.breedTime = this.appConfig.getFishBreedTime(); // reset breed time\n\t}", "private int insertForciblyIntoPopulation(Individual new_child) {\n int position = insertIntoPopulation(new_child);\n if( position == population_size) {\n population[population_size - 1] = new_child;\n position = population_size - 1;\n }\n return position;\n }", "private MushroomType getMushroomTypeMixFromParents(MushroomSheepEntity father, MushroomSheepEntity mother) {\n if (father.getRandom().nextBoolean()) {\n return father.getMushroomType();\n } else {\n return mother.getMushroomType();\n }\n }", "public void addPatty() {\n\t\tMyStack newBurger = new MyStack();\n\t\tif (pattyCount < MAX_PATTY) {\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString top = (String) myBurger.peek();\n\t\t\t\tif (pattyCount > 0) {\n\t\t\t\t\tif (top.equals(\"Cheddar\") || top.equals(\"Mozzarella\") || top.equals(\"Pepperjack\")\t\n\t\t\t\t\t\t\t|| top.equals(\"Beef\") || top.equals(\"Chicken\") || top.equals(\"Veggie\")) {\t\n\t\t\t\t\t\tnewBurger.push(\"Beef\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\n\t\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\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\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\t\n\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else if (pattyCount == 0) {\n\t\t\t\t\tif (top.equals(\"Mushrooms\") || top.equals(\"Mustard\") || top.equals(\"Ketchup\")\n\t\t\t\t\t\t\t|| top.equals(\"Bottom Bun\")) {\n\t\t\t\t\t\tnewBurger.push(\"Beef\");\n\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\tnewBurger.push(ingredient);\n\t\t\t}\n\t\t\twhile (newBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) newBurger.pop();\n\t\t\t\tmyBurger.push(ingredient);\n\t\t\t}\n\t\t\tpattyCount++;\n\t\t} else {\n\t\t\tSystem.out.println(\"cant add anymore patties\");\n\t\t}\n\t}", "Genome chooseParent();", "public void checkGrowth() {\n if (age == 100) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Sprout(gc, x, y, h);\n }\n if (age == 200) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Bud(gc, x, y, h);\n }\n if (age == 300) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Blossom(gc, x, y, h);\n }\n if (age == 400) {\n double h = ((Growable)delegate).currentHealth;\n delegate = new Bloom(gc, x, y, h);\n }\n if (age == 500) {\n delegate = new Seed(gc, x, y);\n age = 0;\n GameManager.score += 100;\n }\n\n if (getCurrentHealth() <= 0) {\n delegate = new Seed(gc, x, y);\n GameManager.lives--;\n }\n delegate.wilt();\n delegate.update();\n }", "public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "Sheep(int health,int stomach,boolean movement,boolean child,boolean gender){\r\n super(health,stomach,movement,child,gender);\r\n \r\n }", "private Vector2d generateNewPositionForChild()\n {\n\n Random generator = new Random();\n List<Vector2d> freePositions = new LinkedList<>(); //tutaj przechowywane sa wolne pozycje wokol\n Vector2d position;\n Directions directionToAdd;\n\n for(int i = 0; i<8; i++)\n {\n directionToAdd = new Directions(i); //wykorzystujemy klase directions do generowania pozycji wokol\n position = this.position.add(directionToAdd.move());\n if(map.animalsAt(position).isEmpty())\n {\n freePositions.add(position);\n }\n }\n\n if(freePositions.isEmpty()) //jezeli nie ma wolnych pozycji\n {\n //jesli nie ma wolnych pozycji\n int x = generator.nextInt(8);\n directionToAdd = new Directions(x);\n return this.position.add(directionToAdd.move());\n }\n\n //jezeli mamy wolne pozycje to generujemy dowolna z listy\n int x = generator.nextInt(freePositions.size());\n Vector2d newPosition = freePositions.get(x);\n\n return newPosition;\n }", "public void grow(Grid[][] map) {\n\t\tBranchNode parent = root;\r\n\t\twhile (parent.children.size() > 0) {\r\n\t\t\tif (parent.children.size() >= max_branch_per_node) {\r\n\t\t\t\t// if no more room at this branch\r\n\t\t\t\tparent = parent.children\r\n\t\t\t\t\t\t.get((int) (Math.random() * parent.children.size()));\r\n\t\t\t} else if (Math.random() < 0.5) {\r\n\t\t\t\t// if there is still room, picks randomly\r\n\t\t\t\tparent = parent.children\r\n\t\t\t\t\t\t.get((int) (Math.random() * parent.children.size()));\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint newX, newY; // X and Y coordinates for the new node.\r\n\t\tint r = (int) (Math.random() * GENE_TOTAL);\r\n\t\tint gene_count = width_gene[0];\r\n\t\tint width_select = 0;\r\n\t\twhile (r > gene_count) {\r\n\t\t\twidth_select += 1;\r\n\t\t\tgene_count += width_gene[width_select];\r\n\t\t}\r\n\t\tr = (int) (Math.random() * WIDTH_VARIATION);\r\n\t\tnewX = parent.x - WIDTH_VARIATION / 2 + (width_select - 2)\r\n\t\t\t\t* WIDTH_VARIATION + r;\r\n\t\tif (newX < 0) {// if goes off the grid, push back.\r\n\t\t\tnewX = 0;\r\n\t\t} else if (newX >= World.WORLD_WIDTH) {\r\n\t\t\tnewX = World.WORLD_WIDTH - 1;\r\n\t\t}\r\n\r\n\t\tr = (int) (Math.random() * GENE_TOTAL);\r\n\t\tgene_count = height_gene[0];\r\n\t\tint height_select = 0;\r\n\t\twhile (r > gene_count) {\r\n\t\t\theight_select += 1;\r\n\t\t\tgene_count += height_gene[height_select];\r\n\t\t}\r\n\t\tr = (int) (Math.random() * HEIGHT_VARIATION);\r\n\t\tnewY = parent.y + height_select * HEIGHT_VARIATION + r;\r\n\t\tif (newY >= World.WORLD_HEIGHT) {\r\n\t\t\tnewY = World.WORLD_HEIGHT - 1;\r\n\t\t}\r\n\r\n\t\t// add the branch to the total body.\r\n\t\tamount_of_tree += (int) Math.sqrt((newX - parent.x) * (newX - parent.x)\r\n\t\t\t\t+ (newY - parent.y) * (newY - parent.y));\r\n\t\tBranchNode child = new BranchNode(parent, newX, newY);\r\n\t\tparent.children.add(child);\r\n\r\n\t\tif (parent.leaf_alive) {\r\n\t\t\t// kill leaf, because branch is growing off of it\r\n\t\t\tparent.killLeaf(this, map);\r\n\t\t}\r\n\r\n\t\t// make new leaf on new branch\r\n\t\tchild.addLeaf(this, map);\r\n\t}", "public boolean inherit(Organism parent, boolean first) {\n\t\tGeneticCode inheritGeneticCode;\n\t\tboolean ok = true;\n\t\t\n\t\t// Create the inherited genetic code\n\t\tif (parent._infectedGeneticCode != null) {\n\t\t\tinheritGeneticCode = parent._infectedGeneticCode;\n\t\t // Add 1 to the generation number\n\t\t _generation = parent.getInfectedGeneration() + 1;\n\t\t} else {\n\t\t\tinheritGeneticCode = parent._geneticCode;\n\t\t // Add 1 to the generation number\n\t\t\t_generation = parent.getGeneration() + 1;\n\t\t}\n\t\t_geneticCode = new GeneticCode(inheritGeneticCode);\n\t\t// Take a reference to the parent\n\t\t_parentID = parent.getID();\n\t\t_growthRatio = 16;\n\t\t// Initial energy: minimum energy required to reproduce is divided\n\t\t// between all children and the parent.\n\t\tif ((parent._geneticCode.getSelfish()) && (parent._infectedGeneticCode == null)) {\n\t\t _energy = Math.min(((inheritGeneticCode._reproduceEnergy / 2) / (double)parent._nChildren), parent._energy);\n\t\t} else if ((parent._indigo > 0) && (parent._infectedGeneticCode != null)) {\n\t\t\tif (parent._geneticCode.getSymmetry() != 3) {\n\t\t\tif ((parent._isjade) && (!parent._isaconsumer) && (inheritGeneticCode._reproduceEnergy > parent._geneticCode._reproduceEnergy)) {\n\t\t\t_energy = Math.min(((parent._geneticCode._reproduceEnergy / ((parent._indigo/(Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t} else {\n\t\t\t_energy = Math.min(((inheritGeneticCode._reproduceEnergy / ((parent._indigo/(Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t}\n\t\t\t} else {\n\t\t\tif ((parent._isjade) && (!parent._isaconsumer) && (inheritGeneticCode._reproduceEnergy > parent._geneticCode._reproduceEnergy)) {\n\t\t\t_energy = Math.min(((parent._geneticCode._reproduceEnergy / ((parent._indigo/(1.5*Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t} else {\n\t\t\t_energy = Math.min(((inheritGeneticCode._reproduceEnergy / ((parent._indigo/(1.5*Utils.INDIGO_DIVISOR)) + 1)) / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ((parent._isjade) && (!parent._isaconsumer) && (inheritGeneticCode._reproduceEnergy > parent._geneticCode._reproduceEnergy)) {\n\t\t\t_energy = Math.min((parent._geneticCode._reproduceEnergy / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t} else {\n\t\t _energy = Math.min((inheritGeneticCode._reproduceEnergy / (double)(parent._nChildren + 1)), parent._energy);\n\t\t\t}\n\t\t}\n\t\tif (first || parent._energy >= _energy+Utils.YELLOW_ENERGY_CONSUMPTION) {\n\t\t\t// Initialize\n\t\t\tcreate();\n\t\t\tsymmetric();\n\t\t\t// Put it in the world, near its parent\n\t\t\tok = placeNear(parent);\n\t\t\tif (ok && !first)\n\t\t\t\tparent.useEnergy(Utils.YELLOW_ENERGY_CONSUMPTION);\n\t\t} else\n\t\t\tok = false;\n\t\t\n\t\treturn ok;\n\t}", "public void buildPathes() {\n\n for (Fruit fruit :game.getFruits()) {\n\n GraphNode.resetCounterId();\n changePlayerPixels();\n addBlocksVertices();\n Point3D fruitPixels = new Point3D(fruit.getPixels()[0],fruit.getPixels()[1]);\n GraphNode fruitNode = new GraphNode(fruitPixels);\n vertices.add(fruitNode);\n Target target = new Target(fruitPixels, fruit);\n\n //find the neigbours\n BFS();\n\n // build the grpah\n buildGraph(target);\n }\n }", "@Override\n public void mature(Farm farm, Animal animal) {\n }", "public Fish(String name, String gender){\n this.name = name;\n this.gender = gender;\n this.value = 10;\n this.eats = whatItEats(new fishFood());\n this.portionSize = 20;\n this.minimumOffspring = 1;\n this.maximumOffspring = 12;\n this.maxAge = 4;\n this.vetCost = 2;\n }", "private void giveBirthToRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.isReproducing()) {\n\t\t\t\taddNewRabbit();\n\t\t\t}\n\t\t}\n\t}", "public void growthCycle() {\n\t\tboolean doMore = true;\n\t\tdo {\n\t\t\tdoMore = false;\n\t\t\tgrower = planter;\n\t\t\tCollections.shuffle(grower, random);\n\t\t\tplanter = new ArrayList<Room>();\n\t\t\tfor(Room room : grower) {\n\t\t\t\tif(rooms.size() >= size.maxRooms) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(room.plantChildren(this)) {\n\t\t\t\t\t//System.out.println(\"Added side room.\");\n\t\t\t\t\tdoMore = true;\n\t\t\t\t}\n\t\t\t} \n\t\t} while(doMore);\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Rooms (growthCycle)\");\n\t}", "private void setParentFeatures(ClassifiedFeature classifiedFeature, Classifier newClassifier) {\n Feature childFeature = classifiedFeature.getFeature();\r\n List<Feature> anchestors = FeatureModelUtil.getAllAchestorFeatures(childFeature);\r\n\r\n Classification classification = (Classification) classifiedFeature.eContainer();\r\n // set each anchestor alive\r\n for (Feature feature : anchestors) {\r\n // check if the parent features are contained in the view and therefore can be configured manually\r\n handleAutoCompleteFeature(feature, newClassifier, classification);\r\n }\r\n }", "private void returnToHive() {\n\t\tGridPoint hiveLoc = grid.getLocation(hive);\n\t\t// if bee is inside hive\n\t\tif(grid.getDistance(grid.getLocation(this), hiveLoc) < 10) {\n\t\t\t// decide whether or not to dance (biased by nectar of last resource)\n\t\t\tif((RandomHelper.nextIntFromTo((int)(maxFlowerNectar/3), \n\t\t\t (int)(maxFlowerNectar/danceProbability)) < lastFlowerNectar)\n\t\t\t && waggle && targetFlower != null){\n\t\t\t\tdanceDuration = lastFlowerNectar/5;\n\t\t\t\thive.dancingBees.add(this);\n\t\t\t\tstate = \"DANCING\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstate = \"SLEEPING\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// otherwise continue toward hive\n\t\t\tmoveTowards(hiveLoc, 5);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void createAppareil(Home h) {\n\t\tint numOfChauffages = manager.createQuery(\"Select p From Heater p\", Heater.class).getResultList().size();\n\n if (numOfChauffages == 0) {\n \tHeater e1 =new Heater(100);\n \th.getChauffages().add(e1);\n \te1.setHome(h);\n manager.persist(e1);\n \n Heater e2 =new Heater(120);\n \th.getChauffages().add(e2);\n \te2.setHome(h);\n manager.persist(e2);\n \n \tElectronicDevice e3 =new ElectronicDevice(80);\n \th.getEquipements().add(e3);\n \te3.setHome(h);\n manager.persist(e3);\n \n ElectronicDevice e4 =new ElectronicDevice(70);\n \th.getEquipements().add(e4);\n \te4.setHome(h);\n manager.persist(e4);\n }\n\t}", "private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }", "@Override\r\n\tpublic final Genome chooseParent() {\r\n\t\tGenome baby;\r\n\r\n\t\t// If there is a single member, then choose that one.\r\n\t\tif (this.members.size() == 1) {\r\n\t\t\tbaby = this.members.get(0);\r\n\t\t} else {\r\n\t\t\t// If there are many, then choose the population based on survival\r\n\t\t\t// rate\r\n\t\t\t// and select a random genome.\r\n\t\t\tfinal int maxIndexSize \r\n\t\t\t= (int) (this.population.getSurvivalRate() * this.members\r\n\t\t\t\t\t.size()) + 1;\r\n\t\t\tfinal int theOne = (int) RangeRandomizer.randomize(0, maxIndexSize);\r\n\t\t\tbaby = this.members.get(theOne);\r\n\t\t}\r\n\r\n\t\treturn baby;\r\n\t}", "void updateAllParentsBelow();", "private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}", "private Individual<T> createChild(List<Individual<T>> tournament) {\n Individual<T> child = mate(tournament.get(0), tournament.get(1));\n child = mutate(child);\n child = child.evaluate();\n return child;\n }", "public void eatHay(Hay hay) {\n raiseFoodLevel(20);\n }", "@Override\r\n\tpublic void makeChildcare() {\n\t\t\r\n\t}", "@Override\n public CreationBean modify(final HomeFolderModificationRequest hfmr,\n final List<Adult> newAdults, final List<Child> newChildren, Address adress)\n throws CvqException {\n for (int i = 0; i < newAdults.size(); i++) {\n if (newAdults.get(i).getId() != null) {\n Adult mergeAdult = (Adult)HibernateUtil.getSession().merge(newAdults.get(i));\n newAdults.set(i, mergeAdult);\n }\n }\n for (int i = 0; i < newChildren.size(); i++) {\n if (newChildren.get(i).getId() != null) {\n Child mergeChild = (Child)HibernateUtil.getSession().merge(newChildren.get(i));\n newChildren.set(i, mergeChild);\n }\n }\n if (adress.getId() != null)\n adress = (Address)HibernateUtil.getSession().merge(adress);\n \n historyInterceptor.setCurrentRequest(hfmr);\n historyInterceptor.setCurrentUser(SecurityContext.getCurrentUserLogin());\n historyInterceptor.setCurrentSession(HibernateUtil.getSession());\n \n CreationBean cb = null;\n \n HomeFolder oldHomeFolder = homeFolderService.getById(hfmr.getHomeFolderId());\n \n // TODO REFACTORING\n // home folder will have to be validated again\n oldHomeFolder.setState(ActorState.PENDING);\n \n // take a snapshot of the \"old\" home folder\n // (ie as it was before issuing this modification request)\n \n List<Child> oldChildren = new ArrayList<Child>();\n List<Adult> oldAdults = new ArrayList<Adult>();\n for (Individual tempInd : oldHomeFolder.getIndividuals()) {\n if (tempInd instanceof Adult) {\n oldAdults.add((Adult) tempInd);\n } else {\n oldChildren.add((Child) tempInd);\n }\n }\n \n // first, deal with modifications related to children\n for (Child child : oldChildren) {\n logger.debug(\"modify() looking at old child : \" + child);\n if (!containsIndividual(newChildren, child)) {\n logger.debug(\"modify() child removed from home folder : \" + child);\n // just unlink from its home folder, don't remove it yet from DB\n // because request can be refused\n // if the request is validated, the child will be removed then\n child.setHomeFolder(null);\n \n // TODO INDEXED LISTS TO TEST MORE\n oldHomeFolder.getIndividuals().remove(child);\n \n individualService.modify(child);\n }\n }\n for (Child newChild : newChildren) {\n logger.debug(\"modify() looking at new child : \" + newChild);\n if (!containsIndividual(oldChildren, newChild)) {\n logger.debug(\"modify() child added to home folder : \" + newChild);\n \n individualService.create(newChild, oldHomeFolder, adress, false);\n oldChildren.add(newChild);\n }\n }\n \n // then, deal with modifications related to home folder adults\n boolean loggedInUserChange = false;\n for (Adult adult : oldAdults) {\n logger.debug(\"modify() looking at old adult : \" + adult);\n if (!containsIndividual(newAdults, adult)) {\n logger.debug(\"modify() adult removed from home folder : \" + adult);\n \n // check if adult was the currently logged in user\n // if so, prepare for a hot swap\n if (SecurityContext.getCurrentEcitizen().getLogin().equals(adult.getLogin())) {\n logger.info(\"modify() currently logged in user is going to be removed from its home folder !\");\n loggedInUserChange = true;\n }\n \n // just unlink from its home folder, don't remove it yet from DB\n // because request can be refused\n // if the request is validated, the adult will be removed then\n adult.setHomeFolder(null);\n \n // TODO INDEXED LISTS TO TEST MORE\n oldHomeFolder.getIndividuals().remove(adult);\n \n individualService.modify(adult);\n } else {\n if (!adult.getLogin().startsWith(adult.getFirstName().toLowerCase() + \".\" \n + adult.getLastName().toLowerCase())) {\n logger.debug(\"modify() adult changed of first or last name\");\n logger.debug(\"modify() adult login : \" + adult.getLogin());\n logger.debug(\"modify() adult names : \" + adult.getFirstName() + \" \" + adult.getLastName());\n }\n }\n }\n \n for (Adult adult : newAdults) {\n logger.debug(\"modify() looking at new adult : \" + adult);\n \n // new passwords generation handling\n // -> a new adult which is home folder responsible\n // -> an home folder responsible change inside home folder\n if (adult.getPassword() != null && !adult.getPassword().startsWith(\"{SHA}\")) {\n adult.setPassword(individualService.encryptPassword(adult.getPassword()));\n }\n \n if (!containsIndividual(oldAdults, adult)) {\n logger.debug(\"modify() adult added to home folder : \" + adult);\n individualService.create(adult, oldHomeFolder, adult.getAdress(), true);\n }\n \n // currently logged in user has been removed from the home folder\n // set the new home folder responsible as the new logged in user\n if (loggedInUserChange) {\n \n for (IndividualRole individualRole : adult.getIndividualRoles()) {\n if (individualRole.getRole().equals(RoleType.HOME_FOLDER_RESPONSIBLE)) {\n logger.debug(\"modify() Got the new logged in user with login : \"\n + adult.getLogin());\n cb = new CreationBean();\n cb.setLogin(adult.getLogin());\n cb.setRequestId(hfmr.getId());\n // and set it as the request's requester, to pass security checks\n hfmr.setRequesterId(adult.getId());\n SecurityContext.setCurrentEcitizen(adult);\n }\n }\n }\n }\n \n homeFolderService.checkAndFinalizeRoles(hfmr.getHomeFolderId(), newAdults, newChildren);\n \n requestDAO.update(hfmr);\n \n // TODO REFACTORING : branch into common treatments\n logger.debug(\"modify() Gonna generate a pdf of the request\");\n byte[] pdfData =\n certificateService.generateRequestCertificate(hfmr);\n requestActionService.addCreationAction(hfmr.getId(), new Date(), pdfData);\n \n super.notifyRequestCreation(hfmr, pdfData);\n \n // inform history interceptor that it could stop intercepting after the next postFlush()\n historyInterceptor.releaseInterceptor();\n \n return cb;\n }", "private void insertBoger() {\r\n\t\tEmne emne;\r\n\t\tBog bog;\r\n\t\tForfatter forfatter;\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,2);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-2\", emne, 2002,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(1);\r\n\t\tbog = new BogEksemplar(\"Titel-3\", emne, 2003,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-4\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(2);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t}", "public void growSnake() {\n grow = true;\n }", "public EntityCroco spawnBabyAnimal(EntityAgeable par1EntityAgeable)\n {\n return new EntityCroco(this.worldObj);\n }", "public PlantAI(Creature creature, StuffFactory factory, PlantAI parent) {\n\t\tsuper(creature);\n\t\tthis.factory = factory;\n\t\tthis.parent = parent;\n\t\tif (parent == null)\n\t\t\tthis.children = new ArrayList<PlantAI>();\n\t\telse\n\t\t\tparent.children.add(this);\n\t}", "protected void makeChild(FHeapNode y, FHeapNode x)\r\n { \r\n y.left.right = y.right;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// remove y from root list of heap\r\n y.right.left = y.left;\r\n \r\n y.parent = x;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// make y a child of x\r\n\r\n if (x.child == null)\r\n\t\t{\r\n x.child = y;\r\n y.right = y;\r\n y.left = y;\r\n } \r\n\t\telse\r\n\t\t{\r\n y.left = x.child;\r\n y.right = x.child.right;\r\n x.child.right = y;\r\n y.right.left = y;\r\n }\t\t\t\r\n x.degree++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// increase degree[x] \r\n y.childCut = false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set childCut[y] to false\r\n }", "int insertSelective(Dish record);", "@Override\n\tpublic boolean step(Tile newTile) {\n\t\tif(newTile==null) return false;\n\t\tTile temp=tile;\n\n\t\tboolean success = newTile.receiveAnimal(this); //NULLPTR\n\t\tif(success) {\n\t\t\ttile.removePandaFromNeighborSubbedPandas(this); //Panda eltavolitasa a szomszedokrol.\n\t\t\tsubbedTiles.clear(); //Panda feliratkozasainak torlese\n\t\t\tfor(Tile newTileNeighbor:newTile.getNeighbors()) {\n\t\t\t\tif(map.getSpecificTiles(hatesEntity).contains(newTileNeighbor)) {\n\t\t\t\t\taddSubbedTile(newTileNeighbor); //Az uj helyen szomszedok felirasa pandara\n\t\t\t\t\tnewTileNeighbor.addSubbedPanda(this); //Az uj helyen szomszedokra feliratkozasok\n\t\t\t\t}\n\t\t\t}\n\t\t\t//animate(temp,newTile);\n\t\t\tif(isFollowedBy())\n\t\t\t\tfollowedBy.step(temp);\n\t\t}\n\n\t\treturn success;\n\t}", "public void insertFoodItem(FoodItem f){\n int flag = 0;\n\t\tfor(int i=0; i<fooditem.length; i++){\n\n\t\t\tif (fooditem[i]!= null) {\n\t\t\t\tif (fooditem[i].getFid().equals(f.getFid())) {\n\t\t\t\t\tSystem.out.println(\"Opps! The Food ID already exists!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(fooditem[i] == null){\n\t\t\t\tfooditem[i] = f;\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag == 1)\n\t\t{\n\t\t\tSystem.out.println(\"Food Dish Inserted\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Can Not Insert\");\n\t\t}\n\n }", "protected void findNewParent() {\n\t\t\tif (parent != null)\n\t\t\t\tparent.children.remove(this);\n\t\t\tNodeLayout[] predecessingNodes = node.getPredecessingNodes();\n\t\t\tparent = null;\n\t\t\tfor (int i = 0; i < predecessingNodes.length; i++) {\n\t\t\t\tTreeNode potentialParent = (TreeNode) owner.layoutToTree\n\t\t\t\t\t\t.get(predecessingNodes[i]);\n\t\t\t\tif (!children.contains(potentialParent)\n\t\t\t\t\t\t&& isBetterParent(potentialParent))\n\t\t\t\t\tparent = potentialParent;\n\t\t\t}\n\t\t\tif (parent == null)\n\t\t\t\tparent = owner.superRoot;\n\n\t\t\tparent.addChild(this);\n\t\t}", "public void storeNewFlock(Abraham shep) {\n\tFlockInfo info;\n\tif ( ! (shep.fetchInfo() == null)) {\n\t\tthrow new AboraAssertionException(\"Must not have an info yet\");\n\t}\n\t/* Create a FlockInfo to make the FlockTable registration happy. */\n\tinfo = FlockInfo.make(shep, - myCount);\n\tshep.flockInfo(info);\n/*\nudanax-top.st:16777:FakePacker methodsFor: 'shepherds'!\n{void} storeNewFlock: shep {Abraham} \n\t\"Shep just got created!! On some later commit, assign it to a snarf \n\tand write it to the disk.\"\n\t| info {FlockInfo} |\n\tshep fetchInfo == NULL assert: 'Must not have an info yet'.\n\t\"Create a FlockInfo to make the FlockTable registration happy.\"\n\tinfo _ FlockInfo make: shep with: myCount negated.\n\tshep flockInfo: info.!\n*/\n}", "@Override\n\t\tpublic void findChild(ITargetNode child, ITargetNode parent) {\n\t\t\tchild.setParent(parent);\n\n\t\t\t// create temp object\n\n\t\t\tif (child instanceof Tar_namespace) {\n\t\t\t\tTar_namespace tar = (Tar_namespace) child;\n\t\t\t\tMyTempNS tmpNS = new MyTempNS(tar);\n\t\t\t\tString tid = tar.getTargetId();\n\t\t\t\tMyBpnsFactory.this.mTempNsMap.put(tid, tmpNS);\n\n\t\t\t\tString name = tar.getNamespaceURI();\n\t\t\t\tMyBpnsFactory.this.mTempNsMap.put(name, tmpNS);\n\n\t\t\t\t// System.out.println(\"new ns : \" + tar);\n\n\t\t\t} else if (child instanceof Tar_class) {\n\t\t\t\tTar_class tar = (Tar_class) child;\n\t\t\t\tMyTempClass tmpCls = new MyTempClass(tar);\n\t\t\t\tString tid = tar.getTargetId();\n\t\t\t\tMyBpnsFactory.this.mTempClassMap.put(tid, tmpCls);\n\n\t\t\t\tString name = tar.getName();\n\t\t\t\tMyTempNS tmpNS = tmpCls.getNS();\n\t\t\t\ttmpNS.mTempClassMap.put(name, tmpCls);\n\t\t\t\tMyBpnsFactory.this.mTempClassMap.put(name, tmpCls);\n\n\t\t\t\t// System.out.println(\"new cls : \" + tar);\n\t\t\t}\n\n\t\t}", "private void addGeneralPatty(String s) {\n\t\tMyStack newBurger = new MyStack();\n\t\tif (pattyCount < MAX_PATTY) {\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString top = (String) myBurger.peek();\n\t\t\t\tif (pattyCount > 0) {\n\t\t\t\t\tif (top.equals(\"Cheddar\") || top.equals(\"Mozzarella\") || top.equals(\"Pepperjack\")\t\n\t\t\t\t\t\t\t|| top.equals(\"Beef\") || top.equals(\"Chicken\") || top.equals(\"Veggie\")) {\t\n\t\t\t\t\t\tif (s.equals(\"Beef\")) {\n\t\t\t\t\t\t\tnewBurger.push(\"Beef\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\n\t\t\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s.equals(\"Chicken\")) {\n\t\t\t\t\t\t\tnewBurger.push(\"Chicken\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\n\t\t\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s.equals(\"Veggie\")) {\n\t\t\t\t\t\t\tnewBurger.push(\"Veggie\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\n\t\t\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\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\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\t\n\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else if (pattyCount == 0) {\n\t\t\t\t\tif (top.equals(\"Mushrooms\") || top.equals(\"Mustard\") || top.equals(\"Ketchup\")\n\t\t\t\t\t\t\t|| top.equals(\"Bottom Bun\")) {\n\t\t\t\t\t\tif (s.equals(\"Beef\")) {\n\t\t\t\t\t\t\tnewBurger.push(\"Beef\");\n\t\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} if (s.equals(\"Chicken\")) {\n\t\t\t\t\t\t\tnewBurger.push(\"Chicken\");\n\t\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} if (s.equals(\"Veggie\")) {\n\t\t\t\t\t\t\tnewBurger.push(\"Veggie\");\n\t\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\tnewBurger.push(ingredient);\n\t\t\t}\n\t\t\twhile (newBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) newBurger.pop();\n\t\t\t\tmyBurger.push(ingredient);\n\t\t\t}\n\t\t\tpattyCount++;\n\t\t} else {\n\t\t\tSystem.out.println(\"cant add anymore patties\");\n\t\t}\n\t}", "protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}", "public static int bfs() {\r\n check = new int[N][N]; // check 변수 초기화\r\n q = new LinkedList<Point>();\t\t\t\t\t//bfs 할때 필요한 그 stack. first in first out\r\n q.offer(new Point(shark.x, shark.y));\t\t\t//q.offer == 해당 큐의 맨 뒤에 전달된 요소를 삽입함. list에서 list.add와 같은 말임.\r\n check[shark.x][shark.y] = 1;\r\n\r\n int FishCheck = 0;\t\t\t\t\t\t\t\t//the number of the fish in the sea map\r\n Shark fish = new Shark(N, N);\t\t\t\t\t//new shark initiation\r\n loop: while (!q.isEmpty()) {\r\n int r = q.peek().x;\t\t\t\t\t\t\t//q.peek == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환함\r\n int c = q.poll().y;\t\t\t\t\t\t\t//q.poll == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환하고, 해당 요소를 큐에서 제거함. 만약 큐가 비어있으면 null을 반환함.\r\n\r\n for (int d = 0; d < dr.length; d++) {\r\n int nr = r + dr[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nr == new row\r\n int nc = c + dc[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nc == new column\r\n\r\n // 지나갈 수 있는 곳: 자신보다 큰 물고기가 없는 곳\r\n if (isIn(nr, nc) && check[nr][nc] == 0 && sea[nr][nc] <= shark.lv) {\r\n check[nr][nc] = check[r][c] + 1;\r\n q.offer(new Point(nr, nc));\r\n\r\n // 위치가 더 커질 경우, 더이상 확인할 필요 X\r\n if (FishCheck != 0 && FishCheck < check[nr][nc]) {\r\n break loop;\r\n }\r\n \r\n // 처음 먹을 수 있는 자기보다 물고기가 발견 되었을 때\r\n if (0 < sea[nr][nc] && sea[nr][nc] < shark.lv && FishCheck == 0) {\r\n FishCheck = check[nr][nc];\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n // 같은 위치에 여러 마리 있을 경우, 가장 위의 가장 왼쪽 물고기부터 먹음\r\n else if (FishCheck == check[nr][nc] && 0 < sea[nr][nc] && sea[nr][nc] < shark.lv) {\r\n if (nr < fish.x) { // 가장 위에 있는 거 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n } else if (nr == fish.x && nc < fish.y) { // 다 가장 위일 경우, 가장 왼쪽 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n\r\n }\r\n\r\n }else if(isIn(nr, nc) && check[nr][nc] == 0) {\r\n check[nr][nc] = -1;\r\n }\r\n }\r\n }\r\n // idx 초과 안날 경우\r\n if (fish.x != N && fish.y != N) {\r\n eatFish(fish);\r\n }\r\n \r\n return (FishCheck - 1);\r\n }", "public static void selfTest()\n {\n\t\tBoatGrader b = new BoatGrader();\n\t\t \n\t\tSystem.out.println(\"\\n ***Testing Boats with only 2 children***\");\n\t\tbegin(0, 2, b);\n\t\t \n\t\t// System.out.println(\"\\n ***Testing Boats with 2 children, 1 adult***\");\n\t\t// \t begin(1, 2, b);\n\t\t \n\t\t// System.out.println(\"\\n ***Testing Boats with 3 children, 3 adults***\");\n\t\t// begin(3, 3, b);\n }", "public PoisonBrick(Flyweight newFlyweight) {\n hitpoints = 2;\n flyweight = newFlyweight;\n for (Observer observer: flyweight.getObservers()) {\n addObserver(observer);\n }\n }", "public static List<Artist> makeChild7() {\n Artist q = new Artist(\"\", true);\n return Arrays.asList(q);\n }", "public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}", "private void grow(){\n\t\tberries.replaceAll((p, v) -> v + 1);\n\t\tapples.replaceAll((p, v) -> v + 1);\n\t}", "public abstract Individual makeChild(Individual otherIndividual);", "public interface TreeBuilder {\r\n\r\n\t/**\r\n\t * Creates the relationship for the give persons in the provided family with given relationshiptype.\r\n\t * @param rt\r\n\t * @param parentId\r\n\t * @param childId\r\n\t * @param familyId\r\n\t * @return - Relationship created with the given type in the given family for the given persons\r\n\t * @throws Exception\r\n\t */\r\n\tpublic Relationship createRelationship(RelationshipType rt, String parentId, String childId, String familyId) throws Exception;\r\n\t/**\r\n\t * Creates a family with given name.\r\n\t * @param name\r\n\t * @return - Family ID of the created family\r\n\t */\r\n\tpublic String createFamily(String name);\r\n\t/**\r\n\t * Provides any one person from the given family.\r\n\t * @param familyId\r\n\t * @return - Person ID from the given family\r\n\t */\r\n\tpublic String getFamilyPerson(String familyId);\r\n\t/**\r\n\t * Provides the Person Id of the root member of this family.\r\n\t * @param familyId\r\n\t * @return - Person ID of the root member in the family.\r\n\t */\r\n\tpublic String getFamilyRoot(String familyId);\r\n\t/**\r\n\t * Checks if the family exists with given ID.\r\n\t * @param familyId\r\n\t * @return boolean\r\n\t */\r\n\tpublic boolean isFamily(String familyId);\r\n}", "void addFullHadith(Object newFullHadith);", "private void makeMeal() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\t\t\n\t\tmeal = new Sprite(3, 3, 27, 24, new Image(\"file:./res/images/meal.png\"), 1, 2100);\n\t\tmeal.setLayoutX(150);\n\t\tmeal.setLayoutY(150);\n\t\tmeal.setScaleX(0.5);\n\t\tmeal.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(meal);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(2100));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(meal);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().eatMeal();\n//\t\t\tif(!model.isHealthy()){\n//\t\t\t\tsetSickImg();\n//\t\t\t}\n\t\t});\n\t\tpause.play();\n\t}", "private void plantMushroom(){\r\n\t\tif (rand.nextInt(200) < this.BIRTH_RATE){\r\n\t\t\tint plant = rand.nextInt(5);\r\n\r\n\t\t\tMushroom mush = null;\r\n\r\n\t\t\tswitch (plant){\r\n\t\t\tcase 0:\r\n\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * These while functions make sure that the mushrooms are not spawned on top of any\r\n\t\t\t\t\t\t * other mushroom or on top of the snake itself.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tshrooms.add(mush);\t//it adds the crated mushroom to the list of mushrooms\r\n\t\t}\r\n\t}", "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "public Population breedPopulation(EvolutionState state)\r\n {\n if( previousPopulation != null )\r\n {\r\n if( previousPopulation.subpops.length != state.population.subpops.length )\r\n state.output.fatal( \"The current population should have the same number of subpopulations as the previous population.\" );\r\n for( int i = 0 ; i < previousPopulation.subpops.length ; i++ )\r\n {\r\n if( state.population.subpops[i].individuals.length != previousPopulation.subpops[i].individuals.length )\r\n state.output.fatal( \"Subpopulation \" + i + \" should have the same number of individuals in all generations.\" );\r\n for( int j = 0 ; j < state.population.subpops[i].individuals.length ; j++ )\r\n if( previousPopulation.subpops[i].individuals[j].fitness.betterThan( state.population.subpops[i].individuals[j].fitness ) )\r\n state.population.subpops[i].individuals[j] = previousPopulation.subpops[i].individuals[j];\r\n }\r\n previousPopulation = null;\r\n }\r\n\r\n // prepare the breeder (some global statistics might need to be computed here)\r\n prepareDEBreeder(state);\r\n\r\n // create the new population\r\n Population newpop = (Population) state.population.emptyClone();\r\n\r\n // breed the children\r\n for( int subpop = 0 ; subpop < state.population.subpops.length ; subpop++ )\r\n {\r\n if (state.population.subpops[subpop].individuals.length < 4) // Magic number, sorry. createIndividual() requires at least 4 individuals in the pop\r\n state.output.fatal(\"Subpopulation \" + subpop + \" has fewer than four individuals, and so cannot be used with DEBreeder.\");\r\n \r\n Individual[] inds = state.population.subpops[subpop].individuals;\r\n for( int i = 0 ; i < inds.length ; i++ )\r\n {\r\n newpop.subpops[subpop].individuals[i] = createIndividual( state, subpop, inds, i, 0); // unthreaded for now\r\n }\r\n }\r\n\r\n // store the current population for competition with the new children\r\n previousPopulation = state.population;\r\n return newpop;\r\n }", "public FObj(FONode parent) {\n super(parent);\n \n // determine if isOutOfLineFODescendant should be set\n if (parent != null && parent instanceof FObj) {\n if (((FObj)parent).getIsOutOfLineFODescendant()) {\n isOutOfLineFODescendant = true;\n } else {\n int foID = getNameId();\n if (foID == FO_FLOAT || foID == FO_FOOTNOTE\n || foID == FO_FOOTNOTE_BODY) {\n isOutOfLineFODescendant = true;\n }\n }\n }\n }", "protected int createGroup() {\n\t\tint id = _motherGroupID + 1;\n\t\twhile (_soundNodes.containsKey(id)) { id++; }\n\t\tcreateGroup(id);\n\t\treturn id;\n\t}", "private void MakeParentChildLink() {\n\n //Hier wordt de hoogte van elke rij opgeslagen\n heightList = new ArrayList<>();\n\n for(Slot slot: slots) {\n int slotCenterY = slot.getCenterY() / 10;\n int slotCenterX = slot.getCenterX() / 10;\n\n // Als de Z gelijk is aan nul weten we dat het slot zich op de grond bevindt\n if (slot.getZ() == 0) {\n //initialisatie (if grondslot get(slotcenterY) geen value heeft maak een value new Hashmap)\n grondSlots.computeIfAbsent(slotCenterY, s -> new HashMap<>());\n\n //Er zijn ook input en output slots dus enkel bij storage\n if (slot.getType().equals(Slot.SlotType.STORAGE)) {\n grondSlots.get(slotCenterY).put(slotCenterX, slot);\n\n }\n } else {\n Slot child = grondSlots.get(slotCenterY).get(slotCenterX);\n // we stijgen telkens tot op de hoogste z\n for (int i = 1; i < slot.getZ(); i++) {\n child = child.getParent();\n }\n //Als we de child gevonden hebben zetten we de link\n slot.setChild(child);\n child.setParent(slot);\n }\n\n //Wanneer het slot gevuld is in een hashmap steken\n if (slot.getItem() != null)\n itemSlotLocation.put(slot.getItem().getId(), slot);\n }\n\n for(HashMap<Integer, Slot> row : grondSlots.values()){\n heightList.add(GeneralMeasures.hoogteBezetting(new HashSet<>(row.values())));\n }\n }", "private AbstractStorageOfFoods reallocateFood(Food food, Date currentDate) {\n AbstractStorageOfFoods result = null;\n for (AbstractStorageOfFoods storage : storages) {\n if (storage != null && storage.isAppropriate(food, currentDate)) {\n storage.add(food);\n result = storage;\n break;\n }\n }\n return result;\n }", "public static void processCreateEdit(String str){\n\n\t\tString fullMatch;\n\t\tString relation1;\n\t\tString relation2;\n\t\tString name1;\n\t\tString name2;\n\n\t\tPattern pattern = Pattern.compile(INPUT_REGEX_ADD_EDIT);\n\t\tMatcher matcher = pattern.matcher(str);\n\t\twhile (matcher.find()) {\n\n\t\t\tfullMatch = matcher.group(0);\n\t\t\trelation1 = matcher.group(1);\n \t\tname1 = matcher.group(2);\n \t\trelation2 = matcher.group(3);\n \t\tname2 = matcher.group(4);\n\n \t\tSystem.out.println(\"fullMatch\" + fullMatch);\n\t\t\tSystem.out.println(\"relation1: \" + relation1);\n \t\tSystem.out.println(\"name1: \" + name1);\n \t\tSystem.out.println(\"relation2: \" + relation2);\n \t\tSystem.out.println(\"name2: \" + name2);\n\n \tif(relation1.equalsIgnoreCase(Relationships.HUSBAND.name()) && relation2.equalsIgnoreCase(Relationships.WIFE.name())){\n\n \t\t\tPerson person1 = new Person(name1, Gender.MALE);\n \t\t\tPerson person2 = new Person(name2, Gender.FEMALE);\n \t\t\tCouple couple = new Couple(person1, person2);\n\n\t\t\t\tfamilyTree.setData(couple);\n\n\t\t\t\tSystem.out.println(familyTree.getData());\n \t}\n\n \telse if(relation1.equalsIgnoreCase(Relationships.MOTHER.name()) && relation2.equalsIgnoreCase(Relationships.SON.name())){\n \t\tPerson person1 = new Person(name1, Gender.FEMALE);\n\t\t\tPerson person2 = new Person(name2, Gender.MALE);\n\t\t\t\n\t\t\t\n\t\t\tCouple couple = new Couple(person2);\n\n\t\t\tfamilyTree.addChild(couple);\n\n\t\t\tSystem.out.println(familyTree.getData());\n\t\t\t\n\t\t\tSystem.out.println(\"name found: \" + familyTree.getDescendants(familyTree, \"name\"));\n \t}\n \telse{\n \t\tFamilyTreeNode huh = familyTree.getChildren().get(0);\n \t\t\n \t\tPerson person2 = new Person(\"name\", Gender.MALE);\n\t\t\t\n\t\t\tCouple couple = new Couple(person2);\n\t\t\t\n \t\thuh.addChild(couple);\n \t}\n\n}\n\n\n\t}", "private static ResourceIterator<GrandFatherRel> isGrandFather_0(final DerivationController _derivation, final Person grandFather, final Person grandChild) {\n\n\t\t_derivation.log(\"test.org.mandarax.compiler.reldef5.GrandFather.rule1\", DerivationController.RULE, _annotations_rule1);\n\n\t\t// utility class used to keep track of variables bindings\n\t\t// rule: rule1: Father(x.getName(),y) & Father(y,z.getName()) ->\n\t\t// GrandFather(x,z);\n\t\t// prereqs: [Father(x.getName(),y), Father(y,z.getName())]\n\t\tclass _Bindings {\n\t\t\tprivate test.org.mandarax.compiler.Person x = grandFather;\n\t\t\tprivate test.org.mandarax.compiler.Person z = grandChild;\n\t\t\tprivate java.lang.String y = null;\n\t\t}\n\t\tfinal _Bindings _bindings = new _Bindings();\n\t\tResourceIterator<?> _tmp = null;\n\n\t\t// apply prerequisite Father(x.getName(),y)\n\n\t\t// case 1\n\t\tfinal ResourceIterator<FatherRel> _iterator2 = FatherRelInstances.getChildren(_derivation.push(), _bindings.x.getName());\n\n\t\t// apply prerequisite Father(y,z.getName())\n\n\t\t// case 3\n\n\t\tcom.google.common.base.Predicate<FatherRel> _filter3 = new com.google.common.base.Predicate<FatherRel>() {\n\t\t\tpublic boolean apply(FatherRel _object) {\n\t\t\t\t// bind parameters from Father(x.getName(),y)\n\t\t\t\t_bindings.y = _object.child;\n\n\t\t\t\tResourceIterator<FatherRel> _r = FatherRelInstances.isFather(_derivation.push(), _bindings.y, _bindings.z.getName());\n\t\t\t\tboolean _b = _r.hasNext();\n\t\t\t\t_r.close();\n\t\t\t\treturn _b;\n\n\t\t\t}\n\t\t};\n\t\tfinal ResourceIterator<FatherRel> _iterator3 = new FilteredIterator<FatherRel>(_iterator2, _filter3);\n\n\t\t// rule head\n\n\t\treturn new NestedIterator<FatherRel, GrandFatherRel>(_iterator3) {\n\t\t\tpublic ResourceIterator<GrandFatherRel> getNextIterator(FatherRel _object) {\n\t\t\t\t// bind parameters from Father(x.getName(),y)\n\t\t\t\t_bindings.y = _object.child;\n\n\t\t\t\treturn new SingletonIterator(new GrandFatherRel(_bindings.x, _bindings.z));\n\t\t\t}\n\t\t};\n\n\t}", "private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }", "void expandChilds() {\n\t\t\tenumAndExpand(this.parentItem);\n\t\t}", "void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }", "public void addIngredient(String type) {\n\t\tBurger fullBurger1 = new Burger(true);\n\t\tBurger fullBurger2 = new Burger(true);\n\n\t\tfullBurger1.removeIngredient(\"Beef\");\n\t\tfullBurger2.removeIngredient(\"Beef\");\n\n\t\tint howManyBeef = this.howMany(\"Beef\");\n\t\tint howManyChicken = this.howMany(\"Chicken\");\n\t\tint howManyVeggie = this.howMany(\"Veggie\");\n\n\t\tif (this.has(\"Beef\")) {\n\t\t\tfor (int i = 0; i < howManyBeef; i++) {\n\t\t\t\tfullBurger1.addPatty();\n\t\t\t\tfullBurger2.addPatty();\n\t\t\t}\n\t\t}\n\t\tif (this.has(\"Chicken\")) {\n\t\t\tfor (int i = 0; i < howManyChicken; i++) {\n\t\t\t\tfullBurger1.addGeneralPatty(\"Chicken\");\n\t\t\t\tfullBurger2.addGeneralPatty(\"Chicken\");\n\t\t\t}\n\t\t}\n\t\tif (this.has(\"Veggie\")) {\n\t\t\tfor (int i = 0; i < howManyVeggie; i++) {\n\t\t\t\tfullBurger1.addGeneralPatty(\"Veggie\");\n\t\t\t\tfullBurger2.addGeneralPatty(\"Veggie\");\n\t\t\t}\n\t\t}\n\t\tmyBurger.push(type);\t\n\t\twhile (myBurger.size() != 0) {\n\t\t\tString top = (String) myBurger.peek();\n\t\t\tfullBurger1.removeIngredient(top);\n\t\t\tthis.removeIngredient(top);\n\t\t}\n\n\t\twhile (fullBurger1.myBurger.size() != 0) {\n\t\t\tString top = (String) fullBurger1.myBurger.peek();\n\t\t\tfullBurger2.removeIngredient(top);\n\t\t\tfullBurger1.removeIngredient(top);\n\t\t}\n\t\tint totalPatties = howManyBeef + howManyChicken + howManyVeggie;\n\t\tmyBurger = fullBurger2.myBurger;\n\t\tpattyCount = pattyCount + totalPatties;\n\t\tif (type.equals(\"Beef\") || type.equals(\"Chicken\") || type.equals(\"Veggie\")) {\n\t\t\tpattyCount++;\n\t\t}\n\t}", "void propagate_childs_of_fprivate_that_only_call_relatives(Element element, Feature feature_to_assign, Fact factInf, Feature parent_feature){\n\t\tfor(Element child : element.getRefToThis()){\n\t\t\tif(child != element && check_only_call_relatives(child) && child.getFeature() == parent_feature){\n\t\t\t\tfactInf.addInference(child.getIdentifier() + \", BttF says it's a child of \" + element.getIdentifier() + \n\t\t\t\t\t\t\" that only calls relatives THEN it also belongs to \" + feature_to_assign.getFeature_name(), child, feature_to_assign);\n\t\t\t\tadd_element_to_feature(factInf, feature_to_assign, child, false, false, parent_feature, true);\n\t\t\t\tpropagate_childs_of_fprivate_that_only_call_relatives(child, feature_to_assign, factInf, parent_feature);\n\t\t\t}\n\t\t}\n\t}", "private static Bat createBat(){\n try {\n UtilityMethods.print(\"Creating Big bat for you...!\"); \n BatGenerator batGenerator = new BatGenerator();\n BatBuilder bigBatBuilder = new BigBatBuilder();\n batGenerator.setBatBuilder(bigBatBuilder);\n batGenerator.constructBat(\n \"Bat\", \n \"Male\",\n 25,\n \"Scavenger\"\n );\n Bat bigBat = bigBatBuilder.getBat();\n UtilityMethods.print(\"\\n\"); \n bigBat.eat();\n UtilityMethods.print(\"\\n\"); \n bigBat.speak();\n UtilityMethods.print(\"\\n\"); \n bigBat.walk();\n UtilityMethods.print(\"\\n\"); \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }", "private void indexFirework(){\n firework = new ItemStack(Material.FIREWORK, 1);\n FireworkMeta meta = (FireworkMeta) firework.getItemMeta();\n\n meta.addEffect(FireworkEffect.builder().with(FireworkEffect.Type.BALL).withColor(Color.LIME).build());\n meta.setPower(1);\n firework.setItemMeta(meta);\n }", "public void grow() {\n if (!getIsWilted()) {\n age++;\n }\n }", "IClassBuilder getParent();", "public ArrayList<Double> branch(BGStem parent) {\n\t\t\n\t\t// Store the node coordinates\n\t\tArrayList <Double> node = new ArrayList<Double>();\n\t\t\n\t\t// Calculate\n\t\tnode.add(parent.getLength() * Math.cos(parent.getDirection()) + parent.getX());\n\t\tnode.add(parent.getLength() * Math.sin(parent.getDirection()) + parent.getY());\n\t\t\n\t\treturn node;\n\t}", "public void addNewEntity() {\n Random random = new Random();\n int bound = Aquarium.WIDTH / 10;\n int randX = bound + random.nextInt(Aquarium.WIDTH - (2 * bound));\n int randY = bound + random.nextInt(Aquarium.HEIGHT - (2 * bound));\n Piranha newPiranha = new Piranha(randX, randY);\n piranhas.add(newPiranha);\n }", "void propagate_childs_with_no_calls(Element element, Feature feature_to_assign, Fact factInf, Feature parent_feature){\n\t\tfor(Element elem : element.getRefToThis()){\n\t\t\tif( elem.getParentName()!= null \n\t\t\t\t\t&& elem.getParentName().equals(element.getIdentifier()) \n\t\t\t\t\t&& elem.getRefToThis().size() == 0\n\t\t\t\t\t&& elem.getRefFromThis().size() == 1\n\t\t\t\t\t&& elem.getRefFromThis().get(0).equals(elem.getParentName())\n\t\t\t\t\t&& elem.getFeature() == parent_feature){\n\t\t\t\tfactInf.addInference(elem.getIdentifier() + \", BttF says it's a child of \" + element.getIdentifier() + \n\t\t\t\t\t\t\" with no callers and only calls its parent THEN it also belongs to \" + feature_to_assign.getFeature_name(), elem, feature_to_assign);\n\t\t\t\tadd_element_to_feature(factInf, feature_to_assign, elem, false, false, parent_feature, true);\n\t\t\t}\n\t\t}\n\t}", "private TreeItem<String> addNewItem(Path path) {\n TreeItem<String> mostCorrespondingParent = findMostCorrespondingParentFor(path);\n TreeItem<String> newChildTreeItem;\n if (buildPathForNode(mostCorrespondingParent) != null) {\n Path newChildPath;\n if (mostCorrespondingParent != rootNode) {\n Path mostCorrespondingParentPath = getNodeAbsolutePath(mostCorrespondingParent);\n newChildPath = extractChildPath(path, mostCorrespondingParentPath);\n } else {\n newChildPath = path;\n }\n newChildTreeItem = new TreeItem<>(newChildPath.toString(), new ImageView(FileTreeItem.FileType.FILE.getImage()));\n } else {\n newChildTreeItem = new TreeItem<>(path.toString(), new ImageView(FileTreeItem.FileType.FILE.getImage()));\n }\n mostCorrespondingParent.getChildren().add(newChildTreeItem);\n sortChildren(mostCorrespondingParent);\n return extractFileNameToLeaf(newChildTreeItem);\n }", "public void createNewFarm(){\n this.mFarm = new Farm();\n this.loaded = false;\n }", "private Egg(String name, int turnsToHatch, int hatchEarnings, Dinosaur babyDinosaur) {\n super(name, 'O', true);\n this.turnsToHatch = turnsToHatch;\n this.hatchEarnings = hatchEarnings;\n this.babyDinosaur = babyDinosaur;\n this.age = 0;\n }", "protected void grow() {\n }", "Chef(String name, Restaurant restaurant) {\n super(name, restaurant);\n numChefs++;\n setId(numChefs);\n restaurant.getStaffSystem().addChef(this);\n }", "private void createFoodTrees(){\r\n while(!foodArray.isEmpty()){\r\n Food element= foodArray.dequeue();\r\n priceTree.add(element);\r\n stockTree.add(element);\r\n }\r\n }", "Faucet startWashingHands(String person);", "private void addThingsToParent(LinearLayout parent, String target, List<Gender> genders, List<WeatherType> weatherTypes) throws ExecutionException, InterruptedException {\n ThingSelectAsyncTask task = new ThingSelectAsyncTask();\n task.setCategory(target);\n ThingMapper mapper = new ThingMapper();\n List<Thing> things = filter(mapper.to(task.execute().get()), weatherTypes, genders);\n for (Thing thing : things) {\n parent.addView(createThingView(thing));\n }\n }", "private Persons createMother(Persons mom, Persons husband)\n {\n mom.setPersonFirstName(nameGenerator.generateFemaleName());\n mom.setPersonLastName(nameGenerator.generateLastName());\n mom.setPersonSpouseID(husband.getPersonID());\n mom.setPersonGender(\"f\");\n mom.setDescendantID(userName);\n return mom;\n }", "public void setFamilyTree() {\n\n //Set Father's Side\n if(user.getFatherID() != null) {\n Person father = people.get(user.getFatherID());\n paternalAncestorsMales.add(father.getPersonID());\n childrenMap.put(user.getFatherID(), user);\n\n setFatherSide(father);\n }\n\n //Set Mother's Side\n if(user.getMotherID() != null) {\n Person mother = people.get(user.getMotherID());\n maternalAncestorsFemales.add(mother.getPersonID());\n childrenMap.put(user.getMotherID(), user);\n\n setMotherSide(mother);\n }\n }", "private List<Path> expandExecution(Path input) {\n\t\tList<Path> childInputs = new ArrayList<>(); //store the paths generated from given path\n\t\t\n\t\t//search from the top node which have not been searched before\n\t\tfor(int j = input.bound; j < input.path.size() - 1; j++){\n\t\t\tdouble[] probabilityArray = cfg.getTransition_matrix().getRow(input.path.get(j));\n\t\t\tfor(int i = 0; i < probabilityArray.length; i++){\n\t\t\t\t//the node been visited before only have two situation:1.has been searched,2.the path contains it in the workList \n\t\t\t\tif(probabilityArray[i] > 0 && i != input.path.get(j + 1) && unvisited.contains(i)){\n\t\t\t\t\tList<Integer> tempPath = new ArrayList<>();\n\t\t\t\t\tfor(int index = 0; index < j + 1; index++)\n\t\t\t\t\t\ttempPath.add(input.path.get(index));\n\t\t\t\t\ttempPath.add(i);\n\t\t\t\t\t\n\t\t\t\t\tPath newInput = new Path(tempPath, j + 1);\n\t\t\t\t\tchildInputs.add(newInput);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn childInputs;\n\t}", "protected abstract void addMeat();", "public static Graph_chromosome generateChild(Graph_chromosome parent1,\r\n\t\t\tGraph_chromosome parent2 )\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\tint crossover_point = random_generator.nextInt(parent1.chromosome_size);\r\n\t\t\r\n\t\tGraph_chromosome child = new Graph_chromosome(parent1.chromosome_size,parent1.num_colors);\r\n\t\t\r\n\t\tfor(int i=0;i<child.chromosome_size;i++)\r\n\t\t{\r\n\t\t\tif(i<crossover_point)\r\n\t\t\t\tchild.chromosome[i] = parent1.getChromosomeAt(i+1);\r\n\t\t\telse\r\n\t\t\t\tchild.chromosome[i] = parent2.getChromosomeAt(i+1);\r\n\t\t}\r\n\t\treturn child;\r\n\t}", "public ArrayList<Fish> generateGuppies() {\n ArrayList<Fish> generatedFish = new ArrayList<Fish>();\n\n final double femaleProbability = 0.5;\n\n Random generator = new Random();\n\n int ageInWeeks;\n double healthCoefficient;\n double femaleRoll;\n for (int i = 1; i <= numberOfGuppies; i++) {\n ageInWeeks = generator.nextInt(maxAge - minAge) + minAge;\n healthCoefficient = generator.nextDouble()\n * (maxHealthCoefficient - minHealthCoefficient)\n + minHealthCoefficient;\n femaleRoll = generator.nextDouble();\n\n generatedFish.add(new Guppy(\"Poecilia\", \"reticulata\",\n ageInWeeks, femaleRoll < femaleProbability, 0,\n healthCoefficient));\n }\n\n return generatedFish;\n }", "final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }", "public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }" ]
[ "0.55157983", "0.53726935", "0.53544444", "0.5352998", "0.5326033", "0.52954614", "0.5249321", "0.52313364", "0.5217388", "0.52122283", "0.5169353", "0.51676553", "0.51648694", "0.51629686", "0.5158023", "0.5155939", "0.5146212", "0.51398903", "0.5128124", "0.51271844", "0.5102998", "0.5097612", "0.50872624", "0.50818884", "0.50709087", "0.5034369", "0.5015838", "0.49803206", "0.49771398", "0.49726772", "0.49678516", "0.4959105", "0.4956323", "0.49558726", "0.49553862", "0.49426246", "0.4932887", "0.4927423", "0.49012667", "0.48974591", "0.4888805", "0.48872846", "0.48848948", "0.48826116", "0.48811445", "0.48744464", "0.48694754", "0.48597813", "0.48552123", "0.48468196", "0.4842452", "0.48413908", "0.4839493", "0.48372063", "0.4827717", "0.482689", "0.48241317", "0.48211718", "0.47962093", "0.47930616", "0.4789365", "0.47891265", "0.4784243", "0.47827527", "0.47784823", "0.47553098", "0.4746651", "0.47374097", "0.4731355", "0.4725016", "0.47248054", "0.47181833", "0.47157297", "0.4711158", "0.4708931", "0.47075874", "0.47073373", "0.4701061", "0.46961337", "0.4691558", "0.4690213", "0.4687738", "0.46824208", "0.46767196", "0.46766964", "0.46705133", "0.46662918", "0.46661302", "0.4659514", "0.46524417", "0.46476015", "0.46466714", "0.4646605", "0.4644897", "0.46375883", "0.46341097", "0.46330756", "0.46325442", "0.46314543", "0.4628979" ]
0.5075192
24
for (GameObject g: world)if (g instanceof Seaweed)return (Seaweed)g;
GameObject findSeaweed(){ Iterator iterator = gc.getIterator(); while(iterator.hasNext()){ GameObject g = iterator.getNext(); if (g instanceof Seaweed)return g; } return nullSeaweed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to find first instance of a fish\r\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Fish)return (Fish)g;\r\n\t\t}\r\n\treturn nullFish;\r\n\t}", "public EntityLiving c()\r\n/* 209: */ {\r\n/* 210:221 */ if (this.h == null) {\r\n/* 211:222 */ return null;\r\n/* 212: */ }\r\n/* 213:224 */ if ((this.h instanceof aek)) {\r\n/* 214:225 */ return ((aek)this.h).j();\r\n/* 215: */ }\r\n/* 216:227 */ if ((this.h instanceof EntityLiving)) {\r\n/* 217:228 */ return (EntityLiving)this.h;\r\n/* 218: */ }\r\n/* 219:230 */ return null;\r\n/* 220: */ }", "GameObject getObject();", "public static CraftEntity getEntity(CraftServer server, Entity entity) {\n/* 199 */ if (entity instanceof EntityLiving)\n/* */ \n/* 201 */ { if (entity instanceof EntityHuman) {\n/* 202 */ if (entity instanceof EntityPlayer) return new CraftPlayer(server, (EntityPlayer)entity); \n/* 203 */ return new CraftHumanEntity(server, (EntityHuman)entity);\n/* */ } \n/* */ \n/* 206 */ if (entity instanceof EntityWaterAnimal) {\n/* 207 */ if (entity instanceof EntitySquid) return new CraftSquid(server, (EntitySquid)entity); \n/* 208 */ if (entity instanceof EntityFish) {\n/* 209 */ if (entity instanceof EntityCod) return new CraftCod(server, (EntityCod)entity); \n/* 210 */ if (entity instanceof EntityPufferFish) return new CraftPufferFish(server, (EntityPufferFish)entity); \n/* 211 */ if (entity instanceof EntitySalmon) return new CraftSalmon(server, (EntitySalmon)entity); \n/* 212 */ if (entity instanceof EntityTropicalFish) return new CraftTropicalFish(server, (EntityTropicalFish)entity); \n/* 213 */ return new CraftFish(server, (EntityFish)entity);\n/* */ } \n/* 215 */ if (entity instanceof EntityDolphin) return new CraftDolphin(server, (EntityDolphin)entity); \n/* 216 */ return new CraftWaterMob(server, (EntityWaterAnimal)entity);\n/* */ } \n/* 218 */ if (entity instanceof EntityCreature)\n/* */ \n/* 220 */ { if (entity instanceof EntityAnimal)\n/* 221 */ { if (entity instanceof EntityChicken) return new CraftChicken(server, (EntityChicken)entity); \n/* 222 */ if (entity instanceof EntityCow) {\n/* 223 */ if (entity instanceof EntityMushroomCow) return new CraftMushroomCow(server, (EntityMushroomCow)entity); \n/* 224 */ return new CraftCow(server, (EntityCow)entity);\n/* */ } \n/* 226 */ if (entity instanceof EntityPig) return new CraftPig(server, (EntityPig)entity); \n/* 227 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityTameableAnimal) {\n/* 228 */ if (entity instanceof EntityWolf) return new CraftWolf(server, (EntityWolf)entity); \n/* 229 */ if (entity instanceof EntityCat) return new CraftCat(server, (EntityCat)entity); \n/* 230 */ if (entity instanceof EntityParrot) return new CraftParrot(server, (EntityParrot)entity); \n/* */ } else {\n/* 232 */ if (entity instanceof EntitySheep) return new CraftSheep(server, (EntitySheep)entity); \n/* 233 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseAbstract)\n/* 234 */ { if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseChestedAbstract)\n/* 235 */ { if (entity instanceof EntityHorseDonkey) return new CraftDonkey(server, (EntityHorseDonkey)entity); \n/* 236 */ if (entity instanceof EntityHorseMule) return new CraftMule(server, (EntityHorseMule)entity); \n/* 237 */ if (entity instanceof EntityLlamaTrader) return new CraftTraderLlama(server, (EntityLlamaTrader)entity); \n/* 238 */ if (entity instanceof EntityLlama) return new CraftLlama(server, (EntityLlama)entity); }\n/* 239 */ else { if (entity instanceof EntityHorse) return new CraftHorse(server, (EntityHorse)entity); \n/* 240 */ if (entity instanceof EntityHorseSkeleton) return new CraftSkeletonHorse(server, (EntityHorseSkeleton)entity); \n/* 241 */ if (entity instanceof EntityHorseZombie) return new CraftZombieHorse(server, (EntityHorseZombie)entity); }\n/* */ }\n/* 243 */ else { if (entity instanceof EntityRabbit) return new CraftRabbit(server, (EntityRabbit)entity); \n/* 244 */ if (entity instanceof EntityPolarBear) return new CraftPolarBear(server, (EntityPolarBear)entity); \n/* 245 */ if (entity instanceof EntityTurtle) return new CraftTurtle(server, (EntityTurtle)entity); \n/* 246 */ if (entity instanceof EntityOcelot) return new CraftOcelot(server, (EntityOcelot)entity); \n/* 247 */ if (entity instanceof EntityPanda) return new CraftPanda(server, (EntityPanda)entity); \n/* 248 */ if (entity instanceof EntityFox) return new CraftFox(server, (EntityFox)entity); \n/* 249 */ if (entity instanceof EntityBee) return new CraftBee(server, (EntityBee)entity); \n/* 250 */ if (entity instanceof EntityHoglin) return new CraftHoglin(server, (EntityHoglin)entity); \n/* 251 */ if (entity instanceof EntityStrider) return new CraftStrider(server, (EntityStrider)entity); \n/* 252 */ return new CraftAnimals(server, (EntityAnimal)entity); }\n/* */ \n/* */ } }\n/* 255 */ else { if (entity instanceof EntityMonster) {\n/* 256 */ if (entity instanceof EntityZombie) {\n/* 257 */ if (entity instanceof EntityPigZombie) return new CraftPigZombie(server, (EntityPigZombie)entity); \n/* 258 */ if (entity instanceof EntityZombieHusk) return new CraftHusk(server, (EntityZombieHusk)entity); \n/* 259 */ if (entity instanceof EntityZombieVillager) return new CraftVillagerZombie(server, (EntityZombieVillager)entity); \n/* 260 */ if (entity instanceof EntityDrowned) return new CraftDrowned(server, (EntityDrowned)entity); \n/* 261 */ return new CraftZombie(server, (EntityZombie)entity);\n/* */ } \n/* 263 */ if (entity instanceof EntityCreeper) return new CraftCreeper(server, (EntityCreeper)entity); \n/* 264 */ if (entity instanceof EntityEnderman) return new CraftEnderman(server, (EntityEnderman)entity); \n/* 265 */ if (entity instanceof EntitySilverfish) return new CraftSilverfish(server, (EntitySilverfish)entity); \n/* 266 */ if (entity instanceof EntityGiantZombie) return new CraftGiant(server, (EntityGiantZombie)entity); \n/* 267 */ if (entity instanceof EntitySkeletonAbstract) {\n/* 268 */ if (entity instanceof EntitySkeletonStray) return new CraftStray(server, (EntitySkeletonStray)entity); \n/* 269 */ if (entity instanceof EntitySkeletonWither) return new CraftWitherSkeleton(server, (EntitySkeletonWither)entity); \n/* 270 */ return new CraftSkeleton(server, (EntitySkeletonAbstract)entity);\n/* */ } \n/* 272 */ if (entity instanceof EntityBlaze) return new CraftBlaze(server, (EntityBlaze)entity); \n/* 273 */ if (entity instanceof EntityWitch) return new CraftWitch(server, (EntityWitch)entity); \n/* 274 */ if (entity instanceof EntityWither) return new CraftWither(server, (EntityWither)entity); \n/* 275 */ if (entity instanceof EntitySpider) {\n/* 276 */ if (entity instanceof EntityCaveSpider) return new CraftCaveSpider(server, (EntityCaveSpider)entity); \n/* 277 */ return new CraftSpider(server, (EntitySpider)entity);\n/* */ } \n/* 279 */ if (entity instanceof EntityEndermite) return new CraftEndermite(server, (EntityEndermite)entity); \n/* 280 */ if (entity instanceof EntityGuardian) {\n/* 281 */ if (entity instanceof EntityGuardianElder) return new CraftElderGuardian(server, (EntityGuardianElder)entity); \n/* 282 */ return new CraftGuardian(server, (EntityGuardian)entity);\n/* */ } \n/* 284 */ if (entity instanceof EntityVex) return new CraftVex(server, (EntityVex)entity); \n/* 285 */ if (entity instanceof EntityIllagerAbstract) {\n/* 286 */ if (entity instanceof EntityIllagerWizard) {\n/* 287 */ if (entity instanceof EntityEvoker) return new CraftEvoker(server, (EntityEvoker)entity); \n/* 288 */ if (entity instanceof EntityIllagerIllusioner) return new CraftIllusioner(server, (EntityIllagerIllusioner)entity); \n/* 289 */ return new CraftSpellcaster(server, (EntityIllagerWizard)entity);\n/* */ } \n/* 291 */ if (entity instanceof EntityVindicator) return new CraftVindicator(server, (EntityVindicator)entity); \n/* 292 */ if (entity instanceof EntityPillager) return new CraftPillager(server, (EntityPillager)entity); \n/* 293 */ return new CraftIllager(server, (EntityIllagerAbstract)entity);\n/* */ } \n/* 295 */ if (entity instanceof EntityRavager) return new CraftRavager(server, (EntityRavager)entity); \n/* 296 */ if (entity instanceof EntityPiglinAbstract) {\n/* 297 */ if (entity instanceof EntityPiglin) return new CraftPiglin(server, (EntityPiglin)entity); \n/* 298 */ if (entity instanceof EntityPiglinBrute) return new CraftPiglinBrute(server, (EntityPiglinBrute)entity); \n/* 299 */ return new CraftPiglinAbstract(server, (EntityPiglinAbstract)entity);\n/* */ } \n/* 301 */ if (entity instanceof EntityZoglin) return new CraftZoglin(server, (EntityZoglin)entity);\n/* */ \n/* 303 */ return new CraftMonster(server, (EntityMonster)entity);\n/* */ } \n/* 305 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityGolem) {\n/* 306 */ if (entity instanceof EntitySnowman) return new CraftSnowman(server, (EntitySnowman)entity); \n/* 307 */ if (entity instanceof EntityIronGolem) return new CraftIronGolem(server, (EntityIronGolem)entity); \n/* 308 */ if (entity instanceof EntityShulker) return new CraftShulker(server, (EntityShulker)entity); \n/* */ } else {\n/* 310 */ if (entity instanceof EntityVillagerAbstract) {\n/* 311 */ if (entity instanceof EntityVillager) return new CraftVillager(server, (EntityVillager)entity); \n/* 312 */ if (entity instanceof EntityVillagerTrader) return new CraftWanderingTrader(server, (EntityVillagerTrader)entity); \n/* 313 */ return new CraftAbstractVillager(server, (EntityVillagerAbstract)entity);\n/* */ } \n/* 315 */ return new CraftCreature(server, (EntityCreature)entity);\n/* */ } }\n/* */ }\n/* 318 */ else { if (entity instanceof EntitySlime) {\n/* 319 */ if (entity instanceof EntityMagmaCube) return new CraftMagmaCube(server, (EntityMagmaCube)entity); \n/* 320 */ return new CraftSlime(server, (EntitySlime)entity);\n/* */ } \n/* */ \n/* 323 */ if (entity instanceof EntityFlying) {\n/* 324 */ if (entity instanceof EntityGhast) return new CraftGhast(server, (EntityGhast)entity); \n/* 325 */ if (entity instanceof EntityPhantom) return new CraftPhantom(server, (EntityPhantom)entity); \n/* 326 */ return new CraftFlying(server, (EntityFlying)entity);\n/* */ } \n/* 328 */ if (entity instanceof EntityEnderDragon) {\n/* 329 */ return new CraftEnderDragon(server, (EntityEnderDragon)entity);\n/* */ }\n/* */ \n/* 332 */ if (entity instanceof EntityAmbient) {\n/* 333 */ if (entity instanceof EntityBat) return new CraftBat(server, (EntityBat)entity); \n/* 334 */ return new CraftAmbient(server, (EntityAmbient)entity);\n/* */ } \n/* 336 */ if (entity instanceof EntityArmorStand) return new CraftArmorStand(server, (EntityArmorStand)entity); \n/* 337 */ return new CraftLivingEntity(server, (EntityLiving)entity); }\n/* */ }\n/* 339 */ else { if (entity instanceof EntityComplexPart) {\n/* 340 */ EntityComplexPart part = (EntityComplexPart)entity;\n/* 341 */ if (part.owner instanceof EntityEnderDragon) return new CraftEnderDragonPart(server, (EntityComplexPart)entity); \n/* 342 */ return new CraftComplexPart(server, (EntityComplexPart)entity);\n/* */ } \n/* 344 */ if (entity instanceof EntityExperienceOrb) return new CraftExperienceOrb(server, (EntityExperienceOrb)entity); \n/* 345 */ if (entity instanceof EntityTippedArrow) return new CraftTippedArrow(server, (EntityTippedArrow)entity); \n/* 346 */ if (entity instanceof EntitySpectralArrow) return new CraftSpectralArrow(server, (EntitySpectralArrow)entity); \n/* 347 */ if (entity instanceof EntityArrow) {\n/* 348 */ if (entity instanceof EntityThrownTrident) return new CraftTrident(server, (EntityThrownTrident)entity); \n/* 349 */ return new CraftArrow(server, (EntityArrow)entity);\n/* */ } \n/* 351 */ if (entity instanceof EntityBoat) return new CraftBoat(server, (EntityBoat)entity); \n/* 352 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityProjectile) {\n/* 353 */ if (entity instanceof EntityEgg) return new CraftEgg(server, (EntityEgg)entity); \n/* 354 */ if (entity instanceof EntitySnowball) return new CraftSnowball(server, (EntitySnowball)entity); \n/* 355 */ if (entity instanceof EntityPotion) return new CraftThrownPotion(server, (EntityPotion)entity); \n/* 356 */ if (entity instanceof EntityEnderPearl) return new CraftEnderPearl(server, (EntityEnderPearl)entity); \n/* 357 */ if (entity instanceof EntityThrownExpBottle) return new CraftThrownExpBottle(server, (EntityThrownExpBottle)entity); \n/* */ } else {\n/* 359 */ if (entity instanceof EntityFallingBlock) return new CraftFallingBlock(server, (EntityFallingBlock)entity); \n/* 360 */ if (entity instanceof EntityFireball) {\n/* 361 */ if (entity instanceof EntitySmallFireball) return new CraftSmallFireball(server, (EntitySmallFireball)entity); \n/* 362 */ if (entity instanceof EntityLargeFireball) return new CraftLargeFireball(server, (EntityLargeFireball)entity); \n/* 363 */ if (entity instanceof EntityWitherSkull) return new CraftWitherSkull(server, (EntityWitherSkull)entity); \n/* 364 */ if (entity instanceof EntityDragonFireball) return new CraftDragonFireball(server, (EntityDragonFireball)entity); \n/* 365 */ return new CraftFireball(server, (EntityFireball)entity);\n/* */ } \n/* 367 */ if (entity instanceof EntityEnderSignal) return new CraftEnderSignal(server, (EntityEnderSignal)entity); \n/* 368 */ if (entity instanceof EntityEnderCrystal) return new CraftEnderCrystal(server, (EntityEnderCrystal)entity); \n/* 369 */ if (entity instanceof EntityFishingHook) return new CraftFishHook(server, (EntityFishingHook)entity); \n/* 370 */ if (entity instanceof EntityItem) return new CraftItem(server, (EntityItem)entity); \n/* 371 */ if (entity instanceof EntityLightning) return new CraftLightningStrike(server, (EntityLightning)entity); \n/* 372 */ if (entity instanceof EntityMinecartAbstract)\n/* 373 */ { if (entity instanceof EntityMinecartFurnace) return new CraftMinecartFurnace(server, (EntityMinecartFurnace)entity); \n/* 374 */ if (entity instanceof EntityMinecartChest) return new CraftMinecartChest(server, (EntityMinecartChest)entity); \n/* 375 */ if (entity instanceof EntityMinecartTNT) return new CraftMinecartTNT(server, (EntityMinecartTNT)entity); \n/* 376 */ if (entity instanceof EntityMinecartHopper) return new CraftMinecartHopper(server, (EntityMinecartHopper)entity); \n/* 377 */ if (entity instanceof EntityMinecartMobSpawner) return new CraftMinecartMobSpawner(server, (EntityMinecartMobSpawner)entity); \n/* 378 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityMinecartRideable) return new CraftMinecartRideable(server, (EntityMinecartAbstract)entity); \n/* 379 */ if (entity instanceof EntityMinecartCommandBlock) return new CraftMinecartCommand(server, (EntityMinecartCommandBlock)entity); }\n/* 380 */ else { if (entity instanceof EntityHanging) {\n/* 381 */ if (entity instanceof EntityPainting) return new CraftPainting(server, (EntityPainting)entity); \n/* 382 */ if (entity instanceof EntityItemFrame) return new CraftItemFrame(server, (EntityItemFrame)entity); \n/* 383 */ if (entity instanceof EntityLeash) return new CraftLeash(server, (EntityLeash)entity); \n/* 384 */ return new CraftHanging(server, (EntityHanging)entity);\n/* */ } \n/* 386 */ if (entity instanceof EntityTNTPrimed) return new CraftTNTPrimed(server, (EntityTNTPrimed)entity); \n/* 387 */ if (entity instanceof EntityFireworks) return new CraftFirework(server, (EntityFireworks)entity); \n/* 388 */ if (entity instanceof EntityShulkerBullet) return new CraftShulkerBullet(server, (EntityShulkerBullet)entity); \n/* 389 */ if (entity instanceof EntityAreaEffectCloud) return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud)entity); \n/* 390 */ if (entity instanceof EntityEvokerFangs) return new CraftEvokerFangs(server, (EntityEvokerFangs)entity); \n/* 391 */ if (entity instanceof EntityLlamaSpit) return new CraftLlamaSpit(server, (EntityLlamaSpit)entity); }\n/* */ \n/* */ } }\n/* 394 */ throw new AssertionError(\"Unknown entity \" + ((entity == null) ? null : entity.getClass()));\n/* */ }", "Net findNet(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Net)return (Net)g;\r\n\t\t}\r\n\treturn nullNet;\r\n\t}", "public Entity.Spigot spigot() {\n/* 1087 */ return this.spigot;\n/* */ }", "WorldGenerator getForWorld(World world);", "public World getWorld();", "private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }", "World getWorld();", "public <T extends GameObject> T[] senseNearbyGameObjects(Class<T> type);", "public abstract void gameObjectAwakens();", "Entity getShooter();", "abstract public GameElement getGameElement();", "public abstract void accept(GameObjectVisitor v);", "public GameObject getGameObject()\n {\n return this.gameObject;\n }", "public abstract ArrayList<GameObject> fight();", "@Override\n\tpublic World getWorld() { return world; }", "public ThingNode getWorld()\n {\n return world;\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isMinecraftEntity(final Object obj) {\n \t\treturn getEntityClass().isAssignableFrom(obj.getClass());\n \t}", "public int getGameObject (GameObject gameObject){\n\t\tint typeObject =0;\r\n\t\tif (gameObject instanceof ShipSection){\r\n\t\t\ttypeObject= 1;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Shots || gameObject instanceof Explosion){\r\n\t\t\ttypeObject= 2;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Blank){\r\n\t\t\ttypeObject= 3;\r\n\t\t}\r\n\t\treturn typeObject;\r\n\t}", "public void visit(Instanceof i) {}", "public Class<?> getCreatureClass()\r\n/* 19: */ {\r\n/* 20:37 */ return this.e;\r\n/* 21: */ }", "public MapLocation senseLocationOf(GameObject o) throws GameActionException;", "public T caseSeason(Season object) {\n\t\treturn null;\n\t}", "public World getWorld(String worldName);", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public Shoe makeShoe() {\n\treturn new Shoe();\r\n}", "private LinkedList<Smoke> listSensorSmoke(){\r\n LinkedList<Smoke> aux=new LinkedList<>();\r\n for (Sensor s:sensors){\r\n if(s instanceof Smoke)\r\n aux.add((Smoke)s);\r\n }\r\n return aux;\r\n }", "private WarPlayer castPlayer (Player player) {\n return (WarPlayer)player;\n }", "public List<Entity> getPassengers() {\n/* 667 */ return Lists.newArrayList(Lists.transform((getHandle()).passengers, new Function<Entity, Entity>()\n/* */ {\n/* */ public Entity apply(Entity input) {\n/* 670 */ return input.getBukkitEntity();\n/* */ }\n/* */ }));\n/* */ }", "@Override\n\tpublic BaseNode slove() {\n\t\treturn this.search(board);\n\n\t}", "private Spaceship getTheSpaceship() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tif(object instanceof Spaceship)\n\t\t\t\treturn (Spaceship) object;\n\t\treturn null;\n\t}", "public SbMatrix\ngetWorldToObject( SoNode node) \n//\n////////////////////////////////////////////////////////////////////////\n{\n getMatrix(node);\n return matrixAction.getInverse();\n}", "public Mass getCholesterolContent() throws ClassCastException;", "public World getParent() {\r\n return ocean;\r\n }", "public interface iPhisycs<E extends WolEntity> extends iEventGenerator<E>,iEventObserver<E>,Runnable,Serializable{\r\n public void insert(E entity,Position coordinate);\r\n public void castAwayEntities(Position coordinate,long radius);//Cast away all entities in thre radius near the position\r\n //public Acceleration calcAcceleration(E entity,Collection<Force> forces);\r\n public void applyForce(E entity,Force force);\r\n public void removeForce(E entity,Force force);\r\n public Velocity getVelocity(E entity);\r\n public Rotation<E> getAngularVelocity(E entity);\r\n}", "public void ingresaVehiculo (){\r\n \r\n Vehicle skate = new Skateboard(\"vanz\", \"2009\", \"1 metro\");\r\n Vehicle carro = new Car(\"renault\", \"2009\", \"disel\",\"corriente\" );\r\n Vehicle jet = new Jet(\"jet\", \"2019\", \"premiun\", \"ocho motores\");\r\n Vehicle cicla = new Bicycle(\"shimano\", \"2010\",\"4 tiempos\" ) ; \r\n Vehuculo.add(skate);\r\n Vehuculo.add(carro);\r\n Vehuculo.add(jet);\r\n Vehuculo.add(cicla); \r\n \r\n /*\r\n for en el cual se hace el parceo y se instancia la clase Skateboard\r\n \r\n */\r\n for (Vehicle Vehuculo1 : Vehuculo) {\r\n if(Vehuculo1 instanceof Skateboard){\r\n Skateboard skatevehiculo = (Skateboard)Vehuculo1;\r\n skatevehiculo.imprimirPadre();\r\n skatevehiculo.imprimirSkate();\r\n skatevehiculo.imprimirInterfaz();\r\n }\r\n /*\r\n se intancia y se hace el parceo de la clase car\r\n \r\n */\r\n else if(Vehuculo1 instanceof Car){\r\n \r\n Car carvhiculo = (Car)Vehuculo1;\r\n carvhiculo.imprimirPadre();\r\n carvhiculo.imprimirCarro();\r\n carvhiculo.imprimirVehiculopotenciado();\r\n \r\n \r\n \r\n }\r\n /*se intancia y se hace el parceo de la clase\r\n \r\n */\r\n else if(Vehuculo1 instanceof Jet){\r\n \r\n Jet jethiculo = (Jet)Vehuculo1;\r\n jethiculo.imprimirPadre();\r\n jethiculo.imprimirJet();\r\n jethiculo.imprimirVehiculopotenciado();\r\n jethiculo.imprimirInterfaz();\r\n }\r\n else if(Vehuculo1 instanceof Bicycle){\r\n \r\n Bicycle ciclavehiculo = (Bicycle)Vehuculo1;\r\n ciclavehiculo.imprimirPadre();\r\n ciclavehiculo.imprimirBici();\r\n }\r\n }\r\n \r\n \r\n }", "public interface IGetWorld {\n void getDynamicObjects();\n}", "public abstract String getWorldType();", "public World getWorld() {\n return world;\n }", "public World getWorld() {\n return world;\n }", "public BowlingGame getGame();", "public T caseSphere(Sphere object) {\r\n\t\treturn null;\r\n\t}", "slco.Object getObject2();", "@Override\n\tpublic void visit(Instanceof n) {\n\t\t\n\t}", "@ReflectiveMethod(name = \"b\", types = {NMSEntityAgeable.class})\n public NMSEntitySheep b(NMSEntityAgeable entityAgeable){\n return new NMSEntitySheep(NMSWrapper.getInstance().exec(nmsObject, entityAgeable));\n }", "public abstract V getEntity();", "public abstract void collector(FloodItWorld w);", "public abstract Player getOpponent();", "@ReflectiveMethod(name = \"a\", types = {NMSWorld.class, int.class})\n public NMSTileEntity a(NMSWorld world, int i){\n return new NMSTileEntity(NMSWrapper.getInstance().exec(nmsObject, world, i));\n }", "void impact(GameObject object) {\n\n }", "protected Entity findPlayerToAttack() {\n/* 339 */ double var1 = 8.0D;\n/* 340 */ return getIsSummoned() ? null : this.field_70170_p.func_72890_a(this, var1);\n/* */ }", "private LinkedList<Gas> listSensorGas(){\r\n LinkedList<Gas> aux=new LinkedList<>();\r\n for (Sensor doo:sensors){\r\n if(doo instanceof Gas)\r\n aux.add((Gas)doo);\r\n }\r\n return aux;\r\n }", "private World copyWorld(boolean useCloning) throws CloneNotSupportedException {\n\t \n\t if (useCloning == false) {\n\t \t\tif ( mWorld instanceof ArrayWorld) { // if mWorld (current) is an ArrayWorld\n\t \t\t\tWorld copy;\n\t \t\t\tcopy = new ArrayWorld((ArrayWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n\t \t\telse if ( mWorld instanceof PackedWorld) {\n\t \t\t\tWorld copy = new PackedWorld((PackedWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n \t \t}\n\t else {\n\t\t World copy = (World) mWorld.clone();\n\t\t \treturn copy;\n\t }\n\t \n\t return null;\n\t}", "public abstract Collection<PlayerFish> getPlayers();", "private Entity getThing(String s)\r\n/* 304: */ {\r\n/* 305:260 */ Entity t = (Entity)this.things.get(s);\r\n/* 306:261 */ if (t == null)\r\n/* 307: */ {\r\n/* 308:263 */ int space = s.indexOf(\" \");\r\n/* 309: */ \r\n/* 310:265 */ t = new Entity(s.substring(1, space));\r\n/* 311: */ }\r\n/* 312:268 */ return t;\r\n/* 313: */ }", "@Override\n\tpublic Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {\n\t TileEntity tileEntity = world.getBlockTileEntity(x, y, z);\n\t if(tileEntity instanceof TileEntityBioCarbonizer){\n\t \treturn new ContainerBioCarbonizer(player.inventory, (TileEntityBioCarbonizer)tileEntity);\n\t }else if(tileEntity instanceof TileEntityBlast){\n\t \treturn new ContainerBlast(player.inventory,(TileEntityBlast)tileEntity);\n\t }else if(tileEntity instanceof TileEntityIncinerator){\n\t \treturn new ContainerIncinerator(player.inventory,(TileEntityIncinerator)tileEntity);\n\t }\n return null;\n}", "void printObjects(){\r\n\t\tIterator iterator = gc.getIterator();\r\n\t while(iterator.hasNext()){\r\n\t\t GameObject g = iterator.getNext();\r\n\t\t\t if (!(g instanceof Bar))System.out.println(g.toString());\r\n\t\t}\r\n\t}", "public EnemyRoom getEnemyRoom(){\n return (EnemyRoom) room;\n }", "private ArrayList<Slime> getSlimes(){\n\t\treturn slimes;\n\t}", "public ISite getSite() throws AstrometryException;", "public Enemy getEnemy(int whichEnemy);", "public Warrior checkWarrior(){\n Object obj=charactersOccupiedTheLocation[0];\n if(obj!=null){\n return (Warrior)obj;\n }\n return null;\n }", "public Map<EntityPlayer, Vec3> b()\r\n/* 204: */ {\r\n/* 205:217 */ return this.k;\r\n/* 206: */ }", "public Room getTheObject(){\n return this;\n }", "GeometricalObject getObject(int index);", "@Override\n\tpublic Boolean esVideo() {\n\t\tBoolean bool = this instanceof Video; \n\t\treturn bool;\n\t}", "private GameObject resolveXMLNode(Node node) {\n\t\tGameObject gO = null;\n\n\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\tElement element = (Element) node;\n\n\t\t\tswitch (element.getAttribute(\"type\")) {\n\n\t\t\t\tcase \"MPOpponentObject4\":\n\t\t\t\t\tgO = new MPOpponentObject4();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPOpponentObject3\":\n\t\t\t\t\tgO = new MPOpponentObject3();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPPlayerObject\":\n\t\t\t\t\tgO = new MPPlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPOpponentObject\":\n\t\t\t\t\tgO = new MPOpponentObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PlayerObject\":\n\t\t\t\t\tgO = new PlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"GroundObject\":\n\t\t\t\t\tgO = new GroundObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"AIPlayerObject\":\n\t\t\t\t\tgO = new AIPlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EnemyObject\":\n\t\t\t\t\tgO = new EnemyObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DamageBooster\":\n\t\t\t\t\tgO = new DamageBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SpeedBooster\":\n\t\t\t\t\tgO = new SpeedBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"JumpBooster\":\n\t\t\t\t\tgO = new JumpBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"BaseBooster\":\n\t\t\t\t\tgO = new BaseBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MovingObstacle\":\n\t\t\t\t\tgO = new MovingObstacle();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"StunBooster\":\n\t\t\t\t\tgO = new StunBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MovingGroundObject\":\n\t\t\t\t\tgO = new MovingGroundObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CoinObject\":\n\t\t\t\t\tgO = new CoinObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Meteor\":\n\t\t\t\t\tgO = new Meteor();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"InvincibleWeapon\":\n\t\t\t\t\tgO = new InvincibleWeapon();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ObstacleWeapon\":\n\t\t\t\t\tgO = new ObstacleWeapon();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"KnockbackBooster\":\n\t\t\t\t\tgO = new KnockbackBooster();\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif (gO != null) {\n\t\t\t\tNodeList components = element.getElementsByTagName(\"Component\");\n\t\t\t\tfor (int i = 0; i < components.getLength(); i++) {\n\t\t\t\t\tElement component = (Element) components.item(i);\n\t\t\t\t\tgO.GetComponent(component.getAttribute(\"type\")).ResolveXML(component);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn gO;\n\t}", "public abstract Koordinate schuss();", "public GameObject peek();", "private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"intersected\");\r\n\t\t\t\t\tthis.setTranslateY(renderObject.getTranslateY() - renderObject.getHeight());\r\n\t\t\t\t\tfalling = false;\r\n\t\t\t\t\tjump = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfalling = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (renderObject.getType() == \"NURSE\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"nurse\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else {\r\n\t\t\t\tfalling = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n }", "public boolean a(EntityPlayer paramahd)\r\n/* 24: */ {\r\n/* 25: 79 */ return true;\r\n/* 26: */ }", "public Salvageable getSalvageable(Material type);", "public WorldEnd worldEnds() {\n if (this.collected == 0 && this.helicopter.isCollected) {\n return new WorldEnd(true, this.makeScene());\n }\n for (Cell c : this.board) {\n if (c.isFlooded && (c.isTouching(this.player) || c.isTouching2(this.player2))) {\n return new WorldEnd(true, this.makeScene());\n }\n }\n return new WorldEnd(false, this.makeScene());\n }", "public interface WorldQueryService {\n\n /**\n * @param type The type of world.\n * @return The world of this type.\n */\n World getWorld(WorldType type);\n\n /**\n * @param world The world.\n * @param x The X coordinate.\n * @param y The Y coordinate.\n * @param z The Z coordinate.\n * @return The block in the given world at the specified coordinates.\n */\n Block getBlockAt(WorldType world, int x, int y, int z);\n\n /**\n * @param world The world.\n * @param vector The vector.\n * @return The block at the given vector.\n */\n Block getBlockAt(WorldType world, Vector3ic vector);\n\n /**\n * @param location The location.\n * @return The block at the location.\n */\n Block getBlockAt(BlockLocation location);\n\n /**\n * @param location The location.\n * @return The block at the location.\n */\n Block getBlockAt(Location location);\n\n /**\n * @param world The world.\n * @param x The X coordinate.\n * @param z The Y coordinate.\n * @return The highest non-air block in the given world at the specified coordinates.\n */\n Block getHighestBlockAt(WorldType world, int x, int z);\n\n /**\n * @param location The location.\n * @return The highest non-air block at the specified location.\n */\n Block getHighestBlockAt(BlockLocation location);\n\n\n}", "public List<Enemy> getEnemies();", "public WorldScene makeScene() {\n WorldScene ws = new WorldScene(ForbiddenIslandWorld.ISLAND_SIZE,\n ForbiddenIslandWorld.ISLAND_SIZE);\n for (Cell c : this.board) {\n ws.placeImageXY(c.drawCell(waterHeight), c.x * 10, c.y * 10);\n }\n for (Target t : this.helicopterpieces) {\n ws.placeImageXY(t.drawPiece(), t.x * 10, t.y * 10);\n }\n ws.placeImageXY(this.player.drawPerson(), player.x * 10, player.y * 10);\n ws.placeImageXY(this.player2.drawPerson2(), player2.x * 10, player2.y * 10);\n return ws;\n }", "public SimpleWorldObject getSimpleWorldObject() {\n\t\treturn swo;\n\t}", "public SedeEntity getSede() \r\n {\r\n return this.sede;\r\n }", "public bza(EntityPlayer paramahd)\r\n/* 10: */ {\r\n/* 11: 63 */ Inventory localahb = paramahd.inventory;\r\n/* 12: 64 */ for (int i = 0; i < 5; i++) {\r\n/* 13: 65 */ for (int j = 0; j < 9; j++) {\r\n/* 14: 66 */ a(new ajk(byz.f(), i * 9 + j, 9 + j * 18, 18 + i * 18));\r\n/* 15: */ }\r\n/* 16: */ }\r\n/* 17: 70 */ for (int i = 0; i < 9; i++) {\r\n/* 18: 71 */ a(new ajk(localahb, i, 9 + i * 18, 112));\r\n/* 19: */ }\r\n/* 20: 74 */ a(0.0F);\r\n/* 21: */ }", "public interface Shoots {\n}", "public World getWorld () {\n\t\treturn world;\n\t}", "public GameTypeWrapper playGame();", "@Override\n public Element senseElement(World world, int agentX, int agentY, int squareX, int squareY) {\n Element e = world.getSquare(squareX, squareY).getElement();\n if (e.isAgent()) return null; // there is no food but there might be an agent\n \n \n double distance = Math.sqrt(Math.pow(squareX - agentX, 2) + Math.pow(squareY - agentY, 2));\n int random = new Random().nextInt(100);\n double decimalDistance = (distance/this.getElementRange()); // something like 0.80\n double cutoff = 5*decimalDistance; // the closer we are, the smaller the cutoff, the smaller the chances of sensing incorrectly\n if (random > cutoff) // we sense correctly\n {\n return e; // return whether theres food or not\n }\n else {\n if (e == null)\n return new Food(); // it thinks there's food but theres not\n else\n return null; // it thinks theres no food but there is\n }\n \n }", "public GameData getWorld() {\r\n return world;\r\n }", "public Level getWorld() {\r\n return this;\r\n }", "public GameObject get(int index) {\r\n\t\treturn (GameObject) list.get(index);\r\n\t}", "private LinkedList<Wind> listSensorWind(){\r\n LinkedList<Wind> aux=new LinkedList<>();\r\n for (Sensor doo:sensors){\r\n if(doo instanceof Wind)\r\n aux.add((Wind)doo);\r\n }\r\n return aux;\r\n }", "private Alien getRandomAlien() {\n\t\twhile(roamingAliens >= 0){\n\t\t\tint i = random.nextInt(gameObject.size());\n\t\t\tif(gameObject.get(i)instanceof Alien)\n\t\t\t\treturn (Alien) gameObject.get(i);\n\t\t}\n\t\treturn null;\n\t}", "int indexOf(GeometricalObject object);", "private List<ItemMovement> uitGraven(Slot slot, Gantry gantry){\n\n List<ItemMovement> itemMovements = new ArrayList<>();\n Richting richting = Richting.NaarVoor;\n\n //Recursief naar boven gaan, doordat we namelijk eerste de gevulde parents van een bepaald slot moeten uithalen\n if(slot.getParent() != null && slot.getParent().getItem() != null){\n itemMovements.addAll(uitGraven(slot.getParent(), gantry));\n }\n\n //Slot in een zo dicht mogelijke rij zoeken\n boolean newSlotFound = false;\n Slot newSlot = null;\n int offset = 1;\n do { //TODO: als storage vol zit en NaarVoor en NaarAchter vinden geen vrije plaats => inf loop\n // bij het NaarAchter lopen uw index telkens het negatieve deel nemen, dus deze wordt telkens groter negatief.\n //AANPASSING\n Integer locatie = richting==Richting.NaarVoor? (slot.getCenterY() / 10) + offset : (slot.getCenterY() / 10) - offset;\n //we overlopen eerst alle richtingen NaarVoor wanneer deze op zen einde komt en er geen plaats meer is van richting veranderen naar achter\n // index terug op 1 zetten omdat de indexen ervoor al gecontroleerd waren\n if (grondSlots.get(locatie) == null) {\n //Grootte resetten en richting omdraaien\n offset = 1;\n richting = Richting.NaarAchter;\n continue;\n }\n\n Set<Slot> ondersteRij = new HashSet<>(grondSlots.get(locatie).values());\n newSlot = GeneralMeasures.zoekLeegSlot(ondersteRij);\n\n if(newSlot != null){\n newSlotFound = true;\n }\n //telkens één slot verder gaan\n offset += 1;\n }while(!newSlotFound);\n // vanaf er een nieuw vrij slot gevonden is deze functie verlaten\n\n //verplaatsen\n itemMovements.addAll(GeneralMeasures.createMoves(pickupPlaceDuration,gantry, slot, newSlot));\n update(Operatie.VerplaatsIntern, newSlot, slot);\n\n return itemMovements;\n }", "public void b(EntityPlayer paramahd) {}", "@Override\n\tpublic Boolean esLibro() {\n\t\tBoolean bool = this instanceof Video;\n\t\tif(bool)bool = false;\n\t\telse bool = true;\n\t\treturn bool;\n\t}", "boolean visitSmartContainer(Object o);", "@Override\n public Iterator<T> inOrden(){\n return (super.inOrden());\n }", "public IIterator getIterator() {\n\t\treturn new GameObjectVectorIterator();\n\t}", "private Worm getFirstWormInRangeSpecial() {\n \n int count = 0;\n Worm targetWorm = null;\n\n //Jika worm saat ini adalah Agent (bisa menggunakan Banana Bomb)\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[1].bananaBombs.count;\n int range = gameState.myPlayer.worms[1].bananaBombs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.health <= 0) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n\n //Jika worm saat ini adalah Technician (bisa menggunakan Snowball)\n if (gameState.myPlayer.worms[2].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[2].snowballs.count;\n int range = gameState.myPlayer.worms[2].snowballs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.roundsUntilUnfrozen > 1) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n \n return targetWorm;\n\n }", "Object getObject();", "Object getObject();" ]
[ "0.5864327", "0.5742805", "0.5730504", "0.57007116", "0.5684811", "0.5618274", "0.5604474", "0.55402386", "0.5538347", "0.5508373", "0.54507935", "0.5346618", "0.5277931", "0.5215871", "0.5214463", "0.5193803", "0.51866037", "0.5166855", "0.5132995", "0.5131617", "0.5129224", "0.51185966", "0.5098484", "0.5084326", "0.50812596", "0.50639874", "0.5057352", "0.50553924", "0.50502616", "0.503895", "0.5036067", "0.5021891", "0.501221", "0.50041234", "0.49990818", "0.49932685", "0.49736646", "0.49712384", "0.49557805", "0.4939149", "0.49280828", "0.49280828", "0.49173623", "0.4904346", "0.4900668", "0.4895862", "0.489268", "0.4878804", "0.48727956", "0.48708642", "0.48702917", "0.4861087", "0.48384243", "0.48241317", "0.482246", "0.4821217", "0.4813692", "0.48131287", "0.48110828", "0.48105314", "0.48079687", "0.48060912", "0.48032355", "0.48002303", "0.47917077", "0.47827893", "0.47755072", "0.47744226", "0.47724187", "0.4771511", "0.47656378", "0.47450703", "0.4737479", "0.47347838", "0.4733099", "0.47249103", "0.47235915", "0.47212735", "0.4720712", "0.47195864", "0.4718752", "0.47170535", "0.471237", "0.4709385", "0.4708486", "0.47050244", "0.47042418", "0.47019655", "0.4700715", "0.46986768", "0.46956873", "0.46885303", "0.46829295", "0.46828833", "0.46776462", "0.46706998", "0.4670438", "0.46688193", "0.46687", "0.46687" ]
0.7843104
0
for(GameObject g: world)if (g instanceof Net)return (Net)g;
Net findNet(){ Iterator iterator = gc.getIterator(); while(iterator.hasNext()){ GameObject g = iterator.getNext(); if (g instanceof Net)return (Net)g; } return nullNet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GameObject getObject();", "public NetObject getObject();", "GameObject findSeaweed(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Seaweed)return g;\r\n\t\t}\r\n\treturn nullSeaweed;\r\n\t}", "private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }", "public <T extends GameObject> T[] senseNearbyGameObjects(Class<T> type);", "public interface IGetWorld {\n void getDynamicObjects();\n}", "public int getGameObject (GameObject gameObject){\n\t\tint typeObject =0;\r\n\t\tif (gameObject instanceof ShipSection){\r\n\t\t\ttypeObject= 1;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Shots || gameObject instanceof Explosion){\r\n\t\t\ttypeObject= 2;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Blank){\r\n\t\t\ttypeObject= 3;\r\n\t\t}\r\n\t\treturn typeObject;\r\n\t}", "public static CraftEntity getEntity(CraftServer server, Entity entity) {\n/* 199 */ if (entity instanceof EntityLiving)\n/* */ \n/* 201 */ { if (entity instanceof EntityHuman) {\n/* 202 */ if (entity instanceof EntityPlayer) return new CraftPlayer(server, (EntityPlayer)entity); \n/* 203 */ return new CraftHumanEntity(server, (EntityHuman)entity);\n/* */ } \n/* */ \n/* 206 */ if (entity instanceof EntityWaterAnimal) {\n/* 207 */ if (entity instanceof EntitySquid) return new CraftSquid(server, (EntitySquid)entity); \n/* 208 */ if (entity instanceof EntityFish) {\n/* 209 */ if (entity instanceof EntityCod) return new CraftCod(server, (EntityCod)entity); \n/* 210 */ if (entity instanceof EntityPufferFish) return new CraftPufferFish(server, (EntityPufferFish)entity); \n/* 211 */ if (entity instanceof EntitySalmon) return new CraftSalmon(server, (EntitySalmon)entity); \n/* 212 */ if (entity instanceof EntityTropicalFish) return new CraftTropicalFish(server, (EntityTropicalFish)entity); \n/* 213 */ return new CraftFish(server, (EntityFish)entity);\n/* */ } \n/* 215 */ if (entity instanceof EntityDolphin) return new CraftDolphin(server, (EntityDolphin)entity); \n/* 216 */ return new CraftWaterMob(server, (EntityWaterAnimal)entity);\n/* */ } \n/* 218 */ if (entity instanceof EntityCreature)\n/* */ \n/* 220 */ { if (entity instanceof EntityAnimal)\n/* 221 */ { if (entity instanceof EntityChicken) return new CraftChicken(server, (EntityChicken)entity); \n/* 222 */ if (entity instanceof EntityCow) {\n/* 223 */ if (entity instanceof EntityMushroomCow) return new CraftMushroomCow(server, (EntityMushroomCow)entity); \n/* 224 */ return new CraftCow(server, (EntityCow)entity);\n/* */ } \n/* 226 */ if (entity instanceof EntityPig) return new CraftPig(server, (EntityPig)entity); \n/* 227 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityTameableAnimal) {\n/* 228 */ if (entity instanceof EntityWolf) return new CraftWolf(server, (EntityWolf)entity); \n/* 229 */ if (entity instanceof EntityCat) return new CraftCat(server, (EntityCat)entity); \n/* 230 */ if (entity instanceof EntityParrot) return new CraftParrot(server, (EntityParrot)entity); \n/* */ } else {\n/* 232 */ if (entity instanceof EntitySheep) return new CraftSheep(server, (EntitySheep)entity); \n/* 233 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseAbstract)\n/* 234 */ { if (entity instanceof net.minecraft.server.v1_16_R2.EntityHorseChestedAbstract)\n/* 235 */ { if (entity instanceof EntityHorseDonkey) return new CraftDonkey(server, (EntityHorseDonkey)entity); \n/* 236 */ if (entity instanceof EntityHorseMule) return new CraftMule(server, (EntityHorseMule)entity); \n/* 237 */ if (entity instanceof EntityLlamaTrader) return new CraftTraderLlama(server, (EntityLlamaTrader)entity); \n/* 238 */ if (entity instanceof EntityLlama) return new CraftLlama(server, (EntityLlama)entity); }\n/* 239 */ else { if (entity instanceof EntityHorse) return new CraftHorse(server, (EntityHorse)entity); \n/* 240 */ if (entity instanceof EntityHorseSkeleton) return new CraftSkeletonHorse(server, (EntityHorseSkeleton)entity); \n/* 241 */ if (entity instanceof EntityHorseZombie) return new CraftZombieHorse(server, (EntityHorseZombie)entity); }\n/* */ }\n/* 243 */ else { if (entity instanceof EntityRabbit) return new CraftRabbit(server, (EntityRabbit)entity); \n/* 244 */ if (entity instanceof EntityPolarBear) return new CraftPolarBear(server, (EntityPolarBear)entity); \n/* 245 */ if (entity instanceof EntityTurtle) return new CraftTurtle(server, (EntityTurtle)entity); \n/* 246 */ if (entity instanceof EntityOcelot) return new CraftOcelot(server, (EntityOcelot)entity); \n/* 247 */ if (entity instanceof EntityPanda) return new CraftPanda(server, (EntityPanda)entity); \n/* 248 */ if (entity instanceof EntityFox) return new CraftFox(server, (EntityFox)entity); \n/* 249 */ if (entity instanceof EntityBee) return new CraftBee(server, (EntityBee)entity); \n/* 250 */ if (entity instanceof EntityHoglin) return new CraftHoglin(server, (EntityHoglin)entity); \n/* 251 */ if (entity instanceof EntityStrider) return new CraftStrider(server, (EntityStrider)entity); \n/* 252 */ return new CraftAnimals(server, (EntityAnimal)entity); }\n/* */ \n/* */ } }\n/* 255 */ else { if (entity instanceof EntityMonster) {\n/* 256 */ if (entity instanceof EntityZombie) {\n/* 257 */ if (entity instanceof EntityPigZombie) return new CraftPigZombie(server, (EntityPigZombie)entity); \n/* 258 */ if (entity instanceof EntityZombieHusk) return new CraftHusk(server, (EntityZombieHusk)entity); \n/* 259 */ if (entity instanceof EntityZombieVillager) return new CraftVillagerZombie(server, (EntityZombieVillager)entity); \n/* 260 */ if (entity instanceof EntityDrowned) return new CraftDrowned(server, (EntityDrowned)entity); \n/* 261 */ return new CraftZombie(server, (EntityZombie)entity);\n/* */ } \n/* 263 */ if (entity instanceof EntityCreeper) return new CraftCreeper(server, (EntityCreeper)entity); \n/* 264 */ if (entity instanceof EntityEnderman) return new CraftEnderman(server, (EntityEnderman)entity); \n/* 265 */ if (entity instanceof EntitySilverfish) return new CraftSilverfish(server, (EntitySilverfish)entity); \n/* 266 */ if (entity instanceof EntityGiantZombie) return new CraftGiant(server, (EntityGiantZombie)entity); \n/* 267 */ if (entity instanceof EntitySkeletonAbstract) {\n/* 268 */ if (entity instanceof EntitySkeletonStray) return new CraftStray(server, (EntitySkeletonStray)entity); \n/* 269 */ if (entity instanceof EntitySkeletonWither) return new CraftWitherSkeleton(server, (EntitySkeletonWither)entity); \n/* 270 */ return new CraftSkeleton(server, (EntitySkeletonAbstract)entity);\n/* */ } \n/* 272 */ if (entity instanceof EntityBlaze) return new CraftBlaze(server, (EntityBlaze)entity); \n/* 273 */ if (entity instanceof EntityWitch) return new CraftWitch(server, (EntityWitch)entity); \n/* 274 */ if (entity instanceof EntityWither) return new CraftWither(server, (EntityWither)entity); \n/* 275 */ if (entity instanceof EntitySpider) {\n/* 276 */ if (entity instanceof EntityCaveSpider) return new CraftCaveSpider(server, (EntityCaveSpider)entity); \n/* 277 */ return new CraftSpider(server, (EntitySpider)entity);\n/* */ } \n/* 279 */ if (entity instanceof EntityEndermite) return new CraftEndermite(server, (EntityEndermite)entity); \n/* 280 */ if (entity instanceof EntityGuardian) {\n/* 281 */ if (entity instanceof EntityGuardianElder) return new CraftElderGuardian(server, (EntityGuardianElder)entity); \n/* 282 */ return new CraftGuardian(server, (EntityGuardian)entity);\n/* */ } \n/* 284 */ if (entity instanceof EntityVex) return new CraftVex(server, (EntityVex)entity); \n/* 285 */ if (entity instanceof EntityIllagerAbstract) {\n/* 286 */ if (entity instanceof EntityIllagerWizard) {\n/* 287 */ if (entity instanceof EntityEvoker) return new CraftEvoker(server, (EntityEvoker)entity); \n/* 288 */ if (entity instanceof EntityIllagerIllusioner) return new CraftIllusioner(server, (EntityIllagerIllusioner)entity); \n/* 289 */ return new CraftSpellcaster(server, (EntityIllagerWizard)entity);\n/* */ } \n/* 291 */ if (entity instanceof EntityVindicator) return new CraftVindicator(server, (EntityVindicator)entity); \n/* 292 */ if (entity instanceof EntityPillager) return new CraftPillager(server, (EntityPillager)entity); \n/* 293 */ return new CraftIllager(server, (EntityIllagerAbstract)entity);\n/* */ } \n/* 295 */ if (entity instanceof EntityRavager) return new CraftRavager(server, (EntityRavager)entity); \n/* 296 */ if (entity instanceof EntityPiglinAbstract) {\n/* 297 */ if (entity instanceof EntityPiglin) return new CraftPiglin(server, (EntityPiglin)entity); \n/* 298 */ if (entity instanceof EntityPiglinBrute) return new CraftPiglinBrute(server, (EntityPiglinBrute)entity); \n/* 299 */ return new CraftPiglinAbstract(server, (EntityPiglinAbstract)entity);\n/* */ } \n/* 301 */ if (entity instanceof EntityZoglin) return new CraftZoglin(server, (EntityZoglin)entity);\n/* */ \n/* 303 */ return new CraftMonster(server, (EntityMonster)entity);\n/* */ } \n/* 305 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityGolem) {\n/* 306 */ if (entity instanceof EntitySnowman) return new CraftSnowman(server, (EntitySnowman)entity); \n/* 307 */ if (entity instanceof EntityIronGolem) return new CraftIronGolem(server, (EntityIronGolem)entity); \n/* 308 */ if (entity instanceof EntityShulker) return new CraftShulker(server, (EntityShulker)entity); \n/* */ } else {\n/* 310 */ if (entity instanceof EntityVillagerAbstract) {\n/* 311 */ if (entity instanceof EntityVillager) return new CraftVillager(server, (EntityVillager)entity); \n/* 312 */ if (entity instanceof EntityVillagerTrader) return new CraftWanderingTrader(server, (EntityVillagerTrader)entity); \n/* 313 */ return new CraftAbstractVillager(server, (EntityVillagerAbstract)entity);\n/* */ } \n/* 315 */ return new CraftCreature(server, (EntityCreature)entity);\n/* */ } }\n/* */ }\n/* 318 */ else { if (entity instanceof EntitySlime) {\n/* 319 */ if (entity instanceof EntityMagmaCube) return new CraftMagmaCube(server, (EntityMagmaCube)entity); \n/* 320 */ return new CraftSlime(server, (EntitySlime)entity);\n/* */ } \n/* */ \n/* 323 */ if (entity instanceof EntityFlying) {\n/* 324 */ if (entity instanceof EntityGhast) return new CraftGhast(server, (EntityGhast)entity); \n/* 325 */ if (entity instanceof EntityPhantom) return new CraftPhantom(server, (EntityPhantom)entity); \n/* 326 */ return new CraftFlying(server, (EntityFlying)entity);\n/* */ } \n/* 328 */ if (entity instanceof EntityEnderDragon) {\n/* 329 */ return new CraftEnderDragon(server, (EntityEnderDragon)entity);\n/* */ }\n/* */ \n/* 332 */ if (entity instanceof EntityAmbient) {\n/* 333 */ if (entity instanceof EntityBat) return new CraftBat(server, (EntityBat)entity); \n/* 334 */ return new CraftAmbient(server, (EntityAmbient)entity);\n/* */ } \n/* 336 */ if (entity instanceof EntityArmorStand) return new CraftArmorStand(server, (EntityArmorStand)entity); \n/* 337 */ return new CraftLivingEntity(server, (EntityLiving)entity); }\n/* */ }\n/* 339 */ else { if (entity instanceof EntityComplexPart) {\n/* 340 */ EntityComplexPart part = (EntityComplexPart)entity;\n/* 341 */ if (part.owner instanceof EntityEnderDragon) return new CraftEnderDragonPart(server, (EntityComplexPart)entity); \n/* 342 */ return new CraftComplexPart(server, (EntityComplexPart)entity);\n/* */ } \n/* 344 */ if (entity instanceof EntityExperienceOrb) return new CraftExperienceOrb(server, (EntityExperienceOrb)entity); \n/* 345 */ if (entity instanceof EntityTippedArrow) return new CraftTippedArrow(server, (EntityTippedArrow)entity); \n/* 346 */ if (entity instanceof EntitySpectralArrow) return new CraftSpectralArrow(server, (EntitySpectralArrow)entity); \n/* 347 */ if (entity instanceof EntityArrow) {\n/* 348 */ if (entity instanceof EntityThrownTrident) return new CraftTrident(server, (EntityThrownTrident)entity); \n/* 349 */ return new CraftArrow(server, (EntityArrow)entity);\n/* */ } \n/* 351 */ if (entity instanceof EntityBoat) return new CraftBoat(server, (EntityBoat)entity); \n/* 352 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityProjectile) {\n/* 353 */ if (entity instanceof EntityEgg) return new CraftEgg(server, (EntityEgg)entity); \n/* 354 */ if (entity instanceof EntitySnowball) return new CraftSnowball(server, (EntitySnowball)entity); \n/* 355 */ if (entity instanceof EntityPotion) return new CraftThrownPotion(server, (EntityPotion)entity); \n/* 356 */ if (entity instanceof EntityEnderPearl) return new CraftEnderPearl(server, (EntityEnderPearl)entity); \n/* 357 */ if (entity instanceof EntityThrownExpBottle) return new CraftThrownExpBottle(server, (EntityThrownExpBottle)entity); \n/* */ } else {\n/* 359 */ if (entity instanceof EntityFallingBlock) return new CraftFallingBlock(server, (EntityFallingBlock)entity); \n/* 360 */ if (entity instanceof EntityFireball) {\n/* 361 */ if (entity instanceof EntitySmallFireball) return new CraftSmallFireball(server, (EntitySmallFireball)entity); \n/* 362 */ if (entity instanceof EntityLargeFireball) return new CraftLargeFireball(server, (EntityLargeFireball)entity); \n/* 363 */ if (entity instanceof EntityWitherSkull) return new CraftWitherSkull(server, (EntityWitherSkull)entity); \n/* 364 */ if (entity instanceof EntityDragonFireball) return new CraftDragonFireball(server, (EntityDragonFireball)entity); \n/* 365 */ return new CraftFireball(server, (EntityFireball)entity);\n/* */ } \n/* 367 */ if (entity instanceof EntityEnderSignal) return new CraftEnderSignal(server, (EntityEnderSignal)entity); \n/* 368 */ if (entity instanceof EntityEnderCrystal) return new CraftEnderCrystal(server, (EntityEnderCrystal)entity); \n/* 369 */ if (entity instanceof EntityFishingHook) return new CraftFishHook(server, (EntityFishingHook)entity); \n/* 370 */ if (entity instanceof EntityItem) return new CraftItem(server, (EntityItem)entity); \n/* 371 */ if (entity instanceof EntityLightning) return new CraftLightningStrike(server, (EntityLightning)entity); \n/* 372 */ if (entity instanceof EntityMinecartAbstract)\n/* 373 */ { if (entity instanceof EntityMinecartFurnace) return new CraftMinecartFurnace(server, (EntityMinecartFurnace)entity); \n/* 374 */ if (entity instanceof EntityMinecartChest) return new CraftMinecartChest(server, (EntityMinecartChest)entity); \n/* 375 */ if (entity instanceof EntityMinecartTNT) return new CraftMinecartTNT(server, (EntityMinecartTNT)entity); \n/* 376 */ if (entity instanceof EntityMinecartHopper) return new CraftMinecartHopper(server, (EntityMinecartHopper)entity); \n/* 377 */ if (entity instanceof EntityMinecartMobSpawner) return new CraftMinecartMobSpawner(server, (EntityMinecartMobSpawner)entity); \n/* 378 */ if (entity instanceof net.minecraft.server.v1_16_R2.EntityMinecartRideable) return new CraftMinecartRideable(server, (EntityMinecartAbstract)entity); \n/* 379 */ if (entity instanceof EntityMinecartCommandBlock) return new CraftMinecartCommand(server, (EntityMinecartCommandBlock)entity); }\n/* 380 */ else { if (entity instanceof EntityHanging) {\n/* 381 */ if (entity instanceof EntityPainting) return new CraftPainting(server, (EntityPainting)entity); \n/* 382 */ if (entity instanceof EntityItemFrame) return new CraftItemFrame(server, (EntityItemFrame)entity); \n/* 383 */ if (entity instanceof EntityLeash) return new CraftLeash(server, (EntityLeash)entity); \n/* 384 */ return new CraftHanging(server, (EntityHanging)entity);\n/* */ } \n/* 386 */ if (entity instanceof EntityTNTPrimed) return new CraftTNTPrimed(server, (EntityTNTPrimed)entity); \n/* 387 */ if (entity instanceof EntityFireworks) return new CraftFirework(server, (EntityFireworks)entity); \n/* 388 */ if (entity instanceof EntityShulkerBullet) return new CraftShulkerBullet(server, (EntityShulkerBullet)entity); \n/* 389 */ if (entity instanceof EntityAreaEffectCloud) return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud)entity); \n/* 390 */ if (entity instanceof EntityEvokerFangs) return new CraftEvokerFangs(server, (EntityEvokerFangs)entity); \n/* 391 */ if (entity instanceof EntityLlamaSpit) return new CraftLlamaSpit(server, (EntityLlamaSpit)entity); }\n/* */ \n/* */ } }\n/* 394 */ throw new AssertionError(\"Unknown entity \" + ((entity == null) ? null : entity.getClass()));\n/* */ }", "public ThingNode getWorld()\n {\n return world;\n }", "public static EnergyNet getForWorld(World world) {\n\t\ttry {\n\t\t\tif (EnergyNet_getForWorld == null) EnergyNet_getForWorld = Class.forName(getPackage() + \".core.EnergyNet\").getMethod(\"getForWorld\", World.class);\n\n\t\t\treturn new EnergyNet(EnergyNet_getForWorld.invoke(null, world));\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "WorldGenerator getForWorld(World world);", "public BoxModel getWorldModel(IBlockAccess world, int x, int y, int z)\r\n/* 87: */ {\r\n/* 88: 89 */ int pipe_type = 0;int metadata = 0;int node_dir = 0;\r\n/* 89: 92 */ if (!(world.getTileEntity(x, y, z) instanceof INode)) {\r\n/* 90: 93 */ return new BoxModel();\r\n/* 91: */ }\r\n/* 92: 96 */ INode node = (INode)world.getTileEntity(x, y, z);\r\n/* 93: */ \r\n/* 94: 98 */ BoxModel boxes = node.getModel(node.getNodeDir());\r\n/* 95: 99 */ List pipe_boxes = getPipeModel(world, x, y, z, null);\r\n/* 96:101 */ if (pipe_boxes.size() > 1) {\r\n/* 97:102 */ boxes.addAll(pipe_boxes);\r\n/* 98: */ }\r\n/* 99:105 */ return boxes;\r\n/* 100: */ }", "private Spaceship getTheSpaceship() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tif(object instanceof Spaceship)\n\t\t\t\treturn (Spaceship) object;\n\t\treturn null;\n\t}", "@ReflectiveMethod(name = \"a\", types = {NMSWorld.class, int.class})\n public NMSTileEntity a(NMSWorld world, int i){\n return new NMSTileEntity(NMSWrapper.getInstance().exec(nmsObject, world, i));\n }", "public SbMatrix\ngetWorldToObject( SoNode node) \n//\n////////////////////////////////////////////////////////////////////////\n{\n getMatrix(node);\n return matrixAction.getInverse();\n}", "public EntityLiving c()\r\n/* 209: */ {\r\n/* 210:221 */ if (this.h == null) {\r\n/* 211:222 */ return null;\r\n/* 212: */ }\r\n/* 213:224 */ if ((this.h instanceof aek)) {\r\n/* 214:225 */ return ((aek)this.h).j();\r\n/* 215: */ }\r\n/* 216:227 */ if ((this.h instanceof EntityLiving)) {\r\n/* 217:228 */ return (EntityLiving)this.h;\r\n/* 218: */ }\r\n/* 219:230 */ return null;\r\n/* 220: */ }", "public World getWorld();", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isMinecraftEntity(final Object obj) {\n \t\treturn getEntityClass().isAssignableFrom(obj.getClass());\n \t}", "public T caseNetwork(Network object) {\r\n\t\treturn null;\r\n\t}", "World getWorld();", "public EntityObject getEntityObject(String language,String type) {\n\t\tEntityObject r = null;\n\t\tfor (EntityObject eo: entities) {\n\t\t\tif (eo.getLanguage().equals(language) && eo.getType().equals(type)) {\n\t\t\t\tr = eo;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn r;\n\t}", "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to find first instance of a fish\r\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Fish)return (Fish)g;\r\n\t\t}\r\n\treturn nullFish;\r\n\t}", "void printObjects(){\r\n\t\tIterator iterator = gc.getIterator();\r\n\t while(iterator.hasNext()){\r\n\t\t GameObject g = iterator.getNext();\r\n\t\t\t if (!(g instanceof Bar))System.out.println(g.toString());\r\n\t\t}\r\n\t}", "public ArrayList<Entity> retrieve(Entity entity){\n int index = this.getIndex(entity);\n if (index != -1){\n // Recursiveley find its real node\n return this.getNodes().get(index).retrieve(entity);\n }else{\n // It is part of the current node\n ArrayList<Entity> collision = (ArrayList<Entity>) entities.clone();\n collision.remove(entity); //We dont want to return the entity itself as part of the collision\n return collision;\n }\n\n }", "NetworkNodeType getIsA();", "private GameObject resolveXMLNode(Node node) {\n\t\tGameObject gO = null;\n\n\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\tElement element = (Element) node;\n\n\t\t\tswitch (element.getAttribute(\"type\")) {\n\n\t\t\t\tcase \"MPOpponentObject4\":\n\t\t\t\t\tgO = new MPOpponentObject4();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPOpponentObject3\":\n\t\t\t\t\tgO = new MPOpponentObject3();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPPlayerObject\":\n\t\t\t\t\tgO = new MPPlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPOpponentObject\":\n\t\t\t\t\tgO = new MPOpponentObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PlayerObject\":\n\t\t\t\t\tgO = new PlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"GroundObject\":\n\t\t\t\t\tgO = new GroundObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"AIPlayerObject\":\n\t\t\t\t\tgO = new AIPlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EnemyObject\":\n\t\t\t\t\tgO = new EnemyObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DamageBooster\":\n\t\t\t\t\tgO = new DamageBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SpeedBooster\":\n\t\t\t\t\tgO = new SpeedBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"JumpBooster\":\n\t\t\t\t\tgO = new JumpBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"BaseBooster\":\n\t\t\t\t\tgO = new BaseBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MovingObstacle\":\n\t\t\t\t\tgO = new MovingObstacle();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"StunBooster\":\n\t\t\t\t\tgO = new StunBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MovingGroundObject\":\n\t\t\t\t\tgO = new MovingGroundObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CoinObject\":\n\t\t\t\t\tgO = new CoinObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Meteor\":\n\t\t\t\t\tgO = new Meteor();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"InvincibleWeapon\":\n\t\t\t\t\tgO = new InvincibleWeapon();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ObstacleWeapon\":\n\t\t\t\t\tgO = new ObstacleWeapon();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"KnockbackBooster\":\n\t\t\t\t\tgO = new KnockbackBooster();\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif (gO != null) {\n\t\t\t\tNodeList components = element.getElementsByTagName(\"Component\");\n\t\t\t\tfor (int i = 0; i < components.getLength(); i++) {\n\t\t\t\t\tElement component = (Element) components.item(i);\n\t\t\t\t\tgO.GetComponent(component.getAttribute(\"type\")).ResolveXML(component);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn gO;\n\t}", "public GameObject get(int n) { \n\t\treturn (GameObject) collection.get(n);\n\t}", "public Entity.Spigot spigot() {\n/* 1087 */ return this.spigot;\n/* */ }", "public GameObject getGameObject()\n {\n return this.gameObject;\n }", "public interface ObjectGraph {\n\n\t\n\t/**\n\t * As in neo4j, starts a new transaction and associates it with the current thread.\n\t * @return a transaction from NeoService.\n\t */\n\tTransaction beginTx();\n\n\t/**\n\t * Mirror a java object within the neo4j graph. Only fields annotated with {@code}neo\n\t * will be considered.\n\t * @param o\n\t */\n\t<A> void persist(A... o);\n\n\t/**\n\t * removes all data representing an object from the graph.\n\t * \n\t * @param o an object retrieved from this {@link ObjectGraph}\n\t */\n\tvoid delete(Object... o);\n\t\n\t\n\t/**\n\t * Looks up a neo4j graph node using it's java object\n\t * mirror. \n\t * @param o an object retrieved from this {@link ObjectGraph}\n\t * @return neo4j node represented by o\n\t */\n\tNode get(Object o);\n\t\n\t/**\n\t * Looks up all instances of {@code}type in the graph.\n\t * \n\t * @param type a type previously stored in the graph\n\t * @return a Collection of {@code}type instances.\n\t */\n\t<T> Collection<T> get(Class<T> type);\n\n\t/**\n\t * Type safe lookup of object given it's neo4j nodeid.\n\t * Your domain classes may use {@link Nodeid#id()} to discover\n\t * their neo4j nodeid. \n\t * \n\t * @param t\n\t * @param key neo4j node id.\n\t * @return\n\t */\n\t<T> T get(Class<T> t, long key);\n\n\t\n\t/**\n\t * Return an object represented by <code>node</code> provided\n\t * the node was created by jo4neo.\n\t * \n\t * @param node\n\t * @return an object that mirrors node.\n\t */\n\tObject get(Node node);\n\t\n\t/**\n\t * Looks up the node representation of a given \n\t * uri. This method may update your graph if no node\n\t * was previously allocated for the uri.\n\t * \n\t * @return the node representation of uri.\n\t */\n\tNode get(URI uri);\n\n\n\t/**\n\t * Unmarshal a collections of nodes into objects.\n\t * \n\t */\n\t<T> Collection<T> get(Class<T> type, Iterable<Node> nodes);\n\n\t/**\n\t * Closes this ObjectGraph after which it will be unavailable \n\t * for use. Calling close is necessary, and should be called even\n\t * if the application is halted suddenly. ObjectGraph's maintain \n\t * a lucene index which may become corrupt without proper shutdown.\n\t * \n\t */\n\tvoid close();\n\n\t/**\n\t * Begin fluent interface find. <code>a</code> should be \n\t * a newly constructed instance as it's contents will be modified/initialized\n\t * by this call.\n\t * <pre>\n\t * <code>\n\t * Customer customer = new Customer();\n\t * customer = graph.find(customer).where(customer.id).is(123).result();\n\t * </code>\n\t * </pre>\n\t * \n\t * @param a\n\t * @return\n\t */\n\t<A> Where<A> find(A a);\n\n\t/**\n\t * Counts child entities without loading objects into memory. This is preferable to \n\t * using Collection.size(), which would load the full collection into memory.\n\t * <pre>\n\t * <code>\n\t * Customer customer = new Customer();\n\t * customer = graph.find(customer).where(customer.id).is(123).result();\n\t * long numOrders = graph.count(customer.orders);\n\t * </code>\n\t * </pre>\n\t * \n\t * @param values a collection value from a jo4neo annotated field.\n\t * @return\n\t */\n\tlong count(Collection<? extends Object> values);\n\n\t/**\n\t * Returns a collection of entities added since <code>d</code>.\n\t * Type <code>t</code> must be annotated with {@link Timeline}\n\t * \n\t * @see Timeline\n\t * \n\t */\n\t<T> Collection<T> getAddedSince(Class<T> t, Date d);\n\n\t/**\n\t * Returns a collection of entities added bewteen dates from and to.\n\t * Type <code>t</code> must be annotated with {@link Timeline}.\n\t * \n\t * @see Timeline\n\t */\n\t<T> Collection<T> getAddedBetween(Class<T> t, Date from,\n\t\t\tDate to);\n\n\t\n\t/**\n\t * Returns up to <code>max</code> most recently added instances of type <code>t</code>\n\t * \n\t * @param max limit the number of instances returned\n\t * @see neo#recency()\n\t */\n\t<T> Collection<T> getMostRecent(Class<T> t, int max);\n\t\n\t\n\t<T> T getSingle(Class<T> t, String indexname, Object value);\n\t\n\t<T> Collection<T> get(Class<T> t, String indexname, Object value);\n\t\n\t<T> Collection<T> fullTextQuery(Class<T> t, String indexname, Object value);\n\n}", "public abstract Player getOpponent();", "public Collision getCollisionType(ISprite sprite);", "TriangleNet3D getNet() {\n\t\treturn comp.getNet();\n\t}", "private LinkedList<Gas> listSensorGas(){\r\n LinkedList<Gas> aux=new LinkedList<>();\r\n for (Sensor doo:sensors){\r\n if(doo instanceof Gas)\r\n aux.add((Gas)doo);\r\n }\r\n return aux;\r\n }", "NetNode representative() {\n\t\t\tfor (NetNode n : members) {\n\t\t\t\tif (!n.varAddress && !n.varMask)\n\t\t\t\t\treturn n;\n\t\t\t}\n\t\t\treturn members.iterator().next();\n\t\t}", "@Override\r\n\tpublic Iterable<Entity> getNodes()\r\n\t{\n\t\treturn null;\r\n\t}", "public abstract GameObject clone();", "public BowlingGame getGame();", "@Override\n public List<Obstacle> getObstacals() {\n List<Obstacle> obstacles = new ArrayList<Obstacle>();\n for (Spatial s : obstacleNode.getChildren()) {\n if (s instanceof Vehicle) {\n Vehicle v = (Vehicle) s;\n obstacles.add(v.toObstacle());\n }\n }\n return obstacles;\n }", "@Override\n protected INetworkObject doInBackground(INetworkObject... params) {\n if(params==null){return null;}\n netObj = params[0];\n try {\n if(netObj.getClass()==NetworkObjectPosition.class){\n communicateWithServer((NetworkObjectPosition) netObj);\n }\n if(netObj.getClass()==NetworkObjectGetID.class){\n communicateWithServer((NetworkObjectGetID) netObj);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return netObj;\n }", "private World copyWorld(boolean useCloning) throws CloneNotSupportedException {\n\t \n\t if (useCloning == false) {\n\t \t\tif ( mWorld instanceof ArrayWorld) { // if mWorld (current) is an ArrayWorld\n\t \t\t\tWorld copy;\n\t \t\t\tcopy = new ArrayWorld((ArrayWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n\t \t\telse if ( mWorld instanceof PackedWorld) {\n\t \t\t\tWorld copy = new PackedWorld((PackedWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n \t \t}\n\t else {\n\t\t World copy = (World) mWorld.clone();\n\t\t \treturn copy;\n\t }\n\t \n\t return null;\n\t}", "public Object clone() {\r\n\t\tNetwork net = new Network();\r\n\t\tfor (Variable v : variables) {\r\n\t\t\tVariable v1 = v.copy(net);\r\n\t\t\tif (v.getIndex() != v1.getIndex())\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t}\r\n\t\tfor (Constraint c: constraints) { \r\n\t\t\tConstraint c1 = c.copy(net);\r\n\t\t\tif (c.getIndex() != c1.getIndex())\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t}\r\n\t\tif (objective != null) {\r\n\t\t\tnet.setObjective(net.getVariable(objective.getIndex()));\r\n\t\t}\r\n\t\treturn net;\r\n\t}", "public Loop getLoop(Node nd) {\n\t\t\n\n\t\tint addr = nd.getAddress();\n\t\treturn getLoop(addr);\n\t\t\n\t}", "public abstract Object getVanillaPacket();", "public abstract ArrayList<GameObject> fight();", "abstract public GameElement getGameElement();", "public GameObject get(int index) {\r\n\t\treturn (GameObject) list.get(index);\r\n\t}", "@Override\n\tpublic void visit(Instanceof n) {\n\t\t\n\t}", "public Iterator getNetworkList(){\n NeutronTest nt=new NeutronTest(this.idsEndpoint,this.tenantName,this.userName,this.password,this.region);\n Networks ns=nt.listNetworks();\n Iterator<Network> itNet=ns.iterator();\n return itNet;\n }", "BPlayer getPlayer(Player player);", "public GameObject getOther(){\n \n return currentCollidingObject;\n \n }", "public Network getNetwork() {\r\n \t\treturn network;\r\n \t}", "public static WrapperWorld getWrapperFor(World world){\r\n\t\tif(world != null){\r\n\t\t\tWrapperWorld wrapper = worldWrappers.get(world);\r\n\t\t\tif(wrapper == null || world != wrapper.world){\r\n\t\t\t\twrapper = new WrapperWorld(world);\r\n\t\t\t\tworldWrappers.put(world, wrapper);\r\n\t\t\t}\r\n\t\t\treturn wrapper;\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public List<Entity> getPassengers() {\n/* 667 */ return Lists.newArrayList(Lists.transform((getHandle()).passengers, new Function<Entity, Entity>()\n/* */ {\n/* */ public Entity apply(Entity input) {\n/* 670 */ return input.getBukkitEntity();\n/* */ }\n/* */ }));\n/* */ }", "public Node getNetworkNode() {\r\n return network;\r\n }", "@Override\n\tpublic World getWorld() { return world; }", "Object getBase();", "public abstract void gameObjectAwakens();", "protected IProjectile getProjectileEntity(World par1World, IPosition par2IPosition)\n {\n \tEntityBrick brick = new EntityBrick(par1World, par2IPosition.getX(), par2IPosition.getY(), par2IPosition.getZ());\n \tbrick.dispensed = true;\n \treturn brick; \n }", "public abstract String getWorldType();", "@Override\n public void update(float dt) {\n\n\n for (GameObject g : getGameObjectList()) {\n Collider gameObjectCollider = g.getComponent(Collider.class);\n if (g.getSID() instanceof Map.Block ) {\n continue;\n }\n gameObjectCollider.reduceAvoidTime(dt);\n\n for (GameObject h : getGameObjectList()) {\n Collider gameObjectCollider2 = h.getComponent(Collider.class);\n if (g.equals(h)) {\n continue;\n }\n\n if ((gameObjectCollider.bitmask & gameObjectCollider2.layer) != 0) {\n if (gameObjectCollider2.layer == gameObjectCollider.layer){\n continue;\n }\n\n TransformComponent t = g.getComponent(TransformComponent.class);\n Vector2f pos1 = g.getComponent(Position.class).getPosition();\n FloatRect rect1 = new FloatRect(pos1.x, pos1.y, t.getSize().x, t.getSize().y);\n TransformComponent t2 = g.getComponent(TransformComponent.class);\n Vector2f pos2 = h.getComponent(Position.class).getPosition();\n FloatRect rect2 = new FloatRect(pos2.x, pos2.y, t2.getSize().x, t2.getSize().y);\n FloatRect collision = rect2.intersection(rect1);\n if (collision != null) {\n Collider mainCollider = g.getComponent(Collider.class);\n Collider collidingWith = h.getComponent(Collider.class);\n\n\n if (!(mainCollider.checkGameObject(h)||collidingWith.checkGameObject(g)))\n {\n if (mainCollider.events == true && collidingWith.events == true)\n {\n\n\n if ((g.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0)\n {\n g.addComponent(new CollisionEvent());\n\n\n }\n g.getComponent(CollisionEvent.class).getG().add(h);\n if ((h.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0) {\n h.addComponent(new CollisionEvent());\n\n }\n h.getComponent(CollisionEvent.class).getG().add(g);\n\n }\n\n\n if (mainCollider.dieOnPhysics == true) {\n EntityManager.getEntityManagerInstance().removeGameObject(g);\n }\n if (mainCollider.physics == true && collidingWith.physics == true) {\n float resolve = 0;\n float xIntersect = (rect1.left + (rect1.width * 0.5f)) - (rect2.left + (rect2.width * 0.5f));\n float yIntersect = (rect1.top + (rect1.height * 0.5f)) - (rect2.top + (rect2.height * 0.5f));\n if (Math.abs(xIntersect) > Math.abs(yIntersect)) {\n if (xIntersect > 0) {\n resolve = (rect2.left + rect2.width) - rect1.left;\n } else {\n resolve = -((rect1.left + rect1.width) - rect2.left);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(resolve, 0));\n } else {\n if (yIntersect > 0) {\n resolve = (rect2.top + rect2.height) - rect1.top;\n\n } else\n {\n resolve = -((rect1.top + rect1.height) - rect2.top);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(0, resolve));\n }\n }\n }\n\n\n }\n }\n }\n }\n }", "<T> Collection<T> get(Class<T> type, Iterable<Node> nodes);", "private GObject getCollidingObject() {\n \tdouble x1 = ball.getX();\n \tdouble y1 = ball.getY();\n \tdouble x2 = x1 + BALL_RADIUS * 2;\n \tdouble y2 = y1 + BALL_RADIUS * 2;\n \n \tif (getElementAt(x1, y1) != null) return getElementAt(x1, y1);\n \tif (getElementAt(x1, y2) != null) return getElementAt(x1, y2);\n \tif (getElementAt(x2, y1) != null) return getElementAt(x2, y1);\n \tif (getElementAt(x2, y2) != null) return getElementAt(x2, y2);\n \n \treturn null;\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean instanceOfNMS(final Object obj, final String clazz) {\n \t\treturn getMinecraftClass(clazz).isAssignableFrom(obj.getClass());\n \t}", "public Obstacle getConstructingObstacle();", "public interface IWorldNetworkAssistant<T extends INBTSerializable> {\n\n /**\n * To be called on the placement of a node that is used in a worldnetwork.\n * Handles registration in the appropriate network.\n *\n * @param world the world the node is in.\n * @param pos the in world position of the node.\n */\n void onNodePlaced(World world, BlockPos pos);\n\n /**\n * To be called when the neighbour of a node changes.\n * Handles (de)registration in the appropriate network.\n *\n * @param world the world the node is in.\n * @param pos the in world position of the node.\n * @param neighbourPos the position of the change.\n */\n void onNodeNeighbourChange(World world, BlockPos pos, BlockPos neighbourPos);\n\n /**\n * To be called when a node is destroyed.\n * De-registers the node and performs network validations if needed.\n *\n * @param world the world the node is in.\n * @param pos the in world position of the node.\n */\n void onNodeBroken(World world, BlockPos pos);\n\n /**\n * Inserts the given data into the appropriate network.\n *\n * @param entryPoint the entry point node this data is coming from.\n * @param insertInto the position we're trying to insert into.\n * @param insertData the data we're inserting.\n * @param networksInsertionOnly\n * @param simulate\n * @return the remaining data that was not inserted.\n */\n @Nonnull\n default T insertData(WorldNetworkEntryPoint entryPoint, BlockPos insertInto, T insertData, ImmutableMap<String, NBTBase> additionalData, boolean networksInsertionOnly, boolean simulate) {\n return insertData(entryPoint, insertInto, insertData, additionalData, (node, enumFacing) -> true, networksInsertionOnly, simulate);\n }\n\n /**\n * Inserts the given data into the appropriate network.\n *\n * @param entryPoint the entry point node this data is coming from.\n * @param insertInto the position we're trying to insert into.\n * @param insertData the data we're inserting.\n * @param networksInsertionOnly\n * @param simulate\n * @return the remaining data that was not inserted.\n */\n @Nonnull\n T insertData(WorldNetworkEntryPoint entryPoint, BlockPos insertInto, T insertData, ImmutableMap<String, NBTBase> additionalData, BiPredicate<WorldNetworkNode, EnumFacing> endpointPredicate, boolean networksInsertionOnly, boolean simulate);\n\n}", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getEntityClass() {\n \t\treturn getMinecraftClass(\"Entity\");\n \t}", "public GameObject getObstacle() {\n \tif (selection != null) {\n \tjava.lang.Object data = selection.getBody().getUserData();\n \ttry {\n \t\treturn (GameObject)data;\n \t} catch (Exception e) {\n \t}\n }\n return null;\n }", "public interface INeighbor {\n public Set<Cell> getNeighbours();\n}", "public static World getWorld(NetworkManager network) {\n\t\treturn getWorld();\n\t}", "public GameData getWorld() {\r\n return world;\r\n }", "private GObject getCollidingObject(GOval ball) {\n GObject result = null;\n GPoint[] borderPoints = createArrayOfBallBorders(ball);\n for (GPoint someBorderPoint : borderPoints) {\n result = getElementAt(someBorderPoint);\n if (result != null){\n break;\n }\n }\n return result;\n }", "slco.Object getObject2();", "public interface WorldQueryService {\n\n /**\n * @param type The type of world.\n * @return The world of this type.\n */\n World getWorld(WorldType type);\n\n /**\n * @param world The world.\n * @param x The X coordinate.\n * @param y The Y coordinate.\n * @param z The Z coordinate.\n * @return The block in the given world at the specified coordinates.\n */\n Block getBlockAt(WorldType world, int x, int y, int z);\n\n /**\n * @param world The world.\n * @param vector The vector.\n * @return The block at the given vector.\n */\n Block getBlockAt(WorldType world, Vector3ic vector);\n\n /**\n * @param location The location.\n * @return The block at the location.\n */\n Block getBlockAt(BlockLocation location);\n\n /**\n * @param location The location.\n * @return The block at the location.\n */\n Block getBlockAt(Location location);\n\n /**\n * @param world The world.\n * @param x The X coordinate.\n * @param z The Y coordinate.\n * @return The highest non-air block in the given world at the specified coordinates.\n */\n Block getHighestBlockAt(WorldType world, int x, int z);\n\n /**\n * @param location The location.\n * @return The highest non-air block at the specified location.\n */\n Block getHighestBlockAt(BlockLocation location);\n\n\n}", "public Game copy();", "public interface Clash extends EntityComponent {\r\n}", "public World getParent() {\r\n return ocean;\r\n }", "public GameTypeWrapper playGame();", "public interface NetworkMapper extends BaseMapper<Network> {\r\n}", "public List<REPoint> getObstacles();", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public interface MetaNEATEvolvable {\n\t\n\tpublic int getPopulationSize();\n\t\n\tpublic MetaNEATGenome getGenome(int index);\n\t\n\tpublic void evolveNextGeneration();\n\t\n\tpublic int getNumberOfSpecies();\n\n}", "public World getWorld(String worldName);", "public Collection<INetwork> getNetworks(IProcess process) {\n\t\treturn null;\n\t}", "CyNetwork getGroupNetwork();", "public World getWorld() {\n return world;\n }", "public World getWorld() {\n return world;\n }", "public GameObject peek();", "public void map() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tSystem.out.println(object);\n\t}", "public Entity get_entity(String uid) {\n for (int layer_id: layer_ent_list.keySet()){\n Entity ent = get_entity(uid, layer_id);\n if (ent!=null){\n return ent;\n }\n }\n return null;\n }", "public abstract V getEntity();", "public interface iPhisycs<E extends WolEntity> extends iEventGenerator<E>,iEventObserver<E>,Runnable,Serializable{\r\n public void insert(E entity,Position coordinate);\r\n public void castAwayEntities(Position coordinate,long radius);//Cast away all entities in thre radius near the position\r\n //public Acceleration calcAcceleration(E entity,Collection<Force> forces);\r\n public void applyForce(E entity,Force force);\r\n public void removeForce(E entity,Force force);\r\n public Velocity getVelocity(E entity);\r\n public Rotation<E> getAngularVelocity(E entity);\r\n}", "@Override\n\tpublic Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {\n\t TileEntity tileEntity = world.getBlockTileEntity(x, y, z);\n\t if(tileEntity instanceof TileEntityBioCarbonizer){\n\t \treturn new ContainerBioCarbonizer(player.inventory, (TileEntityBioCarbonizer)tileEntity);\n\t }else if(tileEntity instanceof TileEntityBlast){\n\t \treturn new ContainerBlast(player.inventory,(TileEntityBlast)tileEntity);\n\t }else if(tileEntity instanceof TileEntityIncinerator){\n\t \treturn new ContainerIncinerator(player.inventory,(TileEntityIncinerator)tileEntity);\n\t }\n return null;\n}", "@Override\n\tprotected Class<FriendCircle> getEntityClass() {\n\t\treturn FriendCircle.class;\n\t}", "public abstract TextureObject getTexture();", "public interface Game {\n\n\t/**\n\t * return a specific tile. Precondition: Position p is a valid position in the world.\n\t * \n\t * @param p\n\t * the position in the world that must be returned.\n\t * @return the tile at position p.\n\t */\n\tpublic Tile getTileAt(Position p);\n\n\t/**\n\t * return the uppermost unit in the stack of units at position 'p' in the world. Precondition: Position p is a valid\n\t * position in the world.\n\t * \n\t * @param p\n\t * the position in the world.\n\t * @return the unit that is at the top of the unit stack at position p, OR null if no unit is present at position p.\n\t */\n\tpublic Unit getUnitAt(Position p);\n\n\t/**\n\t * return the city at position 'p' in the world. Precondition: Position p is a valid position in the world.\n\t * \n\t * @param p\n\t * the position in the world.\n\t * @return the city at this position or null if no city here.\n\t */\n\tpublic City getCityAt(Position p);\n\n\t/**\n\t * return the player that is 'in turn', that is, is able to move units and manage cities.\n\t * \n\t * @return the player that is in turn\n\t */\n\tpublic Player getPlayerInTurn();\n\n\t/**\n\t * return the player that has won the game.\n\t * \n\t * @return the player that has won. If the game is still not finished then return null.\n\t */\n\tpublic Player getWinner();\n\n\t/**\n\t * return the age of the world. Negative numbers represent a world age BC (-4000 equals 4000 BC) while positive\n\t * numbers are AD.\n\t * \n\t * @return world age.\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * move a unit from one position to another. If that other position is occupied by an opponent unit, a battle is\n\t * conducted leading to either victory or defeat. If victorious then the opponent unit is removed from the game and\n\t * the move conducted. If defeated then the attacking unit is removed from the game. If a successful move results in\n\t * the unit entering the position of a city then this city becomes owned by the owner of the moving unit.\n\t * Precondition: both from and to are within the limits of the world. Precondition: there is a unit located at\n\t * position from.\n\t * \n\t * @param from\n\t * the position that the unit has now\n\t * @param to\n\t * the position the unit should move to\n\t * @return true if the move is valid (no mountain, move is valid under the rules of the game variant etc.), and\n\t * false otherwise. If false is returned, the unit stays in the same position and its \"move\" is intact (it\n\t * can be moved to another position.)\n\t */\n\tpublic boolean moveUnit(Position from, Position to);\n\n\t/**\n\t * Tell the game that the current player has finished his/her turn. The next player is then in turn. If all players\n\t * have had their turns then do end-of-round processing: A) restore all units' move counts B) produce food and\n\t * production in all cities C) produce units in all cities (if enough production) D) increase population size in all\n\t * cities (if enough food) E) increment the world age.\n\t */\n\tpublic void endOfTurn();\n\n\t/**\n\t * change the work force's focus in a city, i.e. what kind of production there will be emphasis on in the city.\n\t * Precondition: there is a city at location 'p'.\n\t * \n\t * @param p\n\t * the position of the city whose focus should be changed.\n\t * @param balance\n\t * a string defining the focus of the work force in a city. Valid values are at least\n\t * GameConstants.productionFocus and GameConstants.foodFocus.\n\t */\n\tpublic void changeWorkForceFocusInCityAt(Position p, String balance);\n\n\t/**\n\t * change the type of unit a city will produce next. Precondition: there is a city at location 'p'.\n\t * \n\t * @param p\n\t * the position of the city whose production should be changed.\n\t * @param unitType\n\t * a string defining the type of unit that the city should produce next.\n\t */\n\tpublic void changeProductionInCityAt(Position p, String unitType);\n\n\t/**\n\t * perform the action associated with the unit at position p. Example: a settler unit may create a new city at its\n\t * location. Precondition: there is a unit at location 'p'.\n\t * \n\t * @param p\n\t * the position of a unit that must perform its action. Nothing happens in case the unit has no\n\t * associated action.\n\t */\n\tpublic void performUnitActionAt(Position p);\n}", "public ClassBodyNode getBody()throws ClassCastException;" ]
[ "0.5891836", "0.5832082", "0.5727899", "0.56154317", "0.54934955", "0.54463375", "0.544479", "0.5443036", "0.5397901", "0.53918886", "0.5378255", "0.5293183", "0.52715975", "0.52568024", "0.5239583", "0.5234011", "0.5221522", "0.5208541", "0.5205438", "0.5203077", "0.51854634", "0.5175631", "0.5174943", "0.5172246", "0.5156743", "0.51524585", "0.5152324", "0.5143572", "0.5117948", "0.50971645", "0.49973807", "0.49672103", "0.49613252", "0.4944029", "0.49267846", "0.4878393", "0.48765874", "0.48738784", "0.48732293", "0.48722926", "0.48713598", "0.48701993", "0.48600894", "0.48580772", "0.48423225", "0.48419282", "0.48342595", "0.48333508", "0.48255417", "0.4822495", "0.4811416", "0.48098448", "0.4809031", "0.48044083", "0.48014256", "0.48001888", "0.4798308", "0.47905943", "0.4779713", "0.47705254", "0.47660306", "0.47657293", "0.47628424", "0.47623742", "0.47616825", "0.4756904", "0.4752407", "0.47504643", "0.47501075", "0.4748489", "0.47331417", "0.47318053", "0.47287259", "0.47193184", "0.47166532", "0.47160873", "0.47159478", "0.4714984", "0.470098", "0.47006544", "0.47001266", "0.47001266", "0.47001266", "0.47001266", "0.4699589", "0.46961647", "0.46958807", "0.46948397", "0.46944878", "0.46944878", "0.46925682", "0.46899214", "0.46898225", "0.4680723", "0.46718642", "0.46647087", "0.4661329", "0.4654069", "0.4650059", "0.46454418" ]
0.7944132
0
move net corresponding to use input
void moveNet(char c){ Net n = findNet(); n.move(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void fromInputToFirstLayer(Network net, Example example)\r\n\t{\r\n\t\tList<List<Neuron>> neurons = net.getNeurons();\r\n\t\tList<Double> input = example.getInput();\r\n\r\n\t\tfor (int i = 0; i < input.size(); i++)\r\n\t\t\tneurons.get(0).get(i+1).setOutput(input.get(i));\r\n\t}", "private Link moveInterface(NetworkAddr networkAddr, int newInterface) {\n\t\tif(_routingTable[newInterface] != null) {\n\t\t\treturn null;\n\t\t}\n\t\tLink link = (Link)removeFromInterface(networkAddr);\n\t\tLink newLink = new Link();\n\t\tnewLink.setConnector(link.getOther(this));\n\t\tnewLink.setConnector(this);\n\t\tconnectInterface(newInterface, newLink , link.getOther(this));\n\t\tlink.removeConnector(link.getOther(this));\n\t\tlink.removeConnector(this);\n\t\t\n\t\treturn newLink;\n\t}", "public FeedForwardNeuralNetwork mutate(FeedForwardNeuralNetwork net)\n\t{\n // Copies the net\n FeedForwardNeuralNetwork newNetwork = new FeedForwardNeuralNetwork(net);\n newNetwork.setWeightVector((Vector<Double>)net.getWeightVector().clone());\n\n Vector<Double> newWeights = new Vector<Double>();\n\t\tRandom gen = new Random();\n int mc = gen.nextInt(100), slSize;\n\n if (mc <= 10) { // all the weights in the network\n for(SynapseLayer sl: newNetwork.synapse_layers) {\n slSize = sl.getWeightVector().size() / 20;\n for (Double weight: sl.getWeightVector())\n newWeights.add(weight + gen.nextGaussian()*Math.sqrt(slSize));\n }\n newNetwork.setWeightVector(newWeights);\n }\n else if (mc <= 37) { // all the weights in a randomly selected layer\n SynapseLayer sl = newNetwork.synapse_layers.get(gen.nextInt(newNetwork.synapse_layers.size()));\n for (Double weight: sl.getWeightVector())\n newWeights.add(weight + gen.nextGaussian() * Math.sqrt(sl.getWeightVector().size()/20));\n sl.setWeightVector(newWeights);\n }\n else if (mc <= 64) { // all the weights going into a randomly selecte layer, i can't tell the difference between this and the last one\n SynapseLayer sl = newNetwork.synapse_layers.get(gen.nextInt(newNetwork.synapse_layers.size()));\n for (Double weight: sl.getWeightVector())\n newWeights.add(weight + gen.nextGaussian() * Math.sqrt(sl.getWeightVector().size()/20));\n sl.setWeightVector(newWeights);\n }\n else {\n newWeights = newNetwork.getWeightVector();\n int rInd = gen.nextInt(newWeights.size());\n newWeights.set(rInd, newWeights.get(rInd) + Math.sqrt(gen.nextGaussian()*14));\n newNetwork.setWeightVector(newWeights);\n }\n\t\treturn newNetwork;\n\t}", "public abstract Object makeMove(Clue clue, Bipartite bipartite);", "public void move(Layer layer, boolean up) {\n int i = 0;\n Layer target = null;\n while ( i < list.size() && target == null ) {\n Layer tmp = (Layer)list.get( i );\n if ( tmp.getName().equals( layer.getName() ) &&\n tmp.getServer().getOnlineResource().equals( layer.getServer().getOnlineResource() ) ) {\n target = tmp;\n }\n i++;\n }\n i--;\n if ( i > 0 && up ) {\n Object o = list.get( i );\n list.set( i, list.get( i-1 ) );\n list.set( i-1, o );\n } else if ( i < list.size()-1 && !up ) {\n Object o = list.get( i );\n list.set( i, list.get( i+1 ) );\n list.set( i+1, o );\n }\n }", "private void updateMNetwork() {\n\t\t/*\n\t\t Having applied the network inputs, update the brain simulation.\n\t\t */\n\t\tmsimulation.step();\n\t}", "public RoutingProcessor(Network netIn)\r\n {\r\n network_topology = netIn;\r\n routing_method = \"SHP\";\r\n }", "public void moveNonEdgeSpecificState(ISolverNode other);", "public void MOVE(String input){\n\t\tint YM=0;\n\t\tint XM=0;\n\t\tfor(int i = 0; i<this.position.length;i++){\n\t\t\tfor(int p =0; p<this.position.length;p++){\n\t\t\t\tif(this.position[i][p] == 1){\n\t\t\t\t\tYM = i;\n\t\t\t\t\tXM = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tswitch(input){//first block is up and down second block is left and right\n\t\t\tcase \"a\":\n\t\t\t\tif(this.area[YM][XM-1] != \"[ ]\"){\n\t\t\t\t\tthis.position[YM][XM-1] = 1;//to turn left\n\t\t\t\t\tthis.position[YM][XM] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"d\":\n\t\t\t\tif(this.area[YM][XM+1] != \"[ ]\"){\n\t\t\t\t\tthis.position[YM][XM+1] = 1;//to turn right\n\t\t\t\t\tthis.position[YM][XM] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"w\":\n\t\t\t\tif(this.area[YM-1][XM] != \"[ ]\"){\n\t\t\t\t\tthis.position[YM-1][XM] = 1;//to turn up\n\t\t\t\t\tthis.position[YM][XM] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"s\":\n\t\t\t\tif(this.area[YM+1][XM] != \"[ ]\"){\n\t\t\t\t\tthis.position[YM+1][XM] = 1;//to turn down\n\t\t\t\t\tthis.position[YM][XM] = 0; \n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\n\t}", "@Override\n public Status move(){\n\n if(onNode.getNextNode(this)==null){\n return Status.NOT_EMPTY_CAR;\n }\n List<Train> on = onNode.getNextNode(this).getTrains();\n if(!on.isEmpty()) return Status.CRASHED;\n\n Node next = onNode.getNextNode(this);\n prevNode.removeTrain(this);\n next.addTrain(this);\n x=next.getX();\n y=next.getY();\n try {\n ((Station)next).setGetOff();\n }\n catch (Exception e) {}\n \n return nextCar.move();\n }", "public void connectNodes(){\n for(int i = 0; i < inputSize; i++){\n network.get(0).add(new InputNode());\n }\n \n for(int i = 1; i < layers; i++){\n \n for(int j = 0; j < layerSize; j++){\n \n network.get(i).add(new Node(network.get(i-1)));\n }\n \n }\n \n }", "private void applySensoryInputToBrain() {\n\t\tArrayList<MNeuron> neurons = mnetwork.getNeurons();\n\n\t\t/* Temporarily hardcode id's of neurons of interest. */\n\t\tint numVSegs = Agent.configNumSegments;\n\t\tint firstVFoodNid = 3;\n\t\tint lastVFoodNid = firstVFoodNid + numVSegs - 1;\n\t\tint firstVWallNid = lastVFoodNid + 1;\n\t\tint lastVWallNid = firstVWallNid + numVSegs - 1;\n\t\tint firstVEnemyNid = lastVWallNid + 1;\n\t\tint lastVEnemyNid = firstVEnemyNid + numVSegs - 1;\n\n\t\t/*\n\t\t Provide input current the network using the sensory\n\t\t components of the interface.\n\t\t */\n\t\tfor (MNeuron n : neurons) {\n\t\t\tdouble current;\n\t\t\tint index;\n\t\t\tint id = n.getID();\n\n\t\t\t/* If the neuron is a food visual neuron. */\n\t\t\tif (id >= firstVFoodNid && id <= lastVFoodNid) {\n\t\t\t\tindex = id - 3;\n\t\t\t\tcurrent = ninterface.affectors.vFood[index];\n\t\t\t\tn.addCurrent(60.0*current);\n\t\t\t} /* If the neuron is a wall visual neuron. */ else if (id >= firstVWallNid && id <= lastVWallNid) {\n\t\t\t\tindex = id - numVSegs - 3;\n\t\t\t\tcurrent = ninterface.affectors.vWall[index];\n\t\t\t\tn.addCurrent(60.0*current);\n\t\t\t} /* If the neuron is an enemy visual neuron. */ else if (id >= firstVEnemyNid && id <= lastVEnemyNid) {\n\t\t\t\tindex = id - 2 * numVSegs - 3;\n\t\t\t\tcurrent = ninterface.affectors.vEnemy[index];\n\t\t\t\tn.addCurrent(60.0*current);\n\t\t\t}\n\t\t}\n\t}", "public abstract Field.RadioData move(Field.RadioData radioData, Location newLoc);", "public void getInputAndMove() {\n\t\tSystem.out.println(\"Where to move?\");\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tString input = keyboard.nextLine();\n\t\t\n\t\t\n\t\tAvatar testAvatar = new Avatar(avatar.getLocation());\n\t\ttestAvatar.move(input);\n\n\t\tif (wall.overlapsWith(testAvatar)) {\n\t\t\tSystem.out.println(\"\\nYou have hit a wall\");\n\t\t} \n\t\telse {\n\t\t\tavatar.move(input);\n\t\t\tSystem.out.println(\"\\nYou have moved\");\n\t\t}\n\t}", "@Override\r\n public void MIPSme() {\r\n MIPSMove(this.dst, this.op1);\r\n }", "@Override\n public void promotePawn(String input){\n super.promotePawn(input);\n sendMove(lastStartIndex, lastEndIndex, input);\n }", "private void establishPetriNetStructure(PetriNet net) {\n\t\t// establish the same petri net structure like in the given model\n\t\tHashMap mapping = new HashMap();\n\t\t// arraylist for all nodes in the petri net\n\t\tArrayList nodeList = new ArrayList();\n\t\tSubgraph graph = net.getGrappaVisualization().getSubgraph().getGraph();\n\t\t// get all the nodes that are in a cluster\n\t\tEnumeration subGraphElts = graph.subgraphElements();\n\t\twhile (subGraphElts.hasMoreElements()) {\n\t\t\tElement e1 = (Element) subGraphElts.nextElement();\n\t\t\tif (e1 instanceof Subgraph) {\n\t\t\t\tSubgraph subgraph = (Subgraph) e1;\n\t\t\t\tEnumeration enumerationNodes = subgraph.nodeElements();\n\t\t\t\t// put all the nodeElements in nodeList\n\t\t\t\twhile (enumerationNodes.hasMoreElements()) {\n\t\t\t\t\tElement enumNode = (Element) enumerationNodes.nextElement();\n\t\t\t\t\tif (enumNode != null && enumNode.object instanceof ModelGraphVertex) {\n\t\t\t\t\t\tnodeList.add(enumNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add the nodes that are not in a cluster to the list of all nodes\n\t\tEnumeration nodeElts = graph.nodeElements();\n\t\twhile (nodeElts.hasMoreElements()) {\n\t\t\tElement e1 = (Element) nodeElts.nextElement();\n\t\t\tif (e1.object != null && e1.object instanceof ModelGraphVertex) {\n\t\t\t\tnodeList.add(e1);\n\t\t\t}\n\t\t}\n\t\t// convert the ordinary transitions to simulated transitions\n\t\tIterator transitions = nodeList.iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tElement e1 = (Element) transitions.next();\n\t\t\tif (e1.object != null && e1.object instanceof Transition) {\n\t\t\t\tNode n = (Node) e1;\n\t\t\t\tint x = (int) n.getCenterPoint().getX() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint y = -(int) n.getCenterPoint().getY() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint width = (int) (((Double) n.getAttributeValue(Grappa.WIDTH_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tint height = (int) (((Double) n.getAttributeValue(Grappa.HEIGHT_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tColoredTransition simTransition = new ColoredTransition((Transition) e1.object, this,\n\t\t\t\t\t\tx, y, width, height);\n\t\t\t\tthis.addTransition(simTransition);\n\t\t\t\t\n\t\t\t\t// keep the mapping until the edges have been established\n\t\t\t\tmapping.put((Transition) e1.object, simTransition);\n\t\t\t}\n\t\t}\n\t // convert the ordinary places to simulated places\n\t\tIterator places = nodeList.iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tElement e1 = (Element) places.next();\n\t\t\tif (e1.object != null && e1.object instanceof Place) {\n\t\t\t\tNode n = (Node) e1;\n\t\t\t\tint x = (int) n.getCenterPoint().getX() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint y = -(int) n.getCenterPoint().getY() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint width = (int) (((Double) n.getAttributeValue(Grappa.WIDTH_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tint height = (int) (((Double) n.getAttributeValue(Grappa.HEIGHT_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tColoredPlace simPlace = new ColoredPlace((Place) e1.object, this,\n\t\t\t\t\t\t\t\t\t\t x, y, width, height);\n\t\t\t\tthis.addPlace(simPlace);\n\t\t\t}\n\t\t}\n // convert the ordinary edges to simulated edges\n\t\tIterator edges = net.getEdges().iterator();\n\t\twhile (edges.hasNext()) {\n\t\t\tPNEdge edge = (PNEdge) edges.next();\n\t\t\tColoredEdge simEdge;\n\t\t\t// if place is source\n\t\t\tif (edge.isPT()) {\n\t\t\t\tPlace p = (Place) edge.getSource();\n\t\t\t\t// find respective place in this net (place names are assumed to be unique)\n\t\t\t\tPlace myPlace = this.findPlace(p.getIdentifier());\n\t\t\t\tTransition t = (Transition) edge.getDest();\n\t\t\t\t// find respective transition in this net\n\t\t\t\tTransition myTransition = (Transition) mapping.get(t);\n\t\t\t\t// reproduce edge\n\t\t\t\tsimEdge = new ColoredEdge(myPlace, myTransition);\n\t\t\t\tthis.addEdge(simEdge);\n\t\t\t} else {\n\t\t\t\t// if transition is source\n\t\t\t\tPlace p = (Place) edge.getDest();\n\t\t\t\t// find respective place in this net (place names are assumed to be unique)\n\t\t\t\tPlace myPlace = (Place)this.findPlace(p.getIdentifier());\n\t\t\t\tTransition t = (Transition) edge.getSource();\n\t\t\t\t// find respective transition in this net\n\t\t\t\tTransition myTransition = (Transition) mapping.get(t);\n\t\t\t\t// reproduce edge\n\t\t\t\tsimEdge = new ColoredEdge(myTransition, myPlace);\n\t\t\t\tthis.addEdge(simEdge);\n\t\t\t}\n\t\t}\n\t\tIterator clusters = net.getClusters().iterator();\n\t\twhile (clusters.hasNext()) {\n\t\t\tTransitionCluster currentCluster = (TransitionCluster) clusters.next();\n\t\t\tthis.addCluster(new TransitionCluster(currentCluster));\n\t\t}\n\t}", "public void move()\n\t{\n\t\tVector v = ship.v;\n\t\tb = b.getLocation().add(v).getBlock();\n\t\tif(triangle != null) triangle.move();\n\t\tif(rear != null) rear.move();\n\t\tif(foreAndAft != null) foreAndAft.move();\n\t\tif(sails != null) for(int i = 0; i < sails.size(); i++)\n\t\t{\n\t\t\tSail sail = sails.get(i);\n\t\t\tsail.move();\n\t\t}\n\t}", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "public InputNeuron getInputNeuronFromName(String name) {\n\t\tfor (InputNeuron neuron : inputLayer) {\n\t\t\tif (name.equals(neuron.getName())) {\n\t\t\t\treturn neuron;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void buildPointPetriNet(){\n\t\tcreatePlace(pnet, \"int\", 3);\n\t\tcreatePlace(pnet, \"Point\", 2);\n\t\tcreatePlace(pnet, \"MyPoint\", 2);\n\t\tcreatePlace(pnet, \"void\", 2);\n\t\t\n\t\t// Create transitions for the petri-net\n\t\tpnet.createTransition(\"int<-getX(Point)\");\n\t\tpnet.createTransition(\"int<-getY(Point)\");\n\t\tpnet.createTransition(\"void<-setX(Point,int)\");\n\t\tpnet.createTransition(\"void<-setY(Point,int)\");\n\t\tpnet.createTransition(\"Point<-Point(void)\");\n\t\t\n\t\tpnet.createTransition(\"int<-getX(MyPoint)\");\n\t\tpnet.createTransition(\"int<-getY(MyPoint)\");\n\t\tpnet.createTransition(\"MyPoint<-MyPoint(int,int)\");\n\t\t\n\t\t// Create clone transitions for the petri-net\n\t\tpnet.createTransition(\"int<-clone(int)\");\n\t\tpnet.createTransition(\"Point<-clone(Point)\");\n\t\tpnet.createTransition(\"MyPoint<-clone(MyPoint)\");\n\t\tpnet.createTransition(\"void<-clone(void)\");\n\t\t\n\t\t// Create flows for the petri-net\n\t\tpnet.createFlow(\"Point\",\"int<-getX(Point)\",1);\n\t\tpnet.createFlow(\"int<-getX(Point)\",\"int\",1);\n\t\tpnet.createFlow(\"Point\",\"int<-getY(Point)\",1);\n\t\tpnet.createFlow(\"int<-getY(Point)\",\"int\",1);\n\t\tpnet.createFlow(\"Point\",\"void<-setX(Point,int)\",1);\n\t\tpnet.createFlow(\"int\",\"void<-setX(Point,int)\",1);\n\t\tpnet.createFlow(\"void<-setX(Point,int)\",\"void\",1);\n\t\tpnet.createFlow(\"Point\",\"void<-setY(Point,int)\",1);\n\t\tpnet.createFlow(\"int\",\"void<-setY(Point,int)\",1);\n\t\tpnet.createFlow(\"void<-setY(Point,int)\",\"void\",1);\n\t\tpnet.createFlow(\"void\",\"Point<-Point(void)\",1);\n\t\tpnet.createFlow(\"Point<-Point(void)\",\"Point\",1);\n\t\t\n\t\tpnet.createFlow(\"MyPoint\",\"int<-getX(MyPoint)\",1);\n\t\tpnet.createFlow(\"int<-getX(MyPoint)\",\"int\",1);\n\t\tpnet.createFlow(\"MyPoint\",\"int<-getY(MyPoint)\",1);\n\t\tpnet.createFlow(\"int<-getY(MyPoint)\",\"int\",1);\n\t\tpnet.createFlow(\"int\",\"MyPoint<-MyPoint(int,int)\",2);\n\t\tpnet.createFlow(\"MyPoint<-MyPoint(int,int)\",\"MyPoint\",1);\n\t\t\n\t\t// Create flows for the clone edges\n\t\tpnet.createFlow(\"int\",\"int<-clone(int)\",1);\n\t\tpnet.createFlow(\"int<-clone(int)\",\"int\",2);\n\t\tpnet.createFlow(\"Point\",\"Point<-clone(Point)\",1);\n\t\tpnet.createFlow(\"Point<-clone(Point)\",\"Point\",2);\n\t\tpnet.createFlow(\"MyPoint\",\"MyPoint<-clone(MyPoint)\",1);\n\t\tpnet.createFlow(\"MyPoint<-clone(MyPoint)\",\"MyPoint\",2);\n\t\tpnet.createFlow(\"void\",\"void<-clone(void)\",1);\n\t\tpnet.createFlow(\"void<-clone(void)\",\"void\",2);\n\t\t\n\t}", "public void makeMoveFromMinimax(MoveNode move) {\n ArrayList<Slot> path = move.getMovePath();\n\n Slot source = path.get(0);\n Slot last = path.get(1);\n\n boardObject.setSlotColor(boardObject.getSlot(source.getRow(), source.getColumn()), Slot.EMPTY);\n\n for (int i = 1; i < path.size(); i++) {\n Slot[] intermediatesTemp = new Slot[1];\n Slot dest = path.get(i);\n\n if (makeMoveFromMinimax(source, dest, intermediatesTemp)) {\n boardObject.setSlotColor(boardObject.getSlot(dest.getRow(), dest.getColumn()), Slot.EMPTY);\n last = dest;\n\n source = new Slot(dest.getRow(), dest.getColumn(), source.getColor());\n }\n }\n\n boardObject.setSlotColor(boardObject.getSlot(last.getRow(), last.getColumn()), source.getColor());\n }", "public void copyFromNetwork(final FlatNetwork source) {\r\n\t\tEngineArray.arrayCopy(source.getWeights(), this.weights);\r\n\t\tEngineArray.arrayCopy(source.getLayerOutput(), this.output);\r\n\t}", "private Command createLayerMoveCommand(ChangeBoundsRequest req, StrataArtFragEditPart movedAFEP, Layer oldParentLyr ) {\n\t\tLayer layer = ((LayerEditPart) this).getLayer();\r\n\t\tboolean isHorz = layer.getLayout();\r\n\t\tif ((layer instanceof CompositeLayer) && ((CompositeLayer) layer).getMultiLayer()) {\r\n\t\t\t// edge case:\r\n\t\t\t// if adding to the multiLayer below child layers then add at\r\n\t\t\t// end of the last layer (do not create new layer)\r\n\t\t\tint newLayerChildNdx = -1;\r\n\t\t\tint newLayerNdx = ((LayerEditPart) this).getLayer().getShownChildren().size()-1;\r\n\r\n\t\t\tLayerEditPart child = getLayerChild(req.getLocation(), getChildren());\r\n\t\t\tif (child != null) {\r\n\t\t\t\tnewLayerNdx = getChildren().indexOf(getLayerChild(req.getLocation(), getChildren()))+1;\r\n\t\t\t\tnewLayerChildNdx = child.getChildren().indexOf(getEPChild(req.getLocation(), child, isHorz));\r\n\t\t\t}\r\n\t\t\tlogger.info(\"moving to MultiLayer\" + this.getClass() + newLayerChildNdx);\r\n\t\t\treturn createMoveCommand(\r\n\t\t\t\t\tthis.getParentTAFEP().getArtFrag(), // target AF\r\n\t\t\t\t\t// target Layer (child of multiLayer)\r\n\t\t\t\t\t((Layer) ((LayerEditPart) this).getLayer().getShownChildren().get(newLayerNdx)), \r\n\t\t\t\t\tmovedAFEP.getParentTAFEP().getArtFrag(), // old AF\r\n\t\t\t\t\toldParentLyr, // old layer\r\n\t\t\t\t\tmovedAFEP.getArtFrag(), newLayerChildNdx, -1); // moving AF, index to insert into in Layer, -1 (not new layer)\r\n\t\t}\r\n\t\tint newLayerChildNdx = ((LayerEditPart) this).getLayer().getShownChildren().size();\r\n\t\tif(getEPChild(req.getLocation(), this, isHorz) != null)\r\n\t\t\tnewLayerChildNdx = getChildren().indexOf(getEPChild(req.getLocation(), this, isHorz));\r\n\t\tlogger.info(\"moving to Layer \" + this.getClass() + newLayerChildNdx);\r\n\t\treturn createMoveCommand(\r\n\t\t\t\tthis.getParentTAFEP().getArtFrag(),\r\n\t\t\t\t((LayerEditPart) this).getLayer(),\r\n\t\t\t\tmovedAFEP.getParentTAFEP().getArtFrag(),\r\n\t\t\t\toldParentLyr,\r\n\t\t\t\tmovedAFEP.getArtFrag(), newLayerChildNdx, -1);\r\n\t}", "@Override\r\n\tpublic boolean makeMove(String notation) {\n\t\tif(Castle.isCastlingMove(new ChessCoordinate(notation))) {\r\n\t\t\tKing playerKing = (King) getPlayerTurn().getPieces(\"King\", true).get(0);\r\n\t\t\t//return the result of trying to castle\r\n\t\t\treturn playerKing.move(new ChessCoordinate(notation));\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t//not a castling move, standard move\r\n\t\t\t\t\r\n\t\t\tString[] notationList = notation.split(\"\");\r\n\t\t\t//find the piece name\r\n\t\t\tString pieceName = ChessPieceNames.getPieceName(notationList[0]);\t\t\r\n\t\t\t\r\n\t\t\tif(pieceName == null && getColumnNames().contains(notationList[0].toLowerCase())) {\r\n\t\t\t\t//if first character is a column and returned null from above\r\n\t\t\t\t//must be a pawn move like e4 or axb2\r\n\t\t\t\tpieceName = ChessPieceNames.PAWN.toString();\r\n\t\t\t}else if(pieceName == null){\r\n\t\t\t\t//not a column and null so invalid move\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n//\t\t\t//capturing move if there is a capture (x)\r\n\t\t\tboolean isCaptureMove = Arrays.asList(notationList).contains(\"x\");\r\n\t\t\t\r\n\t\t\t//final coordinate\r\n\t\t\tString coordinateString = notationList[notationList.length-2] + notationList[notationList.length-1];\r\n\t\t\tChessCoordinate coordinate = new ChessCoordinate(coordinateString);\r\n\t\t\tif(coordinate.isValid()) {\r\n\t\t\t\t//extract players alive pieces of piece name\r\n\t\t\t\tList<Piece> piecesOfType = getPlayerTurn().getPieces(pieceName, true);\r\n\t\t\t\t//list of pieces that can move to the same square\r\n\t\t\t\tList<Piece> piecesCanMoveToSquare = new ArrayList<Piece>();\r\n\t\t\t\tfor (Piece piece : piecesOfType) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//use valid moves of attacking if capturing move, else use move to\r\n\t\t\t\t\tSet<Coordinate> pieceMoves = isCaptureMove \r\n\t\t\t\t\t\t\t? piece.getValidMoves(Action.ATTACK) : piece.getValidMoves(Action.MOVE_TO);\r\n\t\t\t\t\tif(pieceMoves.contains(coordinate))piecesCanMoveToSquare.add(piece);\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\tif (piecesCanMoveToSquare.size() == 1) {\r\n\t\t\t\t\t//only one piece can go to that square, so take piece at 0th index as the list only has one element\r\n\t\t\t\t\tpiecesCanMoveToSquare.get(0).move(coordinate);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if (piecesCanMoveToSquare.size() > 1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(notation.length() <= 3) {\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid move, specify which piece to move to \" + coordinateString);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//multiple pieces of the same type can move to that square, check which one to use\r\n\t\t\t\t\t//if pawn, the identifier to use is the 0th index of notationList, eg axb4. use pawn in column a.\r\n\t\t\t\t\t//for other pieces, column to use is the 1st index of notationList. eg Nab4.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//variable called identifier as it can be a row or column value.\r\n\t\t\t\t\tString identifier = (pieceName.equalsIgnoreCase(ChessPieceNames.PAWN.toString()) ?\r\n\t\t\t\t\t\t\tnotationList[0] : notationList[1]).toLowerCase();\r\n\t\t\t\t\t//identifier should be a row value if pieces share the same column\r\n\t\t\t\t\tboolean isRowIdentifier = shareColumn(piecesOfType);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(isRowIdentifier && getRowNames().contains(identifier)) {\r\n\t\t\t\t\t\t//locate piece by row and move that piece to coordinate\r\n\t\t\t\t\t\tfor (Piece piece : piecesCanMoveToSquare) {\r\n\t\t\t\t\t\t\t//look at the row number of piece coordinate, see if it matches the identifier \r\n\t\t\t\t\t\t\tif(Character.toString(piece.getPosition().toString().charAt(1)).equalsIgnoreCase(identifier)) {\r\n\t\t\t\t\t\t\t\tpiece.move(coordinate);\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"There is no \" + pieceName + \" on row \" + identifier);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else if(getColumnNames().contains(identifier)) {\r\n\t\t\t\t\t\tfor (Piece piece : piecesCanMoveToSquare) {\r\n\t\t\t\t\t\t\t//look at the column letter of piece coordinate, see if it matches the identifier \r\n\t\t\t\t\t\t\tif(Character.toString(piece.getPosition().toString().charAt(0)).equalsIgnoreCase(identifier)) {\r\n\t\t\t\t\t\t\t\tpiece.move(coordinate);\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"There is no \" + pieceName + \" on column \" + identifier);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//invalid identifier\r\n\t\t\t\t\telse return false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//invalid coordinate, move can not be played\r\n\t\t\telse return false;\r\n\t\t}\r\n\t\t\r\n\t}", "public void makeMove() {\n ArrayList<Field> myFields = new ArrayList<>();\n for (Field[] fieldsRow : fields) {\n for (Field field : fieldsRow) {\n if(field != null && this.equals(field.getPlayer())) {\n myFields.add(field);\n }\n }\n }\n bestMove[0] = myFields.get(0);\n bestMove[1] = myFields.get(0);\n\n Random rand = new Random();\n for(Field destination : destinationFields) {\n if(canMove()) break;\n destinationField = destination;\n for (Field origin : myFields) {\n for(int i = 0; i < origin.getNeighbours().length; ++i) {\n Field neighbour = origin.getNeighbours()[i];\n if(neighbour != null) {\n if(neighbour.getPlayer() == null) {\n if(valueOfMove(origin, neighbour) > valueOfMove(bestMove[0], bestMove[1])) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n } else if(valueOfMove(origin, neighbour) == valueOfMove(bestMove[0], bestMove[1])) {\n if(rand.nextBoolean()) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n }\n }\n } else {\n Field nextField = neighbour.getNeighbours()[i];\n if(nextField != null) {\n correctJumpPaths(origin,null, origin);\n }\n }\n }\n }\n }\n }\n }", "void moveTo(Node n);", "public void createNodesTunnel(Maze input) {\r\n\t\tfor (int i = 0; i < input.sizeR; i++) {\r\n\t\t\tfor (int j = 0; j < input.sizeC; j++) {\r\n\t\t\t\tnode.add(new CellStorage(input.map[i][j], 1));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void move(){\n\t\t\n\t}", "void moveNode( int from, int to );", "public Network() {\n\t\tnodes.put(\"192.168.0.0\", new NetNode(\"192.168.0.0\"));\n\t\tnodes.put(\"192.168.0.1\", new NetNode(\"192.168.0.1\"));\n\t\tnodes.put(\"192.168.0.2\", new NetNode(\"192.168.0.2\"));\n\t\tnodes.put(\"192.168.0.3\", new NetNode(\"192.168.0.3\"));\n\t\tnodes.put(\"192.168.0.4\", new NetNode(\"192.168.0.4\"));\n\t\t//manually entering ports\n\t\t//0 to 1 and 2\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.2\"));\n\t\t//1 to 0 and 3\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.3\"));\n\t\t//2 to 0 and 3 and 4\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.3\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//3 to 1 and 2 and 4\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//4 to 2 and 3\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.3\"));\n\t}", "public void makeMove(Board board, Scanner input) {\n boolean stillNeedsToMove = true;\n while (stillNeedsToMove) {\n System.out.println(\"Please select a coordinate for a box to make a choice in: \");\n String coordinates = input.next().trim();\n if (coordinates.length() != 2) {\n System.out.println(\"Those were invalid coordinates!\");\n continue;\n }\n int x = Integer.parseInt(coordinates.substring(0, 1));\n int y = Integer.parseInt(coordinates.substring(1, 2));\n // Check if that box has any moves left\n Box box = board.getBoxAtCoordinate(x, y);\n if (box == null) {\n System.out.println(\"Invalid coordinates, please try again!\");\n continue;\n }\n if (!box.hasOwner()) {\n System.out.println(\"That box already has been completed!\");\n continue;\n }\n System.out.println(\"Please select a line to take (LEFT, TOP, RIGHT, BOTTOM): \");\n String side = input.next().toLowerCase();\n if (box.isSideTaken(side)) {\n System.out.println(\"That side is already taken, please try making the move again!\");\n continue;\n }\n // Take the move and check if now owner\n boolean nowOwner = box.setSide(side, BoxOwner.HUMAN);\n if (nowOwner) {\n System.out.println(\"You now own this box!\");\n }\n // Check and see if you need to update the siblings side\n Box siblingToUpdate = board.getSiblingBoxBasedOnCoordinateAndMove(x, y, side);\n if (siblingToUpdate != null) {\n boolean owner;\n // Set opposite side in sibling\n if (side.equals(\"left\")) {\n owner = siblingToUpdate.setSide(\"right\", BoxOwner.HUMAN);\n } else if (side.equals(\"top\")) {\n owner = siblingToUpdate.setSide(\"bottom\", BoxOwner.HUMAN);\n } else if (side.equals(\"right\")) {\n owner = siblingToUpdate.setSide(\"left\", BoxOwner.HUMAN);\n } else {\n owner = siblingToUpdate.setSide(\"top\", BoxOwner.HUMAN);\n }\n\n if (owner) {\n System.out.println(\"You now own the sibling box as well\");\n }\n }\n // End the turn for the user\n stillNeedsToMove = false;\n }\n // Print Board\n board.printBoard();\n }", "private StaticPacketTrace inputFromController(StaticPacketTrace trace, ConnectPoint in) {\n EthTypeCriterion ethTypeCriterion = (EthTypeCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.ETH_TYPE);\n //If the packet is LLDP or BDDP we flood it on all active ports of the switch.\n if (ethTypeCriterion != null && (ethTypeCriterion.ethType().equals(EtherType.LLDP.ethType())\n || ethTypeCriterion.ethType().equals(EtherType.BDDP.ethType()))) {\n //get the active ports\n List<Port> enabledPorts = deviceNib.getPorts(in.deviceId()).stream()\n .filter(Port::isEnabled)\n .collect(Collectors.toList());\n //build an output from each one\n enabledPorts.forEach(port -> {\n PipelineTraceableHitChain hitChain = new PipelineTraceableHitChain(\n new ConnectPoint(port.element().id(), port.number()), ImmutableList.of(),\n new PipelineTraceablePacket(trace.getInitialPacket()));\n trace.addHitChain(in.deviceId(), hitChain);\n });\n return trace;\n }\n return null;\n }", "public void addNeuron(){\n neurons.add(new Neuron(neurons.size(), layerIndex));\n for (Neuron n: upStream.getNeurons()){\n Connection con = new Connection(n, neurons.get(neurons.size()-1));\n n.addDownStream(con);\n neurons.get(neurons.size()-1).addUpStream(con);\n }\n for (Neuron n: downStream.neurons){\n Connection con = new Connection(neurons.get(neurons.size()-1), n);\n n.addUpStream(con);\n neurons.get(neurons.size()-1).addDownStream(con);\n }\n }", "Neuron setName(String name);", "protected void setNeuralNetwork(NeuralNetwork nnet) {\n\t\tthis.nnet = nnet;\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/networks/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Network> replaceNetwork(\n @Path(\"name\") String name, \n @Body Network body);", "public void removeEntry(int source, int net)\n\t{ // this is utilizing my compareTo method, only the source and network number matter\n\t\ttable.remove(new RouteTableEntry(source, new NetworkDistancePair(net, 0), 0));\n\t\t\n\t\tparentActivity.runOnUiThread(new Runnable()\n\t\t{ \n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tuiManager.resetRoutingListAdapter();\n\t\t\t\tuiManager.resetForwardingListAdapter();\n\t\t\t} // end public method run\n\t\t}); // end runOnUiThread\n\t}", "public void moveIn(){\n //because findPlanet is static method, call it using its class name Planet\n //find the index of the current planet by calling the findPlanet method.\n int index=Planet.findPlanet(currPlanet.getName(),planets);\n if(index==0){\n //If the spaceship is already at the first planet in the planet list\n System.out.println(\"The spaceship \"+this.name+\" couldn't move in. No planet is closer in\");\n }else{\n //move closer into the solar system means the index-1 in the ArrayList of planets\n Planet moveToPlanet=planets.get(index-1);\n moveTo(moveToPlanet.getName());\n }\n }", "public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}", "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }", "public void makeMove(Player player, int input) {\n\t\t// Get all the valid moves if there are any\n\t\tArrayList<ArrayList<Integer>> validMoves = getValidMoves(this.board, player.color);\n\t\tprintValidMoves(validMoves, board);\n\t\tif (!validMoves.isEmpty()) {\n\t\t\tif (setMove(input, validMoves, player.color, this.board)) {\n\t\t\t\tturn++;\n\t\t\t}\n\n\t\t\t// Reset noWinnerCount\n\t\t\tnoWinnerCount = 0;\n\t\t} else {\n\t\t\t// Player can't move, if this counter reaches 2, that means both players can't\n\t\t\t// move and the game will end\n\t\t\tnoWinnerCount++;\n\t\t\tSystem.out.println(\"Out of moves + Count = \" + noWinnerCount);\n\t\t}\n\n\t\t// Input is last player player\n\t\tArrayList<ArrayList<Integer>> validMovesOpponent = getValidMoves(board, player.opponent);\n\t\tif (validMovesOpponent.size() > 0) {\n\t\t\tswitchTurn(player);\n\t\t}\n\t}", "public void minimisation4( ArrayList<Node>convrt1, Topology tp)\n {\n for ( int i=0; i<tp.getNodes().size(); i++ )\n {\n Node n= tp.getNodes().get(i);\n List<Link>allLinks = n.getLinks();\n boolean allLinksConnected= true;\n for ( int j=0; j<allLinks.size();j++ )\n {\n Link l= allLinks.get(j);\n if ( l.getColor()!=Color.orange)\n allLinksConnected=false;\n }\n List<Node> neighbors= n.getNeighbors();\n boolean allNeighborsConvert=true;\n for ( int j=0; j<neighbors.size();j++ )\n {\n Node n1= neighbors.get(j);\n if ( (convrt1.contains(n1))== false )\n {\n allNeighborsConvert=false;\n }\n }\n if ( allLinksConnected==true && allNeighborsConvert==true )\n {\n if ( n instanceof Ipv6)\n {\n ((Ipv6) n).setType(\"Conv\");\n n.setIcon(\"./src/img/Conv.png\");\n convrt1.add(n);\n }\n else if ( n instanceof Ipv4)\n {\n ((Ipv4) n).setType(\"Conv\");\n n.setIcon(\"./src/img/Conv.png\");\n convrt1.add(n);\n }\n\n for ( int m=0; m< n.getNeighbors().size(); m++ )\n {\n Node n2= n.getNeighbors().get(m);\n if ( n2 instanceof Ipv6)\n {\n ((Ipv6) n2).setType(\"IPV6\");\n n2.setIcon(\"./src/img/ipv6.png\");\n convrt1.remove(n2);\n }\n else if ( n2 instanceof Ipv4)\n {\n ((Ipv4) n2).setType(\"IPV4\");\n n2.setIcon(\"./src/img/ipv4.png\");\n convrt1.remove(n2);\n }\n }\n }\n }\n }", "public void makeBestMove(String method, double angle, String who){\n\t\tif (method==\"avoid\"){\n\t\t\tif (!blocked1){\n\t\t\t\tthis.convertToMotion(move1x,move1y, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!blocked2){\n\t\t\t\t\tthis.convertToMotion(move2x,move2y, who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (!blocked3){\n\t\t\t\t\t\tthis.convertToMotion(move3x,move3y, who);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (!blocked4){\n\t\t\t\t\t\t\tthis.convertToMotion(move4x,move4y, who);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\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}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Dependent on most dominant vector component. Else, NPC stays put.\n\t\tif (method==\"freeze\"){\n\t\t\tif (!blocked1){\n\t\t\t\tthis.convertToMotion(move1x,move1y, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (who==\"Trainer\"){\n\t\t\t\t\tif(move1x==0 && move1y==1){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceDown();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(1+4);\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(move1x==0 && move1y==-1){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceUp();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(0+4);\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(move1x==1 && move1y==0){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceRight();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(2+4);\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(move1x==-1 && move1y==0){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceLeft();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(3+4);\n\t\t\t\t\t\t}\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t\n\t\t\t\t\tthis.repaint();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(method==\"vert\"){\n\t\t\tint moveVx=0;\n\t\t\tint moveVy=0;\n\t\t\tint xIndex;\n\t\t\tint yIndex;\n\t\t\t\n\t\t\tif (who==\"Trainer\"){\n\t\t\t\txIndex=this._movingTrainers.get(_thisTrainer).getXIndex();\n\t\t\t\tyIndex=this._movingTrainers.get(_thisTrainer).getYIndex();\n\t\t\t}\n\t\t\telse{\n\t\t\t\txIndex=this._xIndex;\n\t\t\t\tyIndex=this._yIndex;\n\t\t\t}\n\t\t\tboolean blockedV=false;\n\t\t\t\n\t\t\tif (angle>0 && angle<180){\n\t\t\t\tmoveVy=1;\n\t\t\t\tmoveVx=0;\n\t\t\t}\n\t\t\tif (angle>180 && angle<360){\n\t\t\t\tmoveVy=-1;\n\t\t\t\tmoveVx=0;\n\t\t\t}\n\t\t\tif (angle==0 || angle==360){\n\t\t\t\tmoveVx=-1;\n\t\t\t\tmoveVy=0;\n\t\t\t}\n\t\t\tif (angle==180){\n\t\t\t\tmoveVx=1;\n\t\t\t\tmoveVy=0;\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t\tif((!_gbs.getPlayer().isIgnoring() && who == \"Player\") || who == \"Trainer\"){\n\t\t\t\tif(xIndex + moveVx<=this._room.getX() && yIndex + moveVy<=this._room.getY() && xIndex + moveVx>=0 && yIndex + moveVy>=0){\n\t\t\t\t\t char nextV=this._room._roomGrid[xIndex + moveVx][yIndex + moveVy];\n\t\t\t\t\t if(nextV==NO || nextV==TRAINER || nextV == CUT || nextV==VERTICAL || nextV == RIGHT_LEDGE || nextV == LEFT_LEDGE|| ((nextV==DOOR || nextV== SEAMLESS) && !this._approachTimer.isRunning())|| (nextV== SURF && !this._movingTrainers.get(_thisTrainer).canSurf()) || ((nextV== FREE || nextV == GRASS) && this._movingTrainers.get(_thisTrainer).canSurf()) || (xIndex + moveVx ==this.xObs && yIndex+moveVy==this.yObs)){\n\t\t\t\t blockedV=true;\n\t\t\t\t }\n\t\t\t\t\t for(int j=0; j<this._movingTrainers.size();j++){\n\t\t\t\t\t\t if(xIndex + moveVx ==this._movingTrainers.get(_thisTrainer).getXIndex() && yIndex + moveVy ==this._movingTrainers.get(_thisTrainer).getYIndex()){\n\t\t\t\t\t\t\t if(this._movingTrainers.get(j).isDefeated() && this._movingTrainers.get(j).getVanishing()){}\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t blockedV=true;\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}\n\t\t\t\telse{\n\t\t\t\t\tblockedV=true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!blockedV){\n\t\t\t\tthis.convertToMotion(moveVx,moveVy, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\tif(xIndex + moveVx==_xIndex && yIndex + moveVy==_yIndex){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).facePlayer(this._xIndex, this._yIndex);\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(method==\"horiz\"){\n\t\t\tint moveHx=0;\n\t\t\tint moveHy=0;\n\t\t\tint xIndex;\n\t\t\tint yIndex;\n\t\t\t\n\t\t\tif (who==\"Trainer\"){\n\t\t\txIndex=this._movingTrainers.get(_thisTrainer).getXIndex();\n\t\t\tyIndex=this._movingTrainers.get(_thisTrainer).getYIndex();\n\t\t\t}\n\t\t\telse{\n\t\t\t\txIndex=this._xIndex;\n\t\t\t\tyIndex=this._yIndex;\n\t\t\t}\n\t\t\t\n\t\t\tboolean blockedH=false;\n\n\t\t\tif (angle>90 && angle<270){\n\t\t\t\tmoveHy=0;\n\t\t\t\tmoveHx=1;\n\t\t\t}\n\t\t\tif ((angle>270 && angle <=360)||(angle>=0 && angle<90)){\n\t\t\t\tmoveHy=0;\n\t\t\t\tmoveHx=-1;\n\t\t\t}\t\n\t\t\tif (angle==90){\n\t\t\t\tmoveHx=0;\n\t\t\t\tmoveHy=1;\n\t\t\t}\n\t\t\tif (angle==270){\n\t\t\t\tmoveHx=0;\n\t\t\t\tmoveHy=-1;\n\t\t\t}\n\n\t\t\t\n\t\t\tif((!_gbs.getPlayer().isIgnoring() && who == \"Player\") || who == \"Trainer\"){\n\t\t\t\tif(xIndex + moveHx<=this._room.getX() && yIndex + moveHy<=this._room.getY() && xIndex + moveHx>=0 && yIndex + moveHy>=0){\n\t\t\t\t\t char nextH=this._room._roomGrid[xIndex + moveHx][yIndex + moveHy];\n\t\t\t\t\t if(nextH==NO || nextH==TRAINER || nextH == CUT || nextH==VERTICAL || nextH == RIGHT_LEDGE || nextH == LEFT_LEDGE|| ((nextH==DOOR || nextH== SEAMLESS) && !this._approachTimer.isRunning())|| (nextH== SURF && !this._movingTrainers.get(_thisTrainer).canSurf()) || ((nextH== FREE || nextH == GRASS) && this._movingTrainers.get(_thisTrainer).canSurf()) || (xIndex + moveHx ==this.xObs && yIndex+moveHy==this.yObs)){\n\t\t\t\t blockedH=true;\n\t\t\t\t }\n\t\t\t\t\t for(int j=0; j<this._movingTrainers.size();j++){\n\t\t\t\t\t\t if(xIndex + moveHx ==this._movingTrainers.get(_thisTrainer).getXIndex() && yIndex + moveHy ==this._movingTrainers.get(_thisTrainer).getYIndex()){\n\t\t\t\t\t\t\t if(this._movingTrainers.get(j).isDefeated() && this._movingTrainers.get(j).getVanishing()){}\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t blockedH=true;\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}\n\t\t\t\telse{\n\t\t\t\t\tblockedH=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockedH){\n\t\t\t\tthis.convertToMotion(moveHx,moveHy, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(method==\"drunk\"){\n\t\t\tRandom r = new Random();\n\t\t\tint rand = r.nextInt(100);\n\t\t\t\n\t\t\t//Probabilities:\n\t\t\t//Best move = 50%\n\t\t\tint p1=50;\n\t\t\t//Second best = 15%\n\t\t\tint p2=65;\n\t\t\t//Third best = 10%\n\t\t\tint p3=75;\n\t\t\t//Worst move = 10%\n\t\t\tint p4=85;\n\t\t\t//Doesn't move at all. = 15%\n\t\t\tint p5=100;\n\t\t\t\n\t\t\tif(rand<=p1){\n\t\t\t\tif(!blocked1){\n\t\t\t\t\tthis.convertToMotion(move1x, move1y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p2){\n\t\t\t\tif(!blocked2){\n\t\t\t\t\tthis.convertToMotion(move2x, move2y, who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p3){\n\t\t\t\tif(!blocked3){\n\t\t\t\t\tthis.convertToMotion(move3x, move3y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p4){\n\t\t\t\tif(!blocked4){\n\t\t\t\t\tthis.convertToMotion(move4x, move4y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p5){\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(method==\"wander\"){\n\t\t\tRandom r = new Random();\n\t\t\tint rand = r.nextInt(100);\n\t\t\t\n\t\t\t//Probabilities:\n\t\t\t//Best move = 65%\n\t\t\tint p1=65;\n\t\t\t//Second best = 10%\n\t\t\tint p2=75;\n\t\t\t//Third best = 5%\n\t\t\tint p3=80;\n\t\t\t//Worst move = 5%\n\t\t\tint p4=85;\n\t\t\t//Doesn't move at all. = 15%\n\t\t\tint p5=100;\n\t\t\t\n\t\t\tif(rand<=p1){\n\t\t\t\tif(!blocked1){\n\t\t\t\t\tthis.convertToMotion(move1x, move1y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p2){\n\t\t\t\tif(!blocked2){\n\t\t\t\t\tthis.convertToMotion(move2x, move2y, who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p3){\n\t\t\t\tif(!blocked3){\n\t\t\t\t\tthis.convertToMotion(move3x, move3y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p4){\n\t\t\t\tif(!blocked4){\n\t\t\t\t\tthis.convertToMotion(move4x, move4y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p5){\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t}", "public void moveForwardOneBlock() {\n\t\tBlockInterface nextBlock = this.currentBlock.goesto(previousBlock);\n\t\tthis.previousBlock = this.currentBlock;\n\t\tthis.currentBlock = nextBlock;\n\t\tif(nextBlock instanceof BlockStation){\n\t\t\tString nbname = ((BlockStation)nextBlock).getStationName();\n\t\t\tif(schedule.containsKey(nbname)){\n\t\t\t\tschedule.remove(nbname);\n\t\t\t\t((SchedulePane)c.schedulepane).reloadSchedual();\n\t\t\t}\n\t\t}\n\t}", "public void deductNetwork(Character ch)\n\t{\n\t\tif(characterAdded.indexOf(ch) != -1)\n\t\t{\n\t\t\tcharacterAdded.get( net_num - 1 ).net_index = ch.net_index;\n\t\t\tcharacterAdded.set(ch.net_index, characterAdded.get( net_num - 1 ) );\n\t\t\tch.net_index = -1;\n\t\t\tcharacterAdded.remove(net_num-1);\n\t\t\tnet_num--;\n\t\t}\n\t}", "public void moveComponentsFrom(ComponentContainer source);", "public abstract void makeBestMove();", "@Override\n public void buildNetwork() {\n }", "public void copyToNetwork(final FlatNetwork target) {\r\n\t\tEngineArray.arrayCopy(this.weights, target.getWeights());\r\n\t\tEngineArray.arrayCopy(this.output, target.getLayerOutput());\t\t\r\n\t}", "default void moveConnector(Direction direction) throws Exception {\n if (direction == Direction.Inbound) {\n if (getConnector(Direction.Inbound).getOccupant() != null) {\n throw new Exception(\"Multiple objects cannot be on the same IConnector\");\n }\n getConnector(Direction.Inbound).setOccupant(getOccupant());\n if (getOccupant() instanceof IOccupant) {\n ((IOccupant) getOccupant()).setConnector(getConnector(Direction.Inbound));\n\n }\n this.setOccupant(null);\n return;\n }\n if (getConnector(Direction.Outbound).getOccupant() != null) {\n throw new Exception(\"Multiple objects cannot be on the same IConnector\");\n }\n getConnector(Direction.Outbound).setOccupant(getOccupant());\n if (getOccupant() instanceof IOccupant) {\n ((IOccupant) getOccupant()).setConnector(getConnector(Direction.Outbound));\n }\n this.setOccupant(null);\n }", "protected void alter_for_neighbour_switch() {\n\t\tint this_l, tother_l, ns_i, ns_j, ns_n;\n\t\t\n\t\t// Let the user know...\n\t\tSystem.out.println(\" H THIS IS IN N_SWITCH (nn comparison) mode, for structure \"+INIT_NPHASE);\n\t\tSystem.out.println(\" H en_shift = \"+EN_SHIFT);\n\t\t\n\t\t// Check that there is room at the inn:\n\t\tif( n > MAX_NNS ) {\n\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\"neighbour switch needs \"+n+\" neighbours in MAX_NNS!\\n\"));\n\t\t}\n\t\t\n\t\t// Make both structures the same:\n\t\tthis_l = INIT_NPHASE;\n\t\ttother_l = 1 - this_l;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tlatt[tother_l][ns_i].x = latt[this_l][ns_i].x;\n\t\t\tlatt[tother_l][ns_i].y = latt[this_l][ns_i].y;\n\t\t\tlatt[tother_l][ns_i].z = latt[this_l][ns_i].z;\n\t\t\t// copy nn lists as well!\n\t\t\tns_n = 0; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\twhile ( ns_j != NO_MORE_NNS ) {\n\t\t\t\tnns[tother_l][ns_i][ns_n] = nns[this_l][ns_i][ns_n];\n\t\t\t\tns_n++; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\t}\n\t\t\tnns[tother_l][ns_i][ns_n] = NO_MORE_NNS;\n\t\t}\n\t\t\n\t\t// Alter the neighbour list for structure 1;\n\t\tmake_it_order_n_squared(1);\n\t}", "public void AskForMove();", "void move_couple() {\n\t\tfor(int i = 0; i < d; i++){\n\t\t\tif(dancers[i].soulmate == -1) continue;\n\t\t\tPoint curr = this.last_positions[i];\n\t\t\tPoint des = this.dancers[i].des_pos;\n\t\t\tthis.dancers[i].next_pos = findNextPosition(curr, des);\n\t\t}\n\t}", "protected BackpropNeuron createNeuron(int layer, int index)\n\t{\n\t\tif( layer == 0 )\n\t\t\treturn new InputBackpropNeuron(this, this.activationFunction, this.learningRate);\n\t\telse if(layer >= (this.getLayerCount() - 1))\n\t\t\treturn new OutputBackpropNeuron(this, this.activationFunction, this.learningRate);\n\t\telse\n\t\t\treturn new BackpropNeuron(this, this.activationFunction, this.learningRate);\n\t}", "void move(Tile t);", "private Move _getNextMovePacket(Packet packet) {\n Move move = new Move();\n\n try {\n switch (packet.command) {\n\n case START:\n move.action = Action.START;\n move.id = packet.getField(\"id\", Integer.class);\n break;\n\n case ANTE:\n move.chips = packet.getField(\"chips\", Integer.class);\n\n // Request the next Move directly, which should be a STAKES\n Move stks = getNextMove();\n if (stks.action != Action.STAKES) {\n System.err.println(\"Invalid packet after ANTE\");\n move.action = Action.NOOP;\n return move;\n }\n\n move.action = Action.ANTE_STAKES;\n move.cStakes = stks.cStakes;\n move.sStakes = stks.sStakes;\n break;\n\n case STAKES:\n move.action = Action.STAKES;\n move.cStakes = packet.getField(\"stakes_client\", Integer.class);\n move.sStakes = packet.getField(\"stakes_server\", Integer.class);\n break;\n\n case ANTE_OK:\n move.action = Action.ANTE_OK;\n break;\n\n case QUIT:\n move.action = Action.QUIT;\n break;\n\n case DEALER:\n move.action = Action.DEALER_HAND;\n move.dealer = packet.getField(\"dealer\", Integer.class);\n Move hand = getNextMove();\n if (hand.cards == null) {\n System.err.println(\"Invalid packet after DEALER\");\n move.action = Action.NOOP;\n return move;\n }\n move.cards = hand.cards;\n break;\n case HAND:\n move.action = Action.DEALER_HAND;\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case RAISE:\n move.action = Action.RAISE;\n move.chips = packet.getField(\"chips\", Integer.class);\n break;\n case BET:\n move.action = Action.BET;\n move.chips = packet.getField(\"chips\", Integer.class);\n break;\n\n case DRAW:\n // If any cards were requested, get the Card array\n move.action = Action.DRAW;\n move.cDrawn = packet.getField(\"number\", Integer.class);\n if (move.cDrawn > 0)\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case DRAW_SERVER:\n move.action = Action.DRAW_SERVER;\n move.sDrawn = packet.getField(\"number\", Integer.class);\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case SHOWDOWN:\n move.action = Action.SHOW;\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case ERROR:\n move.action = Action.ERROR;\n move.error = packet.getField(\"error\", String.class);\n break;\n\n case NET_ERROR:\n // Irrecoverable network error. Terminate the Client Game\n move.action = Action.TERMINATE;\n break;\n\n case PASS:\n move.action = Action.PASS;\n break;\n case CALL:\n move.action = Action.CALL;\n break;\n case FOLD:\n move.action = Action.FOLD;\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n NET_ERROR(\"Network Source: Problem reading next Move arguments\");\n move.action = Action.NOOP;\n }\n\n return move;\n }", "private void moveSteen(MouseEvent e) {\r\n\tNodeComponent node = (NodeComponent)e.getComponent();\t\r\n\tMoves[] tmp = selectedNode.getDamsteen().getMoveToArray();\r\n\t\r\n\tfor (Moves m : tmp) {\r\n\t if (m.getTargetNode() == node.getNode())\r\n\t\tdambord.makeMove(m);\r\n\t}\t\r\n\tselectedNode = null;\r\n }", "public void makeMove(Move m) {\n \tPieceColor moved = m.getSource().getColor();\n\n \t//before the move is made, record the move in the movelist\n \tupdateMoveList(m);\n \t\n \t//store locations\n \tint sx = m.getSource().getLocation().getX();\n \tint sy = m.getSource().getLocation().getY();\n \tint dx = m.getDest().getLocation().getX();\n \tint dy = m.getDest().getLocation().getY();\n \tString name_moved = m.getSource().getName();\n \t\n \t//store new king location if it moved\n \tif(name_moved.equals(\"King\")) {\n \t\tif(moved == PieceColor.White) {\n \t\t\twKing = m.getDest().getLocation();\n \t\t\t\n \t\t\t//remove castle rights on both sides\n \t\t\tcastle[0] = false;\n \t\t\tcastle[1] = false;\n \t\t}\n \t\telse if(moved == PieceColor.Black) {\n \t\t\tbKing = m.getDest().getLocation();\n \t\t\t\n \t\t\t//remove castle rights on both sides\n \t\t\tcastle[2] = false;\n \t\t\tcastle[3] = false;\n \t\t}\n \t\telse System.exit(0);\n \t}\n \t\n \t//rook check for castling rights\n \tif(name_moved.equals(\"Rook\")) {\n \t\tif(moved == PieceColor.White) {\n \t\t\tif(sx == 0 && sy == 0) removeCastle(moved, false);\n \t\t\tif(sx == 7 && sy == 0) removeCastle(moved, true);\n \t\t}\n \t\t\n \t\telse if(moved == PieceColor.Black) {\n \t\t\tif(sx == 0 && sy == 7) removeCastle(moved, false);\n \t\t\tif(sx == 7 && sy == 7) removeCastle(moved, true);\n \t\t}\n \t}\n \t\n \tPiece temp = getPiece(sx, sy);\n \t\n \tsetPiece(sx, sy, new NoPiece(sx, sy));\n \t\n \tif(temp.getName().equals(\"Pawn\") && ((Pawn)temp).getPromo() == dy) {\n \t\ttemp = new Queen(dx, dy, temp.getColor(), this);\n \t}\n \t\n \t\n \ttemp.setLocation(new Square(dx, dy));\n \t\n \t//check for en passant\n \tif(name_moved.equals(\"Pawn\")) {\n \t\tint loc = ((Pawn)temp).advance();\n \t\t((Pawn)temp).setMoved(moveList.size());\n \t\t\n \t\t//only a valid en passant move if the pawn moves diagonally\n \t\t//and the destination square is empty\n \t\tif(sx != dx && getPiece(dx, dy).getName().equals(\"None\")) {\n \t\t\tsetPiece(dx, dy-loc, new NoPiece(dx, dy-loc));\n \t\t}\n \t}\n \t\n \tsetPiece(dx, dy, temp);\n \t\n \tif(turn == PieceColor.White) turn = PieceColor.Black;\n \telse turn = PieceColor.White;\n \t\n \t//check if the move was a castle\n \tif(name_moved.equals(\"King\")) {\n \t\t\n \t\tif(moved == PieceColor.White) { \n\t \t\t//if king moved positive x, then moved king side\n\t \t\tif(dx - sx == 2) {\n\t \t\t\ttemp = getPiece(7, 0);\n\t \t\t\tsetPiece(7, 0, new NoPiece(7, 0));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(5,0));\n\t \t\t\tsetPiece(5, 0, temp);\n\t \t\t}\n\t \t\t\n\t \t\telse if(sx - dx == 2) {\n\t \t\t\ttemp = getPiece(0, 0);\n\t \t\t\tsetPiece(0, 0, new NoPiece(0, 0));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(3, 0));\n\t \t\t\tsetPiece(3, 0, temp);\n\t \t\t}\n \t\t}\n \t\t\n \t\tif(moved == PieceColor.Black) { \n\t \t\t//if king moved positive x, then moved king side\n\t \t\tif(dx - sx == 2) {\n\t \t\t\ttemp = getPiece(7, 7);\n\t \t\t\tsetPiece(7, 7, new NoPiece(7, 7));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(5, 7));\n\t \t\t\tsetPiece(5, 7, temp);\n\t \t\t}\n\t \t\t\n\t \t\telse if(sx - dx == 2) {\n\t \t\t\ttemp = getPiece(0, 7);\n\t \t\t\tsetPiece(0, 7, new NoPiece(0, 7));\n\t \t\t\t\n\t \t\t\ttemp.setLocation(new Square(3, 7));\n\t \t\t\tsetPiece(3, 7, temp);\n\t \t\t}\n \t\t}\n \t}\n }", "protected void internalMove(IMoveShapeContext context) {\n \t\tShape shapeToMove = context.getShape();\n \t\tContainerShape oldContainerShape = context.getSourceContainer();\n \t\tContainerShape newContainerShape = context.getTargetContainer();\n \n \t\tint x = context.getX();\n \t\tint y = context.getY();\n \n \t\tif (oldContainerShape != newContainerShape) {\n \t\t\t// the following is a workaround due to an MMR bug\n \t\t\tif (oldContainerShape != null) {\n \t\t\t\tCollection<Shape> children = oldContainerShape.getChildren();\n \t\t\t\tif (children != null) {\n \t\t\t\t\tchildren.remove(shapeToMove);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tshapeToMove.setContainer(newContainerShape);\n \t\t\tif (shapeToMove.getGraphicsAlgorithm() != null) {\n \t\t\t\tGraphiti.getGaService().setLocation(shapeToMove.getGraphicsAlgorithm(), x, y,\n \t\t\t\t\t\tavoidNegativeCoordinates());\n \t\t\t}\n \t\t} else { // move within the same container\n \t\t\tif (shapeToMove.getGraphicsAlgorithm() != null) {\n \t\t\t\tGraphiti.getGaService().setLocation(shapeToMove.getGraphicsAlgorithm(), x, y,\n \t\t\t\t\t\tavoidNegativeCoordinates());\n \t\t\t}\n \t\t}\n \t}", "public WorkingNeuron getOutputNeuronFromName(String name) {\n\t\tfor (WorkingNeuron neuron : outputLayer) {\n\t\t\tif (name.equals(neuron.getName())) {\n\t\t\t\treturn neuron;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void makeMove(int move, boolean updateGui) {\n //convert van 1d naar 2d\n row = move / 3;\n col = move % 3;\n\n if (isGameRunning && validMove(row, col)) {\n // Steen plaatsen op positie rij, kolom op bord\n makeBoard2d();\n board2d[row][col] = piece;\n\n board = boardConvertto1d();\n\n if (turn.equals(ourUsername)) {\n Controller.con.makeMove(move);\n }\n\n if (updateGui) {\n try {\n if (turn.equals(player1)) {\n turn = player2;\n } else {\n turn = player1;\n }\n Platform.runLater(() -> {\n Controller.tttController.updateView();\n });\n\n } catch (NullPointerException n) {\n System.out.println(Controller.tttController);\n n.printStackTrace();\n }\n }\n }\n }", "public void move() {\n\r\n\t}", "public synchronized void makeMove() throws NumberFormatException, IOException {\r\n\tboolean check=true;\r\n\twhile(check) {\r\n\tsocketOut.println(name+\", what row should your next \"+mark+\" be placed in ?\");\r\n\trow=Integer.parseInt(socketIn.readLine());\r\n\tsocketOut.println(name+\", what column should your next \"+mark+\" be placed in ?\");\r\n\tcol =Integer.parseInt(socketIn.readLine());\r\n\tif((row>=0 && row<=2)&&((col>=0 && col<=2))) {\r\n\tif (board.getMark(row, col)==' ' ) {\r\n\t\t {\r\n\t\t\tboard.addMark(row, col, mark);\r\n\t\t\topponent.board.addMark(row, col, mark);\r\n\t\t\tcheck=false;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}\r\n\telse {\r\n\t\tsocketOut.println(\"There is a mark there, choose another location\");\r\n\t\t\r\n\t}}}\r\n}", "boolean prepareToMove();", "public void requestMovePoseUp()\r\n {\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \tAnimatedSpriteEditorGUI gui = singleton.getGUI(); \r\n \t \r\n boolean continueToMove = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToMove = promptToSave();\r\n }\r\n if(continueToMove)\r\n {\r\n \tposeIO.movePose(poseID, 0);\r\n \tsingleton.getFileManager().reloadSpriteType();\r\n \tsingleton.getGUI().updatePoseList();\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVED_TEXT,\r\n POSE_MOVED_TITLE_TEXT,\r\n JOptionPane.INFORMATION_MESSAGE);\r\n } \r\n }", "private void moveMotor(String num){\n Log.d(\"moveMotor\", \"TO\" + num);\n if (btSocket!=null) {\n try {\n btSocket.getOutputStream().write((\"TO\" + num).getBytes());\n }\n catch (IOException ex) {\n msg(\"Error\");\n }\n }\n }", "private BoardState makeMove(ChessGameNode rootNodeCurr, NewMove nextMoveCurr) {\r\n \tTile[][] currentBoard = rootNodeCurr.getBoardState().getBoard();\r\n \tUnit[] unitListcB = rootNodeCurr.getBoardState().getUnitList();\r\n\r\n \tUnit unitThatMoves = nextMoveCurr.getUnit();\r\n \tMoves moveToMake = nextMoveCurr.getMove();\r\n\r\n \tTile oldSquare = currentBoard[unitThatMoves.getX()][unitThatMoves.getY()];\r\n Tile newSquare = chessBoard[moveToMake.getX()][moveToMake.getY()];\r\n\r\n Unit oldUnit = oldSquare.getPiece();\r\n Unit targetUnit = newSquare.getPiece();\r\n\r\n BoardState newBoard;\r\n\r\n if (targetUnit != null) {\r\n for (int i = 0; i < unitListcB.length; i++) {\r\n if (unitListcB[i] == targetUnit) {\r\n unitListcB[i] = null;\r\n }\r\n } \r\n }\r\n\r\n // update the coordinates of the piece\r\n\t\toldUnit.setCoordinates(moveToMake.getX(),moveToMake.getY());\r\n\t\t// doesn;t update the unit in the unitlist i think\r\n oldSquare.setPiece(null);\r\n newSquare.setPiece(oldUnit);\r\n newBoard = new BoardState(currentBoard, unitListcB);\r\n\r\n \treturn newBoard;\r\n }", "private Board createMovedBoard(MatrixIndex src, MatrixIndex dest) {\n int srcVal = blocks[src.i][src.j];\n blocks[src.i][src.j] = blocks[dest.i][dest.j];\n blocks[dest.i][dest.j] = srcVal;\n Board movedBoard = new Board(blocks);\n blocks[dest.i][dest.j] = blocks[src.i][src.j];\n blocks[src.i][src.j] = srcVal;\n return movedBoard;\n }", "private void moveCamera(float tpf) {\n //Place the camera at the node\n this.getCamera().setLocation(cameraNode.getLocalTranslation().multLocal(1,0,1).add(0, 2, 0));\n cameraNode.lookAt(cam.getDirection().mult(999999), new Vector3f(0,1,0)); //Makes the gun point\n if (im.up) {\n cameraNode.move(getCamera().getDirection().mult(tpf).mult(10));\n }\n else if (im.down) {\n cameraNode.move(getCamera().getDirection().negate().mult(tpf).mult(10));\n }\n if (im.right) {\n cameraNode.move(getCamera().getLeft().negate().mult(tpf).mult(10));\n }\n else if (im.left) {\n cameraNode.move(getCamera().getLeft().mult(tpf).mult(10));\n }\n }", "void moveForward(Lawn lawn);", "private void go(Network n1) {\n\t\t\n\t\tNetwork n2 = new Network(2, n1);\n\t\tNetwork n3 = new Network(2, n2);\n\t\tSystem.out.println(\"\\tn3.p.p.id = \" + n3.p.p.id);\n\t}", "public interface Neuron {\n /**\n * Checks if current neuron is of type NeuronType.INPUT.\n *\n * @return true if it's input neuron, false otherwise\n */\n boolean isInputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.HIDDEN.\n *\n * @return true if it's hidden neuron, false otherwise\n */\n boolean isHiddenNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.OUTPUT.\n *\n * @return true if it's output neuron, false otherwise\n */\n boolean isOutputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.BIAS.\n *\n * @return true if it's bias neuron, false otherwise\n */\n boolean isBiasNeuron();\n\n /**\n * Getter for neuron's name.\n *\n * @return String of this neuron's name\n */\n String getName();\n\n /**\n * Setter for neuron's name.\n *\n * @param name String value as new name for this neuron\n * @return this Neuron instance\n */\n Neuron setName(String name);\n\n /**\n * Gets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return the List of Neuron instance that leads to this neuron\n */\n List<Neuron> getDendrites();\n\n /**\n * Sets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setDendrites(List<Neuron> dendrites);\n\n /**\n * Gets the current value of this neuron.\n *\n * @return double value of this neuron\n */\n double getAxon();\n\n /**\n * Sets the value for this neuron.\n * Could be called only for input neurons.\n * Hidden neurons and output neurons calculating their values using information from their incoming connections\n * and using activation function, and bias neuron always have axon = 1.\n *\n * @param newValue new axon value for input neuron\n * @return this Neuron instance\n */\n Neuron setAxon(double newValue);\n\n /**\n * Gets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type as they can't have outgoing connections.\n *\n * @return the List of Neuron instance that this neuron leads to\n */\n List<Neuron> getSynapses();\n\n /**\n * Sets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type, as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setSynapses(List<Neuron> synapses);\n\n /**\n * Gets the type of this neuron.\n *\n * @return NeuronType value that represents this neuron's type\n */\n NeuronType getType();\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @return new computed soma value\n */\n double calculateSoma(List<Double> weights);\n\n /**\n * Calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateAxon(ActivationFunction activationFunction);\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n * Then calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateSomaAndAxon(List<Double> weights, ActivationFunction activationFunction);\n\n double getDelta();\n\n void setDelta(double delta);\n}", "protected abstract void rebuildNetwork(int numNodes);", "public static void modifyTopology()\r\n\t{\r\n\t\tSystem.out.println(\"===============STARTING TO MODIFY TOPOLOGY==============\");\r\n\t\tscan = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please enter Router that you want to Shutdown : \"); // Printing Instruction\r\n\t\t\r\n\t\tint delr = Integer.parseInt(scan.nextLine()); // Reading the router to be deleted\r\n\t\twhile (delr < 1 || delr > routers) {\r\n\t\t\tSystem.out.print(\"\\n The entered source router not present, Please enter Again : \");\r\n\t\t\tdelr = Integer.parseInt(scan.nextLine());\r\n\t\t}\r\n\t\tdelr = delr - 1;\r\n\t\t\r\n\t\tint[][] graph2 = new int[routers-1][routers-1];\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < routers; ++i) { // Loop for deleting router and shifting graphay\r\n\r\n\t\t\tif (i == delr)\r\n\t\t\t\tcontinue;\r\n\t\t\tint q = 0;\r\n\t\t\tfor (int j = 0; j < routers; ++j) // Control loop for shifting\r\n\t\t\t{\r\n\t\t\t\tif (j == delr)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tgraph2[p][q] = graph[i][j]; // shifting row and column\r\n\t\t\t\t++q;\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\t\r\n\t\trouters -= 1;\r\n\t\t\r\n\t\tSystem.out.println(\"============NEW TOPLOGY============\");\r\n\t\tfor (int row = 0; row < routers; row++) {\r\n\t\t\tfor (int col = 0; col < routers; col++) {\r\n\t\t\t\tLinkstateRouting.graph[row][col] = graph2[row][col];\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the new topology again\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t }\r\n\t\tSystem.out.println(\"Router \" + (delr + 1) + \" is Shutdown\");\r\n\t}", "private void moveShipUp()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit up\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit up\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "public void move(FightCell cell);", "public void draw(NNetwork network) {\n\t\tdrawSynapses(network);\n\t\tint row = 0;\n\t\tArrayList<Input> netInputNodes = (ArrayList<Input>) network\n\t\t\t\t.getInputNodesInNetwork().clone();\n\t\tfor (Input in : netInputNodes) {\n\t\t\tdouble x = Neuroticz.NODE_SHIFT.x\n\t\t\t\t\t+ 130\n\t\t\t\t\t+ (row * Node.NODE_DRAW_SIZE * Neuroticz.HORIZONTAL_NODE_SPACING * Neuroticz.ZOOM_FACTOR);\n\t\t\tin.paint((int) x, (int) ((Node.NODE_DRAW_SIZE * 2)\n\t\t\t\t\t* Neuroticz.VERTICAL_NODE_SPACING * Neuroticz.ZOOM_FACTOR)\n\t\t\t\t\t+ Neuroticz.NODE_SHIFT.y);\n\t\t\trow++;\n\t\t}\n\t\tint y = 1;\n\t\trow = 0;\n\t\tArrayList<HiddenNode> netHiddenNodes = (ArrayList<HiddenNode>) network\n\t\t\t\t.getHiddenNodesInNetwork().clone();\n\t\tfor (HiddenNode n : netHiddenNodes) {\n\t\t\ty += 1;\n\t\t\tdouble x = Neuroticz.NODE_SHIFT.x\n\t\t\t\t\t+ 180\n\t\t\t\t\t+ (row * Node.NODE_DRAW_SIZE * Neuroticz.HORIZONTAL_NODE_SPACING * Neuroticz.ZOOM_FACTOR);\n\t\t\tn.paint((int) x, (int) (y * (Node.NODE_DRAW_SIZE * 2)\n\t\t\t\t\t* Neuroticz.VERTICAL_NODE_SPACING * Neuroticz.ZOOM_FACTOR)\n\t\t\t\t\t+ Neuroticz.NODE_SHIFT.y);\n\t\t\tif (network.getHiddenNodesInNetwork().indexOf(n) % 10 == 0) {\n\t\t\t\trow++;\n\t\t\t\ty = 1;\n\t\t\t}\n\n\t\t}\n\t\trow = 0;\n\t\tfor (Output out : network.getOutputNodesInNetwork()) {\n\t\t\tdouble x = Neuroticz.NODE_SHIFT.x\n\t\t\t\t\t+ 180\n\t\t\t\t\t+ 200\n\t\t\t\t\t+ (row * Node.NODE_DRAW_SIZE * Neuroticz.HORIZONTAL_NODE_SPACING * Neuroticz.ZOOM_FACTOR);\n\n\t\t\tout.paint((int) x, (int) (Node.NODE_DRAW_SIZE * 20\n\t\t\t\t\t* Neuroticz.VERTICAL_NODE_SPACING * Neuroticz.ZOOM_FACTOR)\n\t\t\t\t\t+ Neuroticz.NODE_SHIFT.y);\n\t\t\trow++;\n\t\t}\n\t}", "public yandex.cloud.api.operation.OperationOuterClass.Operation move(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.MoveClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getMoveMethod(), getCallOptions(), request);\n }", "public void makeMove(Location loc)\n {\n if (loc == null)\n removeSelfFromGrid();\n else\n {\n int newDirection = getLocation().getDirectionToward(loc);\n Location nextLocation = getLocation().getAdjacentLocation(newDirection);\n Actor otherActor = getGrid().get(nextLocation);\n if(otherActor != null)\n {\n if(otherActor instanceof AbstractPokemon)\n {\n AbstractPokemon otherPokemon = (AbstractPokemon) otherActor;\n battle(otherPokemon);\n }\n else\n {\n PokemonTrainer otherTrainer = (PokemonTrainer) otherActor;\n battleTrainer(otherTrainer);\n }\n }\n if(getGrid() != null)\n moveTo(loc);\n }\n }", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/networks/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Network> replaceNetwork(\n @Path(\"name\") String name, \n @Body Network body, \n @QueryMap ReplaceNetwork queryParameters);", "public void moveOut(){\n int index=Planet.findPlanet(currPlanet.getName(),planets);\n if(index==planets.size()-1){\n ////If the spaceship is already at the last planet(planets.size()-1) in the planet list\n System.out.println(\"The spaceship \"+this.name+\" couldn't move out. No planet is farther out\");\n }else{\n ////move farther out of the solar system means the index+1 in the ArrayList of planets\n Planet moveToPlanet=planets.get(index+1);\n moveTo(moveToPlanet.getName());\n }\n }", "Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);", "public void move() {\n process(2);\n }", "public void act(){\n\t\tTile[] possibleMoves = game.getAllNeighbours(currentPosition);\r\n\t\tTile targetTile = possibleMoves[rng.nextInt(4)];\r\n\t\tmove(targetTile);\r\n\t}", "private void moveTile()\n {\n int[] moveIndices = null;\n \n int sourceRow = moveIndices[0];\n int sourceCol = moveIndices[1];\n int destRow = moveIndices[2] - 1;\n int destCol = moveIndices[3];\n \n if (sourceRow == 0) \n {\n try\n {\n game.playTileFromHand(sourceCol, destRow, destCol);\n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n else\n {\n sourceRow--;\n try\n {\n game.moveTileInBoard(sourceRow, sourceCol, destRow, destCol); \n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n }", "public move to_move(int x_in, int y_in)\n {\n return new move(x_in,y_in,x_in+xend,y_in+yend);\n }", "public void solveNet()\n {\n// List<Future<?>> layerFutures = new LinkedList<>();\n// for (int i = 1; i < getNumLayers(); i++)\n// {\n// for (int j = 0; j < nodeValues_[i].length; j++)\n// {\n// layerFutures.add(SHARED_NODE_SOLVE_EXECUTOR.submit(new SolveNode(i, j)));\n// }\n// for (Future<?> f : layerFutures)\n// {\n// // Wait for the layer to complete before moving on to the next layer\n// try\n// {\n// f.get();\n// }\n// catch (Exception e)\n// {\n// e.printStackTrace();\n// }\n// }\n// layerFutures.clear();\n// }\n for (int i = 1; i < getNumLayers(); i++)\n {\n for (int j = 0; j < nodeValues_[i].length; j++)\n {\n new SolveNode(i, j).run();\n }\n }\n }", "public interface ITransformablePacket {\n\n default boolean isPacketOnMainThread(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (!MixinLoadManager.isSpongeEnabled() || callingFromSponge) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n return player.getServerWorld().isCallingFromMinecraftThread();\n } else {\n return false;\n }\n }\n\n /**\n * Puts the player into local coordinates and makes a record of where they used to be.\n */\n default void doPreProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n // System.out.println(\"Pre packet process\");\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n if (wrapper != null\n && wrapper.getPhysicsObject().getShipTransformationManager() != null) {\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n worldSubspace.snapshotSubspacedEntity((ISubspacedEntity) player);\n wrapper.getPhysicsObject().getShipTransformationManager()\n .getCurrentTickTransform().transform(player,\n TransformType.GLOBAL_TO_SUBSPACE);\n }\n\n }\n }\n\n /**\n * Restores the player from local coordinates to where they used to be.\n */\n default void doPostProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n // I don't care what happened to that ship in the time between, we must restore\n // the player to their proper coordinates.\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n ISubspacedEntity subspacedEntity = (ISubspacedEntity) player;\n ISubspacedEntityRecord record = worldSubspace\n .getRecordForSubspacedEntity(subspacedEntity);\n // System.out.println(player.getPosition());\n if (subspacedEntity.currentSubspaceType() == CoordinateSpaceType.SUBSPACE_COORDINATES) {\n subspacedEntity.restoreSubspacedEntityStateToRecord(record);\n player.setPosition(player.posX, player.posY, player.posZ);\n }\n // System.out.println(player.getPosition());\n // We need this because Sponge Mixins prevent this from properly working. This\n // won't be necessary on client however.\n }\n }\n\n PhysicsWrapperEntity getPacketParent(NetHandlerPlayServer server);\n}", "private void supplementMST(){\n\t\tList<Village> noOutRoads = getNoOutRoadVillages();\n\t\tList<Village> noInRoads = getNoInRoadVillages();\n\t\t\n\t\tfor(Village v: noOutRoads){\n\t\t\tVillage closestVillage = findClosestVillageTo(v,noInRoads);\n\t\t\tnoInRoads.remove(closestVillage);\n\t\t\tnew Road(v,closestVillage);\n\t\t}\n\t\t\n\t\tfor(Village v: noInRoads){\n\t\t\tnew Road(findClosestVillageTo(v,villages),v);\n\t\t}\n\t}", "Net findNet(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Net)return (Net)g;\r\n\t\t}\r\n\treturn nullNet;\r\n\t}", "private void moveScannable(Scannable scn, Object demandPosition, MotorMove moveType) throws DeviceException {\n\t\tif (scn.getPosition().equals(demandPosition)) {\n\t\t\tlogMessage(scn.getName()+\" is already at requested position \"+demandPosition+ \" (\"+moveType+\")\");\n\t\t\treturn;\n\t\t}\n\n\t\tlogMessage(\"Moving \"+scn.getName()+\" to \"+demandPosition+ \" (\"+moveType+\")\");\n\t\tsetMotorMove(moveType);\n\t\tscn.moveTo(demandPosition);\n\t\tif (verifyMove) {\n\t\t\tcheckScannablePosition(scn, demandPosition);\n\t\t}\n\t}", "static SolvableGame parseInputNodes(ArrayList<InputNode> inputnodes) {\n\n Boolean[] vertex = new Boolean[inputnodes.size()];\n for (int popiter = 0; popiter < inputnodes.size(); ++popiter) {\n vertex[popiter] = true;\n }\n\n //ownership only has two rows: [0] for player 0, [1] for player 1\n Boolean[][] ownedBy = new Boolean[2][inputnodes.size()];\n for (int popiter = 0; popiter < 2; ++popiter) {\n for (int inner = 0; inner < inputnodes.size(); ++inner) {\n ownedBy[popiter][inner] = false;\n }\n }\n\n Boolean[][] adjMatrix = new Boolean[inputnodes.size()][inputnodes.size()];\n for (int popiter = 0; popiter < inputnodes.size(); ++popiter) {\n for (int inner = 0; inner < inputnodes.size(); ++inner) {\n adjMatrix[popiter][inner] = false;\n }\n }\n\n Integer[] priority = new Integer[inputnodes.size()];\n for (int popiter = 0; popiter < inputnodes.size(); ++popiter) {\n priority[popiter] = 0;\n }\n\n for (int nodeIter = 0; nodeIter < inputnodes.size(); ++nodeIter) {\n\n if (inputnodes.get(nodeIter).getOwnership()) {\n ownedBy[1][nodeIter] = true;\n } else {\n ownedBy[0][nodeIter] = true;\n }\n\n for (Integer edgeDest : inputnodes.get(nodeIter).getOutgoing()) {\n adjMatrix[nodeIter][edgeDest] = true;\n }\n\n priority[nodeIter] = inputnodes.get(nodeIter).getPrio();\n }\n\n return new SolvableGame(vertex, ownedBy, adjMatrix, priority);\n }", "public PuzzleState move(int row, int column, Operation op);", "public void moveNodeToLocation(LayoutNode node) {\n\t// We provide this routine so that we can keep our\n\t// min/max values updated\n\tif (node.isLocked())\n\t return;\n\n\tnode.moveToLocation();\n\tupdateMinMax(node.getX(), node.getY());\n }", "@Override\n\tpublic void move() {\n\n\t}", "@Override\r\n public void makeMove(final Move move) {\n if (this.getMoves().size() >= 4) {\r\n this.resetNewDirBots();\r\n }\r\n \r\n // It is OK to now make the default move\r\n // basically add a New Point to the move queue\r\n super.makeMove(move); \r\n initDirBotMove(this.north);\r\n initDirBotMove(this.south);\r\n initDirBotMove(this.east);\r\n initDirBotMove(this.west); \r\n }", "private Board moveTo(int direction) {\n Board newBoard = new Board(this.state);\n int oZ = this.zero;\n int nZ = oZ;\n switch (direction) {\n case Board.LEFT: nZ = oZ - 1; break;\n case Board.RIGHT: nZ = oZ + 1; break;\n case Board.UP: nZ = oZ - Board.dim; break;\n case Board.DOWN: nZ = oZ + Board.dim; break;\n default: return null;\n }\n newBoard.state[oZ] = state[nZ];\n newBoard.state[nZ] = 0;\n newBoard.zero = nZ;\n\n // update heuristic iteratively except for MAN\n switch(Board.heuristic) {\n case HAM:\n if (state[nZ] == oZ) newBoard.dist = this.dist - 1;\n else if (state[nZ] == nZ) newBoard.dist = this.dist + 1;\n else newBoard.dist = this.dist;\n break;\n case INT: // iterative update the interference\n // this is the most logically complicated code I have\n // done in a while\n int moved = state[nZ];\n int oC;\n newBoard.inter = inter;\n switch (direction) {\n case Board.LEFT:\n case Board.RIGHT: // LEFT AND RIGHT\n if (Board.colOf[state[nZ]] == Board.colOf[nZ]) {\n // we've replaced a piece on its col with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old column\n //System.out.println(\"Took \" + state[nZ] + \" out of its col\");\n for (int i = Board.colOf[nZ]; i < nZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n \n } else if (Board.colOf[state[nZ]] == Board.colOf[oZ]) {\n // we've put a piece on its col that was a zero\n // interference can only increase since we know\n // the piece didn't below to its old column\n //System.out.println(\"Put \" + state[nZ] + \" into its col\");\n for (int i = Board.colOf[oZ]; i < oZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n break;\n default: // UP AND DOWN\n if (Board.rowOf[state[nZ]] == Board.rowOf[nZ]) {\n // we've replaced a piece on its row with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Took \" + state[nZ] + \" out of its row\");\n for (int i = Board.dim*Board.rowOf[nZ]; i < nZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ+1; i < Board.dim*(Board.rowOf[nZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n } else if (Board.rowOf[state[nZ]] == Board.rowOf[oZ]) {\n // we've put a piece on its row that was a zero\n // interference can only increase since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Put \" + state[nZ] + \" into its row\");\n for (int i = Board.dim*Board.rowOf[oZ]; i < oZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ+1; i < Board.dim*(Board.rowOf[oZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n } \n default: // update the manhattan distance\n newBoard.dist = this.dist - \n Board.manhattanTable[state[nZ]][nZ] +\n Board.manhattanTable[state[nZ]][oZ];\n }\n return newBoard;\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> move(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.MoveClusterRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getMoveMethod(), getCallOptions()), request);\n }", "private void move3(Habitat habitat,Pool pool)\r\n\t{\r\n\t\t// TODO Auto-generated method stub\r\n\t\tboolean moved = false;\r\n\t\tPool clonedPool=null;\r\n\t\tArrayList<Integer> tabuSivs = new ArrayList<Integer>();\r\n\t\ttabuSivs.add(-1);\r\n\t\t\r\n\t\t//Sort the users of the pool compared to gravity center\r\n\t\t//Collections.sort(pool.getListOfUsers(), User.ComparatorDistG);\r\n\t\t\r\n\t\tfor(int i =0;i<habitat.getSivs().size() - 1 && !moved;i++)\r\n\t\t{\r\n\t\t\tint k = (new Random()).nextInt(habitat.getSivs().size());\r\n\t\t\tint loops = 0;\r\n\t\t\twhile((habitat.getSivs().get(k) == pool || habitat.getSivs().get(k).getRestCarCap()==0 || tabuSivs.contains(k)) && loops<10 )\r\n\t\t\t{\r\n\t\t\t\tk = (new Random()).nextInt(habitat.getSivs().size());\r\n\t\t\t\tloops++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!tabuSivs.contains(k))\r\n\t\t\t{\r\n\t\t\t\ttabuSivs.add(k);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if(habitat.getSivs().get(i) != pool && habitat.getSivs().get(i).getListOfUsers().size()==1) \r\n\t\t\tif(habitat.getSivs().get(k) != pool && habitat.getSivs().get(k).getRestCarCap()>0)\r\n\t\t\t{\r\n\t\t\t\tclonedPool = (Pool) pool.clone();\r\n\t\t\t\t//for(int j=0;j<pool.getListOfUsers().size() && !moved;j++)\r\n\t\t\t\tfor(int j=pool.getListOfUsers().size() - 1; j>=0 && !moved;j--)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(habitat.getSivs().get(k).areAllUsersAuthorized(clonedPool.getListOfUsers().get(j).getNumUser()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thabitat.getSivs().get(k).addUser(clonedPool.getListOfUsers().get(j));\r\n\t\t\t\t\t\tif(habitat.getSivs().get(k).buildRoutes())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmoved = true;\r\n\t\t\t\t\t\t\tclonedPool.getListOfUsers().remove(j);\r\n\t\t\t\t\t\t\tclonedPool.buildRoutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\thabitat.getSivs().get(k).removeUser(clonedPool.getListOfUsers().get(j));\r\n\t\t\t\t\t\t\thabitat.getSivs().get(k).buildRoutes();\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}\r\n\t\t\r\n\t\tif(moved)\r\n\t\t{\r\n\t\t\thabitat.removePool(pool);\r\n\t\t\thabitat.addPool(clonedPool);\r\n\t\t}\r\n\t}" ]
[ "0.6138786", "0.6110796", "0.589485", "0.5830344", "0.561556", "0.5472939", "0.5471726", "0.5413569", "0.5346372", "0.52851313", "0.5255706", "0.5249238", "0.5207239", "0.5159754", "0.5117877", "0.50976527", "0.5087988", "0.5087395", "0.50872606", "0.5078094", "0.5044638", "0.5036337", "0.5031562", "0.50311035", "0.5022755", "0.5017766", "0.5012392", "0.50064427", "0.4999471", "0.49912405", "0.4990801", "0.4980529", "0.49772942", "0.4957779", "0.4956149", "0.49522355", "0.49494117", "0.49416572", "0.49370596", "0.49345183", "0.49309105", "0.49307543", "0.49232298", "0.4892007", "0.48753488", "0.48648596", "0.48569834", "0.48508322", "0.4848043", "0.4840086", "0.48346123", "0.48318523", "0.48312494", "0.48157603", "0.48084137", "0.48006982", "0.48006955", "0.47935885", "0.47826764", "0.47802356", "0.4779525", "0.4769864", "0.475415", "0.47488365", "0.474763", "0.47457257", "0.47424343", "0.4739969", "0.47371945", "0.47312737", "0.47288832", "0.4726465", "0.472245", "0.47157526", "0.4713597", "0.47100538", "0.4708398", "0.47083434", "0.47082624", "0.470407", "0.4697445", "0.46951145", "0.4692444", "0.46918574", "0.46910354", "0.4684816", "0.46831837", "0.4681014", "0.46775603", "0.46765682", "0.46716937", "0.46714804", "0.46690014", "0.46644437", "0.46642578", "0.46626356", "0.46548453", "0.46531355", "0.4651464", "0.464871" ]
0.6632133
0
accessors to GameCollection on behalf of Game
int checkElapsedTime(){ return gc.getElapsedTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GameCollection getGameCollection(){\r\n\t\treturn gc;\r\n\t}", "public GameCollection() {\n\t\tcollection = new Vector();\n\t}", "protected Game getGame() {\n return game;\n }", "protected Game getGame(){\n\t\treturn game;\n\t}", "public Game getGame()\n {\n return game;\n }", "public Game getGame () {\n return game;\n }", "public GameLogic getGame(){\n\t\treturn game;\n\t}", "public Game getGame() {\r\n return game;\r\n }", "public Iiterator getIterator() { \n\t\treturn new GameCollectionIterator();\n\t}", "public abstract Collection<PlayerFish> getPlayers();", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public GameObjectCollection() {\n\t\tgameObjects = new Vector<GameObject>();\n\t}", "public Game getGame()\n\t{\n\t\treturn game;\n\t}", "Collect getColl();", "public Game getGame() {\r\n\t\treturn _game;\r\n\t}", "public Collection getCollection() {\n return mCollection;\n }", "public GameEnvironment() {\r\n this.collidObj = new ArrayList<Collidable>();\r\n }", "public static Game getGame() {\n return game;\n }", "abstract public GameElement getGameElement();", "public BowlingGame getGame();", "@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }", "public GUIGameflow getGame() {\n return game;\n }", "public static Game getGame() {\r\n\t\treturn game;\r\n\t}", "public Game getGame() {\n\t\treturn game;\n\t}", "public abstract Collection<Piece> getActivePieces();", "public abstract Collection<Piece> getActivePieces();", "public List<Game> getGameList() {\n return gameList;\n }", "public GameEnvironment() {\r\n this.collidables = new ArrayList<Collidable>();\r\n }", "public static Game getGame() {\n\t\treturn game;\n\t}", "@Override\n\tpublic void add(Game game) {\n\t\t\n\t}", "public synchronized List<Game> getGameList() {\n return games;\n }", "public interface Game\n{\n\tpublic int getScore();\t\t\t\t\t\t\t\t\t\t\t// Returns the score of the game\n\tpublic int getCurLevel();\t\t\t\t\t\t\t\t\t\t// Returns the current level\n\tpublic int getLevelTime();\t\t\t\t\t\t\t\t\t\t// Returns the time for which the CURRENT level has been played\n\tpublic int getTotalTime();\t\t\t\t\t\t\t\t\t\t// Returns the time for which the game has been played (across all levels)\n\tpublic int getLivesRemaining();\t\t\t\t\t\t\t\t\t// Returns the number of lives remaining for the hero\n\n\tpublic List<Node> getPillList();\t\t\t\t\t\t\t\t// Get a list of all available pills in the current level\n\tpublic List<Node> getPowerPillList();\t\t\t\t\t\t\t// Get a list of all available power pills in the current level\n\n\tpublic boolean checkPill(Node location);\t\t\t\t\t\t// Checks if the location specified is a pill / is still available\n\tpublic boolean checkPowerPill(Node location);\t\t\t\t\t// Checks if the location specified is a power pill / is still available\n\n\tpublic Hero getHero();\t\t\t\t\t\t\t\t\t\t\t// Returns a copy of the hero object\n\tpublic Enemy getEnemy(int whichEnemy);\t\t\t\t\t\t\t// Returns a copy of a specific enemy number\n\tpublic List<Enemy> getEnemies();\t\t\t\t\t\t\t\t// Returns a copy of the enemy array\n\n\tpublic Game copy();\t\t\t\t\t\t\t\t\t\t\t\t// Returns an exact copy of the game (forward model)\n\tpublic Maze getCurMaze();\t\t\t\t\t\t\t\t\t\t// Returns the current maze information\n\tpublic static Random rng = new Random(0);\t\t\t\t\t// Random number generator with fixed seed\n\n\tpublic int[] advanceGame(int heroDir, int[] enemyDirs);\t\t\t// Advances the game using the actions (directions) supplied; returns all directions played [Hero, Enemy1, Enemy2, Enemy3, Enemy4]\n\tpublic boolean gameOver();\t\t\t\t\t\t\t\t\t\t// Returns true if the hero has lost all her lives or if MAX_LEVELS has been reached\n\n\t//These constants specify the exact nature of the game\n\tpublic class Direction { public static final int UP = 0, RIGHT = 1, DOWN = 2, LEFT = 3, EMPTY = -1; }\t//directions\n\n\t// Points\n\tpublic static final int PILL_SCORE = 10;\n\tpublic static final int POWER_PILL_SCORE = 50;\n\tpublic static final int ENEMY_EAT_SCORE = 200;\n\n\t// Timing\n\tpublic static final int EDIBLE_TIME = 200;\t\t\t\t\t\t//initial time an enemy is edible for (decreases as level number increases)\n\tpublic static final float EDIBLE_TIME_REDUCTION = 0.9f;\t\t\t//reduction factor by which edible time decreases as level number increases\n\tpublic static final int[] LAIR_TIMES = {40, 60, 80, 100};\t\t//time spend in the lair by each enemy at the start of a level\n\tpublic static final int COMMON_LAIR_TIME = 40;\t\t\t\t\t//time spend in lair after being eaten\n\tpublic static final float LAIR_REDUCTION = 0.9f;\t\t\t\t//reduction factor by which lair times decrease as level number increases\n\tpublic static final int LEVEL_LIMIT = 3000;\t\t\t\t\t\t//time limit for a level\n\tpublic static final int DELAY = 40;\t\t\t\t\t\t\t\t//delay (in milliseconds) between game advancements\n\n\t// Initial Game State\n\tpublic static final int NUM_LIVES = 3;\t\t\t\t\t\t\t//total number of lives the hero has (current + NUM_LIVES-1 spares)\n\tpublic static final int INITIAL_HERO_DIR = 3;\t\t\t\t\t//initial direction taken by the hero\n\tpublic static final int[] INITIAL_ENEMY_DIRS = {3, 1, 3, 1};\t//initial directions for the enemies (after leaving the lair)\n\tpublic static final int ENEMY_SPEED_REDUCTION = 2;\t\t\t\t//difference in speed when enemies are edible (every ENEMY_SPEED_REDUCTION, an enemy remains stationary)\n\n\t// Misc. configurations for game\n\tpublic static final float ENEMY_REVERSAL = 0.0015f;\t\t\t\t//probability of a global enemy reversal event\n\tpublic static final int EXTRA_LIFE_SCORE = 10000;\t\t\t\t//extra life is awarded when this many points have been collected\n\tpublic static final int EAT_DISTANCE = 2;\t\t\t\t\t\t//distance in the connected graph considered close enough for an eating event to take place\n\tpublic static final int NUM_ENEMY = 4;\t\t\t\t\t\t\t//number of enemies in the game\n\tpublic static final int NUM_MAZES = 4;\t\t\t\t\t\t\t//number of different mazes in the game\n\tpublic static final int MAX_LEVELS = 16;\t\t\t\t\t\t//maximum number of levels played before the end of the game\n\n\tpublic enum DM{PATH,EUCLID,MANHATTEN};\t\t\t\t \t\t\t//simple enumeration for use with the direction methods\n}", "public GameContainer getGameContainer() {\r\n\t\treturn this;\r\n\t}", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}", "public Game getTestGame(){\n return m_testGame;\n }", "private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}", "public GameSession getGameSession()\n {\n return gameSession;\n }", "public Game getGame() {\n\t\treturn gbuilder.getGameProduct();\n\t}", "public Game getCurrentGame()\r\n {\r\n return currentGame;\r\n }", "public Game copy();", "public List<Game> getGameList() {\n return this.games;\n }", "public static GameContainer getContainer() {\r\n return container;\r\n }", "@Override\n\tpublic Game add(Game g) {\n\t\treturn null;\n\t}", "void setGame (Game game) {\n this.game = game;\n }", "protected BattleGrid getGrid() {\n return grid;\n }", "public void setGame() {\n }", "public abstract void setGame(Gyges game);", "Game getGameById(long id);", "GameState getGameState() {\n return gameState;\n }", "public SmallGameBoard[] getAllGames(){return games;}", "protected abstract Collection createCollection();", "public Game populateGames(String name);", "public GameCollectionIterator() { \n\t\t\tcurrIndex = -1;\n\t\t}", "public static ArrayList<Player> getWinners(){return winners;}", "public interface Game {\n\n\t/**\n\t * return a specific tile. Precondition: Position p is a valid position in the world.\n\t * \n\t * @param p\n\t * the position in the world that must be returned.\n\t * @return the tile at position p.\n\t */\n\tpublic Tile getTileAt(Position p);\n\n\t/**\n\t * return the uppermost unit in the stack of units at position 'p' in the world. Precondition: Position p is a valid\n\t * position in the world.\n\t * \n\t * @param p\n\t * the position in the world.\n\t * @return the unit that is at the top of the unit stack at position p, OR null if no unit is present at position p.\n\t */\n\tpublic Unit getUnitAt(Position p);\n\n\t/**\n\t * return the city at position 'p' in the world. Precondition: Position p is a valid position in the world.\n\t * \n\t * @param p\n\t * the position in the world.\n\t * @return the city at this position or null if no city here.\n\t */\n\tpublic City getCityAt(Position p);\n\n\t/**\n\t * return the player that is 'in turn', that is, is able to move units and manage cities.\n\t * \n\t * @return the player that is in turn\n\t */\n\tpublic Player getPlayerInTurn();\n\n\t/**\n\t * return the player that has won the game.\n\t * \n\t * @return the player that has won. If the game is still not finished then return null.\n\t */\n\tpublic Player getWinner();\n\n\t/**\n\t * return the age of the world. Negative numbers represent a world age BC (-4000 equals 4000 BC) while positive\n\t * numbers are AD.\n\t * \n\t * @return world age.\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * move a unit from one position to another. If that other position is occupied by an opponent unit, a battle is\n\t * conducted leading to either victory or defeat. If victorious then the opponent unit is removed from the game and\n\t * the move conducted. If defeated then the attacking unit is removed from the game. If a successful move results in\n\t * the unit entering the position of a city then this city becomes owned by the owner of the moving unit.\n\t * Precondition: both from and to are within the limits of the world. Precondition: there is a unit located at\n\t * position from.\n\t * \n\t * @param from\n\t * the position that the unit has now\n\t * @param to\n\t * the position the unit should move to\n\t * @return true if the move is valid (no mountain, move is valid under the rules of the game variant etc.), and\n\t * false otherwise. If false is returned, the unit stays in the same position and its \"move\" is intact (it\n\t * can be moved to another position.)\n\t */\n\tpublic boolean moveUnit(Position from, Position to);\n\n\t/**\n\t * Tell the game that the current player has finished his/her turn. The next player is then in turn. If all players\n\t * have had their turns then do end-of-round processing: A) restore all units' move counts B) produce food and\n\t * production in all cities C) produce units in all cities (if enough production) D) increase population size in all\n\t * cities (if enough food) E) increment the world age.\n\t */\n\tpublic void endOfTurn();\n\n\t/**\n\t * change the work force's focus in a city, i.e. what kind of production there will be emphasis on in the city.\n\t * Precondition: there is a city at location 'p'.\n\t * \n\t * @param p\n\t * the position of the city whose focus should be changed.\n\t * @param balance\n\t * a string defining the focus of the work force in a city. Valid values are at least\n\t * GameConstants.productionFocus and GameConstants.foodFocus.\n\t */\n\tpublic void changeWorkForceFocusInCityAt(Position p, String balance);\n\n\t/**\n\t * change the type of unit a city will produce next. Precondition: there is a city at location 'p'.\n\t * \n\t * @param p\n\t * the position of the city whose production should be changed.\n\t * @param unitType\n\t * a string defining the type of unit that the city should produce next.\n\t */\n\tpublic void changeProductionInCityAt(Position p, String unitType);\n\n\t/**\n\t * perform the action associated with the unit at position p. Example: a settler unit may create a new city at its\n\t * location. Precondition: there is a unit at location 'p'.\n\t * \n\t * @param p\n\t * the position of a unit that must perform its action. Nothing happens in case the unit has no\n\t * associated action.\n\t */\n\tpublic void performUnitActionAt(Position p);\n}", "public GameTypeWrapper playGame();", "@Override\n\tpublic ArrayList<GameObject> getGmob() {\n\t\treturn gmob;\n\t}", "@Override\n\tpublic List<Game> getGameList() {\n\t\treturn null;\n\t}", "@Override\n public void removeAll(){\n gameCollection.removeAllElements();\n }", "public interface GameView extends Cloneable {\r\n void init(GameEntityInfo[][] gameState, PlayerEntity[] playerEntities);\r\n void updateShot(int shooterX, int shooterY, int woundedX, int woundedY);\r\n void updateMove(int startX, int startY, int finishX, int finishY);\r\n void dispose();\r\n}", "public Collection<Move> getLegalMoves(){\n return legalMoves;\n }", "public Game createGame();", "public Player(Game game){\r\n this.game = game;\r\n }", "public Collection<GObject> getObjects();", "public static GameWindow getGame() {\n return _gameWindow;\n }", "public ItemCollection()\n\t{\n\t\t/*\n\t\t * master list of all consumable/miscellaneous items in the game\n\t\t * \n\t\t * to add a new item to the game, add the item to the itemCollections, and if it is a consumable,\n\t\t * add the effect to the useItem method in the switch statement. If it has no effect, don't add anything.\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE\n\t\t */\n\t\t\n\t\t//CONSUMABLES\n\t\titemCollections.add(new Item(\"Polar Pop\", 1, \"Do you ever drink water?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Klondike Bar\", 20, \"What would you do for this?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Big tiddy goth GF\", 666, \"Vore.\", \"Consumable\"));\n\t\t\n\t\t//MISC, i.e. NO STATUS EFFECT\n\t\titemCollections.add(new Item(\"Sippy Cup\", 9, \"Somebody otta get their child their sippy cup back.\", \"Misc\"));\n\t\t\n\t\t/*\n\t\t * master list of equipment items in the game\n\t\t * \n\t\t * same as above\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE, DAMAGE, DEFENSE, VITALITY, INTELLIGENCE, STRENGTH, WISDOM\n\t\t */\n\t\t\n\t\t//2H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"A Big Boy's Sword\", 69, \"A two- handed sword for a big boy like you... You're growing up so fast!\", \"2H-Weapon\", 10, 0, 0, 0, 0, 0));\n\t\t\n\t\t//1H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"Red Copper Pan\", 300, \"Hey there mothafuckas it's ya girl cathy, I got some brand new shit\", \"1H-Weapon\", 250, 0, 25, 3, 25, 3));\n\t\t\n\t\t//HEAD\n\t\tequipmentCollections.add(new Equipment(\"Broken Helmet\", 1, \"Leather helmet broken from thousands of years of war and abuse\", \"Head\", 0, 3, 0, 0, 0, 0));\n\t\t\n\t\t//TORSO\n\t\tequipmentCollections.add(new Equipment(\"Bloodied Tunic\", 1, \"Tunic covered in your own blood, you can see your wounds through its holes\", \"Torso\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//ARMS\n\t\tequipmentCollections.add(new Equipment(\"Torn Gloves\", 1, \"Gloves so torn they hardly protect your hands\", \"Arms\", 0, 1, 0, 0, 0, 0));\n\t\t\n\t\t//LEGS\n\t\tequipmentCollections.add(new Equipment(\"Muddy Pants\", 1, \"Cloth pants soiled in mud\", \"Legs\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//FEET\n\t\tequipmentCollections.add(new Equipment(\"Worn Boot\", 1, \"A boot with a hole in it, but where is the other one?\", \"Feet\", 0, 1, 0, 0, 0, 0));\n\t}", "public GameDrawer getGameDrawer(){\n return this.gameDrawer;\n }", "public GameService getGameService() {\n return gameService;\n }", "public GameService getGameService() {\n return gameService;\n }", "public GameState getGameState(){\n return this.gameState;\n }", "public Game() {\n\t\tusers = new ArrayList<>();\n\t\ttmpTeam = new UserTeam();\n\t\tcore = new Core();\n\t\tmarket = new Market(core);\n\t}", "public interface Traversable\n{\npublic boolean reset();\n\npublic Player getPlayer();\n\npublic Room[] getAllRooms();\n\npublic MazeRef getMazeSize();\n\npublic Room getRoom(MazeRef location);\n\npublic boolean move(String exitPointName) throws GameException;\n}", "public GameObject getOther(){\n \n return currentCollidingObject;\n \n }", "public void loadGame() {\n game.loadGame();\n }", "@Override\n public void loadGame() {\n\n }", "public ArrayList<Player> getPlayers() {\n return players;\n}", "public abstract ArrayList<GameObject> fight();", "public interface GameTypeWrapper {\n\n\t/**\n\t * This is expected to play an entire game.\n\t * \n\t * @return the played game\n\t */\n\tpublic GameTypeWrapper playGame();\n\n\tpublic List<Player> getPlayers();\n\n\tpublic Score getScore();\n\n\tpublic Player getWinner();\n\n}", "public int getGameX(){return this.gameX;}", "public static GameBoard getGame(){\n\t\t\treturn gameBoard;\n\t\t}", "public interface iGame {\n\n public abstract ArrayList<UUID> getListOfPlanets();\n\n public abstract String getName(UUID uuid);\n\n public abstract String getDescription(UUID uuid);\n\n public abstract int getPid(UUID uuid);\n\n public abstract String getImgPath(UUID uuid);\n\n public abstract String getImgPath(UUID uuid, boolean bool);\n\n public abstract ArrayList<UUID> getInventory();\n\n public abstract void startConversation(UUID uuid);\n\n public abstract ArrayList<UUID> getAvailableNpcs(UUID uuid);\n\n public abstract UUID getPlayerPosition();\n\n public abstract ArrayList<UUID> getPossiblePlanets();\n\n public abstract void travelToPlanet(UUID planet);\n\n public abstract int getFuel();\n\n public abstract int getWarpFuel();\n\n public abstract boolean canWarp();\n\n public abstract int getReputation();\n\n public abstract int getInGameTime();\n\n public abstract UUID getMoonId(UUID uuid);\n\n public abstract String getDashboardUpdate();\n\n public abstract void dropItem(UUID uuid);\n\n public abstract void processWarp(UUID nextPosition);\n\n public abstract void processAnswer(String userAns);\n\n public abstract String[] getAnswers();\n\n public abstract int[] getPositionCoordinates(UUID uuid);\n\n public abstract ArrayList<UUID> getPossibleScenarios();\n\n public abstract void setScenario(UUID uuid);\n\n public abstract long getPlayedMillis();\n\n public abstract void startGame(UUID scenario, String playerName);\n\n public abstract String getDeliveryPlanet(UUID uuid);\n\n public abstract String getDeliveryNpc(UUID uuid);\n\n public abstract boolean isWar(UUID uuid);\n\n public abstract ArrayList<String> quitGame();\n\n public abstract boolean isDead();\n\n public abstract int getItemDeliveryTime(UUID itemUuid);\n\n public abstract boolean getItemPapers(UUID itemUuid);\n\n public abstract UUID getStartNpc();\n}", "public abstract void gameObjectAwakens();", "public GameRules getGameRulesInstance()\n {\n return theGameRules;\n }", "public interface GameViewListener\n{\n public void positionSelected(ChessVector position);\n}", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "public boolean isCollection() {\n return this == LOAD || this == PICKUP;\n }", "public SongCollection getHome(){\n return this.home;\r\n }", "public GameObject getGameObject()\n {\n return this.gameObject;\n }", "private NotesCollection getCollection() {\n\t\t\n\t\tif (collection == null || collection.isRecycled() ) {\n\t\t\tNotesDatabase db = new NotesDatabase(ExtLibUtil.getCurrentSession(), \"\", fakenamesPath);\n\t\t\tcollection = db.openCollectionByName(\"contacts\");\n\t\t}\n\n\t\treturn collection;\n\t}", "Collections() { return; }", "public ArrayList<Fonds> getCollection(){\r\n return collection;\r\n }", "public CheckersGame getGameByID(Integer gameID){\n return games.get(gameID);\n }", "public interface Game extends Serializable {\n\tpublic int getPeriod();\n\t/**\n\t * Called by the GameRunnable to update the game state.\n\t */\n\tpublic void update();\n\t\n\t/**\n\t * Retrieves how many types the game was updated\n\t * \n\t * @return the number of times the game was updated since start.\n\t */\n\tpublic int getUpdateCount();\n\t\n\t/**\n\t * Verifies is the game is over\n\t * \n\t * @return true if the game is over\n\t */\n\tpublic boolean isGameOver();\n\t\n\t/**\n\t * Verifies if the game is paused\n\t * \n\t * @return true if the game is paused.\n\t */\n\tpublic boolean isPaused();\n\t\n\t/**\n\t * Pauses the game\n\t */\n\tpublic void pause();\n\t\n\t/**\n\t * Resumes the game\n\t */\n\tpublic void resume();\n\t\n\t/**\n\t * Starts a new Game.\n\t */\n\tpublic void newGame();\n\t\n\t/**\n\t * Adds a new GameStateListener to the Game\n\t * \n\t * @param gameListener the listener to be added\n\t */\n\tpublic void addGameStateListener(GameStateListener gameListener);\n\t\n\t/**\n\t * Removes a GameStateListener from this Game\n\t * \n\t * @param gameListener the listener to be removed\n\t */\n\tpublic void removeGameStateListener(GameStateListener gameListener);\n\t\n\t/**\n\t * Adds a GameStateListener to the Game\n\t * \n\t * @param gameEventListener the listener to be added\n\t */\n\tpublic void addGameEventListener(GameEventListener gameEventListener);\n\n\t/**\n\t * Removes a GameStateListener from the Game\n\t * \n\t * @param gameEventListener the listener to be Removed\n\t */\t\n\tpublic void removeGameEventListener(GameEventListener gameEventListener);\n}", "public Iterator<IGame> getGames(){\r\n\t\treturn null;\r\n\t}", "public interface GamesManager {\r\n\r\n\t/**\r\n\t * Creates the game.\r\n\t * \r\n\t * @param maxPlayers the max players\r\n\t * @return the server game\r\n\t * @throws BaseException if parameters for the game are invalid\r\n\t */\r\n\tGameEnvironment createGame(int maxPlayers, IntPoint size) throws BaseException;\r\n\r\n\t/**\r\n\t * Gets the game.\r\n\t * \r\n\t * @param gameId the game id\r\n\t * @return the game\r\n\t */\r\n\tGameEnvironment getGame(int gameId);\r\n\r\n\t/**\r\n\t * Gets the pending games.\r\n\t * \r\n\t * @return the pending games\r\n\t */\r\n\tCollection<GameEnvironment> getPendingGames();\r\n\r\n\t/**\r\n\t * Gets the player.\r\n\t * \r\n\t * @param id the id\r\n\t * @return the player or null\r\n\t */\r\n\tServerPlayer getPlayer(int id);\r\n\r\n\t/**\r\n\t * Join game.\r\n\t * \r\n\t * @param game the game\r\n\t * @param player the player\r\n\t * @return true, if successful\r\n\t */\r\n\tboolean joinGame(GameEnvironment game, ServerPlayer player);\r\n\r\n\t/**\r\n\t * Leave game.\r\n\t * \r\n\t * @param game the game\r\n\t * @param player the player\r\n\t * @return true, if successful\r\n\t */\r\n\tboolean leaveGame(GameEnvironment game, ServerPlayer player);\r\n\r\n\t/**\r\n\t * Login.\r\n\t * \r\n\t * @param name the name\r\n\t * @return the server player\r\n\t */\r\n\tServerPlayer login(String name);\r\n\r\n\t/**\r\n\t * Start game.\r\n\t * \r\n\t * @param gameId the game id\r\n\t * @throws BaseException the base exception\r\n\t */\r\n\tpublic void initSingleGame(GameEnvironment game) throws BaseException;\r\n\r\n\tvoid removeGame(GameEnvironment game);\r\n\r\n\tvoid removePlayer(ServerPlayer player);\r\n\r\n\tColor getFreeColor(ServerPlayer player, ServerGame game);\r\n\r\n}", "public abstract Game getGame(int game_id) throws SQLException;", "public Board getBoard()\r\n {\r\n return gameBoard;\r\n }", "public GameProperty [] getGameProperties() {\n return this.GameProperties;\n }" ]
[ "0.7945433", "0.7224376", "0.688955", "0.6820223", "0.6737752", "0.6658726", "0.6547583", "0.6525288", "0.6458508", "0.64536893", "0.64527583", "0.64527583", "0.64527583", "0.64527583", "0.6378933", "0.63470465", "0.6320449", "0.61936635", "0.6180375", "0.61520416", "0.614773", "0.6115601", "0.60929", "0.6081897", "0.6052067", "0.60340625", "0.6032572", "0.60250056", "0.60250056", "0.6024903", "0.6021008", "0.60125273", "0.5992431", "0.5990806", "0.59705526", "0.5956104", "0.5944056", "0.5940643", "0.59083563", "0.58981544", "0.5838841", "0.5789362", "0.5777041", "0.57626486", "0.5740346", "0.573135", "0.57259446", "0.57180136", "0.5716934", "0.570117", "0.5691258", "0.567833", "0.56742513", "0.56708306", "0.5646361", "0.5640723", "0.5637206", "0.56317896", "0.56255156", "0.5623834", "0.5618472", "0.5614856", "0.5609469", "0.55832916", "0.55824435", "0.55767393", "0.5575705", "0.5565585", "0.55605376", "0.55602777", "0.55594075", "0.55594075", "0.55585486", "0.55533946", "0.55511975", "0.5539705", "0.5537322", "0.55353", "0.55218834", "0.55179507", "0.5513301", "0.5502528", "0.54926074", "0.5480356", "0.5472298", "0.5461515", "0.5454379", "0.54461056", "0.5438716", "0.54265416", "0.54264545", "0.5424147", "0.5421829", "0.5418367", "0.54000837", "0.5395578", "0.5393426", "0.53916955", "0.5390721", "0.53866076", "0.538648" ]
0.0
-1
accessors to GameCollection for Command classes
GameCollection getGameCollection(){ return gc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getGameCommands(){\n\n }", "public interface GameCommand\r\n{\r\n void execute(Game game);\r\n}", "protected String getCommand() {\n\treturn \"GAME\";\n }", "public String getGameCommands(){return \"\";}", "public ArrayList<Command> getCommands(){\n\t\treturn commands;\n\t}", "Commands getCommandes();", "public GameCollection() {\n\t\tcollection = new Vector();\n\t}", "public AGameCommand(Command command) {\n this.game = Game.getInstance();\n this.command = command;\n }", "public Commands(){\n this.power = 0;\n this.direction = 0;\n this.started = false;\n this.runTime = new ElapsedTime();\n this.timeGoal = 0;\n }", "network.message.PlayerResponses.Command getCommand();", "public interface Command {\r\n \r\n /** set the coordinates of the mouse down event;\r\n * where the image is moved FROM.\r\n * @param fromX x coordinate of mouse \r\n * @param fromY y coordinate of mouse\r\n */\r\n public void setFromCoordinates(int fromX, int fromY);\r\n\r\n /** set the coordinates of the mouse up event;\r\n * where the image is moved TO.\r\n * @param toX x coordinate of mouse \r\n * @param toY y coordinate of mouse\r\n */\r\n public void setToCoordinates(int toX, int toY);\r\n \r\n /** execute encapsulates the method call on the board game. \r\n * NOTE: it is this method's responsibility return false\r\n * in case the given from and to coordinates cannot\r\n * be translated into a meaningful board game invokation\r\n * and in this case return false. Example: moving a\r\n * piece outside the board may translate into calling\r\n * a game's move method with a null parameter which\r\n * will next generate a null pointer exception in the\r\n * game logic.\r\n * @return false if the action, typically a move, is illegal\r\n * in the board game. \r\n * */\r\n public boolean execute();\r\n}", "private void sendGameCommand(){\n\n }", "public interface Command {\n\n\n}", "public abstract Collection<Piece> getActivePieces();", "public abstract Collection<Piece> getActivePieces();", "public void getCommandsUpdate() {\n\t\t\r\n\t}", "public List<Command> getCommands() {\n return commands;\n }", "Collection<String> getVoicedCommandList();", "public Collection<Move> getLegalMoves(){\n return legalMoves;\n }", "public GameGenerator() {\r\n\t\tthis.actionsCommand = new ArrayList<ICommand>();\r\n\t\tthis.invokerCommands = new ArrayList<InvokerCommand>();\r\n\t}", "List<String> getCommands();", "public void getCommand() {\n\t\t\n\t\tSystem.out.println(\"Enter a command:\");\n\t\tString Input = reader.nextLine(); //takes the user's input and places it in String Input\n\t\t\n\t\t//in the collection of commands, will run loop once for each item in that collection and \n\t\t//stores the item it is looking in the variable created\n\t\tfor (Commandable command : Commands) { \n\t\t\t\n\t\t\tif (command.matchCommand(Input)) {\n\t\t\t\t\n\t\t\t\tcommand.doCommand();\n\t\t\t\treturn;\t//this ends the method to break out of the loop\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Command not recognized\");\n\t}", "Set<CommandConfigurationDTO> getCommands();", "public CommandWords()\n {\n validCommands = new HashMap<String, CommandWord>();\n for(CommandWord command : CommandWord.values()) \n {\n if(command != CommandWord.UNKNOWN) \n {\n validCommands.put(command.toString(), command);\n }\n }\n \n commands = new HashMap<CommandWord, Command>();\n commands.put(CommandWord.GO, new GoCommand());\n commands.put(CommandWord.HELP, new HelpCommand());\n commands.put(CommandWord.QUIT, new QuitCommand());\n commands.put(CommandWord.EAT, new EatCommand());\n commands.put(CommandWord.SEE, new SeeCommand());\n commands.put(CommandWord.TAKE, new TakeCommand());\n commands.put(CommandWord.DROP, new DropCommand());\n //commands.put(CommandWord.TO, new ToCommand());\n //commands.put(CommandWord.LOCK, new LockCommand());\n //commands.put(CommandWord.UNLOCK, new UnlockCommand());\n commands.put(CommandWord.USEITEM, new UseCommand());\n commands.put(CommandWord.INSPECT, new InspectCommand());\n commands.put(CommandWord.TEST, new TestCommand());\n commands.put(CommandWord.INSPECTBAG, new InspectBagCommand());\n //commands.put(CommandWord.BACK, new BackCommand());\n commands.put(CommandWord.TALK, new TalkCommand());\n commands.put(CommandWord.BUY, new BuyCommand());\n commands.put(CommandWord.ALEA, new AleaCommand());\n commands.put(CommandWord.FREEZE, new FreezeCommand());\n }", "public String executeGameCommands(ListOfCommands listOfCommands){return \"\";}", "public abstract Collection<PlayerFish> getPlayers();", "public interface ICommandTracker {\n \n /**\n * Executes the provided command and if it completes adds it to the collection\n * of executed commands being tracked\n * @param _command - Interface to the command object to execute\n * @return boolean True if command completed and was added to the \n * collection of executed commands, False otherwise.\n * @throws Exception Something went wrong.\n */\n boolean executeCommand(ICommand _command) throws Exception;\n /**\n * This method reverses the last command added to the collection of executed commands.\n * Repeated calls to this method will provide an in order reversal of executed commands.\n * Undone commands will be added to their own collection\n * @return boolean True if a command was reversed, False otherwise.\n * @throws Exception Something went wrong.\n */\n boolean undoLastCommand() throws Exception;\n /**\n * This method executes the last command added to the collection of undone commands.\n * @return boolean True if a previously undone command was re-executed, False otherwise\n * @throws Exception Something went wrong.\n */\n boolean redoLastCommand() throws Exception;\n}", "@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}", "public native final JsArray<? extends JavaScriptObject> commands() /*-{\n\t\treturn this.commands;\n\t}-*/;", "public interface Command {\n\n /**\n * Executes given command, returns the results.\n *\n * <p><b>Note:</b> Command only executes by a player.</p>\n *\n * @param player Player executed command\n * @param params Passed command parameters\n * @return Command's result was executed\n */\n @NotNull\n CommandResult onCommand(@NotNull Player player, @NotNull String[] params);\n\n /**\n * Executes given command, returns the results.\n *\n * <p><b>Note:</b> Command only executes in the console.</p>\n *\n * @param console Console sender executed command\n * @param params Passed command parameters\n * @return Command's result was executed\n */\n @NotNull\n CommandResult onConsoleCommand(@NotNull ConsoleCommandSender console,\n @NotNull String[] params);\n\n /**\n * Requests a list of possible completions for a command parameters.\n *\n * <p><b>Note:</b> Request will be executed if command were executed by a player.</p>\n *\n * @param player Player executed command\n * @param params The parameters pass to the to the command, including final partial parameter to\n * be completed and command label\n * @return A result contains a list of possible completions for the final argument, or an empty\n * list to default to the command executor and string to search for.\n */\n @NotNull\n TabResult onTab(@NotNull Player player, @NotNull String[] params);\n\n /**\n * Requests a list of possible completions for a command parameters.\n *\n * <p><b>Note:</b> Request will be executed if command was executed in the console.</p>\n *\n * @param console Console sender executed command\n * @param params The parameters pass to the to the command, including final partial parameter to\n * be completed and command label\n * @return A result contains a list of possible completions for the final argument, or an empty\n * list to default to the command executor and string to search for.\n */\n @NotNull\n TabResult onConsoleTab(@NotNull ConsoleCommandSender console,\n @NotNull String[] params);\n\n /**\n * Returns parent {@link Command} of this command.\n *\n * @return Parent of this command\n * @deprecated Rename to {@link #getRoot()}\n */\n @Deprecated\n @Nullable\n Command getParent();\n\n /**\n * Returns root {@link Command} of this command.\n *\n * @return Root of this command\n */\n @Nullable\n Command getRoot();\n\n /**\n * Returns the name of this command.\n *\n * @return Name of this command\n */\n @NotNull\n String getName();\n\n /**\n * Returns the {@link PermissionWrapper} of this command\n *\n * @return The permission wrapper of this command\n */\n @NotNull\n PermissionWrapper getPermission();\n\n /**\n * Get the syntax or example usage of this command.\n *\n * @return Syntax of this command\n */\n @NotNull\n String getSyntax();\n\n /**\n * Gets a brief description of this command\n *\n * @return Description of this command\n */\n @NotNull\n String getDescription();\n\n /**\n * Returns a list of active aliases of this command, include value of {@link #getName()} method.\n *\n * @return List of aliases\n */\n @NotNull\n List<String> getAliases();\n\n String toString();\n}", "public interface Command {\n\t\t\n\t/**\n\t * Executes the command.\n\t * @param (TurtleModel) t the turtle executing the command\n\t * @return the value the command evaluates to\n\t * @throws InvalidCommandException\n\t */\n\tabstract public double execute(TurtleModel t) throws InvalidCommandException;\n\t\n\t/**\n\t * Executes the command and replaces it with a constant command if the command is not a turtle command\n\t * @param (TurtleModel) t the turtle executing the command\n\t * @throws InvalidCommandException\n\t */\n\tabstract public void execNonTurtle(TurtleModel t) throws InvalidCommandException;\n\t\n\t/**\n\t * Checks if the command is a turtle command\n\t * @return true iff the command is a turtle command\n\t */\n\tabstract public boolean isTurtleCommand();\n\t\n\t/**\n\t * Checks if the command is a variable command\n\t * @return true iff the command is a variable command\n\t */\n\tabstract public boolean isVariableCommand();\n\t\n\t/**\n\t * Adds a command to this commands list of children/arguments\n\t * @param cmd\n\t */\n\tabstract public void addChild(Command cmd);\n\t\n\t/**\n\t * Replaces this command with another, by making the replacement the parent's child instead of this.\n\t * @param replacement\n\t */\n\tabstract public void selfReplace(Command replacement);\n\t\n\t/**\n\t * Checks if the command needs more arguments\n\t * @return true iff command can hold more arguments\n\t */\n\tabstract public boolean argsNotFull();\n\t\n\t/**\n\t * Gets the maximum arguments the command can hold\n\t * @return maximum arguments\n\t */\n\tabstract public int maxArgs();\n\t\n\t/**\n\t * Gets string representation of the command. Mostly used for debugging.\n\t * @return string representation\n\t */\n\tabstract public String toString();\n\t\n\t/**\n\t * Gets the command's name \n\t * @return the command's name\n\t */\n\tabstract public String getName();\n\t\n\t/**\n\t * Gets the commands children\n\t * @return the list of children\n\t */\n\tabstract public List<Command> getChildren();\n\t\n\t/**\n\t * Gets child index\n\t * @param index\n\t * @return the child at index index\n\t */\n\tabstract public Command getChild(int index);\n\t\n\t/**\n\t * Gets the command's parent\n\t * @return parent\n\t */\n\tabstract public Command getParent();\n\t\n\t/**\n\t * Sets the command's parent to cmd\n\t * @param cmd\n\t */\n\tabstract public void setParent(Command cmd);\n\t\n\t/**\n\t * Sets the TurtleModel used for execution to t\n\t * @param t\n\t */\n\tabstract public void setTurtle(TurtleModel t);\n\t\n\t/**\n\t * Gets the TurtleModel used for execution\n\t * @return the TurtleModel used for execution\n\t */\n\tabstract public TurtleModel getTurtle();\n\t\n\t/**\n\t * Sets the TurtleModel used for execution to value, and calls setTurtleRecursive(value)\n\t * on this turtle's parent\n\t * @param value\n\t */\n\tpublic abstract void setTurtleRecursive(TurtleModel value);\n}", "public interface MenuCommands \n{\n public void execute( int idx, Creature c ); \n}", "HashMap <String, Command> getMap();", "protected abstract Command getAddCommand(ChangeBoundsRequest request);", "List<CommandInfo> list();", "public Map<String, Commands> getCommandMap() {\n return cmdMap;\n }", "public interface OptionsCollection {\n State getNextState(Commander commander);\n}", "public GameObjectCollection() {\n\t\tgameObjects = new Vector<GameObject>();\n\t}", "protected void initializeCommands() {\n\t\t\r\n\t\tcommands.add(injector.getInstance(Keys.inputQuestionCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.backCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.helpCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.quitCommand));\r\n\t}", "public AutonomousCommandGroup() {\n\t\tString gameData = getGameData();\n\t\tgameInfo = gameData;\n\t\tif(Robot.autoMode == AutoMode.SWITCH_SCALE) {\n addSequential(new SwitchScaleCommandGroup(gameData));\n }\n else if(Robot.autoMode == AutoMode.SWITCH_HALF_SCALE){\n\t\t addSequential(new SwitchHalfScaleCommandGroup(gameData));\n }\n else if(Robot.autoMode == AutoMode.DOUBLE_SCALE_RIGHT){\n\t\t addSequential(new DoubleScaleCommandGroup(gameData, true));\n }\n else if(Robot.autoMode == AutoMode.DOUBLE_SCALE_LEFT){\n\t\t addSequential(new DoubleScaleCommandGroup(gameData, false));\n }\n else if(Robot.autoMode == AutoMode.DOUBLE_SCALE_RIGHT_STRAIGHT_ONLY){\n\t\t addSequential(new DoubleScaleStraightOnlyCommandGroup(gameData, true));\n }\n else if(Robot.autoMode == AutoMode.DOUBLE_SCALE_LEFT_STRAIGHT_ONLY){\n\t\t addSequential(new DoubleScaleStraightOnlyCommandGroup(gameData, false));\n }\n else if(Robot.autoMode == AutoMode.DOUBLE_SWITCH){\n\t\t addSequential(new DoubleSwitchCommandGroup(gameData));\n }\n else if(Robot.autoMode == AutoMode.DRIVE_STRAIGHT) {\n addSequential(new DriveStraightDelayCommandGroup(11000, 4));\n }\n }", "public void getPlayerChoice(CommandOption[] cmdOps) {\r\n\t\timplementCommand(player.makeChoice(cmdOps));\r\n\t}", "java.util.List<java.lang.String>\n getCommandList();", "Iterable<BuildozerCommand> getCommands();", "public CommandHandler() {\r\n\t\tcommands.put(\"userinfo\", new UserInfoCommand());\r\n\t\tcommands.put(\"verify\", new VerifyCommand());\r\n\t\tcommands.put(\"ping\", new PingCommand());\r\n\t\tcommands.put(\"rapsheet\", new RapsheetCommand());\r\n\t\tcommands.put(\"bet\", new BetCommand());\r\n\t\tcommands.put(\"buttons\", new ButtonCommand());\r\n\r\n\t\t// for each command in commands\r\n\t\t// call getAlternativeName and assign to that key\r\n\t\tcommands.keySet().stream().forEach(key -> {\r\n\t\t\tList<String> alts = commands.get(key).getAlternativeNames();\r\n\t\t\tif (alts != null)\r\n\t\t\t\talts.forEach(a -> commandAlternative.put(a, key));\r\n\t\t});\r\n\t}", "public Pit getCommandPit();", "CommandTypes(String command) {\n this.command = command;\n }", "public String getCommand() { return command; }", "public Command(){\n \n comando.put(\"!addGroup\", 1);\n comando.put(\"!addUser\", 2);\n comando.put(\"!delFromGroup\", 3);\n comando.put(\"!removeGroup\", 4);\n comando.put(\"!upload\", 5);\n comando.put(\"!listUsers\",6);\n comando.put(\"!listGroups\",7);\n\n }", "private CommandBrocker() {}", "public GamemodeCommand() {\n aliasMap = new HashMap<>();\n aliasMap.put(AliasConstants.CREATIVE_ALIAS, GameMode.CREATIVE);\n aliasMap.put(AliasConstants.SURVIVAL_ALIAS, GameMode.SURVIVAL);\n aliasMap.put(AliasConstants.SPECTATOR_ALIAS, GameMode.SPECTATOR);\n }", "public void registerCommands() {\n commands = new LinkedHashMap<String,Command>();\n \n /*\n * admin commands\n */\n //file util cmds\n register(ReloadCommand.class);\n register(SaveCommand.class);\n \n //shrine cmds\n register(KarmaGetCommand.class);\n register(KarmaSetCommand.class); \n }", "public abstract String getCommand();", "private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}", "Commands createCommands();", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "int getCommand();", "public Command getCurrentCommand();", "private void handleCommands() {\n for (Command c : commands) {\n try {\n if (!game.isPaused()) {\n switch (c) {\n case INTERACT:\n game.interact();\n break;\n case PRIMARY_ATTACK:\n game.shoot(mouse.getX(), mouse.getY());\n break;\n case SECONDARY_ATTACK:\n game.specialAbility(mouse.getX(), mouse.getY());\n break;\n case PAUSE:\n game.pauseGame();\n break;\n }\n }\n } catch (Exception ignored) { }\n }\n }", "private interface Command {\n public void execute();\n }", "@Override\r\n public void execute(Command command) {\n\r\n }", "public List<String> getCommands()\n\t{\n\t\treturn commands;\n\t}", "public CarrierEntity getCommandMount();", "public EventType getCommand(){\n return this.command;\n }", "abstract public List<Command> getChildren();", "public ItemCollection()\n\t{\n\t\t/*\n\t\t * master list of all consumable/miscellaneous items in the game\n\t\t * \n\t\t * to add a new item to the game, add the item to the itemCollections, and if it is a consumable,\n\t\t * add the effect to the useItem method in the switch statement. If it has no effect, don't add anything.\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE\n\t\t */\n\t\t\n\t\t//CONSUMABLES\n\t\titemCollections.add(new Item(\"Polar Pop\", 1, \"Do you ever drink water?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Klondike Bar\", 20, \"What would you do for this?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Big tiddy goth GF\", 666, \"Vore.\", \"Consumable\"));\n\t\t\n\t\t//MISC, i.e. NO STATUS EFFECT\n\t\titemCollections.add(new Item(\"Sippy Cup\", 9, \"Somebody otta get their child their sippy cup back.\", \"Misc\"));\n\t\t\n\t\t/*\n\t\t * master list of equipment items in the game\n\t\t * \n\t\t * same as above\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE, DAMAGE, DEFENSE, VITALITY, INTELLIGENCE, STRENGTH, WISDOM\n\t\t */\n\t\t\n\t\t//2H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"A Big Boy's Sword\", 69, \"A two- handed sword for a big boy like you... You're growing up so fast!\", \"2H-Weapon\", 10, 0, 0, 0, 0, 0));\n\t\t\n\t\t//1H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"Red Copper Pan\", 300, \"Hey there mothafuckas it's ya girl cathy, I got some brand new shit\", \"1H-Weapon\", 250, 0, 25, 3, 25, 3));\n\t\t\n\t\t//HEAD\n\t\tequipmentCollections.add(new Equipment(\"Broken Helmet\", 1, \"Leather helmet broken from thousands of years of war and abuse\", \"Head\", 0, 3, 0, 0, 0, 0));\n\t\t\n\t\t//TORSO\n\t\tequipmentCollections.add(new Equipment(\"Bloodied Tunic\", 1, \"Tunic covered in your own blood, you can see your wounds through its holes\", \"Torso\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//ARMS\n\t\tequipmentCollections.add(new Equipment(\"Torn Gloves\", 1, \"Gloves so torn they hardly protect your hands\", \"Arms\", 0, 1, 0, 0, 0, 0));\n\t\t\n\t\t//LEGS\n\t\tequipmentCollections.add(new Equipment(\"Muddy Pants\", 1, \"Cloth pants soiled in mud\", \"Legs\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//FEET\n\t\tequipmentCollections.add(new Equipment(\"Worn Boot\", 1, \"A boot with a hole in it, but where is the other one?\", \"Feet\", 0, 1, 0, 0, 0, 0));\n\t}", "public void addCommand(Command m);", "public interface RemoveCommentCommand extends Command {\r\n\r\n /**\r\n * Get the owner of the comment\r\n *\r\n * @return The owner of the comment\r\n */\r\n public Peer getPeer();\r\n\r\n /**\r\n * Set the owner of the comment\r\n *\r\n * @param peer The owner of the comment\r\n */\r\n public void setPeer(Peer peer);\r\n\r\n /**\r\n * Get the music to comment\r\n *\r\n * @return The music to comment\r\n */\r\n public Music getMusic();\r\n\r\n /**\r\n * Set the music to comment\r\n *\r\n * @param music The music to comment\r\n */\r\n public void setMusic(Music music);\r\n\r\n /**\r\n * Get the id of the comment for the music\r\n *\r\n * @return The id of the comment for the music\r\n */\r\n public int getCommentId();\r\n\r\n /**\r\n * Set the id of the comment for the music\r\n *\r\n * @param commentId The id of the comment for the music\r\n */\r\n public void setCommentId(int commentId);\r\n}", "public Map<String, String> getCommands() {\n return commands;\n }", "public ExamineCommand(){\n\t\tthis.game = null;\n\t}", "public cl_command_queue getCommandQueue() {\r\n return commandQueue;\r\n }", "public interface PowreedCommand<Result extends PowreedCommandResultInterface> extends Comparable<PowreedCommand<Result>> {\n\n /**\n * The name of the command\n *\n * @return name of the command or sub-command\n */\n String getName();\n\n /**\n * The parameter list of command\n *\n * @return parameter list of command\n */\n List<PowreedCommandParameter> getParameters();\n\n /**\n * The description to describe the command\n *\n * @return description of command\n */\n String getDescription();\n\n /**\n * The permission which allow player to access to the command\n *\n * @return the permission as Strings\n */\n String getPermission();\n\n /**\n * The plugin of the command as an instance\n *\n * @return plugin of the command\n */\n Plugin getPlugin();\n\n /**\n * Convert to the help string by using help command\n *\n * @return the help string by using help command\n */\n default String toHelpString() {\n // Builder\n StringBuilder builder = new StringBuilder();\n // Name\n builder.append(ChatColor.RED).append(getName()).append(\" \");\n // Parameter\n Iterator<PowreedCommandParameter> iterator = this.getParameters().iterator();\n while (iterator.hasNext()) {\n PowreedCommandParameter next = iterator.next();\n\n if (next.isRequired()) {\n builder.append(ChatColor.GOLD).append(\"<\").append(next.getName()).append(\">\");\n } else {\n builder.append(ChatColor.DARK_GRAY).append(\"[\").append(next.getName()).append(\"]\");\n }\n\n if (iterator.hasNext()) {\n builder.append(\" \");\n }\n }\n // Description\n builder.append(ChatColor.RED).append(\": \").append(ChatColor.GRAY).append(getDescription());\n // Return to string\n return builder.toString();\n }\n\n /**\n * This method will be called by using\n *\n * @param sender the sender who call command\n * @param args the argument list\n * @return the result of command\n */\n Result command(@NotNull CommandSender sender, List<String> args);\n\n /**\n * Compare by the name. To order the command or something else relate to it\n *\n * @param o an another object to compare\n * @return the index of comparison related to String compare\n * @see String#compareTo(String)\n */\n @Override\n default int compareTo(@NotNull PowreedCommand o) {\n return this.getName().compareTo(o.getName());\n }\n\n /**\n * Tab executor of the command as suggestion\n *\n * @param sender the sender who tab\n * @param args the previous arguments as list\n * @return the list of suggestion\n */\n List<String> tab(CommandSender sender, List<String> args);\n}", "public interface Command {\n void execute();\n\n void printCommandInfo();\n}", "public CommandDirector() {\n\t\t//factory = ApplicationContextFactory.getInstance();\n\t\t//context = factory.getClassPathXmlApplicationContext();\n\t\t\n\t\t//commands.put(\"createEntry\", context.getBean(\"creationEntryCommand\", CreationEntryCommand.class));\n\t\t//commands.put(\"searchEntry\", context.getBean(\"searchingEntryCommand\", SearchingEntryCommand.class));\n\t\t\n\t\tcommands.put(\"createEntry\", new CreationEntryCommand());\n\t\tcommands.put(\"searchEntry\", new SearchingEntryCommand());\n\t\t\n\t}", "interface CommandBase {}", "interface DrawCommand {\n void draw();\n}", "private List<Command> getCommands(String name) {\r\n\t\tList<Command> result = new ArrayList<>();\r\n\t\tfor (Command command : commands) {\r\n\t\t\tif (command.name().equals(name) || command.aliases().contains(name)) {\r\n\t\t\t\tresult.add(command);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (LearnedCommand command : learnedCommands) {\r\n\t\t\tif (command.name().equals(name) || command.aliases().contains(name)) {\r\n\t\t\t\tresult.add(command);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n public Cli<C> build() {\n ParserMetadata<C> parserConfig = this.parserBuilder.build();\n\n CommandMetadata defaultCommandMetadata = null;\n List<CommandMetadata> allCommands = new ArrayList<CommandMetadata>();\n if (defaultCommand != null) {\n defaultCommandMetadata = MetadataLoader.loadCommand(defaultCommand, baseHelpSections, parserConfig);\n }\n\n List<CommandMetadata> defaultCommandGroup = defaultCommandGroupCommands != null\n ? MetadataLoader.loadCommands(defaultCommandGroupCommands, baseHelpSections, parserConfig)\n : new ArrayList<CommandMetadata>();\n\n allCommands.addAll(defaultCommandGroup);\n if (defaultCommandMetadata != null)\n allCommands.add(defaultCommandMetadata);\n\n // Build groups\n List<CommandGroupMetadata> commandGroups;\n if (groups != null) {\n commandGroups = new ArrayList<CommandGroupMetadata>();\n for (GroupBuilder<C> groupBuilder : groups.values()) {\n commandGroups.add(groupBuilder.build());\n }\n } else {\n commandGroups = new ArrayList<>();\n }\n\n // Find all commands registered in groups and sub-groups, we use this to\n // check this is a valid CLI with at least 1 command\n for (CommandGroupMetadata group : commandGroups) {\n allCommands.addAll(group.getCommands());\n if (group.getDefaultCommand() != null)\n allCommands.add(group.getDefaultCommand());\n\n // Make sure to scan sub-groups\n Queue<CommandGroupMetadata> subGroups = new LinkedList<CommandGroupMetadata>();\n subGroups.addAll(group.getSubGroups());\n while (!subGroups.isEmpty()) {\n CommandGroupMetadata subGroup = subGroups.poll();\n allCommands.addAll(subGroup.getCommands());\n if (subGroup.getDefaultCommand() != null)\n allCommands.add(subGroup.getDefaultCommand());\n subGroups.addAll(subGroup.getSubGroups());\n }\n }\n\n // add commands to groups based on the value of groups in the @Command\n // annotations\n // rather than change the entire way metadata is loaded, I figured just\n // post-processing was an easier, yet uglier, way to go\n MetadataLoader.loadCommandsIntoGroupsByAnnotation(allCommands, commandGroups, defaultCommandGroup,\n baseHelpSections, parserConfig);\n\n // Build restrictions\n // Use defaults if none specified\n if (restrictions.size() == 0)\n withDefaultRestrictions();\n\n if (allCommands.size() == 0)\n throw new IllegalArgumentException(\"Must specify at least one command to create a CLI\");\n\n // Build metadata objects\n GlobalMetadata<C> metadata = MetadataLoader.<C> loadGlobal(name, description, defaultCommandMetadata,\n ListUtils.unmodifiableList(defaultCommandGroup), ListUtils.unmodifiableList(commandGroups),\n ListUtils.unmodifiableList(restrictions), Collections.unmodifiableCollection(baseHelpSections.values()),\n parserConfig);\n\n return new Cli<C>(metadata);\n }", "private void registerCommands(){\n getCommand(\"mineregion\").setExecutor(new MineRegionCommand());\n getCommand(\"cellblock\").setExecutor(new CellBlockCommand());\n getCommand(\"cell\").setExecutor(new CellCommand());\n getCommand(\"prisonblock\").setExecutor(new PrisonBlockCommand());\n getCommand(\"rankup\").setExecutor(new RankUpCommand());\n getCommand(\"portal\").setExecutor(new PortalCommand());\n }", "public interface Command {\n\t/**\n\t * Executes the logic for this command\n\t * @return an Object to be cast to the desired return object\n\t * @throws ServerException \n\t */\n\tpublic void execute() throws ServerException;\n}", "public interface Dictionary extends Iterable<DictionaryCommand> {\n\n /**\n * Test if a given command is present in a dictionary.\n * @param tc The command to search for\n * @return <code>true</code>If the command is found\n */\n public boolean containsCommand(TokenizedCommand tc);\n \n /**\n * Find a given command in the dictionary\n * @param tc The command to search for\n * @return The index of the command in the dictionary, or <code>-1</code> if \n * the command is not found.\n */\n public int findCommand(TokenizedCommand tc);\n\n /**\n * The size of the dictionary.\n * @return The number of commands in this dictionary.\n */\n public int size();\n\n /**\n * Get the command at the given index.\n * @param index\n * @return The command found\n * @throws IndexOutOfBoundsException If the index is out of bounds.\n */\n public DictionaryCommand get(int index) throws IndexOutOfBoundsException;\n \n}", "private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }", "public String getCommand(){\n return command;\n }", "private void registerCommands() {\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.HOME.toString())) {\r\n\t\t\t(new HomeCommand(this)).register();\r\n\t\t\t(new SetHomeCommand(this)).register();\r\n\t\t\t(new DelHomeCommand(this)).register();\r\n\t\t\t(new ListHomesCommand(this)).register();\r\n\t\t\t(new NearbyHomesCommand(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.BACK.toString())) {\r\n\t\t\t(new Back(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.TPASK.toString())) {\r\n\t\t\t(new TeleportToggle(this)).register();\r\n\t\t\t(new TpAsk(this)).register();\r\n\t\t\t(new TpAskHere(this)).register();\r\n\t\t\t(new TeleportAccept(this)).register();\r\n\t\t\t(new TeleportDeny(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.TELEPORT.toString())) {\r\n\t\t\t(new Teleport(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.SPEED_SETTING.toString())) {\r\n\t\t\t(new SpeedCommand(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.FLY.toString())) {\r\n\t\t\t(new FlyCommand(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.GAMEMODE.toString())) {\r\n\t\t\tGameModeCommand gmc = new GameModeCommand(this);\r\n\t\t\tPlayerLoader loader = new PlayerLoader(true, false, false, false);\r\n\t\t\tGameModeLoader gml = new GameModeLoader(true);\r\n\t\t\tgmc.setLoader(gml);\r\n\t\t\tgml.setLoader(loader);\r\n\t\t\tgmc.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.PLAYER_CMD.toString())) {\r\n\t\t\t// create command and player loader\r\n\t\t\tPlayerCommand pc = new PlayerCommand();\r\n\t\t\tPlayerLoader playerLoader = new PlayerLoader(true, false, false, false);\r\n\t\t\t\r\n\t\t\t// create components\r\n\t\t\tFeedComponent fc = new FeedComponent();\r\n\t\t\tfc.setLoader(playerLoader);\r\n\t\t\tStarveComponent sc = new StarveComponent();\r\n\t\t\tsc.setLoader(playerLoader);\r\n\t\t\tHealComponent hc = new HealComponent();\r\n\t\t\thc.setLoader(playerLoader);\r\n\t\t\tKillComponent kc = new KillComponent();\r\n\t\t\tkc.setLoader(playerLoader);\r\n\t\t\tBurnComponent bc = new BurnComponent();\r\n\t\t\tbc.setLoader(playerLoader);\r\n\t\t\tExtinguishComponent ec = new ExtinguishComponent();\r\n\t\t\tec.setLoader(playerLoader);\r\n\t\t\tLightningComponent lc = new LightningComponent();\r\n\t\t\tlc.setLoader(playerLoader);\r\n\t\t\tLightningEffectComponent lec = new LightningEffectComponent();\r\n\t\t\tlec.setLoader(playerLoader);\r\n\t\t\t\r\n\t\t\tPlayerLoader gcLoader = new PlayerLoader(false, false, false, false);\r\n\t\t\tBinaryLoader ooc = new BinaryLoader(true, BinaryLoader.BINARY.ENABLE_DISABLE);\r\n\t\t\tooc.setLoader(gcLoader);\r\n\t\t\t\r\n\t\t\tInvincibleComponent gc = new InvincibleComponent();\r\n\t\t\tgc.setLoader(ooc);\r\n\t\t\t\r\n\t\t\t// add components\r\n\t\t\tpc.addComponent(\"feed\", fc);\r\n\t\t\tpc.addComponent(\"starve\", sc);\r\n\t\t\tpc.addComponent(\"heal\", hc);\r\n\t\t\tpc.addComponent(\"invincible\", gc);\r\n\t\t\tpc.addComponent(\"kill\", kc);\r\n\t\t\tpc.addComponent(\"burn\", bc);\r\n\t\t\tpc.addComponent(\"extinguish\", ec);\r\n\t\t\tpc.addComponent(\"lightning\", lc);\r\n\t\t\tpc.addComponent(\"lightningeffect\", lec);\r\n\t\t\t\r\n\t\t\t// register command\r\n\t\t\tpc.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.HAT.toString())) {\r\n\t\t\t// /hat command\r\n\t\t\t(new HatCommand()).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.WORKBENCH_ENDERCHEST.toString())) {\r\n\t\t\t// /enderchest and /workbench commands\r\n\t\t\tWorkbenchCommand wb = new WorkbenchCommand();\r\n\t\t\twb.setPermission(\"karanteenials.inventory.workbench\");\r\n\t\t\twb.register();\r\n\t\t\t\r\n\t\t\tEnderChestCommand ec = new EnderChestCommand();\r\n\t\t\tec.setPermission(\"karanteenials.inventory.enderchest\");\r\n\t\t\tec.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.CLEAR_INVENTORY.toString())) {\r\n\t\t\tClearInventoryCommand cic = new ClearInventoryCommand();\r\n\t\t\tPlayerLoader pl = new PlayerLoader(true, false, false, false);\r\n\t\t\tMaterialLoader ml = new MaterialLoader(true, false, false);\r\n\t\t\tpl.setLoader(ml);\r\n\t\t\tcic.setLoader(pl);\r\n\t\t\tpl.setPermission(\"karanteenials.inventory.clear-multiple\");\r\n\t\t\tcic.setPermission(\"karanteenials.inventory.clear\");\r\n\t\t\tcic.register();\r\n\t\t}\r\n\t\t\r\n\t\t// /nick command\r\n\t\t/*if(getSettings().getBoolean(KEY_PREFIX+KEYS.NICK.toString())) {\r\n\t\t\tNickCommand nc = new NickCommand();\r\n\t\t\tnc.register();\r\n\t\t}*/\r\n\t\t\r\n\t\t\r\n\t\t// /enchant command\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.ENCHANT_COMMAND.toString())) {\r\n\t\t\tEnchantCommand ec = new EnchantCommand();\r\n\t\t\t\r\n\t\t\tGiveEnchantmentComponent gec = new GiveEnchantmentComponent();\r\n\t\t\tgec.setPermission(\"karanteenials.enchant.set\");\r\n\t\t\t\r\n\t\t\tRemoveEnchantmentComponent rec = new RemoveEnchantmentComponent();\r\n\t\t\trec.setPermission(\"karanteenials.enchant.remove\");\r\n\t\t\t\r\n\t\t\tec.addComponent(\"give\", gec);\r\n\t\t\tec.addComponent(\"remove\", rec);\r\n\t\t\t\r\n\t\t\tEnchantmentLoader giveEnchLoader = new EnchantmentLoader();\r\n\t\t\tgec.setLoader(giveEnchLoader);\r\n\t\t\t\r\n\t\t\tEnchantmentLoader removeEnchLoader = new EnchantmentLoader();\r\n\t\t\trec.setLoader(removeEnchLoader);\r\n\t\t\t\r\n\t\t\tLevelLoader ll = new LevelLoader();\r\n\t\t\tgiveEnchLoader.setLoader(ll);\r\n\t\t\t\r\n\t\t\tec.register();\r\n\t\t}\r\n\t\t\r\n\t\t// /rtp command\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.RANDOM_TELEPORT.toString())) {\r\n\t\t\tRandomTeleport rtp = new RandomTeleport();\r\n\t\t\tPlayerLoader pl = new PlayerLoader(true, false, true, false);\r\n\t\t\trtp.setLoader(pl);\r\n\t\t\trtp.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.NEAR_COMMAND.toString())) {\r\n\t\t\tNearCommand nc = new NearCommand();\r\n\t\t\tnc.setPermission(\"karanteenials.near\");\r\n\t\t\tnc.register();\r\n\t\t}\r\n\t}", "public interface Command {\n\tvoid execute();\n}", "@Override\n public Answer processCommand(Command command) {\n\n // Add Item to your backpack\n if (command.hasActionOf(HitWord.GET, HitWord.TAKE)) {\n return PersonManager.get().getPerson().getBackpack().addItem(this);\n }\n // Remove the item from your backpack\n if (command.hasActionOf(HitWord.DROP, HitWord.REMOVE)) {\n if (PersonManager.get().getPerson().getBackpack().removeItemById(this.getId())) {\n return new Answer(\"Removed \" + getColor().name() + \" \" + getName() + \" from your backpack, \" + getName() + \" is lost.\", Answer.DECORATION.REMOVING);\n }\n }\n\n return super.processCommand(command);\n }", "public Collection<GObject> getObjects();", "public interface CommandLoader {\n\n\t/**\n\t * Gets list of commands in bundle\n\t * @return\n\t */\n\tList<CommandInfo> list();\n\t\n\t/**\n\t * Executes command\n\t * @param cmdName command name\n\t * @return\n\t */\n\tObject execute(String cmdName, String param);\n}", "private void retriveCommand(){\n\t\tdirections.add(\"Turn left.\");\n\t\tdirections.add(\"Walk 20 meters and turn right.\");\n\t\tdirections.add(\"Arrive destination.\");\n\t}", "@Override\r\n\tpublic void command() {\n\t\tShape r = new Rectangle(0, 0, p.getImage().getWidth(), p.getImage().getHeight());\r\n\t\tr.setCenterX(p.getLoc().x + dx);\r\n\t\tr.setCenterY(p.getLoc().y + dy);\r\n\t\tSystem.out.println(commandBlockType);\r\n\t\tif (!m.isColliding(r)) {\r\n\t\t\tp.setColliding(false);\r\n\t\t\tp.getLoc().x+=dx;\r\n\t\t\tp.getLoc().y+=dy;\r\n\t\t} else {\r\n\t\t\tp.setColliding(true);\r\n\t\t}\r\n\t}", "network.message.PlayerResponses.CommandOrBuilder getCommandOrBuilder();", "public interface Command {\r\n\r\n\tpublic void execute();\r\n\r\n}", "public static void reloadCommands() {\n\t\tinstances.clear();\n\t\tCommands.initializeCommands();\n\t}", "public CommandStack getCommandStack() \n {\n return commandStack;\n }", "String getCommand();", "protected void handleCommand(List<Command> commands, Command c)\n\t{\n\t\tList<String> uniques = new ArrayList<String>();\n\t\tuniques.add(\"#weapon\");\n\t\tuniques.add(\"#custommagic\");\n\t\tuniques.add(\"#magicskill\");\n\t\tuniques.add(\"#magicboost\");\n\t\t\n\t\tint copystats = -1;\n\n\t\tc = new Command(c.command, c.args);\n\t\tCommand old = null;\n\t\tfor(Command cmd : commands)\n\t\t{\n\t\t\tif(cmd.command.equals(c.command))\n\t\t\t\told = cmd;\n\t\t\t\n\t\t\tif(cmd.command.equals(\"#copystats\"))\n\t\t\t\tcopystats = Integer.parseInt(cmd.args.get(0));\n\t\t}\n\t\t\n\n\t\t// If the unit has #copystats it doesn't have defined stats. Thus we need to fetch value from database\n\t\tif(c.args.size() > 0 && (c.args.get(0).startsWith(\"+\")) && copystats != -1 && old == null)\n\t\t{\n\t\t\tString value = this.nationGen.units.GetValue(copystats + \"\", c.command.substring(1));\n\t\t\tif(value.equals(\"\"))\n\t\t\t\tvalue = \"0\";\n\t\t\t\n\t\t\told = new Command(c.command, value);\n\t\t\tcommands.add(old);\t\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\tif(old != null && !uniques.contains(c.command))\n\t\t{\n\n\t\t\t\n\t\t\t/*\n\t\t\tif(this.tags.contains(\"sacred\") && c.command.equals(\"#gcost\"))\n\t\t\t\tSystem.out.println(c.command + \" \" + c.args);\n\t\t\t*/\n\t\t\tfor(int i = 0; i < c.args.size(); i++)\n\t\t\t{\n\t\t\t\n\t\t\t\tString arg = c.args.get(i);\n\t\t\t\tString oldarg = old.args.get(i);\n\t\t\t\tif(arg.startsWith(\"+\") || (arg.startsWith(\"-\") && !arg.startsWith(\"--\")))\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(arg.startsWith(\"+\"))\n\t\t\t\t\t\targ = arg.substring(1);\n\t\t\t\t\t\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\toldarg = \"\" + (Integer.parseInt(oldarg) + Integer.parseInt(arg));\n\t\t\t\t\t\told.args.set(i, oldarg);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(NumberFormatException e)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"FATAL ERROR 1: Argument parsing \" + oldarg + \" + \" + arg + \" on \" + c + \" caused crash.\");\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(arg.startsWith(\"*\"))\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\targ = arg.substring(1);\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\toldarg = \"\" + (int)(Integer.parseInt(oldarg) * Double.parseDouble(arg));\n\t\t\t\t\t\told.args.set(i, oldarg);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"FATAL ERROR 2: Argument parsing \" + oldarg + \" * \" + arg + \" on \" + c.command + \" caused crash.\");\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!uniques.contains(c.command))\n\t\t\t\t\t{\n\t\t\t\t\t\toldarg = arg;\n\t\t\t\t\t\told.args.set(i, oldarg);\n\t\t\t\t\t\tcontinue;\n\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcommands.add(c);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\n\t\t\t\n\t\t\tfor(int i = 0; i < c.args.size(); i++)\n\t\t\t{\n\t\t\t\tif(c.args.get(i).startsWith(\"+\"))\n\t\t\t\t\tc.args.set(i, c.args.get(i).substring(1));\n\t\t\t\telse if(c.args.get(i).startsWith(\"*\"))\n\t\t\t\t\tc.args.set(i, 0 + \"\");\n\n\t\t\t}\n\n\t\t\tcommands.add(c);\n\t\t}\n\t\n\t\t\n\n\t}", "public com.google.protobuf.ProtocolStringList\n getCommandList() {\n return command_.getUnmodifiableView();\n }", "public ItemCommand() {\n }", "protected Game getGame() {\n return game;\n }", "@Override\n public final Command getCommand() {\n return commandIdentifier;\n }", "public CommandManager getCommand() {\n\treturn command;\n }" ]
[ "0.73921955", "0.63453627", "0.61120075", "0.60539573", "0.60351557", "0.6033746", "0.5989299", "0.5933141", "0.5877661", "0.5826379", "0.57961214", "0.57860696", "0.5764927", "0.5732484", "0.5732484", "0.5726773", "0.57202613", "0.5680937", "0.567117", "0.56418496", "0.5625688", "0.562295", "0.5620403", "0.5574632", "0.55729336", "0.5544511", "0.5542903", "0.5534602", "0.5522368", "0.5509274", "0.5506988", "0.5484792", "0.54499745", "0.5443927", "0.5443532", "0.543842", "0.5430214", "0.542405", "0.54213053", "0.5411986", "0.5410811", "0.54056036", "0.5379704", "0.5379184", "0.53764135", "0.5375518", "0.5365325", "0.5351071", "0.5349671", "0.5349363", "0.5347513", "0.5344509", "0.5333891", "0.5333578", "0.5317843", "0.53038114", "0.5297435", "0.5296967", "0.5292092", "0.52898425", "0.52844495", "0.5278764", "0.5274307", "0.5269832", "0.52696365", "0.5266407", "0.5261019", "0.5258612", "0.52581805", "0.52485734", "0.52448285", "0.52244765", "0.52208704", "0.52189696", "0.5215797", "0.52156615", "0.5200497", "0.5194785", "0.5191113", "0.51875496", "0.5186506", "0.5184673", "0.51837575", "0.51804423", "0.5180179", "0.5179854", "0.5179108", "0.5178633", "0.5176836", "0.5176098", "0.5173125", "0.5173072", "0.51687586", "0.51682925", "0.51675224", "0.51660335", "0.5160307", "0.51600724", "0.5158832", "0.5156891" ]
0.63071173
2
mutator in GameCollection for sound
void setSound(boolean b){ gc.setSound(b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public SoundClip getGameMusic(){\n return gameMusic;\n }", "void mute() {\n execute(\"player.muted = true\");\n }", "public abstract void makeSound();", "public void update() {\n\t\tfor(String key : actives.keys()) {\n\t\t\tActiveSound snd = actives.get(key);\n\t\t\tsnd.lifespan++;\n\t\t\tif (snd.lifespan > timeLimit) {\n\t\t\t\tcollection.add(key);\n\t\t\t\tsnd.sound.setLooping(snd.id,false); // Will eventually garbage collect\n\t\t\t\tsnd.sound.setVolume(snd.id, 0.0f); \n\t\t\t}\n\t\t}\n\t\tfor(String key : collection) {\n\t\t\tactives.remove(key);\n\t\t}\n\t\tcollection.clear();\n\t\tcurrent = 0;\n\t}", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}", "public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }", "@Override\n public void playSound(int soundId) {\n\n }", "public String getSound();", "@Override\n\tpublic void play() {\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "public void UpdateSounds(mobj_t listener);", "public interface Sounds {\n// void add();\n void setBackgroundSound(String filepath, LoadMode loadMode);\n void setSound(String key, String filepath, LoadMode loadMode);\n void play();\n void play(String key);\n void pause();\n void resume();\n void clearAll();\n}", "public Sound getSound() {\n return _sound;\n }", "@Override\n public void soundSourceDegreesUpdate(int selectedItem) {\n \n }", "@Override\r\n public void play()\r\n {\n\r\n }", "abstract String getSound();", "public void testMixer_MuteMany() throws InterruptedException { \n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, false);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 1.0, mixer.getOutput().get(), tolerance);\n\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n mixer.setMute(0, true);\n mixer.setMute(1, false);\n mixer.setMute(2, true);\n \n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.7, mixer.getOutput().get(), tolerance);\n }", "public abstract SoundPlayer setVolume(int volume);", "public String interact() {\n return sound;\n }", "void setValueMixerSound(int value);", "public SoundClip getSound() {\n return socSound;\n }", "@Override\n public double getEngineSound() {\n return decoratedEngine.getEngineSound() * .6;\n }", "public void play(){\n\t\t\n\t}", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "@Override\r\npublic void Play() {\n\t\r\n}", "PlayingSquare giveDamage(int damage);", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public abstract void updateMixer();", "public void togglePlay() { }", "private void createUpdateSound(Item item) throws Exception {\r\n\t //cria o som\r\n new Sound().saveSound(item.getNome());\r\n}", "PlaySound getSound();", "public void play() {\n\t\t\r\n\t}", "@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }", "@Override\n\tpublic String makeSound() {\n\t\treturn ANIMAL_SOUND;\n\t}", "public void setSound(Boolean sound_on){\n this.sound_on = sound_on;\n }", "public boolean getSoundShot() { return soundShot; }", "public void game(){\n gameMusic.loop(pitch, volume);\n }", "public String getSound()\r\n\t{\r\n\t\treturn \"Squeak Squeak Squeak\";\r\n\t}", "public void PauseSound();", "public void mute() {\n\t\tstate.mute();\n\t}", "@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\t\t\tLayeredSound.getInstance().add( sound );\r\n\t\t}", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public interface IHasSound\n{\n\t/**\n\t * Gets the sound path of this block's sound.\n\t * @return sound path\n\t */\n\tpublic String getSoundPath();\n\n\t/**\n\t * Gets the multiplier to play this sound by.\n\t * @return sound multiplier\n\t */\n\tpublic float getVolumeMultiplier();\n}", "private void mute(String[] command) {\n\t\ttry {\n\t\t\tnew ProcessBuilder(Constants.CH_PATH_NIRCMD, \"mutesysvolume\", \"1\")\n\t\t\t\t\t.start();\n\t\t\tSystem.out.println(\"Muting sound.\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean getSoundAmbience() { return soundAmbience; }", "public void setSound(Sound sound) {\n\t\ts = sound;\n\t}", "public String sounds(){\n return (\"Moooooo :o\");\n }", "String sound();", "public interface Audible {\n public String makeSound();\n}", "static void soundsEZ() {\n\t\tapplauseSound = EZ.addSound(\"applause.wav\");\n\t\twallSound = EZ.addSound(\"stone1.wav\");\n\t\tdiamondSound = EZ.addSound(\"glass1.wav\");\n\t}", "void togglePlay();", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic String sing() {\n\t\treturn this.sound;\n\t}", "protected abstract void internalPlay();", "public interface Movement {\n void sound ();\n}", "public void registerSounds()\n {\n }", "@Override\n public void stopSound(){\n gameMusic.stop();\n }", "public void setGame() {\n }", "public int getSoundIndex() \n\t{\n\treturn fSoundIndex;\n\t}", "public void pauseSound() {\n\t\tclip.stop();\n\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "public void mute() {\n\t\tif (isMute) {\n\t\t\tplaybin.setVolume(0);\n\t\t\tisMute = false;\n\t\t} else {\n\t\t\tplaybin.setVolume(volume);\n\t\t\tisMute = true;\n\t\t}\n\t}", "public void reloadSoundDevices();", "public void playAudio() {\n\n }", "public void testMixer_MuteAll() throws InterruptedException {\n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, true);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.0, mixer.getOutput().get(), tolerance);\n\t\t\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.0, mixer.getOutput().get(), tolerance);\n\t\t\n }", "private void Scale()\n {\n Song scale = new Song();\n scale.add(new Note(noteA1,WHOLE_NOTE/2));\n scale.add(new Note(noteBB1,WHOLE_NOTE/2));\n scale.add(new Note(noteB1,WHOLE_NOTE/2));\n scale.add(new Note(noteC1,WHOLE_NOTE/2));\n scale.add(new Note(noteCS1,WHOLE_NOTE/2));\n scale.add(new Note(noteD1,WHOLE_NOTE/2));\n scale.add(new Note(noteDS1,WHOLE_NOTE/2));\n scale.add(new Note(noteE1,WHOLE_NOTE/2));\n scale.add(new Note(noteF1,WHOLE_NOTE/2));\n scale.add(new Note(noteFS1,WHOLE_NOTE/2));\n scale.add(new Note(noteG1,WHOLE_NOTE/2));\n scale.add(new Note(noteGS1,WHOLE_NOTE/2));\n\n\n playSong(scale);\n }", "public interface IDoomSound {\n\n\tclass channel_t{\n\n\t\t // sound information (if null, channel avail.)\n\t\t sfxinfo_t\tsfxinfo;\n\n\t\t // origin of sound\n\t\t ISoundOrigin\torigin;\n\n\t\t // handle of the sound being played\n\t\t int\t\thandle;\n\t\t\t}\n\t\n\t/** Convenience hack */\n\tpublic static final int NUMSFX=sfxenum_t.NUMSFX.ordinal();\n\t\n\t// Purpose?\n\tpublic static final char snd_prefixen[]\n\t = { 'P', 'P', 'A', 'S', 'S', 'S', 'M', 'M', 'M', 'S', 'S', 'S' };\n\n\tpublic static final int S_MAX_VOLUME=127;\n\n\t// when to clip out sounds\n\t// Does not fit the large outdoor areas.\n\tpublic static final int S_CLIPPING_DIST\t=\t(1200*0x10000);\n\n\t// Distance tp origin when sounds should be maxed out.\n\t// This should relate to movement clipping resolution\n\t// (see BLOCKMAP handling).\n\t// Originally: (200*0x10000).\n\tpublic static final int S_CLOSE_DIST\t=(160*0x10000);\n\n\tpublic static final int S_ATTENUATOR\t=((S_CLIPPING_DIST-S_CLOSE_DIST)>>m.fixed_t.FRACBITS);\n\n\t// Adjustable by menu.\n\t//protected final int NORM_VOLUME \t\tsnd_MaxVolume\n\n\tpublic static final int NORM_PITCH = \t\t128;\n\tpublic final static int NORM_PRIORITY\t=\t64;\n\tpublic final static int NORM_SEP\t\t=128;\n\n\tpublic final static int S_PITCH_PERTURB\t=\t1;\n\tpublic final static int S_STEREO_SWING\t=\t(96*0x10000);\n\n\t// percent attenuation from front to back\n\tpublic final static int S_IFRACVOL\t=\t30;\n\n\tpublic final static int NA\t=\t\t0;\n\tpublic final static int S_NUMCHANNELS=\t\t2;\n\n\t/**\n\t * Initializes sound stuff, including volume Sets channels, SFX and music\n\t * volume, allocates channel buffer, sets S_sfx lookup.\n\t */\n\n\tvoid Init(int sfxVolume, int musicVolume);\n\n\t/**\n\t * Per level startup code. Kills playing sounds at start of level,\n\t * determines music if any, changes music.\n\t */\n\tpublic void Start();\n\n\t/**\n\t * Start sound for thing at <origin> using <sound_id> from sounds.h\n\t */\n\tpublic void StartSound(ISoundOrigin origin, int sound_id);\n\n\t/**\n\t * Start sound for thing at <origin> using <sound_id> from sounds.h\n\t * Convenience method using sfxenum_t instead. Delegated to int version.\n\t * \n\t */\n\tpublic void StartSound(ISoundOrigin origin, sfxenum_t sound_id);\n\t\n\t/** Will start a sound at a given volume. */\n\tpublic void StartSoundAtVolume(ISoundOrigin origin, int sound_id, int volume);\n\n\t/** Stop sound for thing at <origin> */\n\tpublic void StopSound(ISoundOrigin origin);\n\n\t/**\n\t * Start music using <music_id> from sounds.h, and set whether looping\n\t * \n\t * @param musicnum\n\t * @param looping\n\t */\n\tpublic void ChangeMusic(int musicnum, boolean looping);\n\t\n\tpublic void ChangeMusic(musicenum_t musicnum, boolean looping);\n\n\t/** Stops the music fer sure. */\n\tpublic void StopMusic();\n\n\t/** Stop and resume music, during game PAUSE. */\n\tpublic void PauseSound();\n\n\tpublic void ResumeSound();\n\n\t/**\n\t * Updates music & sounds\n\t * \n\t * @param listener\n\t */\n\tpublic void UpdateSounds(mobj_t listener);\n\n\tpublic void SetMusicVolume(int volume);\n\n\tpublic void SetSfxVolume(int volume);\n\n\n\t/** Start music using <music_id> from sounds.h */\n\tpublic void StartMusic(int music_id);\n\t\n\t/** Start music using <music_id> from sounds.h \n\t * Convenience method using musicenum_t.\n\t */\n\tpublic void StartMusic(musicenum_t music_id);\n\t\n\t//\n\t// Internals. \n\t// \n\t// MAES: these appear to be only of value for internal implementation,\n\t// and are never called externally. Thus, they might as well\n\t// not be part of the interface, even though it's convenient to reuse them.\n\t//\n\t\n\t/*\n\tint\n\tS_getChannel\n\t( mobj_t\t\torigin,\n\t sfxinfo_t\tsfxinfo );\n\n\n\tint\n\tS_AdjustSoundParams\n\t( mobj_t\tlistener,\n\t mobj_t\tsource,\n\t int\t\tvol,\n\t int\t\tsep,\n\t int\t\tpitch );\n\n\tvoid S_StopChannel(int cnum);\n\t*/\n\n}", "public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }", "public void audioAction() {\n getSelectedCell().toggleAudio();\n }", "private void initialMusic(){\n\n }", "public void AudioMuerte() {\r\n\t\ttry {\r\n\t\t\tdeath.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\golpe.wav\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error: \" + e);\r\n\t\t}\r\n\t}", "public static void setSound(boolean tempSound) {\n sound = tempSound;\n }", "public void ChangeMusic(int musicnum, boolean looping);", "public void Play();", "public void setSoundAmbience(final boolean sAmbience) { soundAmbience = sAmbience; }", "@SideOnly(Side.CLIENT)\n protected void soundMagic(ResourceLocation activitySound) {\n if (getBaseMetaTileEntity().isActive()) {\n if (activitySoundLoop == null) {\n activitySoundLoop = new SoundLoop(activitySound, getBaseMetaTileEntity(), false, true);\n Minecraft.getMinecraft().getSoundHandler().playSound(activitySoundLoop);\n }\n } else {\n if (activitySoundLoop != null) {\n activitySoundLoop = null;\n }\n }\n }", "protected float getSoundVolume()\n {\n return 0.4F;\n }", "private SoundController() {\n\t\tsoundbank = new HashMap<String, Sound>();\n\t\tmusicbank = new HashMap<String, Music>();\n\t\tactives = new IdentityMap<String,ActiveSound>();\n\t\tcollection = new Array<String>();\n\t\tcooldown = DEFAULT_COOL;\n\t\ttimeLimit = DEFAULT_LIMIT;\n\t\tframeLimit = DEFAULT_FRAME;\n\t\tcurrent = 0;\n\t}", "void changeMusic(AudioTrack newSong);", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "public SoundEvent getStepSound() {\n/* 91 */ return this.stepSound;\n/* */ }", "public void updateMute() {\n if (game.isMuted()) {\n mute.setIcon(muted);\n } else {\n mute.setIcon(unmuted);\n }\n }", "public abstract Element play();", "private void initSounds() {\n\n\n\t}", "public void play() {\n if (!isHungry()) {\n hunger += 2;\n mood += 2;\n fatigue += 3;\n\n if (!muted) {\n System.out.println(\"play\\t|\\tPlaying is fun!\");\n }\n }\n }", "public boolean getMute();", "public void ReproduceAudio() { \r\n\t\ttry {\r\n\t\t\t//en caso de que como nombre pongas \"undertale\" la musica sera diferente.\r\n\t\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\undertale.wav\");\r\n\t\t\t\t//emppieza la musica\r\n\t\t\t\trepro.Play();\r\n\t\t\t//musica por defecto\r\n\t\t\t} else {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\tetris.mp3\");\r\n\t\t\t\trepro.Play();\r\n\t\t\t}\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\t}", "public void enableSound() {\n soundToggle = true;\n }", "public void setAudioDescriptor( AudioDescriptor audioDescriptor );", "public abstract void audioMessage(Message m);", "public SoundDescriptor clone();", "public int getSoundClipId(){\n return this.soundClipId;\n }", "public static void hit_sound() {\n\t\tif (!hit1) {\n\t\t\thit1 = true;\n\t\t\tm_player_hit.setMediaTime(new Time(0));\n\t\t\tm_player_hit.start();\n\t\t} else if (!hit2) {\n\t\t\thit2 = true;\n\t\t\tm_player_hit2.setMediaTime(new Time(0));\n\t\t\tm_player_hit2.start();\n\t\t} else if (!hit3) {\n\t\t\thit3 = true;\n\t\t\tm_player_hit3.setMediaTime(new Time(0));\n\t\t\tm_player_hit3.start();\n\t\t} else if (!hit4) {\n\t\t\thit4 = true;\n\t\t\tm_player_hit4.setMediaTime(new Time(0));\n\t\t\tm_player_hit4.start();\n\t\t} else if (!hit5) {\n\t\t\thit5 = true;\n\t\t\tm_player_hit5.setMediaTime(new Time(0));\n\t\t\tm_player_hit5.start();\n\t\t} else {\n\t\t\thit1 = hit2 = hit3 = hit4 = hit5 = false;\n\t\t\tm_player_hit6.setMediaTime(new Time(0));\n\t\t\tm_player_hit6.start();\n\t\t}\n\n\t}" ]
[ "0.6527822", "0.6527822", "0.6384619", "0.6221397", "0.6163962", "0.6097734", "0.60428476", "0.60393786", "0.59953773", "0.59682107", "0.5946318", "0.59443426", "0.58503324", "0.58498573", "0.5849465", "0.5823229", "0.58232087", "0.58229", "0.58220214", "0.58170074", "0.5816823", "0.5804235", "0.5795388", "0.5784132", "0.5781103", "0.57744575", "0.5769246", "0.57618403", "0.5753461", "0.5739813", "0.56986374", "0.5687646", "0.5683006", "0.5682331", "0.56578356", "0.56479055", "0.5639554", "0.563385", "0.5631956", "0.56299615", "0.5625472", "0.56090415", "0.56076986", "0.56027186", "0.5597443", "0.5588175", "0.5579962", "0.55780977", "0.5577125", "0.5571976", "0.55705667", "0.55326796", "0.55319124", "0.5519095", "0.55134207", "0.55037713", "0.5484021", "0.5483358", "0.5482741", "0.547653", "0.5471358", "0.5463616", "0.5462122", "0.5459816", "0.5455528", "0.54477024", "0.5444018", "0.54332495", "0.5429756", "0.542609", "0.5421211", "0.5416003", "0.5412624", "0.54111844", "0.54100996", "0.5404354", "0.53942007", "0.5389961", "0.538964", "0.538064", "0.5380201", "0.5377874", "0.53759855", "0.5373281", "0.5373244", "0.53725743", "0.53693974", "0.5365796", "0.53625023", "0.53521186", "0.53472006", "0.5341198", "0.53403324", "0.5333328", "0.53324866", "0.53305304", "0.5330278", "0.5330002", "0.53299206", "0.5327015" ]
0.5901591
12
TODO does elasticsearch need to be reset?
@Override public void resetStateOfSUT() { try { //FIXME: this fails due to locks on Neo4j. need way to reset it //deleteDir(new File(tmpFolder)); if(!Files.exists(Path.of(tmpFolder))) { Files.createDirectories(Path.of(tmpFolder)); } Files.copy(getClass().getClassLoader().getResourceAsStream("users.json"), Path.of(tmpFolder,"users.json"), StandardCopyOption.REPLACE_EXISTING); Files.copy(getClass().getClassLoader().getResourceAsStream("logins.json"), Path.of(tmpFolder,"logins.json"), StandardCopyOption.REPLACE_EXISTING); }catch (Exception e){ throw new RuntimeException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Reindex() {}", "private Reindex() {}", "@Override\n protected boolean preserveIndicesUponCompletion() {\n return true;\n }", "@Override\n protected void beforeSearch() {\n index = 0;\n numberOfIterations = 0;\n pageCounter = 0;\n }", "private void ElasticIndexValidation(TransportClient client) {\n if (!client.admin().indices().prepareExists(ES_TAG_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_TAG_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_TAG_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/tag_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_TAG_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_TAG_INDEX, e);\n }\n }\n // Create/migrate the logbook index\n if (!client.admin().indices().prepareExists(ES_LOGBOOK_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_LOGBOOK_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_LOGBOOK_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/logbook_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_LOGBOOK_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_LOGBOOK_INDEX, e);\n }\n }\n\n // Create/migrate the property index\n if (!client.admin().indices().prepareExists(ES_PROPERTY_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_PROPERTY_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_PROPERTY_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/property_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_PROPERTY_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_PROPERTY_INDEX, e);\n }\n }\n\n // Create/migrate the sequence index\n if (!client.admin().indices().prepareExists(ES_SEQ_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_SEQ_INDEX).setSettings(Settings.builder() \n .put(\"index.number_of_shards\", 1)\n .put(\"auto_expand_replicas\", \"0-all\")).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_SEQ_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/seq_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_SEQ_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }\n\n // create/migrate log template\n PutIndexTemplateRequestBuilder templateRequest = client.admin().indices().preparePutTemplate(ES_LOG_INDEX);\n templateRequest.setPatterns(Arrays.asList(ES_LOG_INDEX));\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/log_template_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n templateRequest.addMapping(ES_LOG_TYPE, XContentFactory.jsonBuilder().map(jsonMap)).get();\n// templateRequest.setSource(jsonMap);\n// templateRequest.addMapping(ES_LOG_TYPE, jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }", "public static void main(String args[]) throws IOException {\n Settings settings = Settings.builder().put(\"cluster.name\", \"elasticsearch\").build();\r\n //.put(\"xpack.security.user\", \"elastic:changeme\").build();\r\n TransportClient client = new PreBuiltTransportClient(settings)\r\n // client.addTransportAddress(new TransportAddress(InetAddress.getByName(\"localhost\"), 9300));\r\n \r\n //TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)\r\n .addTransportAddress(new TransportAddress(InetAddress.getByName(\"localhost\"), 9300));\r\n //.addTransportAddress(new TransportAddress(InetAddress.getByName(\"host2\"), 9300));\r\n \r\n // client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(\"localhost1\"), 9300));\r\n\r\n // TransportClient client = TransportClient.builder().settings(settings).build()\r\n // .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(\"localhost\"), 9300));\r\n // .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(\"host2\"), 9300));\r\n\r\n client.prepareIndex(\"java-example\", \"_doc\", \"1\")\r\n .setSource(putJsonDocument(\"ElasticSearch: Java\",\r\n \"ElasticSeach provides Java API, thus it executes all operations \"\r\n + \"asynchronously by using client object..\",\r\n new Date(), new String[] { \"elasticsearch\" }, \"Hüseyin Akdoğan\"))\r\n .execute().actionGet();\r\n //\r\n // client.prepareIndex(\"kodcucom\", \"article\", \"2\")\r\n // .setSource(putJsonDocument(\"Java Web Application and ElasticSearch (Video)\",\r\n // \"Today, here I am for exemplifying the usage of ElasticSearch which is an open source, distributed \" +\r\n // \"and scalable full text search engine and a data analysis tool in a Java web application.\",\r\n // new Date(),\r\n // new String[]{\"elasticsearch\"},\r\n // \"Hüseyin Akdoğan\")).execute().actionGet();\r\n\r\n getDocument(client, \"java-example\", \"_doc\", \"1\");\r\n\r\n // updateDocument(client, \"java-example\", \"article\", \"1\", \"title\", \"ElasticSearch: Java API\");\r\n //getDocument(client, \"java-example\", \"_doc\", \"1\");\r\n // updateDocument(client, \"kodcucom\", \"article\", \"1\", \"tags\", new String[]{\"bigdata\"});\r\n\r\n // getDocument(client, \"kodcucom\", \"article\", \"1\");\r\n\r\n //searchDocument(client, \"cars\", \"_doc\", \"title\", \"honda is a korean company\");\r\n\r\n // deleteDocument(client, \"kodcucom\", \"article\", \"1\");\r\n\r\n client.close();\r\n }", "@Override\n public void reindexImpl()\n {\n List<StoreRef> storeRefs = nodeService.getStores();\n int count = 0;\n for (StoreRef storeRef : storeRefs)\n {\n // prompt the FTS reindexing\n if (!ftsIndexerCalled)\n {\n ftsIndexer.requiresIndex(storeRef);\n }\n // reindex missing content\n count += reindexMissingContent(storeRef);\n // check if we have to break out\n if (isShuttingDown())\n {\n break;\n }\n }\n \n // The FTS indexer only needs to be prompted once\n ftsIndexerCalled = true;\n\n // done\n if (logger.isDebugEnabled())\n {\n logger.debug(\"Missing content indexing touched \" + count + \" content nodes\");\n }\n }", "@Ignore \n @Test\n public void testPutMappingToIndex() {\n System.out.println(\"putMappingToIndex\");\n \n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n String indexName = \"datastore_100_1_data_event_yearmonth_000000_1\";\n String indexType = \"AAA666_type\";\n \n try\n { \n ESUtil.createIndexWithoutType(client, indexName);\n \n DataobjectType dataobjectType = Util.getDataobjectTypeByIndexTypeName(platformEm, indexType);\n\n XContentBuilder typeMapping = ESUtil.createTypeMapping(platformEm, dataobjectType, true);\n \n ESUtil.putMappingToIndex(client, indexName, indexType, typeMapping);\n }\n catch(Exception e)\n {\n System.out.print(\" failed! e=\"+e);\n }\n }", "private void indexUpdates(UpdateQueryResult updates) {\r\n Iterator<HashMap<String, String>> i = updates.getIterator();\r\n while (i.hasNext()) {\r\n HashMap<String, String> values = i.next();\r\n \r\n \t// during index default solr fields are indexed separately\r\n \tString articleId = values.get(\"KnowledgeArticleId\");\r\n \tString title = values.get(\"Title\");\r\n \tvalues.remove(\"Title\");\r\n \tString summary = values.get(\"Summary\");\r\n \tvalues.remove(\"Summary\");\r\n \t\r\n \ttry {\r\n \t\tif (UtilityLib.notEmpty(articleId) && UtilityLib.notEmpty(title)) {\r\n \t\t\t// index sObject\r\n \t\t\t// default fields every index must have\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tContent c = new Content();\r\n \t\t\tc.setKey(articleId);\r\n \t\t\tsb.setLength(0);\r\n \t\t\tsb.append(summary);\r\n \t\t\tc.setData(sb.toString().getBytes());\r\n \t\t\tc.addMetadata(\"Content-Type\", \"text/html\");\r\n \t\t\tc.addMetadata(\"title\", title);\r\n \t\t\t\r\n \t\t\tLOG.debug(\"Salesforce Crawler: Indexing articleId=\"+articleId+\" title=\"+title+\" summary=\"+summary);\r\n \t\t\t\r\n \t\t\t// index articleType specific fields\r\n \t\t\tfor (Entry<String, String> entry : values.entrySet()) {\r\n \t\t\t\tc.addMetadata(entry.getKey(), entry.getValue().toString());\r\n \t\t\t\tif (!entry.getKey().equals(\"Attachment__Body__s\")) {\r\n \t\t\t\t\tLOG.debug(\"Salesforce Crawler: Indexing field key=\"+entry.getKey()+\" value=\"+entry.getValue().toString());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tstate.getProcessor().process(c);\r\n \t\t}\r\n } catch (Exception e) {\r\n \tUtilityLib.errorException(LOG, e);\r\n \tstate.getStatus().incrementCounter(Counter.Failed);\r\n }\r\n }\r\n }", "void indexReset();", "public static void main(String[] args) throws IOException{\n \n List<List<String>> results;\n String query = \"ADD QUERY OR CATEGORY FOR SEARCH\";\n \n //ADD USER ID WHO SEARCHES\n Long userId = 1;\n PersonalizedSearch searchObj = new PersonalizedSearch();\n \n final CredentialsProvider credsProvider = new BasicCredentialsProvider();\n credsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(\"elastic\",\"elastic\"));\n \n \n RestHighLevelClient client = new RestHighLevelClient(\n RestClient.builder(\n new HttpHost(\"localhost\",9200),\n new HttpHost(\"localhost\",9201))\n .setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {\n @Override\n public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder hacb) {\n return hacb.setDefaultCredentialsProvider(credsProvider);\n }\n }));\n \n /**\n * ---------COMMENT OUT ONE OF THE FOLLOWING TO DO A PERSONALIZED SEARCH FOR A SIGNED IN OR/AND AN ANONYMOUS USER--------\n */\n\n System.out.println(\"Starting collecting queryless/queryfull submissions...\");\n System.out.println(\"\");\n// searchObj.performQuerylessSearchWithPersonalization(client);\n// searchObj.performQueryfullSearchWithPersonalization(client);\n// results = searchObj.performPharm24PersonalizedQueryfullSearch(client, userId, query);\n// results = searchObj.performPharm24PersonalizedQuerylessSearch(client, userId, query);\n \n for(int i=0; i<results.size(); i++){\n for(int j = 0; j<results.get(i).size();j++){\n System.out.println(results.get(i).get(j));\n }\n System.out.println(\"-------RERANKED---------\");\n }\n\n System.out.println(\"\");\n System.out.println(\"I\\'m done!\");\n \n \n }", "@Ignore\n @Test\n public void testSearchDocument() {\n System.out.println(\"searchDocument\");\n Client client = null;\n String indexName = \"\";\n String queryStr = \"\";\n String filterStr = \"\";\n int maxExpectedHits = 0;\n List expResult = null;\n // List result = ESUtil.searchDocument(client, indexName, queryStr, filterStr, maxExpectedHits);\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 }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public interface PaymentSettingsSearchRepository extends ElasticsearchRepository<PaymentSettings, Long> {\n}", "@Ignore \n @Test\n public void testIndexDocument() {\n System.out.println(\"IndexDocument\");\n Client client = null;\n String indexName = \"\";\n String indexTypeName = \"\";\n String docId = \"\";\n Map<String, Object> jsonMap = null;\n long expResult = 0L;\n //long result = ESUtil.indexDocument(client, indexName, indexTypeName, docId, jsonMap);\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 void forceUpdateSearchIndexes() throws InterruptedException {\n\t getFullTextEntityManager().createIndexer().startAndWait();\n\t}", "public void refresh() {\n getIndexOperations().refresh();\n }", "public interface TicketSearchRepository extends ElasticsearchRepository<Ticket, Long> {\n}", "public interface PaymentTransferHistorySearchRepository extends ElasticsearchRepository<PaymentTransferHistory, Long> {\n}", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "@Override\n @Secured(SecurityRoles.ADMINISTRATOR)\n public void reindex() {\n revisionDao.deleteAll();\n // OK, launches a new indexation\n indexFromLatest();\n }", "public interface HouseUpdateSearchRepository extends ElasticsearchRepository<HouseUpdate, Long> {\n}", "public interface HrDepartmentHeadSetupSearchRepository extends ElasticsearchRepository<HrDepartmentHeadSetup, Long> {\n}", "public static Result reindexAllThesaurus() {\n\n\t\ttry {\n\t\t\tPromise<Boolean> p = Promise.promise(() -> ElasticReindexer.reindexAllDbThesaurus());\n\t\t} catch(Exception e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t\treturn internalServerError(e.getMessage());\n\t\t}\n\n\t\treturn ok();\n\t}", "@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}", "@Override\n\tpublic void clearIndex(String indexName) {\n\t\t\n\t}", "public interface OrderEntitySearchRepository extends ElasticsearchRepository<OrderEntity, Long> {\n}", "public interface WalletWithdrawalSearchRepository extends ElasticsearchRepository<WalletWithdrawal, Long> {\n}", "@Repository\npublic interface ArticleRepository extends ElasticsearchRepository<Article, Integer> {\n\n}", "private RequestResponse handleIndexRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n ContentDocument contentDocument = new RequestToContentDocument().convert(request);\n return this.searchService.index(core, contentDocument);\n }", "public interface ReportSearchRepository extends ElasticsearchRepository<Report, Long> {\n}", "public interface ActivitySearchRepository extends ElasticsearchRepository<Activity, Long> {\n}", "@Timed\n @Async\n Future<Integer> reindexSearchDatabase();", "public interface ElasticSearchClientService {\n\n public void add(TodoItem todoItem);\n\n public String search(String searchString);\n\n public void update(String id, TodoItem todoItem);\n\n public void delete(String id);\n\n}", "public interface ChemicalsSearchRepository extends ElasticsearchRepository<Chemicals, Long> {\n}", "public interface ServiceAssuranceSearchRepository extends ElasticsearchRepository<ServiceAssurance, Long> {\n}", "public interface ResulteventSearchRepository extends ElasticsearchRepository<Resultevent, Long> {\n}", "public synchronized void recreateIndex()\n throws InterruptedException, CancellationException, ExecutionException, IOException, IndexServiceException {\n // Clear index first\n clear();\n recreateService(IndexRecreateObject.Service.Groups);\n recreateService(IndexRecreateObject.Service.Acl);\n recreateService(IndexRecreateObject.Service.Themes);\n recreateService(IndexRecreateObject.Service.Series);\n recreateService(IndexRecreateObject.Service.Scheduler);\n recreateService(IndexRecreateObject.Service.Workflow);\n recreateService(IndexRecreateObject.Service.AssetManager);\n recreateService(IndexRecreateObject.Service.Comments);\n }", "public interface AssigsSearchRepository extends ElasticsearchRepository<Assigs, Long> {\n}", "public interface RelatedDocumentSearchRepository extends ElasticsearchRepository<RelatedDocument, Long> {\n}", "public interface ChatMessageSearchRepository extends ElasticsearchRepository<ChatMessage, Long> {\n}", "protected final void exectute(JsonObject query) throws IOException {\n\n\t\tBuilder builder;\n\t\tJestResult jr;\n\t\t//System.out.println(\"------> exist \");\n\t\tif(CLIENT==null)\n\t\t\tCLIENT = ElasticClient.getElasticClient(((SimpleJsonStringConfig) mapConfig.get(HOST)).getValue())\n\t\t\t\t\t\t\t\t\t\t.getClient();\n\t\t\n\t\tbuilder = new Search.Builder(query.toString());\n\t\t((SimpleIndexConfig) mapConfig.get(INDEX)).process(builder);\n\t\tjr = CLIENT.execute(builder.build());\n\t\t//System.out.println(jr.getJsonObject());\n\t\tif(jr.getJsonObject().has(\"error\")){\n\t\t\tSystem.out.println(\"Exception ~ syntax elastic error : verifie your query\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(\"----------------------------------------------------\");\n//\t\tSystem.out.println(jr.getJsonObject());\n//\t\tSystem.out.println(\"----------------------------------------------------\");\n\t\telasticReturn = ElasticReturn.getElasticReturn(jr.getJsonObject());\n//\t\tSystem.out.println(elasticReturn);\n//\t\tSystem.out.println(\"----------------------------------------------------\");\n\n\t}", "public void clear() {\n index.clear();\n }", "public interface OrderComponentSearchRepository extends ElasticsearchRepository<OrderComponent, Long> {\n}", "public interface DepositSearchRepository extends ElasticsearchRepository<Deposit, Long> {\n}", "public interface VeeResponseSearchRepository extends ElasticsearchRepository<VeeResponse, Long> {\n}", "protected SearchSearchResponse doNewSearch(QueryContext queryContext) throws Exception {\n\t\t\n\t\tBooleanQuery query = _queryBuilder.buildSearchQuery(queryContext);\n\t\t\n\t\tBooleanQuery rescoreQuery = \n\t\t\t\t_queryBuilder.buildRescoreQuery(queryContext);\n\t\t\n\t\tList<Aggregation> aggregations = getAggregations(queryContext);\n\n\t\treturn execute(queryContext, query, rescoreQuery, aggregations);\n\t}", "public void testAdvancedQuery() {\n\t\t//manager.advancedQuery(ElasticIndex.analyzed, \"metropolitan areas\", \"sports clubs\");\n\t\t//manager.advancedQuery(ElasticIndex.analyzed, \"\", \"Award\");\n\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"american actor\", \"list of movies starring Sean Connery\");\n//\tmanager.categorySearch(\"Sportspeople\", \"tennis\",ElasticIndex.analyzed,30);\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"Broadway musicals\", \"Grammy Award\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"musical movies\", \"Tony Award\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"Top level football leagues\", \"teams\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"american movies\", \"directed by Woody Allen\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"United states\", \"professional sports teams\");\n\t\t//manager.advancedQuery(\"musical movies\", \"tony award\");\n\t\t//manager.advancedQuery(\"grammy\", \"best album in 2012\"); \n\t\t//manager.advancedQuery(\"american movies\", \"directed by Woody Allen\"); \n\t\t//Canceled manager.advancedQuery(\"tennis\", \"international players\"); \n\t\t// canceled manager.advancedQuery(\"tennis\", \"french open\"); \n\t\t// canceled manager.advancedQuery(\"film movie\", \"1933\"); \n//\t\tmanager.advancedQuery(\"United states\", \"professional sports teams \");\n//\t\t manager.advancedQuery(\"computer games\", \"developed by Ubisoft\");\n//\t\tmanager.advancedQuery(\"movies\", \"academy award nominations\");\n //manager.advancedQuery(\"movies\", \"starring Dustin Hoffman\");\n // manager.advancedQuery(\"movies\", \"best costume design\");\n // manager.advancedQuery(\"concert tours\", \"england\");\n // manager.advancedQuery(\"sport\", \"Francesco\");\n\t\t//System.out.println(\"******* advanced query *******\");\n\t\t//manager.advancedQuery(\"sportspeople\", \"tennis\");\n//\t\tmanager.advancedQuery(ElasticIndex.analyzed, \"Broadway musicals\", \"Grammy Award\");\n //System.out.println(\"*****************************\");\n\n\n\t\t\n\t\t//manager.advancedQuery(\"football\", \"italian championship\");\n\t\t//manager.advancedQuery(\"american basketball\", \"team\");\n\t\t //manager.advancedQuery(\"Goya Award\", \"Winner and nominees from FRA\");\n\t\t//manager.advancedQuery(\"films\", \"american comedy \");\n\t\t//manager.advancedQuery(\"films\", \"american Adventure directed by James P. Hogan\");\n\t\t//manager.advancedQuery(\"NCAA Division\", \"american universities in Arkansas\");\n\t\t//manager.advancedQuery(\"Academy award\", \"winners and nominees in acting in 2011\");\n\t\t//manager.advancedQuery(\"canadian soccer\", \"Alain Rochat position \");\n\n\t}", "public interface ServicePriceSearchRepository extends ElasticsearchRepository<ServicePrice, Long> {\n}", "public void onIndexReset();", "public void test_plugin() throws Exception {\n assertEquals(1, runner.getNodeSize());\n assertNotNull(runner.getNode(0));\n// assertNotNull(runner.getNode(1));\n// assertNotNull(runner.getNode(2));\n assertNotNull(runner.getNode(\"Node 1\"));\n// assertNotNull(runner.getNode(\"Node 2\"));\n// assertNotNull(runner.getNode(\"Node 3\"));\n assertNull(runner.getNode(\"Node 4\"));\n assertNotNull(runner.node());\n\n assertNotNull(runner.client());\n\n // check if a master node exists\n// assertNotNull(runner.masterNode());\n// assertNotNull(runner.nonMasterNode());\n// assertFalse(runner.masterNode() == runner.nonMasterNode());\n\n // check if a cluster service exists\n assertNotNull(runner.clusterService());\n\n final String index = \"test_index\";\n final String type = \"test_type\";\n\n // create an index\n runner.createIndex(index, null);\n runner.ensureYellow(index);\n\n // create a mapping\n final XContentBuilder mappingBuilder = XContentFactory.jsonBuilder()//\n .startObject()//\n .startObject(type)//\n .startObject(\"properties\")//\n\n // id\n .startObject(\"id\")//\n .field(\"type\", \"string\")//\n .field(\"index\", \"not_analyzed\")//\n .endObject()//\n\n // msg\n .startObject(\"msg\")//\n .field(\"type\", \"string\")//\n .endObject()//\n\n // order\n .startObject(\"order\")//\n .field(\"type\", \"long\")//\n .endObject()//\n\n // @timestamp\n .startObject(\"@timestamp\")//\n .field(\"type\", \"date\")//\n .endObject()//\n\n .endObject()//\n .endObject()//\n .endObject();\n runner.createMapping(index, type, mappingBuilder);\n\n if (!runner.indexExists(index)) {\n fail();\n }\n\n // create 1000 documents\n for (int i = 1; i <= 1000; i++) {\n final IndexResponse indexResponse1 = runner.insert(index, type,\n String.valueOf(i), \"{\\\"id\\\":\\\"\" + i + \"\\\",\\\"msg\\\":\\\"test \"\n + i + \"\\\",\\\"order\\\":\" + i\n + \",\\\"@timestamp\\\":\\\"2000-01-01T00:00:00\\\"}\");\n assertTrue(indexResponse1.isCreated());\n }\n runner.refresh();\n\n final Node node = runner.node();\n\n // update alias\n final String alias = index + \"_alias\";\n {\n final GetAliasesResponse aliasesResponse = runner.getAlias(alias);\n assertNull(aliasesResponse.getAliases().get(alias));\n }\n\n {\n runner.updateAlias(alias, new String[] { index }, null);\n runner.flush();\n final GetAliasesResponse aliasesResponse = runner.getAlias(alias);\n assertEquals(1, aliasesResponse.getAliases().size());\n assertEquals(1, aliasesResponse.getAliases().get(index).size());\n assertEquals(alias, aliasesResponse.getAliases().get(index).get(0)\n .alias());\n }\n\n {\n runner.updateAlias(alias, null, new String[] { index });\n final GetAliasesResponse aliasesResponse = runner.getAlias(alias);\n assertNull(aliasesResponse.getAliases().get(alias));\n }\n\n // search 1000 documents\n {\n final SearchResponse searchResponse = runner.search(index, type,\n null, null, 0, 10);\n assertEquals(1000, searchResponse.getHits().getTotalHits());\n assertEquals(10, searchResponse.getHits().hits().length);\n }\n\n {\n final SearchResponse searchResponse = runner.search(index, type,\n QueryBuilders.matchAllQuery(),\n SortBuilders.fieldSort(\"id\"), 0, 10);\n assertEquals(1000, searchResponse.getHits().getTotalHits());\n assertEquals(10, searchResponse.getHits().hits().length);\n }\n\n {\n final SearchResponse searchResponse = runner.count(index, type);\n assertEquals(1000, searchResponse.getHits().getTotalHits());\n }\n\n // delete 1 document\n runner.delete(index, type, String.valueOf(1));\n runner.flush();\n\n {\n final SearchResponse searchResponse = runner.search(index, type,\n null, null, 0, 10);\n assertEquals(999, searchResponse.getHits().getTotalHits());\n assertEquals(10, searchResponse.getHits().hits().length);\n }\n\n // upgrade\n runner.upgrade();\n\n // transport client\n final Settings transportClientSettings = Settings.settingsBuilder()\n .put(\"cluster.name\", runner.getClusterName()).build();\n final int port = runner.node().settings()\n .getAsInt(\"transport.tcp.port\", 9300);\n try (TransportClient client = TransportClient.builder()\n .settings(transportClientSettings).build()) {\n client.addTransportAddress(new InetSocketTransportAddress(\n new InetSocketAddress(\"localhost\", port)));\n final SearchResponse searchResponse = client.prepareSearch(index)\n .setTypes(type).setQuery(QueryBuilders.matchAllQuery())\n .execute().actionGet();\n assertEquals(999, searchResponse.getHits().getTotalHits());\n assertEquals(10, searchResponse.getHits().hits().length);\n }\n\n\n // close 1 node\n final Node node1 = runner.node();\n node1.close();\n\n assertTrue(runner.getNode(0).isClosed());\n assertTrue(runner.startNode(0));\n }", "public void close() {\n\t\t\n\t\ttry {\n\t\t\tindexWriter.optimize();\n\t\t\t\n\t\t\tindexWriter.close();\n\t\t\t\n\t\t\tIndexSearcher = new IndexSearcher(idx);\n\t\t\t\n\t\t} catch (CorruptIndexException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static Result reindexAllResources() {\n\n\t\ttry {\n\t\t\tPromise<Boolean> p = Promise.promise(() -> ElasticReindexer.reindexAllDbDocuments());\n\t\t} catch(Exception e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t\treturn internalServerError(e.getMessage());\n\t\t}\n\n\t\treturn ok();\n\t}", "void initiateRemoveIndexes(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "public interface OrderConsigneeSearchRepository extends ElasticsearchRepository<OrderConsignee, Long> {\n}", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "private void delete(String indexName, String typeName, QueryBuilder query) {\n SearchRequestBuilder searchRequestBuilder = nodeClient.prepareSearch(indexName).setTypes(typeName).setQuery(query)\n .setFetchSource(false);\n searchRequestBuilder.setFrom(0).setSize(1000);\n SearchResponse response = searchRequestBuilder.execute().actionGet();\n\n while (somethingFound(response)) {\n BulkRequestBuilder bulkRequestBuilder = nodeClient.prepareBulk().setRefreshPolicy(RefreshPolicy.IMMEDIATE);\n\n for (int i = 0; i < response.getHits().getHits().length; i++) {\n String id = response.getHits().getHits()[i].getId();\n bulkRequestBuilder.add(nodeClient.prepareDelete(indexName, typeName, id));\n }\n\n bulkRequestBuilder.execute().actionGet();\n\n if (response.getHits().getTotalHits() == response.getHits().getHits().length) {\n response = null;\n } else {\n response = searchRequestBuilder.execute().actionGet();\n }\n }\n }", "public interface PerCompanySearchRepository extends ElasticsearchRepository<PerCompany, Long> {\n}", "public interface MedCheckDetSearchRepository extends ElasticsearchRepository<MedCheckDet, Long> {\n}", "public interface LandmarkRepository extends ElasticsearchRepository<Landmark, String> {\n\n List<Landmark> findByName(String name);\n\n}", "public interface OuderSearchRepository extends ElasticsearchRepository<Ouder, Long> {\n}", "public void search(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, String query, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath, String queryId, String queryDescription) {\n String[] originalQueryTerms = query.split(\" \");\n String originQuery = query;\n docsResults = new HashMap<>();\n parser = new Parse(withStemming, saveInPath, saveInPath);\n HashSet<String> docsOfChosenCities = new HashSet<>();\n query = \"\" + query + queryDescription;\n HashMap<String, Integer> queryTerms = parser.parseQuery(query);\n HashMap<String, ArrayList<Integer>> dictionary = indexer.getDictionary();\n if (!withStemming){\n setDocsInfo(saveInPath + \"\\\\docsInformation.txt\");\n }\n else{\n setDocsInfo(saveInPath + \"\\\\docsInformation_stemming.txt\");\n }\n\n\n //add semantic words of each term in query to 'queryTerms'\n if(withSemantic) {\n HashMap<String,ArrayList<String>> semanticWords = ws.connectToApi(originQuery);\n }\n\n //give an ID to query if it's a regular query (not queries file)\n if(queryId.equals(\"\")){\n queryId = \"\" + Searcher.queryID;\n Searcher.queryID++;\n }\n\n String postingDir;\n if (!withStemming) {\n postingDir = \"\\\\indexResults\\\\postingFiles\";\n } else {\n postingDir = \"\\\\indexResults\\\\postingFiles_Stemming\";\n }\n int pointer = 0;\n\n //find docs that contain the terms in the query in their text\n HashMap<String, Integer> queryTermsIgnoreCase = new HashMap<>();\n for (String term : queryTerms.keySet()) {\n String originTerm = term;\n if (!dictionary.containsKey(term.toUpperCase()) && !dictionary.containsKey(term.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(term.toLowerCase())){\n term = term.toLowerCase();\n }\n else {\n term = term.toUpperCase();\n }\n queryTermsIgnoreCase.put(term,queryTerms.get(originTerm));\n pointer = dictionary.get(term).get(2);\n String chunk = (\"\" + term.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsResults'\n if(line != null) {\n findDocsFromLine(line, term);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their text\n for (String cityTerm : chosenCities) {\n if (!dictionary.containsKey(cityTerm) && !dictionary.containsKey(cityTerm.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(cityTerm.toLowerCase())){\n cityTerm = cityTerm.toLowerCase();\n }\n pointer = dictionary.get(cityTerm).get(2);\n // char chunk = indexer.classifyToPosting(term).charAt(0);\n String chunk = (\"\" + cityTerm.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(0, line.indexOf(\"[\") - 1); //get 'docsListStr'\n String[] docsArr = docs.split(\";\");\n for (String docInfo : docsArr) {\n String doc = docInfo.substring(0, docInfo.indexOf(\": \"));\n while(doc.charAt(0) == ' '){\n doc = doc.substring(1);\n }\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their city tag\n if(!chosenCities.isEmpty()){\n for (String cityDicRec: chosenCities) {\n //get pointer to posting from cityDictionary\n try {\n pointer = cityIndexer.getCitiesDictionary().get(cityDicRec);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + \"\\\\cityIndexResults\" + \"\\\\posting_city\" + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(line.indexOf(\"[\") + 1, line.indexOf(\"]\")); //get 'docsListStr'\n String[] docsArr = docs.split(\"; \");\n for (String doc : docsArr) {\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n ranker.rank(docsResults, docsOfChosenCities, queryTermsIgnoreCase, dictionary, docsInfo,entities, queryId);\n }", "public interface StockTakingItemSearchRepository extends ElasticsearchRepository<StockTakingItem, Long> {\n}", "public interface ContentSearchRepository extends ElasticsearchRepository<Content, Long> {\n}", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "public interface OptionTypeSearchRepository extends ElasticsearchRepository<OptionType, Long> {\n}", "public interface MetroSearchRepository extends ElasticsearchRepository<Metro, Long> {\n}", "public interface SearchTypeSearchRepository extends ElasticsearchRepository<SearchType, Long> {\n}", "public interface EvDiagramSearchRepository extends ElasticsearchRepository<EvDiagram, Long> {\n}", "public interface FollowSearchRepository extends ElasticsearchRepository<Follow, Long> {\n}", "public interface ImageManagerSearchRepository extends ElasticsearchRepository<ImageManager, Long> {\n}", "private IndexerModelEvent refreshIndex(final String indexName) throws InterruptedException, KeeperException {\n try {\n IndexDefinitionImpl index = loadIndex(indexName);\n index.makeImmutable();\n final boolean isNew = !indexes.containsKey(indexName);\n indexes.put(indexName, index);\n \n return new IndexerModelEvent(isNew ? IndexerModelEventType.INDEX_ADDED : IndexerModelEventType.INDEX_UPDATED, indexName);\n \n } catch (IndexNotFoundException e) {\n indexes.remove(indexName);\n \n return new IndexerModelEvent(IndexerModelEventType.INDEX_REMOVED, indexName);\n }\n }", "public void close() throws IndexerException {\n\t\t//TODO\n\t\t\n\t}", "public ElasticSearchWrapper(String index, String type, String serverIP, String port) {\n\t\tthis.index = index;\n\t\tthis.type = type;\n\t\tthis.subdocType = type + \"1\";\n\n\t\t// esUrl = \"http://75.101.244.195:8081/\" + index + \"/\" + type + \"/\";\n\t\tesInsertDeleteUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/\" + type + \"/\";\n\t\tesInsertDeleteSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\"\n\t\t\t\t+ index + \"/\" + subdocType + \"/\";\n\t\tesSearchUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/_search\";\n\t\tesSearchSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/\" + subdocType + \"/_search\";\n\t\tesIndexUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\";\n\t\tesIndexTypeUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/\";\n\t\tesIndexTypeSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/\" + subdocType + \"/\";\n\t\tesMapping = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/_mapping\";\n\t\tesMappingSubdoc = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ subdocType + \"/_mapping\";\n\t\tesScanUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ type + \"/_search?search_type=scan&scroll=2m&size=\";\n\t\tesScanSubdocUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index + \"/\"\n\t\t\t\t+ subdocType + \"/_search?search_type=scan&scroll=2m&size=\";\n\t\tesScrollUrl = \"http://\" + serverIP + \":\" + port\n\t\t\t\t+ \"/_search/scroll?scroll=2m&scroll_id=\";\n\t\tesRefreshIndexUrl = \"http://\" + serverIP + \":\" + port + \"/\" + index\n\t\t\t\t+ \"/_refresh\";\n\t}", "public interface DashboardSearchRepository extends ElasticsearchRepository<Dashboard, Long> {\n}", "public interface TemporadaSearchRepository extends ElasticsearchRepository<Temporada, Long> {\n}", "@Test\n public void indexIsUsedForQueryWhenRegionIsEmpty() {\n try {\n CacheUtils.getCache();\n isInitDone = false;\n Query q =\n qs.newQuery(\"SELECT DISTINCT * FROM \" + SEPARATOR + \"portfolio where status = 'active'\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n\n @Override\n public void afterIndexLookup(Collection coll) {\n indexUsed = true;\n }\n });\n SelectResults set = (SelectResults) q.execute();\n if (set.size() == 0 || !indexUsed) {\n fail(\"Either Size of the result set is zero or Index is not used \");\n }\n indexUsed = false;\n\n region.clear();\n set = (SelectResults) q.execute();\n if (set.size() != 0 || !indexUsed) {\n fail(\"Either Size of the result set is not zero or Index is not used \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.toString());\n } finally {\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }", "public interface PermissionSearchRepository extends ElasticsearchRepository<Permission, Long> {\n}", "private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public interface DataStateSearchRepository extends ElasticsearchRepository<DataState, Long> {\n}", "private void listAllIndices(Client client){\n\t\t\ttry {\n\t\t\t\t String[] indexList = client.admin().cluster().prepareState().execute().actionGet().getState().getMetaData().concreteAllIndices();\n\t\t\t\t System.out.println(\"Index List Size size : \" + indexList.length);\n\t\t\t\t for (String index : indexList) {\n\t\t\t\t\t System.out.println(\"Index Name \" + index);\n\t\t\t\t\t deleteIndex(client,index);\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t }", "public interface CmsSyllabusSearchRepository extends ElasticsearchRepository<CmsSyllabus, Long> {\n}", "private SolrIndexer()\n {\n fieldMap = new HashMap<String, String[]>();\n transMapMap = new HashMap<String, Map<String, String>>();\n customMethodMap = new HashMap<String, Method>();\n customMixinMap = new HashMap<String, SolrIndexerMixin>();\n indexDate = new Date();\n }", "public interface PlaybookcomponentSearchRepository extends ElasticsearchRepository<Playbookcomponent, Long> {\n}", "public Indexer() {\n }", "public interface ElasticsearchRepository<T, ID extends Serializable> {\n\n /**\n * Searches for records of an entity in elasticsearch using pagination\n * @param pageable the pagination information to request\n * @param query the string query to use (see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-query-string-query.html)\n * @return the paginated list of results\n */\n Page<T> search(Pageable pageable, String query);\n\n /**\n * Searches for records of an entity in elasticsearch using pagination\n * @param pageable the pagination information to request\n * @param query the QueryBuilder query to use (see https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-query-builders.html)\n * @return the paginated list of results\n */\n Page<T> search(Pageable pageable, QueryBuilder query);\n\n /**\n * Searches and aggregates the documents according to the given queries and aggregations\n * Note that this is the raw result from the REST ES client lib : entities are not deserialized\n * @param pageable The page information of the search\n * @param query The search query to use\n * @param aggregation The aggregation to use\n * @return The result of the query\n */\n SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);\n\n /**\n * Searches and aggregates the documents according to the given queries and aggregations\n * Note that this is the raw result from the REST ES client lib : entities are not deserialized\n * @param pageable The page information of the search\n * @param query The search query to use\n * @param aggregations The aggregations to use\n * @return The result of the query\n */\n SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);\n\n /**\n * Searches for records of an entity in elasticsearch using pagination, filters and aggregations\n * @param pageable the pagination information to request\n * @param jsonQuery the Query as Json (see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl.html)\n * @return the Result object with hits and aggregations\n * @deprecated This helper is here to keep retro compatibility with search based on the low level rest API. It will be removed in the next release.\n */\n @Deprecated\n Result<T> searchComplex(Pageable pageable, String jsonQuery);\n\n /**\n * Retrieves an entity by its id.\n *\n * @param id must not be {@literal null}.\n * @return the entity with the given id or {@literal null} if none found\n * @throws IllegalArgumentException if {@code id} is {@literal null}\n */\n T findOne(ID id);\n\n /**\n * Returns whether an entity with the given id exists.\n *\n * @param id must not be {@literal null}.\n * @return true if an entity with the given id exists, {@literal false} otherwise\n * @throws IllegalArgumentException if {@code id} is {@literal null}\n */\n boolean exists(ID id);\n\n /**\n * Returns the number of entities available.\n *\n * @return the number of entities\n */\n long count();\n\n /**\n * Saves a given entity. Use the returned instance for further operations as the save operation might have changed the\n * entity instance completely.\n *\n * @param entity The entity to save\n * @param <S> The entity that inherits T\n * @return the saved entity\n */\n <S extends T> S save(S entity);\n\n /**\n * Saves all given entities.\n *\n * @param entities The list of entities to save\n * @param <S> The entity that inherits T\n * @return the saved entities\n * @throws IllegalArgumentException in case the given entity is {@literal null}.\n */\n <S extends T> Iterable<S> save(Iterable<S> entities);\n\n /**\n * Deletes the entity with the given id.\n *\n * @param id must not be {@literal null}.\n * @throws IllegalArgumentException in case the given {@code id} is {@literal null}\n */\n void delete(ID id);\n\n /**\n * Deletes a given entity.\n *\n * @param entity The entity to delete\n * @throws IllegalArgumentException in case the given entity is {@literal null}.\n */\n void delete(T entity);\n\n /**\n * Deletes the given entities.\n *\n * @param entities The list of entities to delete\n * @throws IllegalArgumentException in case the given {@link Iterable} is {@literal null}.\n */\n void delete(Iterable<? extends T> entities);\n\n /**\n * Deletes all entities managed by the repository.\n */\n void deleteAll();\n\n /**\n * The Document type indexed by this repository\n * @return the class of the document\n */\n Class<T> getIndexedClass();\n\n}", "public interface BibliographicEntitySearchRepository extends ElasticsearchRepository<BibliographicEntity, Long> {\n}", "@Test\n public void bulkUploadTest() throws IOException {\n\n JsonArray result = searchService.matchAllQuery(getIndexes(), 10);\n assertEquals(6, result.size());\n }", "public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}", "public interface SaldoAppSearchRepository extends ElasticsearchRepository<SaldoApp, Long> {\n}", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "private void resetCurrentMemoryIndex() throws Exception {\n // by using the globalParameters, the memory index can startup counters etc.\n // we set the documentCount to ensure all documents are given a unique number.\n tupleFlowParameters.getJSON().set(\"documentNumberOffset\", this.globalDocumentCount);\n currentMemoryIndex = new MemoryIndex(tupleFlowParameters);\n }", "public interface BlogRepository extends ElasticsearchRepository<Blog, String>{\n\n /**\n * 分页查询博客(去重)\n * @param title\n * @param tag\n * @param content\n * @return\n */\n Page<Blog> findDistinctBlogByTitleContainingOrTagContainingOrContentContaining(String title, String tag, String content, Pageable pageable);\n\n}", "@Test\n public void testIndexMaintenanceWithHeterogenousObjects() throws Exception {\n DefaultQueryService.TEST_QUERY_HETEROGENEOUS_OBJECTS = true;\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n idSet.clear();\n Portfolio p = new Portfolio(4);\n region.put(\"4\", p);\n idSet.add(\"\" + p.getID());\n p = new Portfolio(5);\n region.put(\"5\", p);\n idSet.add(\"\" + p.getID());\n region.put(\"6\", 6);\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n RangeIndex ri = (RangeIndex) i1;\n assertEquals(2, ri.valueToEntriesMap.size());\n Iterator itr = ri.valueToEntriesMap.values().iterator();\n while (itr.hasNext()) {\n RangeIndex.RegionEntryToValuesMap re2ValMap = (RangeIndex.RegionEntryToValuesMap) itr.next();\n assertEquals(1, re2ValMap.map.size());\n Object obj = re2ValMap.map.values().iterator().next();\n assertFalse(obj instanceof Collection);\n assertTrue(obj instanceof Portfolio);\n Portfolio pf = (Portfolio) obj;\n assertTrue(idSet.contains(String.valueOf(pf.getID())));\n }\n assertEquals(1, ri.undefinedMappedEntries.map.size());\n Map.Entry entry = (Map.Entry) ri.undefinedMappedEntries.map.entrySet().iterator().next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n assertTrue(entry.getValue().equals(6));\n\n region.put(\"7\", 7);\n idSet.add(7);\n assertEquals(2, ri.undefinedMappedEntries.map.size());\n itr = ri.undefinedMappedEntries.map.entrySet().iterator();\n while (itr.hasNext()) {\n entry = (Map.Entry) itr.next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n idSet.contains(entry.getValue());\n }\n\n region.remove(\"7\");\n idSet.remove(7);\n Index i2 =\n qs.createIndex(\"indx2\", IndexType.FUNCTIONAL, \"pf.pkid\", SEPARATOR + \"portfolio1 pf\");\n ri = (RangeIndex) i2;\n assertEquals(2, ri.valueToEntriesMap.size());\n itr = ri.valueToEntriesMap.values().iterator();\n while (itr.hasNext()) {\n RangeIndex.RegionEntryToValuesMap re2ValMap = (RangeIndex.RegionEntryToValuesMap) itr.next();\n assertEquals(1, re2ValMap.map.size());\n Object obj = re2ValMap.map.values().iterator().next();\n assertFalse(obj instanceof Collection);\n assertTrue(obj instanceof Portfolio);\n Portfolio pf = (Portfolio) obj;\n assertTrue(idSet.contains(String.valueOf(pf.getID())));\n }\n assertEquals(1, ri.undefinedMappedEntries.map.size());\n entry = (Map.Entry) ri.undefinedMappedEntries.map.entrySet().iterator().next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n assertTrue(entry.getValue().equals(6));\n\n region.put(\"7\", 7);\n idSet.add(7);\n assertEquals(2, ri.undefinedMappedEntries.map.size());\n itr = ri.undefinedMappedEntries.map.entrySet().iterator();\n while (itr.hasNext()) {\n entry = (Map.Entry) itr.next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n idSet.contains(entry.getValue());\n }\n }", "public interface ShopSearchRepository extends ElasticsearchRepository<Shop, Long> {\n}", "@Test\n public void testIndexMaintenanceOnPutAll() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n region.put(\"1\", new Portfolio(1));\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"posvals.secId\",\n SEPARATOR + \"portfolio1 pf, pf.positions.values posvals \");\n Map data = new HashMap();\n for (int i = 1; i < 11; ++i) {\n data.put(\"\" + i, new Portfolio(i + 2));\n }\n\n region.putAll(data);\n }", "public interface GroupRateSearchRepository extends ElasticsearchRepository<GroupRate, Long> {\n}", "public interface SemesterSearchRepository extends ElasticsearchRepository<Semester, Long> {\n}", "public interface TrainingGeneratedSlideNodeSearchRepository extends ElasticsearchRepository<TrainingGeneratedSlideNode, Long> {\n}", "public interface UserSearchRepository extends ElasticsearchRepository<User, Long> {\n}", "public void runTestSearch() throws TorqueException {\r\n\t}" ]
[ "0.66996825", "0.66996825", "0.6528033", "0.651224", "0.6385051", "0.6217708", "0.61788034", "0.61761016", "0.6050151", "0.6044646", "0.59738356", "0.59663975", "0.5946358", "0.5922935", "0.59156483", "0.58926105", "0.58821726", "0.5859686", "0.5849652", "0.58351564", "0.5826938", "0.57883066", "0.5782267", "0.57759535", "0.577127", "0.57602733", "0.5744573", "0.57341164", "0.5727323", "0.5726249", "0.5706148", "0.57059073", "0.57001805", "0.5692875", "0.56797874", "0.5676756", "0.5665453", "0.56589967", "0.56525445", "0.5652471", "0.5649917", "0.5645445", "0.56425136", "0.56422603", "0.56405467", "0.56387526", "0.5637609", "0.5636513", "0.56357384", "0.5633962", "0.56320804", "0.5631287", "0.56276274", "0.5623043", "0.56036603", "0.560329", "0.5601949", "0.5589584", "0.5588511", "0.5587042", "0.558262", "0.5578087", "0.5559928", "0.5556397", "0.55548096", "0.5549864", "0.5544379", "0.5543187", "0.55310744", "0.5530797", "0.552248", "0.5520534", "0.55171525", "0.55116737", "0.5508169", "0.55054116", "0.550409", "0.5494465", "0.5476959", "0.54743457", "0.54732263", "0.5471867", "0.5469803", "0.54691917", "0.54683185", "0.54669785", "0.5464311", "0.54634553", "0.5463224", "0.5462982", "0.5453421", "0.5453083", "0.54459023", "0.5439592", "0.5439185", "0.5435365", "0.54328305", "0.5432342", "0.54323155", "0.5429449", "0.5421022" ]
0.0
-1
Data la Stringa Json degli Users li inserisce nell'ArrayList e li ordina per punteggio
public void setUsers(String s){ try { alUsers.clear(); JSONArray jsonArray = new JSONArray(s); for(int i=0; i<jsonArray.length(); i++){ JSONObject userObject = jsonArray.getJSONObject(i); String name = userObject.getString("playername"); int score = userObject.getInt("points"); alUsers.add(new User(name, score)); } Collections.sort(alUsers, new CustomComparatorUsers()); } catch (JSONException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createUser(List<User> list) {\n\n Gson gson = new Gson();\n FileService writerService = new FileService();\n for (User user : list) {\n String userData = gson.toJson(user);\n writerService.writeToUserData(userData);\n }\n\n }", "@Override\n public void updateUserJson() {\n synchronized (lockUpdateUserJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Users.json\")) {\n ArrayList<User> userAsArray = new ArrayList<>();\n for (Map.Entry<String, User> entry : mapOfRegisteredUsersByUsername.entrySet()) {\n userAsArray.add(entry.getValue());\n }\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"users\", writer.toJsonTree(userAsArray));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "private void getAllUserElements(String jsonData){\n\t \n\t\t\n\t\t\n\t\t\t\n\t\n\t\t\n\t\t\ttry {\n\t\t\t\tJSONObject obj = new JSONObject(jsonData);\n\n\t\t\t\tJSONArray arr = obj.getJSONArray(\"list\");\n\t\t\t\t\n\t\t\t\tmyUsers = new TibbrUser[arr.length()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < arr.length(); i++)\n\t\t\t\t{\n\t\t\t\t String ID = arr.getJSONObject(i).getString(\"id\");\n\t\t\t\t String login = arr.getJSONObject(i).getJSONObject(\"jive\").getString(\"username\");\n\t\t\t\t myUsers[i] = new TibbrUser (login, ID); \n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t \t \n\t}", "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 String composeJSONfromSQLite()\n {\n ArrayList<User> wordList;\n wordList = new ArrayList<User>();\n String selectQuery = \"SELECT * FROM UsersTable where udpateStatus = '\"+\"no\"+\"'\";\n SQLiteDatabase database = this.getWritableDatabase();\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) \n\t\t{\n do {\n \tUser data=new User(cursor.getString(0),cursor.getString(1),cursor.getString(2), cursor.getString(3),cursor.getString(4),cursor.getString(6));\n wordList.add(data);\n } \n while (cursor.moveToNext());\n }\n database.close();\n Gson gson = new GsonBuilder().create();\n //Use GSON to serialize Array List to JSON \n return gson.toJson(wordList);\n }", "@Override\n public void onSuccess(Users arg0) {\n list = arg0.getCar_id();\n Log.i(\"list\", list.toString());\n Users u = new Users();\n u.setObjectId(bu.getObjectId());\n u.setUsername(name);\n u.setCar_id(list);\n Log.i(\"list\", list.toString());\n Staticobject.currentuser = u;\n new Cache().Writecache(getApplicationContext(), bu.getObjectId(), name, list);\n }", "public synchronized String addUserJSON(String jsonInfo) throws JsonSyntaxException {\n YelpUser user = gson.fromJson(jsonInfo, YelpUser.class);\n // Check if required fields (ie. name) are null\n if (user.getName() == null || user.getName().equals(\"\")) {\n throw new JsonSyntaxException(jsonInfo);\n }\n user.generateNewUserInfo(this); // Add new user fields (such as user_id, url, votes, etc.)\n this.userMap.put(user.getID(), user); // Add the user to the database\n return gson.toJson(user); // Return jsonInfo of completed user (with all fields filled)\n }", "private void getIdolElements(int indx, String jsonData){\n\t \n\t \n\t\ttry {\n\t\t\tJSONObject obj = new JSONObject(jsonData);\n\t\t\tJSONArray arr = obj.getJSONArray(\"list\");\n\n\t\t\t\n\t\t\tfor (int i = 0; i < arr.length(); i++)\n\t\t\t{\n\t\t\t //String ID = arr.getJSONObject(i).getString(\"id\");\n\t\t\t String login = arr.getJSONObject(i).getJSONObject(\"jive\").getString(\"username\");\n\t\t\t this.myUsers[indx].idols[i] = login;\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t \t \n\t}", "public void fillUser(String jsonString){\n try{\n JSONObject json = new JSONObject(jsonString);\n this.id = json.getInt(\"id\");\n this.username = json.getString(\"username\");\n this.password = json.getString(\"password\");\n }catch(JSONException e){\n e.printStackTrace();\n }\n }", "public void insertUserData(ArrayList<String> data) {\n\t\tSQLiteDatabase db = getWritableDatabase();\n\t\tContentValues cv = new ContentValues();\n\t\t\n\t\ttry {\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.ID, data.get(0));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.USR_NAME, data.get(1));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.PASSWORD, data.get(2));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.NAME, data.get(3));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.PHONE_NO, data.get(4));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.EMAIL, data.get(5));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.PHOTO_PATH, data.get(6));\n\t\t\tcv.put(DatabaseInter.TABLE_USER_INFO.ABOUT, data.get(7));\n\t\t\t\n\t\t\tdb.insert(DatabaseInter.TABLE_USER_INFO.TABLE_NAME, null, cv);\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif(db != null) {\n\t\t\t\tdb.close();\n\t\t\t}\n\t\t}\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 }", "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"ram@gmail.com\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"seth@gmail.com\", 50), new User(\"Sita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"ganesh@gmail.com\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"ram@gmail.com\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"seth@gmail.com\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"ganesh@gmail.com\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "@GET\n @Path(\"adduser\")\n @Produces(MediaType.TEXT_PLAIN)\n\n public String insertUsers(@QueryParam(\"username\") String uname, @QueryParam(\"dob\") String dob, String jsonpcallback) {\n\n String val = \"Error Check values!\";\n Users user = new Users();\n\n String[] dateval = dob.split(\"/|-\");\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.YEAR, Integer.parseInt(dateval[0]));\n calendar.set(Calendar.MONTH, Integer.parseInt(dateval[1]) - 1);\n calendar.set(Calendar.DAY_OF_MONTH, Integer.parseInt(dateval[2]));\n java.sql.Date sqldob = new java.sql.Date(calendar.getTimeInMillis());\n\n user.setUsername(uname);\n user.setDob(sqldob);\n boolean status = us.insertUsers(user);\n if (status == true) {\n val = \"Added!!\";\n }\n return jsonpcallback + \"(\\\"\" + val + \"\\\")\";\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\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "@RequestMapping(value = \"/admin/users\", method = RequestMethod.POST, produces = \"application/json;charset=UTF-8\")\r\n @ResponseBody\r\n public String listuser() throws Exception {\r\n List<Member> users = memberManager.findAllUsers();\r\n if (users == null || users.isEmpty()) {\r\n return \"{\\\"total\\\":0,\\\"users\\\":[]}\";\r\n } else {\r\n StringBuilder sb = new StringBuilder(\"{\\\"total\\\":\").append(users.size()).append(\",\\\"users\\\":[\");\r\n boolean isFirst = true;\r\n for (Member user : users) {\r\n if (!isFirst) {\r\n sb.append(\",\");\r\n }\r\n sb.append(\"{\\\"account\\\":\\\"\").append(user.getAccount()).append(\"\\\",\\\"name\\\":\\\"\").append(user.getName())\r\n .append(\"\\\",\\\"birthday\\\":\\\"\").append(String.format(\"%tF\", user.getBirthday())).append(\"\\\"}\");\r\n isFirst = false;\r\n }\r\n sb.append(\"]}\");\r\n return sb.toString();\r\n }\r\n }", "public List createUserList()\r\n{\r\n\tUser madhu=new User(\"mekala.madhu@gmail.com\", \"madhu\");\r\n\tUser krishna=new User(\"Krishna.avva@gmail.com\", \"krishna\");\t\r\n\r\n\tList listOfUsers = new ArrayList();\r\n\tlistOfUsers.add(madhu);\r\n\tlistOfUsers.add(krshna);\r\n\treturn listOfUsers;\r\n}", "@OnClick(R.id.save)\n public void saveUserDetails(){\n broevi.add(new User(Integer.parseInt(broj.getText().toString())));\n Savedata();\n adapterbroevi.notifyDataSetChanged();\n\n\n\n }", "@PostMapping(path = \"/v1/add\")\n public JsonData addUser(@RequestBody User user) {\n int user_id = userService.add(user);\n\n JsonData jsonData = new JsonData(\"2019\", \"添加成功\", user_id);\n return jsonData;\n }", "void addUser(String user){\n usersModel.addRow(new String[]{user});\n }", "public static void updateCreate(String data, ArrayList<String> usersData) {\n \tusersData.add(data.substring(3, 31));\n \tSystem.out.println(usersData.toString());\n\n }", "@Override\n public String execute() throws Exception {\n User user1 = new User();\n user1.setUsername(\"zzz\");\n user1.setPassword(\"123\");\n user1.setAddress(\"西安\");\n\n User user2 = new User();\n user2.setUsername(\"李佳乐\");\n user2.setPassword(\"123\");\n user2.setAddress(\"西安\");\n\n list.add(user1);\n list.add(user2);\n\n return \"success\";\n }", "@Override\n\tpublic void insert(User entity) {\n\t\tuserlist.put(String.valueOf(entity.getDni()), entity);\n\t}", "@Override\n protected void onPostExecute(JSONArray jsonArray) {\n super.onPostExecute(jsonArray);\n //consultar los datos de la respuesta del servidor qu evienen en la variable\n //del parametro del metodo; el cual es del mismo tipo que el resultado del metodo\n //doinbckgroun\n //recorrer el jsonarray y consultar los nodos del json\n\n for (int i=0;i<jsonArray.length();i++){\n Usuario usuario=new Usuario();\n try {\n JSONObject jsonObject=jsonArray.getJSONObject(i);\n //usuario.setId(jsonObject.getInt(\"id\"));\n usuario.setUser(jsonObject.getString(\"user\"));\n usuario.setPass(jsonObject.getString(\"pass\"));\n usuario.setName(jsonObject.getString(\"name\"));\n usuario.setPhone(jsonObject.getString(\"phone\"));\n usuario.setAddress(jsonObject.getString(\"address\"));\n usuario.setQuestion(jsonObject.getString(\"question\"));\n usuario.setAnswer(jsonObject.getString(\"answer\"));\n\n SharedPreferences preferences = getSharedPreferences(\"Usuario\",\n MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"id\", idFinal);\n editor.putString(\"user\", usuario.getUser());\n editor.putString(\"pass\", usuario.getPass());\n editor.putString(\"name\", usuario.getName());\n editor.putString(\"phone\", usuario.getPhone());\n editor.putString(\"address\", usuario.getAddress());\n editor.putString(\"question\", usuario.getQuestion());\n editor.putString(\"answer\",usuario.getAnswer());\n editor.commit();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n\n\n }", "@Override\n public boolean insertjsonarray(List<ModelPerson> persons) {\n return false;\n }", "private void updateUserList() {\n\t\tUser u = jdbc.get_user(lastClickedUser);\n\t\tString s = String.format(\"%s, %s [%s]\", u.get_lastname(), u.get_firstname(), u.get_username());\n\t\tuserList.setElementAt(s, lastClickedIndex);\n\t}", "public static void createUser(User user) {\n URL url = null;\n HttpURLConnection connection = null;\n final String methodPath = \"/entities.credential/\";\n try {\n Gson gson = new Gson();\n String stringUserJson = gson.toJson(user);\n url = new URL(BASE_URI + methodPath);\n // open connection\n connection = (HttpURLConnection) url.openConnection();\n // set time out\n connection.setReadTimeout(10000);\n connection.setConnectTimeout(15000);\n // set connection method to POST\n connection.setRequestMethod(\"POST\");\n // set the output to true\n connection.setDoOutput(true);\n // set length of the data you want to send\n connection.setFixedLengthStreamingMode(stringUserJson.getBytes().length);\n // add HTTP headers\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n // send the POST out\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(stringUserJson);\n out.close();\n Log.i(\"error\", new Integer(connection.getResponseCode()).toString());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n connection.disconnect();\n }\n }", "private String convertToJson(Users user) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(user); \n\t}", "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }", "private List<User> createUserList() {\n for (int i = 1; i<=5; i++) {\n User u = new User();\n u.setId(i);\n u.setEmail(\"user\"+i+\"@mail.com\");\n u.setPassword(\"pwd\"+i);\n userList.add(u);\n }\n return userList;\n }", "@Override\n protected void onPostExecute(String result) {\n List<DataPlant> data = new ArrayList<>();\n\n if (!result.equals(\"failed\")) {\n try {\n JSONArray jArray = new JSONArray(result);\n\n JSONObject user = jArray.getJSONObject(0);\n\n String name = user.getString(\"name\");\n String email = user.getString(\"email\");\n String uid = user.getString(\"unique_id\");\n\n db.addUser(name, email, uid);\n\n session.setLogin(true);\n\n Toast.makeText(getApplicationContext(), \"로그인에 성공했습니다!\", Toast.LENGTH_LONG).show();\n // db.updatePlant(email);\n Log.d(\"로그인 성공\", \"1\");\n\n Intent intent = new Intent(SignInActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n } catch (JSONException e) {\n // You to understand what actually error is and handle it appropriately\n Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_LONG).show();\n Toast.makeText(getApplicationContext(), result.toString(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"로그인에 실패했습니다!\", Toast.LENGTH_LONG).show();\n // db.updatePlant(email);\n Log.d(\"로그인 실패\", \"1\");\n }\n }", "public static void loadValidDataJson(JsonObject json,ArrayList<ParseString> rowList) {\n\r\n JsonArray custarr = new JsonArray();\r\n\r\n for (int n = 0; n < rowList.size(); n++) {\r\n\r\n JsonObject cust = new JsonObject();\r\n cust.put(\"color\",rowList.get(n).color);\r\n cust.put(\"firstname\",rowList.get(n).firstname);\r\n cust.put(\"lastname\",rowList.get(n).lastname);\r\n cust.put(\"phonenumber\",rowList.get(n).phonenumber);\r\n cust.put(\"zipcode\",rowList.get(n).zipcode);\r\n custarr.add(cust);\r\n cust.remove(n);\r\n }\r\n json.put(\"entries\",custarr);\r\n }", "public static void writeData(List<User> users) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = new FileOutputStream(USER_SAVE_FILE_NAME, false);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(users);\n oos.close();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n if (fos != null && oos != null) {\n try {\n oos.close();\n fos.close();\n } catch (Exception ex) {\n Logger.getLogger(Utilities.UserDataIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n\n }\n }\n }", "private void jsonParse() {\n String url = \"http://coms-309-sb-4.misc.iastate.edu:8080/getroommembers\";\n url = url + \"/\" + sessionManager.getRoomid() + \"/\" + sessionManager.getID() + \"/\";\n\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONArray jsonArray = response.getJSONArray(\"Users\");\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject List = jsonArray.getJSONObject(i);\n String temp = List.getString(\"Role\");\n if(temp.equals(\"VIEWER\")){\n temp = \"Viewer\";\n }else if(temp.equals(\"ROOMMATE\")){\n temp = \"Editor\";\n } else{\n temp = \"Owner\";\n }\n items.add(List.getString(\"Name\") + \": \" + temp);\n permissions.add(temp);\n users.add(List.getString(\"Name\"));\n usersID.add(List.getString(\"UserId\"));\n }\n adapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n }", "public void updatelistuser(JList j) {\n try {\n\n DefaultListModel listModel = new <String>DefaultListModel();\n Statement stmt = null;\n\n stmt = cn.createStatement();\n\n ResultSet rs = stmt.executeQuery(\"Select username FROM dba_users \");\n while (rs.next()) {\n listModel.addElement(rs.getString(1));\n }\n j.setModel(listModel);\n\n } catch (SQLException ex) {\n Logger.getLogger(AjoutUtilisateur.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static ArrayList<User> getUsers() {\n users = new ArrayList<User>();\n /*users.add(new User(\"Парковый Гагарина 5а/1\", \"срочный\", \"общий\"));\n users.add(new User(\"Алексеевские планы Ореховая 15 возле шлагбаума\", \"срочный\", \"общий\"));\n users.add(new User(\"Фастовецкая Азина 26\", \"срочный\", \"индивидуальный\"));*/\n //users.add(new User(MainActivity.adres.get(0), \"срочный\", \"общий\"));\n users.add(new User(\"Нет заказов\",\"срочный\",\"общий\"));\n return users;\n }", "@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 writeUsers() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/users.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(users);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public SeznamUser(){\n seznamUser.add(new User(\"adam\", \"heslo\"));\n seznamUser.add(new User(\"ivan\", \"heslo\"));\n seznamUser.add(new User(\"jan\", \"heslo\"));\n seznamUser.add(new User(\"jozef\", \"heslo\"));\n seznamUser.add(new User(\"miro\", \"heslo\"));\n seznamUser.add(new User(\"peto\", \"heslo\"));\n seznamUser.add(new User(\"martin\", \"heslo\"));\n seznamUser.add(new User(\"riso\", \"heslo\"));\n seznamUser.add(new User(\"rado\", \"heslo\"));\n seznamUser.add(new User(\"marek\", \"heslo\"));\n seznamUser.add(new User(\"kubo\", \"heslo\"));\n }", "private void insertFromFile(ArrayList<String> obj){\r\n\t\tsetIdString(obj.get(1));\t\r\n\t\tsetLogin(obj.get(2));\r\n\t\tsetSenha(obj.get(3));\r\n\t\tsetImei(obj.get(4));\r\n\t\tsetMac(obj.get(5));\r\n\t\tString date = Util.convertDateToDateStr(Util.getCurrentDateTime());\t\r\n\t\tsetUltimaAlteracao(date);\t\t\t\r\n\t}", "@Override\n public void onSuccess(List<User> arg0) {\n pullToRefreshListView.onRefreshComplete();\n pullToRefreshListView.setVisibility(View.VISIBLE);\n pullToRefreshListView.getRefreshableView().setVisibility(View.VISIBLE);\n list = arg0;\n headerView.setVisibility(View.GONE);\n listView.setAdapter(mAdapter);\n try {\n // JSONObject object = new\n // JSONObject(getFromAssets(\"moneytest.txt\"));\n // list = gson.fromJson(object.getString(\"users\"), new\n // TypeToken<List<MoneyType>>() {\n // }.getType());\n if (list.size() > 0) {\n addData(list);\n for (int i = 3; i < list.size(); i++) {\n listmoney.add(list.get(i));\n }\n adapter.setData(listmoney);\n } else {\n listView.removeHeaderView(headerView);\n }\n\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n }\n }", "private void sucesso(JSONArray jsonArrayReservas) throws JSONException {\n reservasAdapter.clear();\n\n if (jsonArrayReservas.length() > 0) {\n\n for (int i = 0; i < jsonArrayReservas.length(); i++) {\n\n Reserva reserva = gson.fromJson(jsonArrayReservas.get(i).toString(), Reserva.class);\n\n Log.d(\"DEBUG\", \"Reserva: \" + reserva.toString());\n\n reservasAdapter.add(reserva);\n\n }\n\n } else\n panelSemRegistros.setVisibility(View.VISIBLE);\n\n }", "@Override\r\n\tpublic List<String> execute(WebApplicationContext ac, String insUid, JSONObject jsonObject) {\n\t\tList<String> userIds = new ArrayList<>();\r\n\t\tuserIds.add(\"00056825\");\r\n\t\tuserIds.add(\"00014495\");\r\n\t\treturn userIds;\r\n\t}", "@Override\r\n\tpublic String saveBatch(String userInfo, String saveJsonList)\r\n\t\t\t {\n\t\treturn null;\r\n\t}", "private void parseJSON(String jsonToParse) {\n System.out.print(\"++++++++++++++\"+\"++++++++++++\");\n try {\n JSONArray arr = new JSONArray(jsonToParse);\n for(int i=0; i < arr.length(); i++){\n try {\n JSONObject universityArray = arr.getJSONObject(i);\n String at=universityArray.getString(\"access_token\");\n userDataList.add(new UserData_Login(universityArray.getString(\"expires_in\"),universityArray.getString(\"access_token\"),universityArray.getString(\".expires\"),universityArray.getString(\".issued\"),universityArray.getString(\"token_type\"),universityArray.getString(\"userName\")));\n\n\n\n\n// if(universityArray.getString(\"universityName\").equals(\"Northwest Missori State University\"))\n// {\n// JSONArray fraternityArray = universityArray.getJSONArray(\"Fraternities\");\n// for(int j=0; j < fraternityArray.length(); j++) {\n// JSONObject fraternity = fraternityArray.getJSONObject(i);\n// String fraternityName = fraternity.getString(\"fraternityName\");\n// String fraternityDescription = fraternity.getString(\"fraternityDescription\");\n//// userDataList.add(new UserData_Login(accessToken,tokenType,expireIn,username,issued,expires));\n// }\n// }\n\n }\n catch(JSONException jsone)\n {\n Log.d(\"ERROR\", jsone.getMessage());\n }\n }\n }catch(JSONException jsone){\n Log.d(\"ERROR\",jsone.getMessage());\n }\n }", "private void inicializarUsuarios(){\n usuarios = new ArrayList<Usuario>();\n Administrador admin=new Administrador();\n admin.setCodigo(1);\n admin.setApellidos(\"Alcaide Gomez\");\n admin.setNombre(\"Juan Carlos\");\n admin.setDni(\"31000518Z\");\n admin.setPassword(\"admin\");\n admin.setCorreo(\"algojuca@alu.uma.es\");\n admin.setDireccion(\"Sebastian Garrido 54\");\n admin.setNacimiento(new Date(1991, 12, 29));\n admin.setNacionalidad(\"España\");\n admin.setCentro(\"Centro\");\n admin.setSexo(\"Varon\");\n admin.setDespacho(\"301\");\n usuarios.add(admin);\n \n JefeServicio js=new JefeServicio();\n js.setCodigo(2);\n js.setApellidos(\"Gutierrez Cazorla\");\n js.setNombre(\"Ruben\");\n js.setDni(\"75895329k\");\n js.setPassword(\"admin\");\n js.setCorreo(\"algojuca@alu.uma.es\");\n js.setDireccion(\"Sebastian Garrido 54\");\n js.setNacimiento(new Date(1991, 12, 29));\n js.setNacionalidad(\"España\");\n js.setCentro(\"Centro\");\n js.setSexo(\"Varon\");\n js.setDespacho(\"301\");\n \n usuarios.add(js);\n \n \n Ciudadano c =new Ciudadano();\n c.setCodigo(3);\n c.setApellidos(\"Moreno\");\n c.setNombre(\"Maria\");\n c.setDni(\"123\");\n c.setPassword(\"123\");\n c.setCorreo(\"magonmo92@alu.uma.es\");\n c.setDireccion(\"Sebastian Garrido 54\");\n c.setNacimiento(new Date(1992, 01, 12));\n c.setCentro(\"Teatinos\");\n c.setNacionalidad(\"España\");\n c.setSexo(\"Mujer\");\n c.setTelefono(\"999\");\n usuarios.add(c);\n \n //--Administrativos--\n Administrativo a =new Administrativo();\n a.setCodigo(4);\n a.setApellidos(\"Fernández\");\n a.setNombre(\"Salva\");\n a.setDni(\"1234\");\n a.setPassword(\"1234\");\n a.setCorreo(\"safcf@alu.uma.es\");\n a.setDireccion(\"Sebastian Garrido 54\");\n a.setNacimiento(new Date(1991, 9, 29));\n a.setNacionalidad(\"España\");\n a.setSexo(\"Hombre\");\n a.setCentro(\"Centro\");\n usuarios.add(a);\n \n Tecnico tec=new Tecnico();\n tec.setCodigo(5);\n tec.setApellidos(\"Alcaide Gomez\");\n tec.setNombre(\"Juan Carlos\");\n tec.setDni(\"tecnico\");\n tec.setPassword(\"tecnico\");\n tec.setCorreo(\"algojuca@alu.uma.es\");\n tec.setDireccion(\"Sebastian Garrido 54\");\n tec.setNacimiento(new Date(1991, 12, 29));\n tec.setNacionalidad(\"España\");\n tec.setCentro(\"Centro\");\n tec.setSexo(\"Varon\");\n tec.setDespacho(\"301\");\n tec.setTelefono(\"664671040\");\n tec.setEspecialidad(\"Maltrato\");\n tec.setTfijo(957375546);\n \n usuarios.add(tec);\n \n }", "private void createUserList() {\n\t\tif (!userList.isEmpty() && !listUsers.isSelectionEmpty()) {\n\t\t\tlistUsers.clearSelection();\n\t\t}\t\t\n\t\tif (!archivedUserList.isEmpty() && !listArchivedUsers.isSelectionEmpty()) {\n\t\t\tlistArchivedUsers.clearSelection();\n\t\t}\t\t\n\t\tarchivedUserList.clear();\n\t\tuserList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tif (users.get(i).active()) {\n\t\t\t\tuserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t} else {\n\t\t\t\tarchivedUserList.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t\t}\t\t\n\t\t}\n\t}", "public static List<User> createUserList() {\r\n\t\tList<User> users = new ArrayList<User>();\r\n\t\t\r\n\t\tusers.add(createUser(1, \"Isha\", \"Khandelwal\", \"isha.khandelwal@gmail.com\", \"ishaa\", \"ThinkHR\"));\r\n\t\tusers.add(createUser(2, \"Sharmila\", \"Tagore\", \"stagore@gmail.com\", \"stagore\", \"ASI\"));\r\n\t\tusers.add(createUser(3, \"Surabhi\", \"Bhawsar\", \"sbhawsar@gmail.com\", \"sbhawsar\", \"Pepcus\"));\r\n\t\tusers.add(createUser(4, \"Shubham\", \"Solanki\", \"ssolanki@gmail.com\", \"ssolanki\", \"Pepcus\"));\r\n\t\tusers.add(createUser(5, \"Ajay\", \"Jain\", \"ajain@gmail.com\", \"ajain\", \"TCS\"));\r\n\t\tusers.add(createUser(6, \"Sandeep\", \"Vishwakarma\", \"svishwakarma@gmail.com\", \"svishwakarma\", \"CIS\"));\r\n\t\tusers.add(createUser(7, \"Sushil\", \"Mahajan\", \"smahajan@gmail.com\", \"smahajan\", \"ASI\"));\r\n\t\tusers.add(createUser(8, \"Sumedha\", \"Wani\", \"swani@gmail.com\", \"swani\", \"InfoBeans\"));\r\n\t\tusers.add(createUser(9, \"Mohit\", \"Jain\", \"mjain@gmail.com\", \"mjain\", \"Pepcus\"));\r\n\t\tusers.add(createUser(10, \"Avi\", \"Jain\", \"ajain@gmail.com\", \"ajain\", \"Pepcus\"));\r\n\t\t\r\n\t\treturn users;\r\n\t}", "private ArrayList<User> loadUsers(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<User>>(){}.getType();\r\n\t\tArrayList<User> users = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn users;\r\n\t}", "private void setUserDataFromJson(JSONObject jsonObject) { \n\t\tlogger.debug(\"creating UserData Object from json file \" + fileName);\n\t\t/* \n\t\t * JSON Structure\n\t\t * {\n\t\t * \t\"objectStatus\":\"fail\",\n\t\t * \t\"domain\":\"null\",\n\t\t * \t\"customer\":\"null\",\n\t\t * \t\"sn_id\":\"CC\",\n\t\t * \t\"user_id\":\"9\",\n\t\t * \t\"userName\":\"Cortal_Consors\",\n\t\t * \t\"nickName\":\"Cortal_Consors\",\n\t\t * \t\"postingsCount\":\"0\",\n\t\t * \t\"favoritesCount\":\"0\",\n\t\t * \t\"friends\":\"0\",\n\t\t * \t\"follower\":\"0\",\n\t\t * \t\"userLang\":null,\n\t\t * \t\"listsAndGroupsCount\":\"0\",\n\t\t * \t\"geoLocation\":\"\"\n\t\t * }\n\t\t */\n\t\tif (jsonObject.get(\"domain\") != null) {\n\t\t\tlogger.trace(\" domain\\t\"+jsonObject.get(\"domain\").toString());\n\t\t\tuData.setDomain((String) jsonObject.get(\"domain\"));\n\t\t}\n\t\tif (jsonObject.get(\"customer\") != null) {\n\t\t\tlogger.trace(\" customer\\t\"+jsonObject.get(\"customer\").toString());\n\t\t\tuData.setCustomer((String) jsonObject.get(\"customer\"));\n\t\t}\n\t\tif (jsonObject.get(\"objectStatus\") != null) {\n\t\t\tlogger.trace(\" objectStatus\\t\"+jsonObject.get(\"objectStatus\").toString());\n\t\t\tuData.setObjectStatus((String) jsonObject.get(\"objectStatus\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"sn_id\") != null) {\n\t\t\tlogger.trace(\" sn_id\\t\"+jsonObject.get(\"sn_id\").toString());\n\t\t\tuData.setSnId((String) jsonObject.get(\"sn_id\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"id\") == null) {\n\t\t\tlogger.trace(\" user_id\\t\"+jsonObject.get(\"user_id\").toString());\n\t\t\tuData.setId((String) jsonObject.get(\"user_id\"));\n\t\t} else {\n\t\t\tlogger.trace(\" id\\t\"+jsonObject.get(\"id\").toString());\n\t\t\tuData.setId((String) jsonObject.get(\"id\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"userName\") != null) {\n\t\t\tlogger.trace(\" userName\\t\"+jsonObject.get(\"userName\").toString());\n\t\t\tuData.setUserName((String) jsonObject.get(\"userName\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"nickName\") != null) {\n\t\t\tlogger.trace(\" nickName\\t\"+jsonObject.get(\"nickName\").toString());\n\t\t\tuData.setScreenName((String) jsonObject.get(\"nickName\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"userLang\") != null) {\n\t\t\tlogger.trace(\" userLang\\t\"+jsonObject.get(\"userLang\").hashCode());\n\t\t\tuData.setLang((String) jsonObject.get(\"userLang\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"follower\") != null) {\n\t\t\tlogger.trace(\" follower\\t\"+Long.parseLong(jsonObject.get(\"follower\").toString()));\n\t\t\tuData.setFollowersCount(Long.parseLong(jsonObject.get(\"follower\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"friends\") != null) {\n\t\t\tlogger.trace(\" friends\\t\"+Long.parseLong(jsonObject.get(\"friends\").toString()));\n\t\t\tuData.setFriendsCount(Long.parseLong(jsonObject.get(\"friends\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"postingsCount\") != null) {\n\t\t\tlogger.trace(\" postingsCount\\t\"+Long.parseLong(jsonObject.get(\"postingsCount\").toString()));\n\t\t\tuData.setPostingsCount(Long.parseLong(jsonObject.get(\"postingsCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"favoritesCount\") != null) {\n\t\t\tlogger.trace(\" favoritesCount\\t\"+Long.parseLong(jsonObject.get(\"favoritesCount\").toString()));\n\t\t\tuData.setFavoritesCount(Long.parseLong(jsonObject.get(\"favoritesCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"listsAndGroupsCount\") != null) {\n\t\t\tlogger.trace(\" listsAndGroupsCount\\t\"+Long.parseLong(jsonObject.get(\"listsAndGroupsCount\").toString()));\n\t\t\tuData.setListsAndGroupsCount(Long.parseLong(jsonObject.get(\"listsAndGroupsCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"geoLocation\") != null) {\n\t\t\tlogger.trace(\" geoLocation\\t\"+jsonObject.get(\"geoLocation\"));\n\t\t\tuData.setGeoLocation((String) jsonObject.get(\"geoLocation\"));\n\t\t}\n\t}", "void addUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_utilizador, user.getUser()); // Contact Name\n values.put(KEY_pass, user.getPass()); // Contact Phone\n values.put(KEY_Escola, user.getEscola());\n db.insert(tabela, null, values);\n db.close(); // Closing database connection\n }", "public void Register(String email, String password, String username)\n {\n try\n {\n ObservableList<String> stats = FXCollections.observableArrayList();\n stats.add(\"search:0\");\n stats.add(\"add:0\");\n stats.add(\"remove:0\");\n ObservableList<String> history = FXCollections.observableArrayList();\n ObservableList<String> favorite = FXCollections.observableArrayList();\n\n userProfiles.add(new Profile(email,password,username,stats,history,favorite));\n }\n catch (Exception e)\n {\n System.out.println(\"Something goofed up : \" + e);\n }\n }", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public User save()\n {\n //TODO implantar salvar\n //Metodo que vai salvar no webservice a model\n JSONObject json = new JSONObject();\n try {\n json.put(\"username\", this.username);\n json.put(\"password\", this.password);\n }catch(JSONException e){\n json = null;\n }\n\n return null;\n }", "public boolean addUsers(List<User> users);", "@Override\n\tpublic boolean doInsertList(List<SysUser> b) throws Exception {\n\t\treturn false;\n\t}", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}", "public void getUserInformation(String sInformation) {\n try {\n\n JSONObject jsonInfo = new JSONObject (sInformation);\n name = jsonInfo.getJSONObject(\"user\").getString(\"name\");\n email = jsonInfo.getJSONObject(\"user\").getString(\"email\");\n gender = jsonInfo.getJSONObject(\"user\").getString(\"gender\");\n birthday = jsonInfo.getJSONObject(\"user\").getString(\"birthday\");\n address = jsonInfo.getJSONObject(\"user\").getString(\"address_street\");\n num = jsonInfo.getJSONObject(\"user\").getString(\"address_number\");\n city = jsonInfo.getJSONObject(\"user\").getString(\"address_city\");\n zip = jsonInfo.getJSONObject(\"user\").getString(\"address_zip\");\n qrcode = jsonInfo.getJSONObject(\"user\").getString(\"qrcode\");\n puntos = jsonInfo.getJSONObject (\"user\").getString (\"points\");\n\n menuJson = jsonInfo.getJSONObject(\"menu\");\n arrayBeneficios = jsonInfo.getJSONObject(\"user\").getJSONArray(\"benefits\");\n menu = menuJson.toString();\n beneficios = arrayBeneficios.toString();\n\n\n user.setsName (name);\n user.setsEmail (email);\n user.setsSex (gender);\n user.setsBirth (birthday);\n user.setsAddress (address);\n user.setiNumE (Integer.valueOf (num));\n user.setsCity (city);\n user.setiCP (Integer.valueOf (zip));\n user.setsCodigoQR (qrcode);\n user.setPuntos (Integer.valueOf (puntos));\n\n //Se guardan los datos en memoria\n PreferenceUtils.saveEmail (email, this);\n PreferenceUtils.saveName (name, this);\n PreferenceUtils.saveCodigo (qrcode,this);\n PreferenceUtils.savePuntos (Integer.valueOf (puntos), this);\n PreferenceUtils.saveAddress (address + \" \" + num + \", \" + city + \", \" + zip, this);\n PreferenceUtils.saveMenu(menu, this);\n PreferenceUtils.saveBeneficios(beneficios, this);\n\n\n\n }catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void getUserFromJson(JSONObject user) throws JSONException {\n Log.d(\"User\", \"User\" + user);\n\n // get JSON values\n int userId = user.getInt(\"id\");\n String email = user.getString(\"email\");\n Grade grade = Grade.valueOf(user.getString(\"grade\"));\n float distance = Float.valueOf(user.getString(\"total_distance\"));\n long time = user.getLong(\"total_time\");\n float maxSpeed = Float.valueOf(user.getString(\"max_speed\"));\n float avgSpeed = Float.valueOf(user.getString(\"avg_speed\"));\n\n // create user\n User mUser = new User(userId, email, grade, distance, time, maxSpeed, avgSpeed);\n // store user in SQLite database\n Login(mUser);\n }", "@PostMapping(\"/listarUsuarios\")\r\npublic String listarUsuarios(Model model) {\n try (Connection connection = dataSource.getConnection()) {\r\n Statement stmt = connection.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT id,nome,email FROM usuarios\");\r\n\r\n ArrayList<Usuario> output = new ArrayList<Usuario>();\r\n while (rs.next())\r\n output.add(new Usuario((Integer) rs.getObject(1), (String) rs.getObject(2), (String) rs.getObject(3)));\r\n\r\n model.addAttribute(\"listaUsuarios\", output);\r\n\r\n return \"dashboard_listausuarios\";\r\n\r\n } catch (Exception e) {\r\n model.addAttribute(\"message\", e.getMessage());\r\n return \"error\";\r\n }\r\n\r\n}", "private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void save(List<User> entity) {\n\t\t\n\t}", "private void populateUserList() {\n UserAdapter userAdapter = new UserAdapter(this, users.toArray((Map<String, String>[]) new Map[users.size()]));\n lstUsers.setAdapter(userAdapter);\n }", "@Test\n\tpublic void testCreate(){\n\t\t\n\t\tString jsonStr = \"{'companyName':'Lejia', 'companyNameLocal':'Lejia', 'companyAddress':'Guangdong', 'txtEmail':'qpsandy@126.com', 'telephone':'17721217320', 'contactPerson':'Molly'}\";\n\t\tcreateUser.createUserMain(jsonStr);\n\t\t\n\t}", "@Override\r\n public void onResponse(JSONObject response) {\n\r\n try {\r\n JSONArray data = response.getJSONArray(\"Data\");\r\n\r\n for (int i = 0; i < data.length(); i++) {\r\n JSONObject info = data.getJSONObject(i);\r\n student_id = info.getString(\"student_id\");\r\n username = info.getString(\"username\");\r\n email = info.getString(\"email\");\r\n password = info.getString(\"password\");\r\n arrayList.add(new profile(student_id, username, email, password));\r\n }\r\n loading.dismiss();\r\n } catch (JSONException e) {\r\n Log.d(\"Tag\", e.toString());\r\n }\r\n }", "public List<NameValuePair> userCreationObject(String phone_number,String company_name,String latitude,String longitude,String locationVal,String fullAddress,String active_status,String download_status,String user_name)\n {\n List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();\n try {\n nameValuePairs.add(new BasicNameValuePair(\"phone_number\",phone_number));\n nameValuePairs.add(new BasicNameValuePair(\"Name\",user_name));\n nameValuePairs.add(new BasicNameValuePair(\"company_name\",company_name));\n nameValuePairs.add(new BasicNameValuePair(\"latitude\",latitude));\n nameValuePairs.add(new BasicNameValuePair(\"longitude\",longitude));\n nameValuePairs.add(new BasicNameValuePair(\"location\",locationVal));\n nameValuePairs.add(new BasicNameValuePair(\"fullAddress\",fullAddress));\n nameValuePairs.add(new BasicNameValuePair(\"is_active\",active_status));\n nameValuePairs.add(new BasicNameValuePair(\"app_download_status\",download_status));\n\n } catch (Exception e) {\n //TODO\n e.printStackTrace();\n }\n return nameValuePairs;\n\n }", "private void WriteUserToDatabase(String userName, String name, String password, String emergency_no) {\n\n // Create the JSON Object and the request queue to add it to\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n JSONObject jsonBodyObj = new JSONObject();\n // Specify URL to send the request to\n String url = \"http://81.109.61.10/manage\";\n try{\n jsonBodyObj.put(\"action\", \"create_user\");\n jsonBodyObj.put(\"username\", userName);\n jsonBodyObj.put(\"name\", name);\n jsonBodyObj.put(\"password\", password);\n jsonBodyObj.put(\"emergency_no\", emergency_no);\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n final String requestBody = jsonBodyObj.toString();\n\n // Send POST request to the script\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST,\n url, null, new Response.Listener<JSONObject>(){\n\n @Override\n public void onResponse(JSONObject response) {\n currentUserUUID = response.optString(\"uuid\");\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(\"Error: \", error.getMessage());\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }\n\n @Override public byte[] getBody() {\n byte[] bytes = requestBody.getBytes();\n return bytes;\n }\n };\n\n // Add request to the queue\n requestQueue.add(jsonObjectRequest);\n }", "public void writeUserRegister(int id, String username, String password, boolean isNotified, String county) {\n try {\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONObject newRegister = new JSONObject();\n\n JSONArray registerlist = (JSONArray) obj.get(\"Registry\");\n\n newRegister.put(\"id\", id);\n newRegister.put(\"name\", username);\n newRegister.put(\"password\", password);\n newRegister.put(\"county\", county);\n newRegister.put(\"isInfected\", false);\n newRegister.put(\"isNotified\", isNotified);\n\n registerlist.add(newRegister);\n\n JSONArray countyList = (JSONArray) obj.get(\"Counties\");\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", registerlist);\n objWrite.put(\"Counties\", countyList);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public void hoySeHaEntrenado(){\n\n SharedPreferences sharedPreferences = this.getSharedPreferences(\"usuarios\", Context.MODE_PRIVATE);\n String username = sharedPreferences.getString(\"username\",\"No existe un usuario con este username\");\n if(!username.equalsIgnoreCase(\"No existe un usuario con este username\")){\n String fechasJSON = sharedPreferences.getString(\"fechasJSON\",\"Ninguna\");\n String token = sharedPreferences.getString(\"token\",\"Ninguna\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Log.e(\"test\",fechasJSON);\n Date date = new Date();\n if(!fechasJSON.contains(formatter.format(date))){\n String data = \"token=\"+token;\n String url = \"http://35.180.41.33/identity/user/fechas/nueva/\";\n PostData foo = new PostData(data, url);\n foo.postData();\n try{\n Log.e(\"test\",fechasJSON);\n JSONObject newDate = new JSONObject();\n newDate.put(\"date\", formatter.format(date));\n JSONArray jsonArrayDates = new JSONArray(fechasJSON);\n jsonArrayDates.put(newDate);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"fechasJSON\", jsonArrayDates.toString());\n editor.commit();\n Log.e(\"test\",jsonArrayDates.toString());\n }catch(Exception ex){\n\n }\n }\n }\n }", "public void addUser(ArrayList<User> users) {\n comboCreateBox.removeAllItems();\n for (User usr : users) {\n comboCreateBox.addItem(usr.getUsername());\n }\n }", "private void getUserList() {\n // GET ENTRIES FROM DB AND TURN THEM INTO LIST \n DefaultListModel listModel = new DefaultListModel();\n Iterator itr = DBHandler.getListOfObjects(\"FROM DBUser ORDER BY xname\");\n while (itr.hasNext()) {\n DBUser user = (DBUser) itr.next();\n listModel.addElement(user.getUserLogin());\n }\n // SET THIS LIST FOR INDEX OF ENTRIES\n userList.setModel(listModel);\n }", "@Override\n public void mostrarUsuarios(List<UserModel> usuarios) {\n }", "public void wypelnij(){\n ArrayList<ComboUserInsert> tmp = a.getAllUsers();\n for(int i = 0 ; i < tmp.size(); i++){\n uzytkownicy.addItem(tmp.get(i));\n }\n uzytkownicy.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n Object item = uzytkownicy.getSelectedItem();\n chosen_id = ((ComboUserInsert)item).id;\n }\n });\n }", "private void setupUsersInRoomDB() {\n Log.d(TAG, \"setupUsersInRoomDB: start to setup list of 200 user\");\n userList = new ArrayList<>();\n int j = 0;\n for (int i = 0; i < 200; i++) {\n switch (j) {\n case 0:\n Log.d(TAG, \"setupUsersInRoomDB: case 0 set the user with image one\");\n userList.add(new User(\"user\" + i, getImageOne()));\n j++;\n break;\n case 1:\n userList.add(new User(\"user\" + i, getImageTwo()));\n j++;\n break;\n case 2:\n userList.add(new User(\"user\" + i, getImageThree()));\n j = 0;\n break;\n }\n }\n\n db.userDao().insertListOfUser(userList);\n Log.d(TAG, \"setupUsersInRoomDB: insert list of users in room database\");\n Shared.sharedSave(MainActivity.this, \"usersdb\", USERS_EXIST);\n Toast.makeText(getApplicationContext(), \"finish set database\", Toast.LENGTH_LONG).show();\n }", "private void insertUser() {\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL) //Setting the Root URL\n .build(); //Finally building the adapter\n\n //Creating object for our interface\n RegisterAPI api = adapter.create(RegisterAPI.class);\n\n //Defining the method insertuser of our interface\n\n int value1 = Integer.parseInt(emptyMilage.getText().toString());\n int value2 = Integer.parseInt(loadedMilage.getText().toString());\n int estMilage = value2 + value1;\n\n api.insertUser(\n //Passing the values by getting it from editTexts\n trucksID.getText().toString(),\n tripReportNumber.getText().toString(),\n enteredDate.getText().toString(),\n emptyMilage.getText().toString(),\n loadedMilage.getText().toString(),\n\n // String emptyLocation = spinner.getSelectedItem().toString(),\n\n //can take this out below\n Integer.toString(estMilage),\n startState,\n startTerminal,\n\n //Creating an anonymous callback\n new Callback<Response>() {\n @Override\n public void success(Response result, Response response) {\n //On success we will read the server's output using bufferedreader\n //Creating a bufferedreader object\n BufferedReader reader = null;\n\n //An string to store output from the server\n String output = \"\";\n\n try {\n //Initializing buffered reader\n reader = new BufferedReader(new InputStreamReader(result.getBody().in()));\n\n //Reading the output in the string\n output = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Displaying the output as a toast\n Toast.makeText(MainActivity.this, output, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //If any error occured displaying the error as toast\n Toast.makeText(MainActivity.this, error.toString(), Toast.LENGTH_LONG).show();\n }\n }\n );\n }", "GistUser deserializeUserFromJson(String json);", "private UserDao() {\n\t\tusersList = new HashMap<String, User>();\n\t\tusersDetails = JsonFilehandling.read();\n\t\tfor (JSONObject obj : usersDetails) {\n\t\t\tusersList.put(obj.get(\"id\").toString(), new User(obj.get(\"id\").toString(),obj.get(\"name\").toString(), obj.get(\"profession\").toString()));\n\t\t}\n\t}", "public static void serializeUsers(ListOfAllUsers list) throws FileNotFoundException, IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\toos.writeObject(list);\n\t\toos.close();\n\t\t//System.out.println(\"Serialized.\");\n\t}", "@Override\r\n\tpublic void OnAddVoiceUser(List<stVoiceUserInfo> voiceuser) {\n\t\tstVoiceUserInfo[] userinfos = new stVoiceUserInfo[voiceuser.size()];\r\n\t\tint j = 0;\r\n\t\tfor (Iterator<stVoiceUserInfo> i = voiceuser.iterator(); i.hasNext();)\r\n\t\t{ \r\n\t\t\tstVoiceUserInfo userinfoRef = i.next(); \r\n\t\t\tuserinfos[j] = userinfoRef;\r\n\t\t\tj++;\r\n\t\t} \r\n\t\t\r\n\t}", "private void modify() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.set(i,\r\n\t\t\t\t\t\tnew LoginUser(logTxtIp.getText(), logTxtId.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPw.getText(), logTxtSdi.getText(),\r\n\t\t\t\t\t\t\t\tlogTxtPort.getText(), dbType.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.toString()));\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\r\n\t}", "public void popoulaRepositorioUsuarios(){\n Usuario usuario1 = new Usuario();\n usuario1.setUsername(\"EliSilva\");\n usuario1.setEmail(\"elineide.silva.inf@gmail.com\");\n usuario1.setSenha(\"123\");\n usuario1.setNome(\"Elineide Silva\");\n usuario1.setCPF(\"12345678\");\n\n\n\n Usuario usuario2 = new Usuario();\n usuario2.setUsername(\"gustavo\");\n usuario2.setEmail(\"gustavo@gmail.com\");\n usuario2.setSenha(\"12345\");\n usuario2.setNome(\"Gustavo\");\n usuario2.setCPF(\"666\");\n\n Usuario usuario3 = new Usuario();\n usuario1.setUsername(\"peixe\");\n usuario1.setEmail(\"peixe@gmail.com\");\n usuario1.setSenha(\"1111\");\n usuario1.setNome(\"quem dera ser um peixe\");\n usuario1.setCPF(\"1111\");\n\n Usuario usuario4 = new Usuario();\n usuario1.setUsername(\"segundo\");\n usuario1.setEmail(\"2@gmail.com\");\n usuario1.setSenha(\"123\");\n usuario1.setNome(\"Elineide Silva\");\n usuario1.setCPF(\"12345678\");\n\n inserir(usuario1);\n inserir(usuario2);\n inserir(usuario3);\n inserir(usuario4);\n }", "public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}", "private void AddFaviourate() {\n StringRequest stringRequest = new StringRequest(Request.Method.POST, Configs.URL_ViewUserProfile,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n // progressBar.setVisibility(View.GONE);\n Log.i(\"\",\"view111111111111111111111\"+response.toString());\n\n try {\n JSONObject obj = new JSONObject(response);\n JSONObject userJson = obj.getJSONObject(\"0\");\n //Log.i(\"\",\"111111111111111111111\"+response.toString());\n String jid=userJson.getString(\"intId\");\n Log.i(\"\",\"1fgsdg11111111111111111111\"+jid);\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show();\n\n Log.i(\"\",\"profile error=========\"+error.toString());\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"UserId\", viewUserId);\n\n return params;\n }\n };\n\n VolleySingleton.getInstance(this).addToRequestQueue(stringRequest);\n\n }", "@Override\n protected void onPostExecute(String result) {\n SQLiteDatabase db=conn.getWritableDatabase();\n JSONArray ja = null;\n try {\n ja = new JSONArray(result);\n\n String valor=\"\";\n String ayudanteUsuario=\"\";\n String recojevalor=\"\";\n\n //String[] ayudante=valor.split(\",\");\n ContentValues values=new ContentValues();\n values.put(AyudanteCreacionBD.CAMPO_ID_USUARIO,ja.getString(Integer.parseInt(String.valueOf(0))));\n values.put(AyudanteCreacionBD.CAMPO_NOMBRE_USUARIO,ja.getString(1).replace(\"\\\"\",\"\"));\n ayudanteUsuario=ja.getString(2).replace(\"]\",\"\");\n values.put(AyudanteCreacionBD.CAMPO_CONTRASEÑA,ayudanteUsuario.replace(\"\\\"\",\"\"));\n Long idResultante=db.insert(AyudanteCreacionBD.TABLA_USUARIO,null,values);\n Toast.makeText(getApplicationContext(),\"Se ingeso el usuario: \"+ja.getString(1), Toast.LENGTH_LONG).show();\n\n try {\n Intent ListSong = new Intent(getApplicationContext(), PrincipalActivity.class);\n startActivity(ListSong);\n finish();\n }catch (Exception e){\n Toast.makeText(getApplicationContext(),\"No se puede ir a la pantalla principal\", Toast.LENGTH_LONG).show();\n }\n //db.close();\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Error\\nNO se pudo realizar\", Toast.LENGTH_LONG).show();\n return;\n }\n\n }", "public void addUser(User u){\n\r\n userRef.child(u.getUuid()).setValue(u);\r\n\r\n DatabaseReference zipUserReference;\r\n DatabaseReference zipNotifTokenReference;\r\n List<String> zipList = u.getZipCodes();\r\n\r\n for (String zipCode : zipList) {\r\n zipUserReference = baseRef.child(zipCode).child(ZIPCODE_USERID_REFERENCE_LIST);\r\n // Add uuid to zipcode user list\r\n zipUserReference.child(u.getUuid()).setValue(u.getUuid());\r\n\r\n // Add notifToken to list\r\n zipNotifTokenReference = baseRef.child(zipCode).child(ZIPCODE_NOTIFICATION_TOKENS_LIST);\r\n zipNotifTokenReference.child(u.getNotificationToken()).setValue(u.getNotificationToken());\r\n\r\n }\r\n }", "@Override\n public Vector<String> userName(Vector<Integer> friends)\n {\n Vector<String> userNameFreinds=new Vector<>();\n PreparedStatement Is;\n try {\n DriverManager.registerDriver(new OracleDriver());\n Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/chat\", \"root\", \"\");\n \n for(int i=0;i<friends.size();i++){\n \n \n Is = con.prepareStatement(\"select User_name from users where ID=?\");\n Is.setInt(1, friends.elementAt(i));\n \n ResultSet result = Is.executeQuery();\n \n \n \n if (result.next()) {\n System.out.println(\"success \");\n \n \n userNameFreinds.insertElementAt(result.getString(\"User_name\"), i);\n } else {\n\n System.out.println(\"failed \");\n \n }\n}\n } catch (Exception ex) {\n System.out.println(ex);\n ex.printStackTrace();\n }\n\n \n return userNameFreinds;\n \n }", "@POST\n @Path(\"/users/register\")\n public Response register(\n @Context HttpServletRequest request \n ,@Context HttpServletResponse response\n ,@Context ServletContext servletContext\n ,String raw\n ){\n try{\n log.debug(\"/register called\");\n// String raw=IOUtils.toString(request.getInputStream());\n mjson.Json x=mjson.Json.read(raw);\n \n Database2 db=Database2.get();\n for (mjson.Json user:x.asJsonList()){\n String username=user.at(\"username\").asString();\n \n if (db.getUsers().containsKey(username))\n db.getUsers().remove(username); // remove so we can overwrite the user details\n \n Map<String, String> userInfo=new HashMap<String, String>();\n for(Entry<String, Object> e:user.asMap().entrySet())\n userInfo.put(e.getKey(), (String)e.getValue());\n \n userInfo.put(\"level\", LevelsUtil.get().getBaseLevel().getRight());\n userInfo.put(\"levelChanged\", new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date()));// nextLevel.getRight());\n \n db.getUsers().put(username, userInfo);\n log.debug(\"New User Registered (via API): \"+Json.newObjectMapper(true).writeValueAsString(userInfo));\n db.getScoreCards().put(username, new HashMap<String, Integer>());\n \n db.addEvent(\"New User Registered (via API)\", username, \"\");\n }\n \n db.save();\n return Response.status(200).entity(\"{\\\"status\\\":\\\"DONE\\\"}\").build();\n }catch(IOException e){\n e.printStackTrace();\n return Response.status(500).entity(\"{\\\"status\\\":\\\"ERROR\\\",\\\"message\\\":\\\"\"+e.getMessage()+\"\\\"}\").build(); \n }\n \n }", "@Test\n void add() {\n List<User> userList = Arrays.asList(\n new User(1L, \"star\", 20, \"123456\"),\n new User(2L, \"green\", 21, \"123456\"),\n new User(3L, \"red\", 22, \"123456\"),\n new User(4L, \"blue\", 23, \"123456\"),\n new User(5L, \"yellow\", 24, \"123456\"),\n new User(6L, \"black\", 26, \"123456\")\n );\n userRepository.saveAll(userList);\n }", "@Override\n\tpublic JSONObject insertFuliao(String jsonStr) throws Exception {\n\t\ttry {\n\t\t\t JSONObject allData = JSONObject.fromObject(jsonStr);\n\t\t\t String shop_name = allData.getString(\"shop_name\");\n\t\t\t String accepter = allData.getString(\"person\");\n\t\t\t String date = String.format(\"%tF\",new Date());\n\t\t\t GetSecMaterials getSecMaterials = new GetSecMaterials();\n\t\t\t getSecMaterials.setShop_name(shop_name);\n\t\t\t getSecMaterials.setApply_data(date);\n\t\t\t getSecMaterials.setApplyer(accepter);\n\t\t\t getSecMaterials.setIs_apply(0);\n\t\t\t getSecMaterials.setIs_approve(0);\n\t\t\t getSecMaterials.setIs_pushed(0);\n\t\t\t getSecMaterials.setIs_return(0);\n\t\t\t fuliaoMapper.insertFuliao(getSecMaterials);\n\t\t\t JSONArray jsonArray = allData.getJSONArray(\"detail\");\n\t\t\t List<GetSecDetail> getSecDetails = new ArrayList<>();\n\t\t\t for(int i=0;i<jsonArray.size();i++) {\n\t\t\t\t JSONObject jsonObject = jsonArray.getJSONObject(i);\n\t\t\t\t GetSecDetail getSecDetail = new GetSecDetail();\n\t\t\t\t getSecDetail.setGet_materials_id(getSecMaterials.getGet_materials_id());\n\t\t\t\t getSecDetail.setReshop_name(shop_name);\n\t\t\t\t getSecDetail.setSec_material_no(jsonObject.getString(\"fuliao_no\"));\n\t\t\t\t getSecDetail.setSec_material_name(jsonObject.getString(\"fuliao_name\"));\n\t\t\t\t getSecDetail.setType(jsonObject.getString(\"type\"));\n\t\t\t\t getSecDetail.setUnit(jsonObject.getString(\"unit\"));\n\t\t\t\t getSecDetail.setNum(jsonObject.getString(\"num\"));\n\t\t\t\t getSecDetail.setIs_return(0);\n\t\t\t\t getSecDetails.add(getSecDetail);\n\t\t\t }\n\t\t\t GetSecDetailVo getSecDetailVo = new GetSecDetailVo();\n\t\t\t getSecDetailVo.setGet_sec_details(getSecDetails);\n\t\t\t fuliaoMapper.insertFuliaoDetail(getSecDetails);\n\t\t\t JSONObject is_ok = new JSONObject();\n\t \t\t is_ok.put(\"is_ok\", \"1\");\n\t \t\t return is_ok;\n\t\t }catch(Exception e) {\n\t\t\t e.printStackTrace();\n\t\t\t TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();\n\t\t\t JSONObject is_ok = new JSONObject();\n\t \t\t is_ok.put(\"is_ok\", \"0\");\n\t \t\t return is_ok;\n\t\t }\n\t}", "public static String convertUserListToNameList(List<User> userList) {\n\t\tString result = \"\";\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.disable(MapperFeature.DEFAULT_VIEW_INCLUSION);\n\t\ttry {\n\t\t\tresult = mapper.writerWithView(Views.Public.class)\n\t\t\t\t\t\t .writeValueAsString(userList);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\n\t}", "public ArrayList<UserDataBean> list() {\n/* 80 */ String firstname = \"\";\n/* 81 */ String lastname = \"\";\n/* 82 */ String email = \"\";\n/* */ \n/* 84 */ Connection conn = null;\n/* 85 */ PreparedStatement pstmt = null;\n/* 86 */ ResultSet rs = null;\n/* */ \n/* 88 */ ArrayList<UserDataBean> list = new ArrayList<UserDataBean>();\n/* 89 */ String sql = \"select * from members\";\n/* */ \n/* */ try {\n/* 92 */ conn = getConn();\n/* 93 */ System.out.println(\"db접속 성공\");\n/* 94 */ pstmt = conn.prepareStatement(sql);\n/* 95 */ rs = pstmt.executeQuery();\n/* */ \n/* 97 */ while (rs.next()) {\n/* 98 */ UserDataBean user = new UserDataBean(firstname, lastname, email);\n/* */ \n/* 100 */ user.setFirstname(rs.getString(\"firstname\"));\n/* 101 */ user.setLastname(rs.getString(\"lastname\"));\n/* 102 */ user.setEmail(rs.getString(\"email\"));\n/* */ \n/* 104 */ list.add(user);\n/* */ }\n/* */ \n/* 107 */ } catch (Exception e) {\n/* 108 */ e.printStackTrace();\n/* */ } finally {\n/* 110 */ closeDB();\n/* */ } \n/* */ \n/* 113 */ return list;\n/* */ }", "@Override\n protected void onPostExecute(String result) {\n try {\n JSONArray jArray = new JSONArray(result);\n for(int i = 0; i < jArray.length(); i++){\n JSONObject jObject = jArray.getJSONObject(i);\n Message message = new Message();\n message.setIdService(jObject.getInt(\"id\"));\n message.setTitle(jObject.getString(\"title\"));\n message.setMessage(jObject.getString(\"message\"));\n message.setIdService(jObject.getInt(\"id\"));\n\n if (!jObject.isNull(\"student\")){\n JSONObject jStudent = jObject.getJSONObject(\"student\");\n message.setDestination(jStudent.getString(\"name\"));\n }else{\n JSONObject jStudent = jObject.getJSONObject(\"students_class\");\n message.setDestination(jStudent.getString(\"name\"));\n }\n\n dao.insert(message);\n }\n\n\n } catch (JSONException e) {\n Log.e(\"DOUGLAS\", e.getMessage());\n handler.onJsonError();\n }finally {\n handler.onFinish();\n }\n }", "private void createAllUsersList(){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAvailList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n try {\r\n JSONParser parser = new JSONParser();\r\n\r\n String username, password;\r\n boolean isexist = false;\r\n int i;\r\n\r\n try {\r\n username = request.getParameter(\"username\");\r\n password = request.getParameter(\"password\");\r\n\r\n Object obj = parser.parse(new FileReader(\"C:\\\\Users\\\\VigossZ\\\\Documents\\\\NetBeansProjects\\\\IS2560FinalProject\\\\web\\\\files\\\\api.json\"));\r\n\r\n JSONObject jsonObject = (JSONObject) obj;\r\n JSONArray userObjectarray = (JSONArray) jsonObject.get(\"userObject\");\r\n\r\n for (i = 0; i < userObjectarray.size(); i++) {\r\n JSONObject eachobj = (JSONObject) userObjectarray.get(i);\r\n String eachobjemail = eachobj.get(\"email\").toString();\r\n if (eachobjemail.equals(username)) {\r\n isexist = true;\r\n }\r\n }\r\n\r\n if (isexist)\r\n {\r\n response.sendRedirect(\"signup.html\");\r\n } else {\r\n JSONObject newuser = new JSONObject();\r\n newuser.put(\"id\", i);\r\n newuser.put(\"email\", username);\r\n JSONObject newtodolist = new JSONObject();\r\n newtodolist.put(\"content\", new JSONArray());\r\n newuser.put(\"todolist\", newtodolist);\r\n newuser.put(\"password\", password);\r\n JSONObject newnewsreader = new JSONObject();\r\n newnewsreader.put(\"bookmarks\", new JSONArray());\r\n newuser.put(\"newsreader\", newnewsreader);\r\n JSONObject newcontacts = new JSONObject();\r\n newcontacts.put(\"contact\", new JSONArray());\r\n newuser.put(\"contacts\", newcontacts);\r\n userObjectarray.add(newuser);\r\n\r\n FileWriter file = new FileWriter(\"C:\\\\Users\\\\VigossZ\\\\Documents\\\\NetBeansProjects\\\\IS2560FinalProject\\\\web\\\\files\\\\api.json\");\r\n file.write(jsonObject.toJSONString());\r\n file.flush();\r\n file.close();\r\n\r\n User user = new User();\r\n user.setUsername(username);\r\n user.setUserid(Integer.toString(i));\r\n request.getSession().setAttribute(\"user\", user);\r\n response.sendRedirect(\"home.jsp\");\r\n return;\r\n }\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n } finally {\r\n out.close();\r\n }\r\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public void insertUser() {}", "public void getListaUsuarios(ArrayList<Usuario> listaUsuario) {\n sql = \"SELECT * FROM tbl_usuario\";\n try {\n Statement st = cn.createStatement();\n ResultSet rs = st.executeQuery(sql);\n listaUsuario.clear();\n while (rs.next()) {\n Usuario usuario = new Usuario();\n usuario.setId_usuario(rs.getInt(\"id_usuario\"));\n usuario.setNombre_usuario(rs.getString(\"nombre_usuario\"));\n usuario.setApellido_usuario(rs.getString(\"apellido_usuario\"));\n usuario.setPassword_usuario(rs.getString(\"password_usuario\"));\n usuario.setEmail_usuario(rs.getString(\"email_usuario\"));\n listaUsuario.add(usuario);\n }\n } catch (SQLException ex) {\n Logger.getLogger(UsuarioDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n\tpublic void writeUsers(UserClass user, ArrayList<UserClass> array,\r\n\t\t\tString address) {\n\t\t\r\n\t}", "public void updateJSONdata() {\n\n mDispositiuList = new ArrayList<HashMap<String, String>>();\n\n mDispositiusMapper = new HashMap<Integer, Dispositiu>();\n\n JSONParser jsonParser = new JSONParser();\n\n // Building Parameters\n List<NameValuePair> postValues = new ArrayList<NameValuePair>();\n postValues.add(new BasicNameValuePair(\"id_empresa\", String.valueOf(dades.getInt(\"empresa\"))));\n\n // getting JSON Object\n // Note that login url accepts POST method\n JSONObject json = jsonParser.makeHttpRequest(URL_DISPOSITIUS, \"POST\", postValues);\n\n // check log cat from response\n // Log.d(\"DispositiusEmpresa Response\", json.toString());\n\n try {\n\n success = json.getInt(TAG_SUCCESS);\n\n if (success == 1) {\n // dispositius retrieved successfully\n\n mDispositius = json.getJSONArray(TAG_DEVICES);\n\n if (mDispositius != null) {\n\n int len = mDispositius.length();\n for (int i = 0; i < len; i++) {\n JSONObject obj = mDispositius.getJSONObject(i);\n\n // gets the content of each tag\n String id = String.valueOf(obj.getInt(TAG_DEVICEID));\n String nom = obj.getString(TAG_DEVICENAME);\n String flota = obj.getString(TAG_FLOTA);\n String vehicle = obj.getString(TAG_VEHICLE);\n\n // creating new HashMap\n HashMap<String, String> map = new HashMap<String, String>();\n\n map.put(TAG_DEVICEID, id);\n map.put(TAG_DEVICENAME, nom);\n map.put(TAG_FLOTA, flota);\n map.put(TAG_VEHICLE, vehicle);\n\n // adding HashList to ArrayList\n mDispositiuList.add(map);\n\n\n dispositiu = new Dispositiu();\n dispositiu.setId(obj.getInt(TAG_DEVICEID));\n dispositiu.setNom(nom);\n dispositiu.setFlota(flota);\n dispositiu.setVehicle(vehicle);\n dispositiu.setPosition(obj.getDouble(TAG_LAT), obj.getDouble(TAG_LNG));\n\n mDispositiusMapper.put(dispositiu.getId(), dispositiu);\n }\n }\n\n } else {\n // failed to retrieve dispositius\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.6705138", "0.6667577", "0.6650098", "0.6623271", "0.6594406", "0.6361592", "0.62161815", "0.6207082", "0.6157628", "0.6032617", "0.6008519", "0.6004596", "0.5993431", "0.5976013", "0.59664947", "0.5922155", "0.5885486", "0.58788955", "0.586868", "0.5865561", "0.5854138", "0.58380723", "0.5805704", "0.5800512", "0.5796063", "0.5781514", "0.5753167", "0.57141936", "0.5713875", "0.57120144", "0.5665878", "0.5665563", "0.566132", "0.56575626", "0.56573635", "0.5647534", "0.56395406", "0.563344", "0.56144714", "0.56113595", "0.5605416", "0.5600407", "0.55979836", "0.5597817", "0.5595666", "0.55841166", "0.5581928", "0.55781823", "0.55731857", "0.5568917", "0.5565988", "0.55624276", "0.5560318", "0.5552735", "0.55401975", "0.5526516", "0.55250114", "0.55237186", "0.55230296", "0.54989815", "0.5496806", "0.54955286", "0.54898304", "0.5483285", "0.54790425", "0.5477575", "0.54773504", "0.5474883", "0.54675376", "0.5463759", "0.545185", "0.5451329", "0.54440325", "0.5436119", "0.5435872", "0.5431071", "0.54309714", "0.543021", "0.5421893", "0.5421547", "0.5406592", "0.5405358", "0.54043996", "0.54032594", "0.5394962", "0.5394769", "0.5389054", "0.5383064", "0.53819555", "0.53807116", "0.5380307", "0.53781533", "0.5377539", "0.53748685", "0.5374256", "0.5366385", "0.5359038", "0.53585744", "0.5357115", "0.53532696" ]
0.6275392
6
Dato l'id di un personaggio ritorna l'oggetto character
public Character getCharacterWithId(int id){ for(Character c : alCharacter){ if(c.getId() == id){ return c; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getAoisId();", "public String getInoId();", "private String getIdioma()\n throws MareException\n {\n\t\tLong idioma = UtilidadesSession.getIdioma(this);\n\t\treturn idioma.toString();\n }", "public Long getPersonaId();", "public String getIdAeroporto()\n {\n return this.idAeroporto;\n }", "public char getId(){return this.id;}", "public static String getIdBeneficio(){\n //La Clase Math tiene varios metodos que te ayudaran\n //Escoger numero aleatorio entre 100000 y 1\n int idrandom1 = (int) (Math.random() * 1000000 + 1);\n\n String idrandom = Integer.toString(idrandom1);\n\n return idrandom;\n }", "public abstract java.lang.Long getId_causal_peticion();", "private String getCursoId(String turma_id) \n\t{\n\t\tString curso = null;\n\t\tif(turma_id.charAt(0) == 'I')\n\t\t{\n\t\t\tcurso = \"LEIT\";\n\t\t}else if(turma_id.charAt(0) == 'C')\n\t\t{\n\t\t\tcurso = \"LECT\";\n\t\t}else if(turma_id.charAt(0) == 'M')\n\t\t{\n\t\t\tcurso = \"LEMT\";\n\t\t}else if(turma_id.charAt(0) == 'G')\n\t\t{\n\t\t\tcurso = \"LGF\";\n\t\t}\n\t\telse if(turma_id.charAt(0) == 'A')\n\t\t{\n\t\t\tcurso = \"LEIT\";\n\t\t}\n\t\treturn curso;\n\t}", "public abstract java.lang.String getTica_id();", "public java.lang.Long getId_tecnico();", "public char getId() {\n return id;\n }", "java.lang.String getID();", "String mo10312id();", "private static String generarIdUsuario(String correo2) {\n\t\tString idUsuariogen=\"\";\n\t\tString[] divCorreo=null;\n\t\tString[] divCorreo2=null;\n\t\t\n\t\tif(correo2.contains(\"@ucentral.edu.co\"))\n\t\t{\n\t\t\tdivCorreo=correo2.split(\"@\");\n\t\t\tidUsuariogen = divCorreo[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdivCorreo=correo2.split(\"@\");\n\t\t\tdivCorreo2=divCorreo[1].split(\"\\\\.\");\n\t\t\tidUsuariogen = divCorreo[0]+divCorreo2[0];\n\t\t\tSystem.out.print(idUsuariogen);\n\t\t}\n\t\treturn idUsuariogen;\n\t}", "int getIdRondaCancion(Cancion cancion,Date fecha) throws ExceptionDao;", "public Character Id() {\n return null;\n }", "public static String creaCodiceGiorno(String giornoPersona, String sessoPersona) {\n\n\t\t//se il sesso è F\n\t\tif (sessoPersona.equals(\"F\")) {\n\t\t\t//converto la stringa del giorno in int\n\t\t\tint giornoPersonaInt = Integer.parseInt(giornoPersona);\n\t\t\tgiornoPersonaInt += 40;\n\t\t\t//riconverto da int a string \n\t\t\tgiornoPersona = Integer.toString(giornoPersonaInt);\n\t\t}\n\n\t\treturn giornoPersona;\n\t}", "java.lang.String getCombatNpcPersonalityId();", "public int idade() {\n\t\treturn 2020 - anoNascimento;\n\t}", "@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonaggio;\n\t}", "String getCampoId();", "public char getId() {\n return this.id;\n }", "@AutoEscape\n\tpublic String getIdPtoServicio();", "public java.lang.Integer getIdCaracterizacion() {\n return idCaracterizacion;\n }", "public static String getDateId() {\n Date date = new Date();\n String dateFormatStyle = \"yy-MM-dd-HH-mm-ss\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormatStyle);\n String dateFormat = sdf.format(date);\n String[] formatedDate = dateFormat.split(\"-\");\n int i = 0;\n String year = formatedDate[i];\n String month = formatedDate[++i];\n String cDate = formatedDate[++i];\n String hour = formatedDate[++i];\n String minute = formatedDate[++i];\n String second = formatedDate[++i];\n return alphanum[Integer.parseInt(year)]\n .concat(alphanum[Integer.parseInt(month)])\n .concat(alphanum[Integer.parseInt(cDate)])\n .concat(alphanum[Integer.parseInt(hour)])\n .concat(alphanum[Integer.parseInt(minute)])\n .concat(alphanum[Integer.parseInt(second)]);\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public String getIdtipobulto()\n {\n return (String)getAttributeInternal(IDTIPOBULTO);\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "public char getID() {\n return this.id;\n }", "public int getCharacterId() {\n return characterId;\n }", "public int charNum() {\n return myId.charNum();\n }", "public void generarId() {\n try{\n int numAleatorio = (int)(Math.random()*99999);\n boolean resultado = dgt.generarIdAutomatico(numAleatorio);\n tfid.setText(String.valueOf(numAleatorio));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "public long getLichChiTietId();", "public int getId()\r\n/* 53: */ {\r\n/* 54: 79 */ return this.idDetalleComponenteCosto;\r\n/* 55: */ }", "@AutoEscape\n\tpublic String getIdCanal();", "private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }", "public String getId_Pelanggan(){\r\n \r\n return id_pelanggan;\r\n }", "@Override\n\tpublic int getIdNguoiDong() {\n\t\treturn _keHoachKiemDemNuoc.getIdNguoiDong();\n\t}", "public String generaIDPortalEmpleo(EmpresaPorAutorizarVO vo){\n\t\tString idPortalEmpleo = \"\";\t\t\n\t\tint digitoVerificador = 1;\n\t\tFormat formatter = new SimpleDateFormat(\"yyMMdd\");\t\t\n\t\ttry {\n\t\t\tDomicilioVO domicilio = vo.getDomicilio();\n\t\t\tif(vo.getIdTipoPersona() == Constantes.TIPO_PERSONA.PERSONA_FISICA.getIdTipoPersona()){\n\t\t\t\t//Tipo de Persona Física\n\t\t\t\tif(vo.getApellido2().isEmpty()){\n\t\t\t\t\t//Primeras tres letras del apellido paterno\n\t\t\t\t\t//System.out.println(\"--original--strApellido1:\" + vo.getApellido1());\n\t\t\t\t\tString strApellido1 = convertAccents(vo.getApellido1());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido1:\" + strApellido1);\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido1.substring(0, 3);\t\n\t\t\t\t} else {\n\t\t\t\t\t//Primeras dos letras del apellido paterno\n\t\t\t\t\t//Primera letra del apellido materno\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"--original--strApellido1:\" + vo.getApellido1());\n\t\t\t\t\tString strApellido1 = convertAccents(vo.getApellido1());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido1:\" + strApellido1);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"--original--strApellido2:\" + vo.getApellido2());\n\t\t\t\t\tString strApellido2 = convertAccents(vo.getApellido2());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido2:\" + strApellido2);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido1.substring(0, 2);\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido2.substring(0, 1);\n\t\t\t\t}\n\t\t\t\t//Primera letra del nombre\n\t\t\t\t//System.out.println(\"--original--strNombre:\" + vo.getNombre());\n\t\t\t\tString strNombre = convertAccents(vo.getNombre());\n\t\t\t\t//System.out.println(\"--modificado--strNombre:\" + strNombre);\t\t\t\t\t\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + strNombre.substring(0, 1);\n\t\t\t\t//Fecha de nacimiento en formato yymmdd\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + formatter.format(vo.getFechaNacimiento());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//Tipo de Persona Moral\t\t\t\t\t\n\t\t\t\tString strRazonSocial = convertAccents(vo.getRazonSocial());\n\t\t\t\t//Primeras tres letras de razón social\n\t\t\t\t//COMENTAR EN PRODUCCION\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (strRazonSocial.length() < 3) \n\t\t\t\t\tstrRazonSocial = StringUtils.rightPad(strRazonSocial, 3, \"X\");\n\t\t\t\t/**/\t\t\n\t\t\t\t//TERMINA COMENTAR EN PRODUCCION\t\t\t\t\n\t\t\t\t//\n\t\t\t\t//System.out.println(\"--modificado--strRazonSocial:\" + strRazonSocial);\t\t\t\t\t\t\t\t\t\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + strRazonSocial.substring(0, 3);\t\n\t\t\t\t//Fecha de acta en formato yymmdd\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + formatter.format(vo.getFechaActa());\n\t\t\t}\n\t\t\tidPortalEmpleo = idPortalEmpleo + domicilio.getCodigoPostal();\t\t\t\n\t\t\t//Código verificador (1)\t\t\t\t\n\t\t\tEmpresaPorAutorizarDAO epaDAO = new EmpresaPorAutorizarDAO();\n\t\t\tdigitoVerificador = epaDAO.obtenerDigitoVerificador(idPortalEmpleo, vo.getIdTipoPersona());\t\n\t\t\t//rellenar\n\t\t\tint lenId = idPortalEmpleo.length();\n\t\t\t//System.out.println(\"------digitoVerificador:\" + digitoVerificador);\n\t\t\tint lenDigito = String.valueOf(digitoVerificador).length();\n\t\t\t//System.out.println(\"------lenDigito:\" + lenDigito);\n\t\t\tint intRelleno = PORTAL_ID_SIZE - (lenId + lenDigito);\n\t\t\t//System.out.println(\"------intRelleno:\" + intRelleno);\n\t\t\tString strRelleno = \"\";\n\t\t\tif(intRelleno>0){\n\t\t\t\tfor(int i=0; i<intRelleno; i++){\n\t\t\t\t\tstrRelleno = strRelleno + \"0\";\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t//System.out.println(\"------strRelleno:\" + strRelleno);\n\t\t\tidPortalEmpleo = idPortalEmpleo + strRelleno + digitoVerificador;\n\t\t\t//System.out.println(\"------idPortalEmpleo:\" + idPortalEmpleo);\n\t\t\n\t\t} catch (RuntimeException e) {\n\t\t\tlogger.error(e.toString());\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e.toString());\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.toString());\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t}\t\t\n\t\treturn idPortalEmpleo;\n\t}", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }" ]
[ "0.64699984", "0.63669807", "0.63347507", "0.61600035", "0.6159187", "0.61480325", "0.6147414", "0.612781", "0.611189", "0.6107877", "0.6097328", "0.6094751", "0.6091906", "0.60439736", "0.6017633", "0.6009675", "0.5996351", "0.59931123", "0.59789497", "0.5967988", "0.59658974", "0.59596103", "0.5942642", "0.59413505", "0.59173226", "0.59089935", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.59059936", "0.5898916", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58987623", "0.58896065", "0.5888402", "0.5885729", "0.5882902", "0.58664787", "0.58602047", "0.5855145", "0.5838201", "0.5827626", "0.58216226", "0.5816997", "0.580963" ]
0.0
-1
Dato il nome di un personaggio presente nella partita corrente, ritorna la sua posizione all'interno dell'arraylist
public int getCharaterPositionWithName(String s){ int i; for(i = 0; i<alCharacter.size(); i++){ String nameNextChar = alCharacter.get(i).getName(); if(s.equals(nameNextChar)){ break; } } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic ArrayList<String> partecipantiListaElettorale(String nome) {\n\t\tDB db = getDB();\n\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\n\t\tSet<Integer> keys = map.keySet();\n\t\tfor (int key : keys) {\n\t\t\tif (map.get(key).getNomeLista().equals(nome)) {\n\t\t\t\treturn map.get(key).getComponenti();\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }", "public List<String > getNames(){\n List<String> names = new ArrayList<>();\n String fNameQuery = \"SELECT \" + _IDP + \",\" + COL_F_NAME + \",\" + COL_L_NAME + \" FROM \" + TPYTHONISTAS + \" ;\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(fNameQuery, null);\n String name;\n if (c.moveToFirst()) {\n do {\n // put together NameID#, period, Lastname, Firstname\n name = c.getString(0) + \". \" + c.getString(2) + \", \" + c.getString(1);\n names.add(name);\n } while (c.moveToNext());\n }\n c.close();\n db.close();\n return names;\n }", "public static ArrayList<String> getReglesNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"regles\");\n }", "private String buscaEnArray(ArrayList<Student> lista, int id){\n for (int i=0; i<lista.size(); i++){\n if(lista.get(i).getId_student() == id){\n return lista.get(i).getName() + \" \" + lista.get(i).getSurname1();\n }\n }\n return null;\n }", "public List<String> getListe()\n\t\t\t{\n\t\t\t\treturn personnes;\n\t\t\t}", "public String[] nombres(){\n return partida.nombres();\n }", "public ArrayList <String>GroupePers(Personne p1) throws SQLException{\n\t\t\tArrayList <String> groupe = new ArrayList<String>();\n\t\t\tString req =\"Select NomGroupe from Groupe where NomComptePers= ?\";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setString(1,p1.getNomComptePers());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\tgroupe.add(rs.getString(1));\n\t\t\t}\n\t\t\treturn groupe;\n\t\t\t\n\t\t}", "public String getNombre(){\r\n return beneficiario[1].toString();\r\n }", "public static ArrayList<String> getNameFromPerson(ArrayList<Person> persons){\n ArrayList<String> nameList = new ArrayList<String>();\n for(Person person : persons){\n nameList.add(person.name);\n }\n return nameList;\n }", "public ArrayList<String> getNombrePropiedades(){\n ArrayList<String> listaPropiedades = new ArrayList();\n \n for(TituloPropiedad propiedad :propiedades){\n listaPropiedades.add(propiedad.getNombre());\n }\n return listaPropiedades;\n }", "public ArrayList<String[]> getPatientsNameList()\r\n {\r\n\t String lists[]= new String[2];\r\n\t ArrayList<String[]> name = new ArrayList<String[]>();\r\n\t try \r\n\t {\r\n\t\tResultSet rs = stmt.executeQuery( \"SELECT * FROM PATIENTDATA;\" );\r\n\t\tint i =0;\r\n\t\twhile (rs.next())\r\n\t\t{\r\n\t\t\tlists[0] = rs.getString(\"LASTNAME\");\r\n\t\t\tlists[1]=rs.getString(\"FIRSTNAME\");\r\n\t\t\tname.add(lists);\r\n\t\t\tlists = new String[2];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn name;\r\n\t } \r\n\t catch (SQLException e) \r\n\t {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t }\r\n\t return name;\r\n\t \r\n }", "public String listarSensores(){\r\n String str = \"\";\r\n for(PacienteNuvem x:pacientes){//Para cada paciente do sistema ele armazena uma string com os padroes do protocolo de comunicação\r\n str += x.getNick()+\"-\"+x.getNome()+\"#\";\r\n }\r\n return str;\r\n }", "public ArrayList<String> getFullName(){\n\t\tArrayList<String> fullName = new ArrayList<>(); \n\t\t\n\t\tfor(int i =0; i<firstName.size(); i++) {\n\t\t\tfullName.add(firstName.get(i) + \" \" + lastName.get(i)); \n\t\t}\n\t\t\n\t\treturn fullName; \t\t\n\t}", "public ArrayList<String> Info_Disco_Pel_Rep4(String genero) {\r\n String line;\r\n ArrayList<String> Lista_datos_nombre_genero = new ArrayList();\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/cat_peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco = line.split(\";\");\r\n if (info_disco[2].equals(genero)) {\r\n Lista_datos_nombre_genero.add(info_disco[0]);\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_nombre_genero;\r\n }", "public ArrayList<String> Info_Disc_Pel_Compras(String genero) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep4(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3])) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "public static void personTest(){\n ArrayList<Person> people = new ArrayList<>();\n //people[0] = new Person(\"Fer\", \"Mendoza\", true);\n people.add(new Person(\"Fer\", \"Mendoza\", true));\n people.add(new Person(\"Stacy\", \"Malibu\", false));\n people.add(new Person(\"Ana\", \"Morton\", true));\n\n for (Person person : people) {\n System.out.println(\"person.getFullName() = \" + person.getFullName());\n }\n\n }", "public ArrayList<String> Info_Disc_Mus_Compras(String genero) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Mus_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Musica.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3])) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "public List <Person> getDetails(List <Person> listOfPerson)\n\t{\n\t\tSystem.out.println(\"Enter the First Name of the Person you want the details of:\");\n\t\tString name = Utility.inputString();\t\n\t\tfor(int i = 0; i < listOfPerson.size(); i++)\n\t\t{\n\t\t\tif(listOfPerson.get(i).getFname().equals(name))\n\t\t\t{\n\t\t\t\tPerson temp = listOfPerson.get(i);\n\t\t\t\tSystem.out.println(temp.toString());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Person not found\");\n\t\t\t}\n\t\t}\n\t\treturn listOfPerson;\n\t}", "public String infosPourList(){\n return nom+ \" , \" +promo.getNom();\n }", "public void makeArray(){\n for (int i = 0; i<length; i++){\n departements[i] = wallList.get(i).getName();\n }\n }", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "public ArrayList<String> Info_Disco_Pel_Rep1(String genero) {\r\n String line;\r\n ArrayList<String> Lista_datos_nombre_genero = new ArrayList();\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/cat_peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco = line.split(\";\");\r\n if (info_disco[2].equals(genero)) {\r\n Lista_datos_nombre_genero.add(info_disco[0]);\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_nombre_genero;\r\n }", "private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public String getListaGrupos () {\n String nomesGruposList = \"\";\n if(this.conversas != null && this.conversas.size() > 0){\n for(int i = 0; i < this.conversas.size(); i++){\n //nomesGruposList += conversas.get(i).nomeGrupo + \" \";\n }\n }\n return nomesGruposList;\n }", "public void afficherListeNoms(){\r\n\t\tfor (String nom: noms){\r\n\t\t\tSystem.out.println(nom);\r\n\t\t}\r\n\t}", "@Override\n\tpublic ArrayList<Object[]> parEmplo(String puesto) {\n\t\tfor (Employe emplo : treeMap.values()) {\n\t\t\tif (emplo.getClass().getName().substring(13).equals(puesto)) {\n\t\t\t\t// System.out.println(emplo);\n\t\t\t\tObject[] aux = { emplo.getId(), emplo.getNom(),\n\t\t\t\t\t\templo.getPrenom(), emplo.getDate_N(), emplo.getSexe(),\n\t\t\t\t\t\templo.getRue(), emplo.getNumero(), emplo.getVille(),\n\t\t\t\t\t\templo.getPay(), emplo.getTelef(),\n\t\t\t\t\t\templo.getClass().getName().substring(13) };\n\t\t\t\tarray1.add(aux);\n\t\t\t}\n\t\t}\n\t\treturn array1;\n\t}", "public void cargarNombre() {\n\n System.out.println(\"Indique nombre del alumno\");\n nombre = leer.next();\n nombres.add(nombre);\n\n }", "public Lista listaElettoraleDaNome(String nome) {\n\n\t\tDB db = getDB();\n\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\n\t\tSet<Integer> keys = map.keySet();\n\n\t\t//ritorna la lista elettorale con quel nome\n\t\tfor (int key : keys) {\n\t\t\tif (map.get(key).getNomeLista().equals(nome))\n\t\t\t\treturn map.get(key);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n\tpublic ArrayList<Lista> listaListeElettoraliDiElezione(String nomeElezione) {\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\n\t\t\tfor (int key : keys) {\n\t\t\t\tif (map.get(key).getElezione().equals(nomeElezione))\n\t\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\t\treturn liste;\n\t\t}", "public static void main (String[] args){\n Empleado[] listaEmpleados = new Empleado[10];\n \n //Asignamos objetos a cada posición\n listaEmpleados[0] = new Empleado(\"Manuel\", \"30965835V\");\n listaEmpleados[1] = new Empleado(\"Miguel\", \"30965835V\");\n listaEmpleados[2] = new Empleado(\"Pedro\", \"30965835V\");\n listaEmpleados[3] = new Empleado(\"Samuel\", \"30965835V\");\n listaEmpleados[4] = new Empleado(\"Vanesa\", \"30965835V\");\n listaEmpleados[5] = new Empleado(\"Alberto\", \"30965835V\");\n listaEmpleados[6] = new Empleado(\"Roberto\", \"30965835V\");\n listaEmpleados[7] = new Empleado(\"Carlos\", \"30965835V\");\n listaEmpleados[8] = new Empleado(\"Ernesto\", \"30965835V\");\n listaEmpleados[9] = new Empleado(\"Javier\", \"30965835V\");\n\n /*Empleado[] empleados = {\n empleado1, empleado2, empleado3, null,null,null, null,\n null,null,null\n }*/\n \n //Imprimimos el array sin ordenar\n imprimeArrayPersona(listaEmpleados);\n \n //Creamos el objeto de la empresa\n Empresa empresa0 = new Empresa(\"Indra\", listaEmpleados);\n \n //Usamos la clase array para ordenar el array de mayor a menos\n Arrays.sort(listaEmpleados);\n\n //Imprimimos de nuevo el array\n imprimeArrayPersona(listaEmpleados);\n \n //Imprimimos la empresa\n System.out.println(empresa0);\n \n //Guardamos en un string la lista de nombres de un objeto empresa\n String listado = Empresa.listaEmpleado(empresa0.empleado).toString();\n \n System.out.println(listado);//Imprimimos el listado como un string\n \n //Imprimimos el array de los nombres de los empleados de la empresa\n System.out.println(Arrays.toString(Empresa.listaEmpleadoArray(listado)));\n \n //Método que imprime los empleados de una empresa separados por comas\n Empresa.listaEmpleado(listado);\n \n /*Empresa[] listaEmpresa = new Empresa[4];\n \n listaEmpresa[0] = new Empresa(\"Intel\", listaEmpleados);\n listaEmpresa[1] = new Empresa(\"AMD\", listaEmpleados);\n listaEmpresa[2] = new Empresa(\"Asus\", listaEmpleados);\n listaEmpresa[3] = new Empresa(\"Shaphire\", listaEmpleados);\n System.out.println(Arrays.toString(listaEmpresa));\n Arrays.sort(listaEmpresa);\n System.out.println(Arrays.toString(listaEmpresa));*/\n \n \n }", "public void ListDrwaer() {\n List<Map<String, String>> employeeList = new ArrayList<Map<String, String>>();\n params = new HashMap<>();\n\n try {\n JSONObject jsonResponse = new JSONObject(jsonResult);\n JSONArray jsonMainNode = jsonResponse.optJSONArray(\"listafaltantes\");\n\n for (int i = 0; i < jsonMainNode.length(); i++) {\n JSONObject jsonChildNode = jsonMainNode.getJSONObject(i);\n String name = jsonChildNode.optString(\"nombre\");\n\n\n\n\n\n\n\n String outPut = name;\n\n employeeList.add(createEmployee(\"\", outPut));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(),\n \"Asistieron todos los alumnos\", Toast.LENGTH_LONG).show();\n }\n\n\n\n\n SimpleAdapter simpleAdapter = new SimpleAdapter(this, employeeList,\n android.R.layout.simple_list_item_1,\n new String[] { \"\" }, new int[] { android.R.id.text1 });\n listView.setAdapter(simpleAdapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\n\n String selectedFromList =(listView.getItemAtPosition(position).toString());\n\n\n if (selectedFromList != null && !selectedFromList.isEmpty()) {\n Pattern p = Pattern.compile(\"[{=}]\");\n Matcher m = p.matcher(selectedFromList);\n if (m.find()) {\n nombrealumno = m.replaceAll(\"\");\n }\n }\n\n\n }\n });\n }", "public void getName(ArrayList<String> document) {\r\n name = \"\";\r\n int atIndex = address.indexOf('@');\r\n String username = address.substring(0, atIndex);\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n String[] words = document.get(i).split(\" \");\r\n for(int j = 0; j < words.length; j++)\r\n {\r\n if(username.contains(words[j].toLowerCase()))\r\n {\r\n name = document.get(i);\r\n break;\r\n }\r\n }\r\n if(!name.equals(\"\"))\r\n {\r\n break;\r\n }\r\n } \r\n }", "private void calcNames() {\n final AddressBook addressBook = platform.getAddressBook();\n numColumns = addressBook.getSize();\n if (numColumns != numMembers) {\n numMembers = numColumns;\n names = new String[numColumns];\n for (int i = 0; i < numColumns; i++) {\n final NodeId nodeId = addressBook.getNodeId(i);\n names[i] = addressBook.getAddress(nodeId).getNickname();\n }\n }\n }", "public void mostrarlistafininicio(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=fin;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.anterior;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de fin a inicio\",JOptionPane.INFORMATION_MESSAGE);\n }}", "public String getNomeAluno( int posicao)\n\t{\n\t\treturn gradeNomes[posicao];\n\t}", "public ArrayList<String> retrieveFullNameList() throws Exception{\r\n\t\tArrayList<String> nameList = new ArrayList<String>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tString username \t= array.get(2);\r\n\t\t\t\r\n\t\t\tnameList.add(username);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(nameList, new Comparator<String>() {\r\n\t @Override public int compare(String s1, String s2) {\r\n\t \treturn s1.compareTo(s2);\r\n\t }\r\n\t\t});\r\n\t\t\r\n\t\treturn nameList;\r\n\t}", "public void listarNominasEmpleadoProfundidad(int idMecanico) throws BusinessException;", "public void leituraMapa() throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(caminho+\"/caminho.txt\"));\n String linha = br.readLine();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n dm.addElement(array[1]);\n nomeJanela[contador] = array[0];\n contador++;\n linha = br.readLine();\n }\n br.close();\n }", "public void MostrarListafINInicio() {\n if(!estVacia()){\n String datos=\"<=>\";\n NodoDoble current=fin;\n while(current!=null){\n datos += \"[\"+current.dato+\"]<=>\";\n current = current.anterior;\n }\n JOptionPane.showMessageDialog(null, datos, \"Mostrando Lista de inicio a Fin\",JOptionPane.INFORMATION_MESSAGE);\n }\n }", "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "private String[] getNomeArquivosCaixa(File ordem) throws IOException\n\t{\n\t\tCollection arquivos = new LinkedList();\n\t\tFileReader \t\tfReader \t= new FileReader(ordem);\n\t\tBufferedReader \tbuffReader \t= new BufferedReader(fReader);\n\t\tString patternNomArqCaixa = getPropriedade(\"ordemVoucher.patternArquivosCaixa\");\n\t\tString linha=null;\n\t\twhile ( (linha=buffReader.readLine()) != null )\n\t\t\t/* Verifica se o pattern dos nomes de arquivos foi encontrado */\n\t\t\tif (linha.indexOf(patternNomArqCaixa) > -1)\n\t\t\t{\n\t\t\t\t/* Faz o split da linha que contem diferentes campos separados por \",\"\n\t\t\t\t * Utiliza a classe abaixo devido a maquina da Tecnomen possuir\n\t\t\t\t * a versao 1.3 do Java\n\t\t\t\t */\n\t\t\t\t//String campos[] = linha.split(\",\");\n\t\t\t\tStringTokenizer strToken = new StringTokenizer(linha,\",\");\n\t\t\t\tString campos[] = new String[strToken.countTokens()];\n\t\t\t\tfor (int i=0; i < campos.length; i++)\n\t\t\t\t\tcampos[i] = strToken.nextToken();\n\n\t\t\t\t/* O primeiro campo e o nome do arquivo */\n\t\t\t\tarquivos.add(campos[0]);\n\t\t\t}\n\n\t\tbuffReader.close();\n\t\tfReader.close();\n\t\treturn (String[])arquivos.toArray(new String[0]);\n\t}", "public static void main(String args[]){\n int x = 10;\r\n List<Perro> perros = new ArrayList();\r\n \r\n Perro perro=new Perro();\r\n \r\n Persona persona = new Persona();\r\n persona.setAltura(5.5);\r\n persona.setColorPiel(\"Blanca\");\r\n persona.setEdad(16);\r\n persona.setGenero('f');\r\n persona.setNacionalidad(\"Japonesa\");\r\n persona.setPeso(130);\r\n persona.setTipoDePelo(\"Lacio\"); \r\n persona.setOcupacion(\"Dinero\");\r\n \r\n //Se dan todas las características\r\n perro.setNombre(\"Manuel\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);//Se añade a la instancia\r\n \r\n perro = new Perro();//Se limpia y se vuelve a llamar la instancia\r\n perro.setNombre(\"Igor\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Lacio\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n \r\n perro = new Perro();\r\n perro.setNombre(\"Luli\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Siberiano\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n //****************CUANDO EJECUTES ESTO VE COMENTADO LOS BLOQUES QUE NO QUIERES QUE SE USEN*************\r\n //foreach y for hace la misma funcion\r\n //Uso de for\r\n for (Perro perro1:perros){\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo());\r\n }\r\n \r\n //Formas de uso del for each\r\n perros.forEach(perro1->\r\n System.out.println(perro1.getNombre()));\r\n \r\n perros.forEach(perro1 ->{//Se define una variable que es perro1 y esta recorrera toda la lista\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo()); \r\n System.out.println();\r\n \r\n });\r\n \r\n \r\n System.out.println(\"Blanco\".equals(perro.color)? \"Si es blanco\":\"No es blanco\");\r\n \r\n //Uso del if\r\n if (((4/2==0)&&(10/5 !=0))||(100/20==0)){\r\n System.out.println(\"Es bisiesto\");\r\n }else{\r\n System.out.println(\"No es bisiesto\");\r\n }\r\n \r\n //Uso del switcH\r\n switch(x){\r\n case 6:\r\n System.out.println(\"Es verdadero\");\r\n break;\r\n case 2:\r\n System.out.println(\"Es falso\");\r\n break;\r\n default:\r\n System.out.println(\"No es ninguna\");\r\n \r\n //Uso de la lista de un item en especifico \r\n System.out.println(\"Nombre: \" + perros.get(2).getNombre());//El número del get\r\n System.out.println(\"Color: \"+perros.get(2).getColor());//define que item es que tomará\r\n System.out.println(\"Raza: \"+perros.get(2).getRaza());\r\n \r\n \r\n //Demostración del uso de getters\r\n System.out.println(\"Nombre: \");\r\n System.out.println(\"Altura: \" + persona.getAltura());\r\n System.out.println(\"Color: \" + persona.getColorPiel());\r\n System.out.println(\"Edad: \"+persona.getEdad());\r\n System.out.println(\"Genero: \"+persona.getGenero());\r\n System.out.println(\"Nacionalidad: \"+persona.getNacionalidad());\r\n System.out.println(\"Peso: \"+persona.getPeso());\r\n System.out.println(\"Tipo de Pelo: \"+persona.getTipoDePelo());\r\n \r\n }\r\n \r\n}", "@Override\n public String toString() {\n return nome + placa;\n }", "public ArrayList<String> getNombreDepartamentosJefe(Empleado empleado) {\r\n\t\tArrayList<String> dptos = new ArrayList<String>();\r\n\t\tif (getEmpleadoActual().getRango() == 2) // Solo para jefes\r\n\t\t\tfor (int i=0; i<departamentosJefe.size(); i++)\r\n\t\t\t\tdptos.add(departamentosJefe.get(i).getNombreDepartamento());\r\n\t\treturn dptos;\r\n\t}", "public String getName() {\n return list;\n }", "public static List getAllNames() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT naziv FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"naziv\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public String imprimirListaFormateada() {\n\t\t// Cuando quieran unir un monton de cadenas\n\t\tStringBuilder provLis = new StringBuilder();\n\t\tfor (Proveedor provTmp : BdMemoria.proveedores) {\n\t\t\tif (provTmp != null) {\n\t\t\t\tprovLis.append(provTmp.getIdProveedor()).append(\"-\").append(provTmp.getNombreProv())\n\t\t\t\t\t\t.append(\" !! \");\n\t\t\t}\n\n\t\t}\n\t\treturn provLis.toString();\n\t}", "public ArrayList<String> Info_Disc_Pel_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "private String addIDsNew(List<Person> list) {\n\t\tString iD = \"\";\n\t\tfor( int i = 0 ; i < list.size(); i++ ){\n\t\t\tif( i == list.size() - 1 ){\n\t\t\t\tiD = iD + list.get( i ).iD;\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tiD = iD + list.get( i ).iD + DEFAULT_DELIMMTER;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn iD;\n\t}", "public void ConsultaVehiculosSQlite() {\n preguntas = mydb.getCartList();\n for( int i = 0 ; i < preguntas.size() ; i++ ){\n //Toast.makeText(getApplicationContext(), preguntas.get( i ).getPregunta(), Toast.LENGTH_SHORT).show();\n persons.add(new Solicitud(\"Pregunta \" + String.valueOf(i+1) +\": \"+preguntas.get( i ).getPregunta(),\"Fecha: \"+ preguntas.get( i ).getFecha(), R.drawable.solicitudes,\"Motivo: \"+preguntas.get( i ).getMotivo(),\"Observacion: \"+preguntas.get( i ).getObservacion(),\"\"));\n }\n }", "public String empleadosPorPrioridad(ArrayList<Empleado> prioridad){\n String aux = \"los empleados son: \\n\";\n for (int i = 0; i < prioridad.size(); i++) {\n aux += \"nombre: \" + prioridad.get(i).getNombre() + \" -\" +\" Identificacion: \"+ prioridad.get(i).getIdentificacion() \n + \"\\n\";\n }\n return aux;\n }", "public ArrayList<String> Info_Disco_Mus_Rep1(String genero) {\r\n String line;\r\n ArrayList<String> Lista_datos_nombre_genero = new ArrayList();\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/cat_musica.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco = line.split(\";\");\r\n if (info_disco[2].equals(genero)) {\r\n Lista_datos_nombre_genero.add(info_disco[0]);\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_nombre_genero;\r\n }", "public ArrayList<ArrayList<String>> listeProjet() throws RemoteException{\r\n\t\t\tArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();\r\n\t\t\t\r\n\t\t String requete=\"Select p_id, p_titre, t_debprojet, t_finprojet From projet, association, groupeassoc,\" +\r\n\t\t \t\t\t\t\" typeprojet Where ga_idetudiant =\" + _etudiant.getId() + \" AND ga_idgroupe = a_idgroupe \" +\r\n\t\t \t\t\t\t\" AND a_idprojet = p_id AND p_idtype = t_id\";\r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t ArrayList <String> projet = new ArrayList<String>();\r\n\t\t \r\n\t\t String[] line = null;\r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tArrayList<String> tmp = new ArrayList<String>();\r\n\t\t \tline = data.nextElement();\r\n\t\t \tprojet.add(data.getColumnValue(\"p_id\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"p_titre\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"t_debprojet\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"t_finprojet\"));\r\n\t\t \tlist.add(tmp);\r\n\t\t }\r\n\t\t \r\n\t\t int cpt = 0;\r\n\t\t for (String i : projet){\r\n\t\t \tString note = null;\r\n\t\t \tString requete2 = \"select n_note from note where n_idprojet = \" + i + \" and n_idetudiant = \" +\r\n\t\t \t_etudiant.getId();\r\n\t\t \t\r\n\t\t \tSystem.out.println(\"requete : \" + requete2);\r\n\t\t\t DataSet data2 = database.executeQuery(requete2);\r\n\t\t\t if (!data2.hasMoreElements()) {\r\n\t\t\t \tnote = \"non noté\";\r\n\t\t\t }\r\n\t\t\t else{\r\n\t\t\t \t System.out.println(\"note\");\r\n\t\t\t\t\t note = data2.getColumnValue(\"n_note\");\r\n\t\t\t }\r\n\t\t\t list.get(cpt).add(note);\r\n\t\t\t ++cpt;\r\n\t\t }\r\n\t\t \r\n\t\t for (int i = 0 ; i < list.size() ; ++i)\r\n\t\t {\r\n\t\t \tSystem.out.println(list.get(i));\r\n\t\t }\r\n\t\t \r\n\t\t return list;\r\n\t\t}", "public void listarAlunosNaDisciplina(){\r\n for(int i = 0;i<alunos.size();i++){\r\n System.out.println(alunos.get(i).getNome());\r\n }\r\n }", "public void mostrarlistafininicio(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = fin;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")->\";\n auxiliar = auxiliar.ant;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de fin a inicio\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }", "public ArrayList<String> getAutorInformation(){\n // If there is no autor information\n if (indiceAutorInformation == -1){\n return null;\n }\n\n // Declare ArrayList\n ArrayList<String> autorInformation = new ArrayList<>();\n\n // Get information from third Child\n NodeList nList_name = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"family\");\n NodeList nList_IDNumber = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"identifier\");\n NodeList nList_personList = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"address\");\n NodeList nList_telecom = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"telecom\");\n NodeList nList_creationDate = documentsEntrys.get(indiceMetaInformation).getElementsByTagName(\"date\"); // creation date is on the composition, the first <entry>, block\n\n //The arrayList contains information about residence of the autor\n // [0] => street\n // [1] => post code\n // [2] => city\n ArrayList<String> address = searchInterleavedHierarchy(nList_personList, \"line\");\n\n // get full name of author\n if(nList_name.getLength() != 0){\n autorInformation.add(0, ((Element) nList_name.item(0)).getAttribute(VALUE));\n } else {\n autorInformation.add(0, EMPTYSTRING);\n //logger.log(Level.INFO, \"The name of the author ist unknown!\");\n }\n\n // get life long doctor number\n String lifelongAutorNumber = util.XML.searchHierarchyByTagAndAttribute(nList_IDNumber, SYSTEM, VALUE, \"http://kbv.de/LANR\", VALUE, VALUE);\n if(!util.String.isEmpty(lifelongAutorNumber)) {\n autorInformation.add(1, lifelongAutorNumber);\n } else {\n autorInformation.add(1, EMPTYSTRING);\n //logger.log(Level.INFO, \"The life long doctor number of the author is unknown!\");\n }\n\n // get street\n if(address.size() != 0) {\n autorInformation.add(2, address.get(0));\n } else {\n autorInformation.add(2, EMPTYSTRING);\n //logger.log(Level.INFO, \"The street of author is unknown!\");\n }\n\n // get post code\n if(address.size() >= 1) {\n autorInformation.add(3, address.get(1));\n } else {\n autorInformation.add(3, EMPTYSTRING);\n //logger.log(Level.INFO, \"The post code of author is unknown!\");\n }\n\n // get city\n if(address.size() >= 2) {\n autorInformation.add(4, address.get(2));\n } else {\n autorInformation.add(4, EMPTYSTRING);\n //logger.log(Level.INFO, \"The city of author is unknown!\");\n }\n\n // Get telephone number\n String telephoneNumber = util.XML.searchHierarchyByTagAndAttribute(nList_telecom, \"system\", VALUE,\"phone\", VALUE, VALUE);\n if(!util.String.isEmpty(telephoneNumber)) {\n autorInformation.add(5, telephoneNumber);\n } else {\n autorInformation.add(5, EMPTYSTRING);\n //logger.log(Level.INFO, \"The phone number of autor is unknown!\");\n }\n\n // Get eMail\n String eMail = util.XML.searchHierarchyByTagAndAttribute(nList_telecom, \"system\", VALUE, \"email\", VALUE, VALUE);\n if(!util.String.isEmpty(eMail)) {\n autorInformation.add(6, eMail);\n } else {\n autorInformation.add(6, EMPTYSTRING);\n //logger.log(Level.INFO, \"The eMail of autor is unknown!\");\n }\n\n // Get creation date\n if(nList_creationDate.getLength() != 0){\n autorInformation.add(7, ((Element) nList_creationDate.item(0)).getAttribute(VALUE));\n } else {\n autorInformation.add(7, EMPTYSTRING);\n //logger.log(Level.INFO, \"The creation date of bmp is unknown!\");\n }\n\n // get pharmacy ID\n String pharmacyID = util.XML.searchHierarchyByTagAndAttribute(nList_IDNumber, SYSTEM, VALUE, \"http://kbv.de/IDF\", VALUE, VALUE);\n if(!util.String.isEmpty(pharmacyID)) {\n autorInformation.add(8, pharmacyID);\n } else {\n autorInformation.add(8, EMPTYSTRING);\n //logger.log(Level.INFO, \"The pharmacy ID is unknown!\");\n }\n\n // get hospital ID\n String hospitalID = util.XML.searchHierarchyByTagAndAttribute(nList_IDNumber, SYSTEM, VALUE, \"http://kbv.de/KIK\", VALUE, VALUE);\n if(!util.String.isEmpty(hospitalID)) {\n autorInformation.add(9, hospitalID);\n } else {\n autorInformation.add(9, EMPTYSTRING);\n //logger.log(Level.INFO, \"The hospital ID is unknown!\");\n }\n\n return autorInformation;\n }", "public Afiliado(String nombrePersona, String apellidoPersona, String duiPersona) {\n //Inicializar Miembros de clase.\n Afiliados = new ArrayList<>();\n NumeroDui = new ArrayList<>();\n FechaAfiliacion = new ArrayList<>();\n //Agregar valores a los arraylist.\n Afiliados.add(nombrePersona + \" \" + apellidoPersona);\n NumeroDui.add(duiPersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n }", "public static void obtenerInfoColisionEnemigo(Enemigo enemigo, Objeto col,String[] direccion, ArrayList<Objeto> obj_colision) {\n Rectangle[] lados_ente = enemigo.objeto_ente.getRectangle();\n Rectangle[] lados_col = col.getRectangle();\n\n if (col.getTag().compareToIgnoreCase(Objeto.Tag.JUGADOR) == 0) {\n if (lados_ente[0].intersects(lados_col[2])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"jugador_arriba\";\n }\n if (lados_ente[1].intersects(lados_col[3])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"jugador_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"jugador_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[1])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"jugador_izquierda\";\n }\n }\n\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"entorno_arriba\";\n }\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"entorno_derecha\";\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"entorno_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"entorno_izquierda\";\n }\n }", "public void llenDic(){\r\n ArrayList<String> wor= new ArrayList<String>();\r\n ArrayList<Association<String,String> >asociaciones= new ArrayList<Association<String,String>>();\r\n \r\n try {\r\n \r\n arch = new File (\"diccionario.txt\");\r\n fr = new FileReader (arch);\r\n br = new BufferedReader(fr);\r\n\r\n \r\n String lin;\r\n \r\n while((lin=br.readLine())!=null){\r\n wor.add(lin);\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n \r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n \r\n //Ciclo para separar y obtener la palabra en ingles y español\r\n for(int i=0; i<wor.size()-1;i++){\r\n int lugar=wor.get(i).indexOf(',');\r\n String ing=wor.get(i).substring(0,lugar);\r\n String esp=wor.get(i).substring(lugar+1,wor.get(i).length());\r\n asociaciones.add(new Association(ing, esp));\r\n }\r\n \r\n rz.setValue(asociaciones.get(0));\r\n for (int i=1; i<asociaciones.size(); i++){\r\n insertarNodo(rz, asociaciones.get(i));\r\n }\r\n }", "public List<String> nomeAnimais(){\n\t\tfor (Animal a: this.animais) {\n\t\t\tthis.nomes.add(a.getNomeNumero());\n\t\t}\n\t\treturn this.nomes;\n\t}", "public void listarExamesDaDisciplina(){\r\n System.out.println(\"Docentes da disciplina\");\r\n for(int i=0;i<exames.size();i++){\r\n System.out.println(exames.get(i).getDisciplina().getNome());\r\n }\r\n }", "public static ArrayList<String> getResultatNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"resultats\");\n }", "private ArrayList<String> getNames(int numOfSub, String type) {\n ArrayList<String> subNames = new ArrayList<String>();\n for (int i = 1; i <= numOfSub; i++) {\n if (type.equals(\"Class\")) {\n System.out.println(\"Name of Sub-Class \" + i + \" (eg. CPSC 210 202 Sub-Class Name would be 202)\");\n } else if (type.equals(\"Lab\")) {\n System.out.println(\"Name of Lab \" + i + \" (eg. CPSC 210 L2A Lab Name would be L2A)\");\n } else {\n System.out.println(\"Name of Tutorial \" + i + \" (eg. CPSC 210 T2A Tutorial Name would be T2A)\");\n }\n subNames.add(scanner.nextLine());\n }\n return subNames;\n }", "ArrayList<Professor> professoresFormPend();", "public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }", "public ArrayList<String> Info_Disc_Mus_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Mus_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Musica.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Apart N°\"+Nombre;\n\t}", "public static void obtenerInfoColisionJugador(Jugador jugador, Objeto col,String[] direccion, ArrayList<Objeto> obj_colision) {\n Rectangle[] lados_ente = jugador.objeto_ente.getRectangle();\n Rectangle[] lados_col = col.getRectangle();\n\n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.COMIDA) == 0 || col.getTag().compareToIgnoreCase(Objeto.Tag.MONEDA) == 0) {\n //System.out.println(\"COMIDA\");\n for(int i=0;i<4;i++)\n if (lados_ente[i].intersects(lados_col[0])) {\n obj_colision.add(col);\n return;\n }\n }\n\n \n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.ENEMIGO) == 0) {\n\n //System.out.println(lados_ente[0].x + \" con \" + lados_col[0].x + \" tag: \" + col.getId());\n if (lados_ente[0].intersects(lados_col[2])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"enemigo_arriba\";\n }\n //else\n // System.out.println(lados_ente[0].y + \" con \" + lados_col[2].y + \" tag: \" + col.getId());\n if (lados_ente[1].intersects(lados_col[3])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"enemigo_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"enemigo_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[1])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"enemigo_izquierda\";\n }\n\n }\n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.NPC) == 0) {\n\n //System.out.println(lados_ente[0].x + \" con \" + lados_col[0].x + \" tag: \" + col.getId());\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"npc_arriba\";\n }\n //else\n // System.out.println(lados_ente[0].y + \" con \" + lados_col[2].y + \" tag: \" + col.getId());\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"npc_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"npc_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"npc_izquierda\";\n }\n\n }\n\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"entorno_arriba\";\n }\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"entorno_derecha\";\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"entorno_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"entorno_izquierda\";\n }\n }", "public List<String> q3() {\n\t\tList<String> top20 = jogadores.stream()\n\t\t\t\t.map(x-> x.getFullName())\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn top20.subList(0,20);\n\t}", "public List<String> getMedicine(int PID) {\n\t\t// TODO Auto-generated method stub\n\t\tList<String> mname =null;\n\t\tString query = \"SELECT * FROM pmohan_prescription WHERE pid = ?;\";\n\t\ttry(PreparedStatement statement = connection.prepareStatement(query))\n\t\t{ \n\t\t\t\n\t\t\t statement.setInt(1, PID);\n\t\t\t ResultSet resultSet1 = statement.executeQuery();\n\t\t\t mname= new ArrayList<String>();\n\t\t\t while(resultSet1.next()) \n\t\t\t {\n\t\t\t\t\n\t\t\t\tString typeName = (resultSet1.getString(4));\n\t\t\t\t\n\t\t\t\tmname.add(typeName);\n\t\t\t\n\t\t\t }\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\tSystem.out.println(mname);\n\t\treturn mname;\n\t}", "public String getNomeGiocatore(int i) {\n return null;\r\n }", "public void mostrarlistainciofin(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=inicio;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.siguiente;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de incio a fin\",JOptionPane.INFORMATION_MESSAGE);\n } }", "public void consultarListasPersonas(){\n SQLiteDatabase db = conn.getReadableDatabase();\n Personal personal = null;\n listaPersonales = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM personal\", null);\n while(cursor.moveToNext()){\n personal = new Personal();\n personal.setId(cursor.getInt(0));\n personal.setNombre(cursor.getString(1));\n personal.setApellido(cursor.getString(2));\n personal.setHoraEntrada(cursor.getInt(3));\n personal.setHoraSalida(cursor.getInt(4));\n personal.setId_laboratorio(cursor.getInt(5));\n listaPersonales.add(personal);\n }\n db.close();\n obtenerLista();\n }", "private void addVeiculo(String nome) {\n\t\t\n\t\tlist.setModel(dm);\n\t\tdm.addElement(nome);\n\t}", "@SuppressWarnings(\"checkstyle:avoidinlineconditionals\")\n private static void setUpNameList() {\n List<String> names = new ArrayList<>();\n String verb;\n String noun;\n for (int i = 0; i < NUMBER_OF_NAMES; i++) {\n verb = GenerationHelper.randomElement(verbs);\n noun = GenerationHelper.randomElement(nouns);\n String taskName = verb;\n taskName += \"aeiou\".contains(noun.subSequence(0, 1)) ? \" an \" : \" a \";\n taskName += noun;\n names.add(Character.toUpperCase(taskName.charAt(0)) + taskName.substring(1));\n }\n taskNames = new String[names.size()];\n names.toArray(taskNames);\n }", "private String getRandName() {\n int firstName = (int)(Math.random() * listFirstNames.length);\n String fName = listFirstNames[firstName].trim();\n int lastName = (int)(Math.random() * listLastNames.length);\n String lName = listLastNames[lastName].trim();\n return ( fName + \" \" + lName ); \n }", "public ArrayList<String> getNombreTodosJefes() {\r\n\t\treturn this.controlador.getNombreTodosJefes();\r\n//\t\treturn nombreJefesDepartamento;\r\n\t}", "private void jButtonCreateInsexActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n lstPerson = new ArrayList();\n Properties prop = new Properties();//почти тоже самое что ini файлы\n content = Files.readAllLines(Paths.get(PATH_FILE_SOURCE), Charset.forName(\"cp1251\"));\n String s = content.get(0);\n for (int i = 0, j = 1; i < s.length(); i += 128, j++) {\n Person p = new Person(\n s.substring(i, i + 30).trim(),\n s.substring(i + 30, i + 50).trim(),\n s.substring(i + 50, i + 70).trim(),\n s.substring(i + 70, i + 78).trim(),\n s.substring(i + 78).trim(), j);\n lstPerson.add(p);\n }\n\n for (Person person : lstPerson) {\n prop.put(person.getSurname().toUpperCase(), Integer.toString(person.getID()));\n }\n prop.storeToXML(new FileOutputStream(FILE_PATH_INDEX_SURNAME), \"LIB\");//можно и без xml\n jLabelStatusBar.setForeground(Color.magenta);\n jLabelStatusBar.setText(\"Индексный файл создан!\");\n jLabelStatusBar.setForeground(Color.BLACK);\n\n } catch (IOException ex) {\n jLabelStatusBar.setForeground(Color.red);\n jLabelStatusBar.setText(\"Индексный файл не создан!\");\n Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public String[] getNombresDepartamentosJefe(){\r\n //Primero obtenemos el arrayList con los departamentos\r\n ArrayList<String> dpts=controlador.getDepartamentosJefe(getEmpleadoActual().getEmplId());\r\n //Devolvemos como array\r\n String[] array=new String[dpts.size()];\r\n dpts.toArray(array);\r\n return array;\r\n \t/*String[] array=new String[departamentosJefe.size()];\r\n for(int i=0;i<departamentosJefe.size();i++){\r\n \tarray[i]=departamentosJefe.get(i).getNombreDepartamento();\r\n }\r\n return array;*/\r\n }", "public ArrayList<String> ListDepartamentos(String faculdadeTemp) throws RemoteException;", "static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }", "public String [] getClubNames(ArrayList<Club> list)\n\t{\n\t\tString [] theClubs = new String[list.size()];\n\n\t\tfor(int i=0; i<list.size(); i++)\n\t\t{\n\t\t\ttheClubs[i] = list.get(i).getClubName();\n\t\t}\n\t\treturn theClubs;\n\t}", "@Override\r\n /**\r\n * *\r\n *Primero revisa si los apellidos con iguales, en el caso de que sean iguales\r\n *entra al if y compara por nombres, de lo contrario nunca entra al if y \r\n * compara normalmente por apellido\r\n * \r\n */ \r\n public void ordenarPersonas (){\r\n Comparator<Persona> comparacionPersona= (Persona persona1,Persona persona2)->{\r\n \r\n if(persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos())==0){\r\n return persona1.getNombres().compareToIgnoreCase(persona2.getNombres());}\r\n return persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos());\r\n }; \r\n\r\n listaPersona.sort(comparacionPersona);\r\n }", "private String[] getnames(String name) {\n\t\tString tt[]={name};\n\t\t//tt[0]=name;\n\t\tList<Integer> imp=new ArrayList<Integer>();\n int temp=0;\n\t\ttemp=name.length();\n char ch[]=name.toCharArray();\n for(int i=0;i<temp;i++){\n \tif(ch[i]==' ')\n \t{imp.add(i);\n \t//System.out.println(i);\n \t}\n\n }\n int h=0;\n int nxt;\n\n Iterator<Integer> iterator = imp.iterator();\n int i=0;\n while(iterator.hasNext())\n { nxt=iterator.next();\n\n // System.out.println(haha);\n tt[i]=name.substring(h,nxt);\n i++;\n h=nxt+1;\n }\n\n\t\t\n\t\treturn tt;\n\t}", "public List<String> q3() {\n\t\treturn jogadores.stream()\n\t\t\t\t.limit(20).map(Jogador::getFullName)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public static ArrayList<String> paitentNHIList() throws SQLException\n {\n ArrayList<String> nhiList = new ArrayList<String>();\n \n DatabaseConnection dbc = new DatabaseConnection();\n String sqlQuery = \"SELECT NHI FROM PATIENTS\";\n PreparedStatement prepstmt = dbc.getConnectionPatients().prepareStatement(sqlQuery);\n ResultSet rs = prepstmt.executeQuery();\n nhiList.add(\"choose patients NHI\");\n while (rs.next()) {\n nhiList.add(rs.getString(\"NHI\").toString());\n }\n return nhiList;\n }", "public ArrayList<Patient> getPatientList(String DocName)\r\n {\n\t ArrayList<Patient> names = new ArrayList<Patient>();\r\n\t \r\n\t try \r\n\t {\r\n\t\tResultSet rs = stmt.executeQuery( \"SELECT * FROM PATIENTDATA;\" );\r\n\t\tint i =0;\r\n\t\twhile (rs.next())\r\n\t\t{\r\n\t\t\tString fname = rs.getString(\"firstname\");\r\n\t\t\tString lname = rs.getString(\"lastname\");\r\n\t\t\tString userName = rs.getString(\"username\");\r\n\t\t\tString passWord = rs.getString(\"password\");\r\n\t\t\tString secAns = rs.getString(\"securityans\");\r\n\t\t\tString check = rs.getString(\"doctorsname\");\r\n\t\t\tint Notify = rs.getInt(\"notification\");\r\n\t\t\t// if the name matches the doctor's name, then Add to the Patient Arraylist.\r\n\t\t\tif (check.equals(DocName))\t\r\n\t\t\t{\r\n\t\t\t\tint symp[]= new int[7];\r\n\t\t\t\tint pr1[]=new int[7];\r\n\t\t\t\tint pr2[]=new int[7];\r\n\t\t\t\tint thrs[]=new int[7]; \r\n\t\t\t\t\r\n\t\t\t\tsymp[0] = rs.getInt(\"SYMPTOM1\");\r\n\t\t\t\tsymp[1] = rs.getInt(\"SYMPTOM2\");\r\n\t\t\t\tsymp[2] = rs.getInt(\"SYMPTOM3\");\r\n\t\t\t\tsymp[3] = rs.getInt(\"SYMPTOM4\");\r\n\t\t\t\tsymp[4] = rs.getInt(\"SYMPTOM5\");\r\n\t\t\t\tsymp[5] = rs.getInt(\"SYMPTOM6\");\r\n\t\t\t\tsymp[6] = rs.getInt(\"SYMPTOM7\");\r\n\t\t\t\t\r\n\t\t\t\tpr1[0] = rs.getInt(\"PrevSYMPTOM1_1\");\r\n\t\t\t\tpr1[1] = rs.getInt(\"PrevSYMPTOM1_2\");\r\n\t\t\t\tpr1[2] = rs.getInt(\"PrevSYMPTOM1_3\");\r\n\t\t\t\tpr1[3] = rs.getInt(\"PrevSYMPTOM1_4\");\r\n\t\t\t\tpr1[4] = rs.getInt(\"PrevSYMPTOM1_5\");\r\n\t\t\t\tpr1[5] = rs.getInt(\"PrevSYMPTOM1_6\");\r\n\t\t\t\tpr1[6] = rs.getInt(\"PrevSYMPTOM1_7\");\r\n\t\t\t\t\r\n\t\t\t\tpr2[0] = rs.getInt(\"PrevSYMPTOM2_1\");\r\n\t\t\t\tpr2[1] = rs.getInt(\"PrevSYMPTOM2_2\");\r\n\t\t\t\tpr2[2] = rs.getInt(\"PrevSYMPTOM2_3\");\r\n\t\t\t\tpr2[3] = rs.getInt(\"PrevSYMPTOM2_4\");\r\n\t\t\t\tpr2[4] = rs.getInt(\"PrevSYMPTOM2_5\");\r\n\t\t\t\tpr2[5] = rs.getInt(\"PrevSYMPTOM2_6\");\r\n\t\t\t\tpr2[6] = rs.getInt(\"PrevSYMPTOM2_7\");\r\n\r\n\t\t\t\t\r\n\t\t\t\tthrs[0] = rs.getInt(\"SYMPTOM1Thresh\");\r\n\t\t\t\tthrs[1] = rs.getInt(\"SYMPTOM2Thresh\");\r\n\t\t\t\tthrs[2] = rs.getInt(\"SYMPTOM3Thresh\");\r\n\t\t\t\tthrs[3] = rs.getInt(\"SYMPTOM4Thresh\");\r\n\t\t\t\tthrs[4] = rs.getInt(\"SYMPTOM5Thresh\");\r\n\t\t\t\tthrs[5] = rs.getInt(\"SYMPTOM6Thresh\");\r\n\t\t\t\tthrs[6] = rs.getInt(\"SYMPTOM7Thresh\");\r\n\t\t\t\t\r\n\t\t\t\t//make new Patient object with the patient informations.\r\n\t\t\t\tPatient P1 = new Patient(fname,lname,userName,passWord,secAns,DocName,symp,pr1,pr2,thrs);\r\n\t\t\t\tP1.setFlag(Notify);\r\n\t\t\t\tnames.add(P1); //Added to the Patient Arraylist\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn names; // Return list of patients\r\n\t\t\r\n\t\t\r\n\t } \r\n\t catch (SQLException e) \r\n\t {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t }\r\n\t \r\n\t return names;\r\n\t \r\n\t \r\n }", "public static void main(String[] args) {\n char resp = 's';\n int cont = 0;\n\n ArrayList listaPersonajes = new ArrayList();\n ArrayList<Personaje> lista_buena = new ArrayList();\n lista_buena.add(new Personaje(\"mago\", \"humano\", \"norfair\", 1.68, 88, \"vende chiles\", 150, \"juan\"));\n lista_buena.add(new Personaje(\"picaro\", \"enano\", \"zebes\", 2.58, 350, \"YES\", 185, \"Ricardo\"));\n lista_buena.add(new Personaje(\"barbaro\", \"humano\", \"maridia\", 1.50, 500, \"es inutil\", 158, \"egroj\"));\n lista_buena.add(new Personaje(\"clerigo\", \"elfo\", \"crateria\", 1.70, 55, \"es muy creido\", 85, \"pipe\"));\n while (resp == 's' || resp == 's') {\n System.out.println(\"0 Salir\");\n System.out.println(\"1 Crear Personaje\");\n System.out.println(\"2 Modificar personaje\");\n System.out.println(\"3 Ver atributos de personaje\");\n System.out.println(\"4 Eliminar personaje\");\n System.out.println(\"5 Combate\");\n System.out.print(\"ingrese opcion\");\n int opcion = leer.nextInt();\n\n switch (opcion) {\n case 0:\n System.exit(0);\n break;\n case 1:\n if (cont > 4) {\n System.out.println(\"no se pueden mas personajes\");\n break;\n }\n System.out.println(\"clerigo, barbaro, mago o picaro\");\n System.out.print(\"Eliga su Clase: \");\n String clase = leer.next();\n if (clase.contains(\"clerigo\") || clase.contains(\"barbaro\") || clase.contains(\"mago\") || clase.contains(\"picaro\")) {\n\n } else {\n System.out.println(\"usted no puede elejir esa clase\");\n System.out.print(\"Eliga su Clase: \");\n clase = leer.next();\n }\n\n //\n listaPersonajes.add(cont, clase);\n System.out.println(\"Ingrese su nombre\");\n String nombre = leer.next();\n listaPersonajes.add(cont, nombre);\n //\n System.out.println(\"mediano, enano, elfo o humano\");\n System.out.print(\"ingrese raza: \");\n String raza = leer.next();\n if (raza.contains(\"mediano\") || raza.contains(\"enano\") || raza.contains(\"elfo\") || raza.contains(\"humano\")) {\n\n } else {\n System.out.println(\"no puede ser de esa raza\");\n System.out.print(\"ingrese raza:\");\n raza = leer.next();\n }\n listaPersonajes.add(cont, raza);\n System.out.println(\"ingrese estatura: \");\n double estatura = leer.nextDouble();\n listaPersonajes.add(cont, estatura);\n //\n System.out.println(\"ingrese peso: \");\n double peso = leer.nextDouble();\n listaPersonajes.add(cont, peso);\n //\n System.out.println(\"ingrese edad: \");\n int edad = leer.nextInt();\n listaPersonajes.add(cont, edad);\n //\n System.out.println(\"ingrese descripcion: \");\n leer.nextLine();\n String descrip = leer.nextLine();\n listaPersonajes.add(cont, descrip);\n //\n System.out.println(\"norfair ,brinstar , maridia, zebes o crateria\");\n System.out.print(\"ingrese nacionalidad: \");\n String nacion = leer.next();\n //\n if (nacion.contains(\"norfair\") || nacion.contains(\"brinstatr\") || nacion.contains(\"maridia\") || nacion.contains(\"zebes\") || nacion.contains(\"crateria\")) {\n\n } else {\n System.out.println(\"no puede ser de esa region: \");\n System.out.print(\"ingrese nacionalidad: \");\n nacion = leer.next();\n }\n\n //\n lista_buena.add(new Personaje(clase, raza, nacion, estatura, edad, descrip, peso, nombre));\n cont++;\n break;\n case 2:\n System.out.println(\"que posicion de pesonaje desea modificar\");\n int perso_mod = leer.nextInt();\n modificacion(perso_mod, lista_buena);\n break;\n case 3:\n\n for (Object o : lista_buena) {\n System.out.println(o);\n System.out.println();\n }\n\n break;\n case 4:\n System.out.println(\"Que personaje desea eliminar\");\n int elim = leer.nextInt();\n lista_buena.remove(elim);\n break;\n case 5:\n System.out.println(\"no funcio\");\n break;\n default:\n resp = 'n';\n }\n }\n\n }", "@Override\r\n\tpublic Map<String, MemberDto> nameList() {\n\t\tMap<String, MemberDto> list = new HashMap<>();\r\n\t\tfor (String email : emailList()) {\r\n\t\t\tlist.put(email, myInfo(email));\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "List<String> getFruitNameList() {\t\n\t\tList<String> fruitNameList = new ArrayList<>();\n\t\tfor(Fruit fruit : fruitList){\n\t\t\tfruitNameList.add(fruit.getName());\n\t\t}\n\t\treturn fruitNameList;\n\t}", "public ArrayList<String> getListClubNames(ArrayList<Club> list)\n\t{\n\t\tArrayList<String> theClubs = new ArrayList<String>();\n\t\tfor(int i=0; i<list.size(); i++)\n\t\t{\n\t\t\t//theClubs.set(i, list.get(i).getClubName());\n\t\t\ttheClubs.add(list.get(i).getClubName());\n\t\t}\n\t\treturn theClubs;\n\t}", "private static ArrayList<String> getItemNames(ArrayList<String> contents) {\n\n\t\tArrayList<String> itemNames = new ArrayList<String>();\n\n\t\tint lenContents = contents.size();\n\n\t\tfor (int i = 0; i < lenContents; i = i + 4) {\n\t\t\tString productName = contents.get(i);\n\t\t\titemNames.add(productName);\n\t\t}\n\n\t\treturn itemNames;\n\t}", "java.lang.String getParticipants(int index);", "private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}", "public ArrayList llenar_lv(){\n ArrayList<String> lista = new ArrayList<>();\n SQLiteDatabase database = this.getWritableDatabase();\n String q = \"SELECT * FROM \" + TABLE_NAME;\n Cursor registros = database.rawQuery(q,null);\n if(registros.moveToFirst()){\n do{\n lista.add(\"\\t**********\\nNombre: \" + registros.getString(0) +\n \"\\nDirección: \"+ registros.getString(1) + \"\\n\" +\n \"Servicio(s): \"+ registros.getString(2) +\n \"\\nEdad: \"+ registros.getString(3) + \" años\\n\" +\n \"Telefono: \"+ registros.getString(4) +\n \"\\nIdioma(s): \"+ registros.getString(5) + \"\\n\");\n }while(registros.moveToNext());\n }\n return lista;\n\n }", "public String getName() {\r\n return listName;\r\n }", "@Override\n public java.lang.String getNombre() {\n return _partido.getNombre();\n }", "public static void obtenerInfoColisionGeneral(Objeto obj, Objeto col,String[] direccion, ArrayList<Objeto> obj_colision) {\n Rectangle[] lados_ente = obj.getRectangle();\n Rectangle[] lados_col = col.getRectangle();\n\n \n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"jugador_arriba\";\n direccion[1] = \"jugador_derecha\";\n direccion[2] = \"jugador_abajo\";\n direccion[3] = \"jugador_izquierda\";\n }\n }", "public void mostrarlistainicifin(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = inicio;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")<=>\";\n auxiliar = auxiliar.sig;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de inicio a fin\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }" ]
[ "0.6411344", "0.63429385", "0.62477887", "0.6134062", "0.607564", "0.6058372", "0.6039012", "0.5928794", "0.5923904", "0.5918272", "0.5894202", "0.58918065", "0.58901596", "0.5883548", "0.5790892", "0.5778573", "0.5771746", "0.5757112", "0.5754665", "0.57535166", "0.5752915", "0.57413995", "0.57352483", "0.57280886", "0.57196915", "0.5717748", "0.5714193", "0.57070637", "0.57068413", "0.57042676", "0.5699812", "0.5685084", "0.5671624", "0.5659862", "0.5658779", "0.5652267", "0.5649824", "0.56475145", "0.56274474", "0.56096095", "0.5605171", "0.55985534", "0.5596682", "0.5584818", "0.5580676", "0.5571254", "0.5570328", "0.5565397", "0.5554765", "0.55547166", "0.5554336", "0.5539988", "0.55323386", "0.55283195", "0.55205536", "0.5514407", "0.550501", "0.5502337", "0.54932153", "0.54899955", "0.5489745", "0.54894537", "0.5483989", "0.5473772", "0.54700124", "0.54673475", "0.5462787", "0.5461263", "0.54582787", "0.5428081", "0.5425921", "0.5425493", "0.5422602", "0.54224855", "0.54100364", "0.54027534", "0.54000765", "0.5399455", "0.5395649", "0.5355722", "0.5355623", "0.5352014", "0.5350916", "0.5345833", "0.53458214", "0.5345078", "0.534491", "0.5344452", "0.53438646", "0.53430897", "0.5340766", "0.53323734", "0.53289247", "0.5318846", "0.5318643", "0.5318231", "0.5315117", "0.53144455", "0.5309293", "0.5306733", "0.530524" ]
0.0
-1
Get and Set for position.
protected int getX() { return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPosition(Position pos);", "public void setPosition(Position p);", "public void setPosition(Integer position);", "void setPosition(Position p);", "public void PositionSet(int position);", "public void setPosition(int position);", "public abstract void setPosition(Position position);", "void setPosition(Position position);", "void setPosition(Position position);", "public void setPos(int pos);", "public void setPos(int pos);", "public void set(int pos);", "public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}", "protected void setPosition(Position p) {\n\t\tposition = p;\n\t}", "Object getPosition();", "Position getPosition();", "Position getPosition();", "@Override\n public int getPosition() {\n return position;\n }", "public void setX(int x){ xPosition = x; }", "@Override\n public Position getPosition() {\n return position;\n }", "public void setPosition(Point position);", "public Point getPosition(){\n\t\treturn position;\n\t}", "public int getPosition()\r\n {\r\n return position;\r\n }", "public int getPosition() {\r\n return position;\r\n }", "public void setPosition(Position pos) {\n position = new Position(pos);\n }", "@PropertySetter(role = POSITION)\n\t<E extends CtElement> E setPosition(SourcePosition position);", "public int getPosition() {\n return position;\n }", "public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }", "public void setPosition(Point newPosition);", "void setPosition(double xPos, double yPos);", "public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }", "public int getPosition() {\r\n\t\treturn position;\r\n\t}", "public Position getPosition(){\n return this.position;\n }", "public Position getPosition()\n\t{\n\t\treturn position;\n\t}", "@Override\n public Optional<Position> getPosition() {\n return this.pos;\n }", "public void setPosition(float x, float y);", "public int PositionGet();", "@Override\n public Position getPosition() {\n return new Position(this.x, this.y);\n }", "public Point getPosition(){\r\n return new Point(this.position);\r\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public long position() {\n return _pos;\n }", "public PVector getPosition() { return position; }", "public Coordinate getPosition() {\n return cPosition;\n }", "public int getPosition()\n\t{\n\t\treturn position;\n\t}", "public Position getPosition();", "public Position getPosition();", "public Position getPosition();", "public final int getPosition() {\n return position;\n }", "public java.lang.Integer getPosition() {\n return position;\n }", "public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }", "public Integer getPosition() {\n return this.position;\n }", "public java.lang.Integer getPosition() {\n return position;\n }", "public int getPosition();", "public Position getPosition() {\n\t\treturn position;\n\t}", "@Override\n public Position setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n\n return new Position(x, y);\n }", "public void setPosition(Integer position) {\n this.position = position;\n }", "public String getPosition(){\r\n\t\treturn position;\r\n\t}", "public Integer getPosition()\n {\n return position;\n }", "public void setPosition(Coordinate position) {\n cPosition = position;\n }", "public void setPosition(int position) {\r\n this.position = position;\r\n }", "public Coordinate getPosition();", "public Integer getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Point getPosition() {\n return position;\n }", "@Override\n\tpublic Position getPosition() {\n\t\treturn this.posn;\n\t}", "void setPos(float x, float y);", "@Override\n\tpublic void setPosition(Position p) {\n\t\tthis.position = p;\n\n\t}", "public int getPos()\n {\n return pos;\n }", "public long getPosition();", "public PVector getPosition(){\n\t\treturn position;\n\t}", "public int getPos()\n {\n return pos;\n }", "public int getX() { return position.x; }", "public IntegerTulep getPosition() {\n return position;\n }", "public void setPosition(Position<Edge<E>> p) { pos = p; }", "public ModifiedLocation position(Integer position) {\n this.position = position;\n return this;\n }", "public void updatePositionValue(){\n m_X.setSelectedSensorPosition(this.getFusedPosition());\n }", "public final void setPosition(int p) {\n this.position = p;\n }", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "void setPosition(Point point);", "public void setPosition(int position)\n {\n put(\"Position\", position);\n }", "public Point getPosition()\n\t{\n\t\treturn pos;\n\t}", "void setPosition(int position) {\n mPosition = position;\n }", "public abstract Position getPosition();", "@External\r\n\t@ClientFunc\r\n\tpublic MetaVar SetPos(MetaVarVector positionVar);", "public PointF get_position() { return _position; }", "public Position getPosition() {\n return this.position;\n }", "public void setPosition(){\r\n currentPosition = 0; \r\n }", "@Override\n public void setPosition(float x, float y) {\n }", "public void setPosition(final Position param) {\n this.position = param;\n }", "public Point getPosition() {\n return new Point(position);\n }", "public void setPosition(String position){\r\n\t\tthis.position = position;\r\n\t}", "public void setPosition(Position position_)\n\t{\n\t\tposition=position_;\n\t}", "public Vector2 getPosition() {\n\t\treturn pos;\n\t}", "public Vector2 getPosition() {\n\t\treturn position;\n\t}" ]
[ "0.77611667", "0.7712322", "0.7622496", "0.7617694", "0.75304157", "0.7524017", "0.7487678", "0.74725676", "0.74725676", "0.7419383", "0.7419383", "0.7369797", "0.7354257", "0.73302287", "0.726802", "0.7247141", "0.7247141", "0.7224129", "0.7211684", "0.7207877", "0.71658814", "0.7157634", "0.715357", "0.7150245", "0.7107238", "0.7093032", "0.70834845", "0.70829123", "0.7081247", "0.707943", "0.7074825", "0.70734406", "0.706108", "0.70595425", "0.7042301", "0.7039709", "0.7039619", "0.70341384", "0.7033443", "0.70279384", "0.70279384", "0.70279384", "0.702715", "0.70177656", "0.70153826", "0.7014282", "0.7013535", "0.7013535", "0.7013535", "0.70129406", "0.6999924", "0.6991597", "0.6980198", "0.6978587", "0.6966337", "0.6961753", "0.69517624", "0.69505084", "0.694783", "0.69474614", "0.6944645", "0.69441736", "0.6942426", "0.6917877", "0.69146776", "0.69146776", "0.69146776", "0.69146776", "0.69146776", "0.69146776", "0.6910661", "0.68962693", "0.68959916", "0.6895955", "0.6891446", "0.6891106", "0.68822896", "0.6876905", "0.6876893", "0.68764675", "0.68697906", "0.6866569", "0.6861394", "0.68609726", "0.6856632", "0.6850688", "0.684886", "0.68446666", "0.68351483", "0.6832247", "0.6821673", "0.6820696", "0.6808183", "0.6800226", "0.67999667", "0.67981493", "0.67924523", "0.678897", "0.6785083", "0.67782205", "0.67732346" ]
0.0
-1
Used to create a new checker of that checker's color.
abstract Checker newChecker(int x, int y);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RGB getNewColor();", "void testColorChecker(Tester t) {\r\n initData();\r\n Cell topLeft = (Cell) this.game7.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game7.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game7.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game7.indexHelp(1, 1);\r\n t.checkExpect(topLeft.flooded, true);\r\n t.checkExpect(topRight.flooded, false);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(botRight.flooded, false);\r\n\r\n topRight.colorChecker(topLeft.color);\r\n t.checkExpect(topRight.flooded, true);\r\n t.checkExpect(botRight.flooded, true);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(topLeft.flooded, true);\r\n }", "public abstract void colorChecker(Color c);", "void onCheck(Chess.Color inCheckColor);", "private HepRepColor() {\n }", "@SuppressWarnings({\"deprecation\", \"rawtypes\", \"unchecked\"})\n public static javafx.scene.effect.ColorInputBuilder<?> create() {\n return new javafx.scene.effect.ColorInputBuilder();\n }", "public /* synthetic */ void lambda$new$0() {\n this.applyColorScheduled = false;\n applyColor(this.lastPickedColor, this.lastPickedColorNum);\n this.lastPickedColorNum = -1;\n }", "public Color newColor(){\n\t\tRandom random = new Random();\n\n\t\tint red;\n\t\tint green;\n\t\tint blue;\n\n\t\tint counter = 0;\n\n\t\tdo {\n\t\t\tred = random.nextInt(255);\n\t\t\tgreen = random.nextInt(255);\n\t\t\tblue = random.nextInt(255);\n\t\t\tcounter++;\n\t\t\t\n\t\t}while(red + green + blue < 400 && counter < 20);\n\n\t\treturn Color.rgb(red, green, blue,1);\n\t}", "private static IndependentValidator createColorListValidator() {\n HashMap messageKeyMappings = new HashMap(1);\n messageKeyMappings.put(FaultTypes.INVALID_COLOR,\n \"ColorListSelectionDialog.invalidColor\");\n ValidationMessageBuilder builder =\n new ValidationMessageBuilder(\n ControlsMessages.getResourceBundle(),\n messageKeyMappings,\n null);\n Validator validator = new ColorValidator(NamedColor.getAllColors());\n return new IndependentValidator(validator, builder);\n }", "private static Color newColor(int red, int green, int blue) {\n return new Color(red / 255.0, green / 255.0, blue / 255.0);\n }", "Color(int R, int G, int B) {\r\n\t\t this.rgb = new RGB(R,G,B);\r\n\t\t this.colorific = true;\r\n\t }", "public CachedColorizer()\n {\n colorIndex = 3;\n }", "private Color NewColor(int numb) {\r\n\r\n\t\tswitch(numb){\r\n\t\tcase 0: return Color.BLACK;\r\n\t\tcase 1: return Color.RED;\r\n\t\tcase 3: return Color.BLUE;\r\n\t\t}\r\n\t\treturn Color.MAGENTA;\r\n\t}", "public NewCustomColorPalette() {\n\t\tsuper();\n\t\tbuildPalette();\n\t}", "private ColorUtil() {\n }", "private Command createColorCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\tColor color = new Color(Integer.decode(\"#\" + tokens[1]));\n\t\treturn new ColorCommand(color);\n\t}", "public ColourTest(String name)\n\t{\n\t\tsuper(name);\n\t}", "public Color() {\n\n\t\tthis(0, 0, 0);\n\t}", "public ColorClass( String name) {\n this(name, false);\n }", "public TetrisColors() {\n\t\treset();\t\n\t}", "public ColorFilter(Color color) {\r\n this.color = color;\r\n }", "private ColorWithConstructor() {\n\t\tSystem.out.println(\"Constructor called for : \" + this.toString());\n\t}", "public void makeRandColor(){}", "private SingletonColorFactory() {\n\t\tRandom rand = new Random();\n\t\tfactoryID = rand.nextInt(10000);\n\t}", "public ColorRenderer() {\r\n\t}", "private void colorScheme (Composite parent) {\r\n\t\tbgLabel = ControlFactory.createLabel(parent, CDTFoldingConstants.SELECT_BG);\r\n\t\tbgColorSelector = new ColorSelector(parent);\r\n\r\n\t\tfgLabel = ControlFactory.createLabel(parent, CDTFoldingConstants.SELECT_FG);\r\n\t\tfgColorSelector = new ColorSelector(parent);\r\n\r\n\t\tbgColorSelector.setColorValue(CDTUtilities.restoreRGB(store\r\n\t\t\t\t.getString(CDTFoldingConstants.COLOR_PICKED_BG)));\r\n\t\tfgColorSelector.setColorValue(CDTUtilities.restoreRGB(store\r\n\t\t\t\t.getString(CDTFoldingConstants.COLOR_PICKED_FG)));\r\n\r\n\t\tbgColorSelector.addListener(event -> {\r\n\t\t\tRGB currentRGB = bgColorSelector.getColorValue();\r\n\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tsb.append(Integer.toString(currentRGB.red) + \" \");\r\n\t\t\tsb.append(Integer.toString(currentRGB.green) + \" \");\r\n\t\t\tsb.append(Integer.toString(currentRGB.blue));\r\n\r\n\t\t\tstore.setValue(CDTFoldingConstants.COLOR_PICKED_BG, sb.toString());\r\n\t\t});\r\n\r\n\t\tfgColorSelector.addListener(event -> {\r\n\t\t\tRGB currentRGB = fgColorSelector.getColorValue();\r\n\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tsb.append(Integer.toString(currentRGB.red) + \" \");\r\n\t\t\tsb.append(Integer.toString(currentRGB.green) + \" \");\r\n\t\t\tsb.append(Integer.toString(currentRGB.blue));\r\n\r\n\t\t\tstore.setValue(CDTFoldingConstants.COLOR_PICKED_FG, sb.toString());\r\n\t\t});\r\n\r\n\t\tturnOnOffColors();\r\n\t}", "private void colorPickerHander() {\n\t\tboolean validvalues = true;\n\t\tHBox n0000 = (HBox) uicontrols.getChildren().get(5);\n\t\tTextField t0000 = (TextField) n0000.getChildren().get(1);\n\t\tLabel l0000 = (Label) n0000.getChildren().get(3);\n\t\tString txt = t0000.getText();\n\t\tString[] nums = txt.split(\",\");\n\t\tif (nums.length != 4) {\n\t\t\tvalidvalues = false;\n\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Invalid Color Format!\\nFormat: <0-255>,<0-255>,<0-255>,<0-1> \\n (red),(green),(blue),(alpha)\");\n\t\t\tGUIerrorout.showAndWait();\n\t\t}\n\t\tif (validvalues) {\n\t\t\tint[] colorvalues = new int[3];\n\t\t\tdouble alphavalue = 1.0;\n\t\t\ttry {\n\t\t\t\tfor(int x = 0; x < 3; x++) {\n\t\t\t\t\tcolorvalues[x] = Integer.parseInt(nums[x]);\n\t\t\t\t}\n\t\t\t\talphavalue = Double.parseDouble(nums[3]);\n\t\t\t} catch(Exception e) {\n\t\t\t\tvalidvalues = false;\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Invalid Color Format!\\nFormat: <0-255>,<0-255>,<0-255>,<0-1> \\n (red),(green),(blue),(alpha)\");\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n\t\t\tif (alphavalue <= 1.0 && alphavalue >= 0.0 && colorvalues[0] >= 0 && colorvalues[0] < 256 && colorvalues[1] >= 0 && colorvalues[1] < 256 && colorvalues[2] >= 0 && colorvalues[2] < 256){\n\t\t\t\tif (validvalues) {\n\t\t\t\t\tl0000.setTextFill(Color.rgb(colorvalues[0],colorvalues[1],colorvalues[2],alphavalue));\n\t\t\t\t\tusercolors[colorSetterId] = Color.rgb(colorvalues[0],colorvalues[1],colorvalues[2],alphavalue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Invalid Color Format!\\nFormat: <0-255>,<0-255>,<0-255>,<0-1> \\n (red),(green),(blue),(alpha)\");\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n\t\t}\n\t}", "private ColorUtil() {\n // do nothing\n }", "Color userColorChoose();", "private void createNodeColor(NodeAppearanceCalculator nac) {\r\n\t DiscreteMapping discreteMapping = new DiscreteMapping\r\n\t (Color.WHITE,\r\n\t NODE_TYPE,\r\n\t ObjectMapping.NODE_MAPPING);\r\n\t \r\n\t discreteMapping.putMapValue(\"biochemicalReaction\",\r\n\t new Color (204, 0, 61));\r\n\t discreteMapping.putMapValue(\"catalyst\",\r\n\t new Color(0, 163, 0));\r\n\t discreteMapping.putMapValue(\"protein\",\r\n\t new Color (0, 102, 255));\r\n\t discreteMapping.putMapValue(\"smallMolecule\",\r\n\t new Color (193, 249, 36));\r\n\r\n\t NodeColorCalculator nodeColorCalculator =\r\n\t new GenericNodeColorCalculator(\"SimpleBioMoleculeEditor Node Color Calculator\"\r\n\t , discreteMapping);\r\n\t nac.setNodeFillColorCalculator(nodeColorCalculator);\r\n\t }", "public LightBulb(RGBColor color){\r\n _color = new RGBColor(color);\r\n }", "public static void createBoard() {\n Checkers[] CheckerBoard = new Checkers[24];\n CheckerBoard[0] = new Checkers(0,1,\"black\");\n CheckerBoard[1] = new Checkers(0,3,\"black\");\n CheckerBoard[2] = new Checkers(0,5,\"black\");\n CheckerBoard[3] = new Checkers(0,7,\"black\");\n CheckerBoard[4] = new Checkers(1,0,\"black\");\n CheckerBoard[5] = new Checkers(1,2,\"black\");\n CheckerBoard[6] = new Checkers(1,4,\"black\");\n CheckerBoard[7] = new Checkers(1,6,\"black\");\n CheckerBoard[8] = new Checkers(2,1,\"black\");\n CheckerBoard[9] = new Checkers(2,3,\"black\");\n CheckerBoard[10] = new Checkers(2,5,\"black\");\n CheckerBoard[11] = new Checkers(2,7,\"black\");\n CheckerBoard[12] = new Checkers(5,1,\"red\");\n CheckerBoard[13] = new Checkers(5,3,\"red\");\n CheckerBoard[14] = new Checkers(5,5,\"red\");\n CheckerBoard[15] = new Checkers(5,7,\"red\");\n CheckerBoard[16] = new Checkers(6,0,\"red\");\n CheckerBoard[17] = new Checkers(6,2,\"red\");\n CheckerBoard[18] = new Checkers(6,4,\"red\");\n CheckerBoard[19] = new Checkers(6,6,\"red\");\n CheckerBoard[20] = new Checkers(7,1,\"red\");\n CheckerBoard[21] = new Checkers(7,3,\"red\");\n CheckerBoard[22] = new Checkers(7,5,\"red\");\n CheckerBoard[23] = new Checkers(7,7,\"red\");\n\n\n\n }", "public ColorClass (int ide) {\n this(ide, false);\n }", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "protected Green() {\n\n super();\n }", "protected Color createColor(int red, int green, int blue, int alpha) {\n if ((red <= 1) && (green <= 1) && (blue <= 1) && ((alpha <= 1) || (alpha == 255))) {\n // rgba either 0 or 1\n Color c = new Color((float)red, (float)green, (float)blue, (alpha == 255) ? 1.0f : (float)alpha);\n// System.out.println(c);\n return c;\n }\n return super.createColor(red, green, blue, alpha);\n }", "private ArrayList<Color> createColorArray(){\n ArrayList<Color> out = new ArrayList<>();\n out.add(detectColor((String) Objects.requireNonNull(P1color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P2color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P3color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P4color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P5color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P6color.getSelectedItem())));\n return out;\n }", "public ColorList () { \n\t\t\n\t}", "public Color(Color newColor) {\n\n\t\tthis(newColor.r, newColor.g, newColor.b);\n\t}", "JComponent makeColorBox(final String cmd, Color color) {\n\n ColorSwatchComponent swatch = new ColorSwatchComponent(getStore(), color,\n \"Set Color\") {\n public void userSelectedNewColor(Color c) {\n super.userSelectedNewColor(c);\n try {\n if (cmd.equals(CMD_RAD_COLOR)) {\n rangeRings.setAzimuthLineColor(radColor = c);\n } else if (cmd.equals(CMD_RR_COLOR)) {\n rangeRings.setRangeRingColor(rrColor = c);\n } else if (cmd.equals(CMD_LBL_COLOR)) {\n rangeRings.setLabelColor(lblColor = c);\n }\n if (linkColorAndLineWidthButton.isSelected()) {\n rangeRings.setAzimuthLineColor(radColor = c);\n rangeRings.setRangeRingColor(rrColor = c);\n rangeRings.setLabelColor(lblColor = c);\n radColorSwatch.setBackground(c);\n rrColorSwatch.setBackground(c);\n lblColorSwatch.setBackground(c);\n }\n } catch (Exception exc) {\n logException(\"setting color\", exc);\n }\n }\n };\n return swatch;\n /*\n JComboBox jcb = getDisplayConventions().makeColorSelector(color);\n jcb.addActionListener(this);\n jcb.setActionCommand(cmd);\n return jcb;\n */\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public RandomColorProvider() {\n\t\tcurrentColorValue = 0;\n\t}", "public Pawn(String color){\r\n this.color=color; \r\n }", "public Shape(Color c) {\n\t\tcolor = c;\n\t}", "public abstract TC createStyle();", "public Colour() {\n\t\tset(0, 0, 0);\n\t}", "private ColorIcon(final Color theColor) {\r\n this.myColor = theColor;\r\n }", "public static SelectiveSearchSegmentationStrategyColor createSelectiveSearchSegmentationStrategyColor()\r\n {\r\n \r\n SelectiveSearchSegmentationStrategyColor retVal = SelectiveSearchSegmentationStrategyColor.__fromPtr__(createSelectiveSearchSegmentationStrategyColor_0());\r\n \r\n return retVal;\r\n }", "public ColorChange(Color color, double time) {\n this.color = color;\n this.time = time;\n }", "public ColorPalette build() throws IncorrectSplineDataException\n {\n ArrayList<Double> redList = new ArrayList<>();\n ArrayList<Double> greenList = new ArrayList<>();\n ArrayList<Double> blueList = new ArrayList<>();\n Color[] colors = {color1, color2, color3, color4, color5};\n for (int i = 0; i < colors.length; i++)\n {\n if (colors[i] != null)\n {\n redList.add(colors[i].getRed() * 255);\n greenList.add(colors[i].getGreen() * 255);\n blueList.add(colors[i].getBlue() * 255);\n }\n }\n double[] red = new double[colorsCount];\n double[] green = new double[colorsCount];\n double[] blue = new double[colorsCount];\n\n for (int i = 0; i < colorsCount; i++)\n {\n red[i] = redList.get(i);\n green[i] = greenList.get(i);\n blue[i] = blueList.get(i);\n }\n return new ColorPalette(red, green, blue);\n }", "public IImage createCheckerboard() {\n List<List<Pixel>> grid = new ArrayList<>();\n for (int i = 0; i < this.height; i++) {\n List<Pixel> row;\n // alternating between making rows starting with black or white tiles\n if (i % 2 == 0) {\n // start white\n for (int j = 0; j < this.tileSize; j++) {\n row = createRow(255, 0, (i * this.tileSize) + j);\n grid.add(row);\n }\n }\n else {\n // start black\n for (int m = 0; m < this.tileSize; m++) {\n row = createRow(0, 255, (i * this.tileSize) + m);\n grid.add(row);\n }\n }\n }\n return new Image(grid, 255);\n }", "public static Color create(Scalar s, ColorSpace colorSpace) {\n Class<? extends Color> colorClass = colorSpace.getColorClass();\n\n try {\n return colorClass.getConstructor(Scalar.class).newInstance(s);\n } catch (Exception ignored) {\n throw new IllegalArgumentException(\"Cannot create new color instance.\");\n }\n }", "public ColorSet()\n {\n }", "private Color generateColor() {\r\n\t\tint length = nameColor.size();\r\n\t\tif(length == 0) return colorArray[0];\r\n\t\t\r\n\t\tColor lastColor = nameColor.get(length-1);\r\n\t\tint lastColorIndex = 0;\r\n\t\tfor(int i = 0; i<colorArray.length; i++) {\r\n\t\t\tif(lastColor == colorArray[i]) {\r\n\t\t\t\tlastColorIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tColor curColor = colorArray[(lastColorIndex+1)%3];\r\n\t\treturn curColor;\r\n\t}", "public IsColor getColorFrom() {\n\t\treturn ColorBuilder.parse(getColorFromAsString());\n\t}", "public Color recupColor(int nb){\r\n\t\tColor color;\r\n\t\tif(nb == 1){\r\n\t\t\tcolor = Config.colorJ1;\r\n\t\t}\r\n\t\telse if(nb == 2){\r\n\t\t\tcolor = Config.colorJ2;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcolor =\tConfig.colorVide;\r\n\t\t}\r\n\t\treturn color;\r\n\t}", "public ToolImpl(Color fgColor) {\n\t\tthis(fgColor, null, null, null, null);\n\t}", "private void InitColorTable(){\n\n }", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "public void createBluePickHiglight() {\n\t\tbluePickHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tbluePickHighlight.setBackground(new Color(218, 116, 32, 120));\n\t\tleftPanel.add(bluePickHighlight, new Integer(1));\n\t\tbluePickHighlight.setBounds(18, 10, 210, 88);\n\t}", "@Override\n public void onClick(View v) {\n\n cp.show();\n /* On Click listener for the dialog, when the user select the color */\n Button okColor = (Button) cp.findViewById(R.id.okColorButton);\n okColor.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n /* You can get single channel (value 0-255) */\n int red = cp.getRed();\n int blue = cp.getBlue();\n int green = cp.getGreen();\n /*\n if (color < 0)\n color = -color;*/\n lights.lightscolors.get(index).rgbhex = \"#\" + String.format(\"%02x\", red) + String.format(\"%02x\", green) + String.format(\"%02x\", blue);\n lights.lightscolors.get(index).color = \"rgb(\" + red + \",\" + green + \",\" + blue + \")\";\n Log.v(\"ColorPicker ambiance\", lights.lightscolors.get(index).color);\n int rgb = Color.parseColor(lights.lightscolors.get(index).rgbhex);\n if (!lights.lightscolors.get(index).on)\n rgb = 0;\n GradientDrawable gd = (GradientDrawable) circles.get(index).getDrawable();\n gd.setColor(rgb);\n gd.setStroke(1, Color.WHITE);\n cp.dismiss();\n }\n });\n }", "public int getColor();", "public int getColor();", "public void setColor(String newColor){\n invalidate();\n // Comprobar si el valor del color o el nombre del patrón\n if(newColor.startsWith(\"#\")){\n paintColor = Color.parseColor(newColor);\n drawPaint.setColor(paintColor);\n drawPaint.setShader(null);\n }\n else{\n int patternID = getResources().getIdentifier(newColor, \"drawable\", \"com.example.drawingfun\");\n // decodifica los colores\n Bitmap patternBMP = BitmapFactory.decodeResource(getResources(), patternID);\n BitmapShader patternBMPshader = new BitmapShader(patternBMP,\n Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);\n drawPaint.setColor(0xFFFFFFFF);\n drawPaint.setShader(patternBMPshader);\n }\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTColor addNewPenClr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTColor target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor)get_store().add_element_user(PENCLR$12);\n return target;\n }\n }", "public void RGB_Change(View view) {\r\n int [] color= {0,0,0};\r\n\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Core Colors Change\");\r\n adb.setItems(colors, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n color[which]=255;\r\n lL.setBackgroundColor(Color.rgb(color[0],color[1],color[2]));\r\n }\r\n });\r\n adb.setPositiveButton(\"Exit\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }", "public ColorBox() {\r\n this.popup = new ColorPopup();\r\n setValue(\"#ffffff\");\r\n\r\n popup.addMessageHandler(m_color_event);\r\n addFocusHandler(new FocusHandler() {\r\n\r\n @Override\r\n public void onFocus(FocusEvent event) {\r\n popup.setHex(getText());\r\n popup.setAutoHideEnabled(true);\r\n popup.setPopupPosition(getAbsoluteLeft() + 10, getAbsoluteTop() + 10);\r\n popup.showRelativeTo(ColorBox.this);\r\n }\r\n });\r\n addKeyDownHandler(new KeyDownHandler() {\r\n\r\n @Override\r\n public void onKeyDown(KeyDownEvent event) {\r\n String color = getValue();\r\n if (color.length() > 1) {\r\n MessageEvent ev = new MessageEvent(MessageEvent.COLOR, color);\r\n fireEvent(ev);\r\n }\r\n }\r\n });\r\n\r\n }", "public Figure(Color color){\n this.color=color;\n }", "Color(double lowThreshold, double highThreshold){\n this.lowThreshold = lowThreshold;\n this.highThreshold = highThreshold;\n }", "String getColor();", "public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "RGB getOldColor();", "ColorSelectionDialog() {\n initComponents();\n }", "public void setColorNew(String value) {\n setAttributeInternal(COLORNEW, value);\n }", "public static CustomisableListSelectionDialog\n createColorListSelectionDialog(Shell parent,\n String[] preSelected) {\n return new CustomisableListSelectionDialog(\n parent.getShell(),\n COLOR_RESOURCE_PREFIX,\n new ColorSelectorFactory(),\n createColorListValidator(),\n true, // colour list is allowed duplicate colours\n preSelected);\n }", "public Collection(char colour) { /* ... code ... */ }", "java.awt.Color getColor();", "public Piezas(String color) {\r\n this.color = color;\r\n }", "private ColorWheel() {\n pCount = 0;\n sCount = 0;\n }", "public RGBColor () \r\n\t{\r\n\t\tr = 0; g = 0; b = 0;\r\n\t\tindex = (byte) Palm.WinRGBToIndex(this);\t\r\n\t}", "private void define_select_color(){\n\n TextView white_panel = (TextView) findViewById(R.id.palette_white);\n TextView black_panel = (TextView) findViewById(R.id.palette_black);\n TextView red_panel = (TextView) findViewById(R.id.palette_red);\n TextView blue_panel = (TextView) findViewById(R.id.palette_blue);\n\n white_panel.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n selected_color=WHITE;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n black_panel.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n selected_color=BLACK;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n red_panel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selected_color = RED;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n blue_panel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selected_color = BLUE;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n\n\n\n }", "@Override\n public void setCheckers(boolean color, ArrayList<Checker> checkersInUse, int checkerNum) {\n if(color == true) { //player x\n color = true;\n for(int i = 1; i <= 3; i++) { //iterates through three rows\n if(i%2 != 0) {\n for(int j = 1; j<= 7; j+=2) {\n checkersInUse.add(new KingChecker( j, i,true, checkerNum +1));\n checkerNum ++;\n }\n }else {\n for(int j = 2; j<= 8; j+=2) {\n checkersInUse.add(new KingChecker( j, i, true, checkerNum +1));\n checkerNum ++;\n }\n }\n }\n }else{\n color = false;\n for(int i = 6; i <= 8; i++) {\n if(i%2 != 0) {\n for(int j = 1; j<=7; j+=2) {\n checkersInUse.add(new Checker(j, i, false, checkerNum +1));\n checkerNum ++;\n }\n }else {\n for(int j = 2; j<=8; j+=2) {\n checkersInUse.add(new Checker(j, i, false, checkerNum +1));\n checkerNum ++;\n }\n }\n }\n\n }\n }", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "public ColorClass (int ide, boolean ordered) {\n this(\"C_\"+ide, ordered);\n }", "private PaletteFactory() {\n }", "private void addNewColorToPanel() {\n if (!colorPickerCurrent.getValue().equals(colorsQueue.getFirst())) {\n colorsQueue.push(colorPickerCurrent.getValue());\n revalidateColorPanel();\n }\n }", "public ColorClass (int ide, Interval interval) {\n this(ide , interval , false);\n }", "private Color createColor( final String key, final Display display ) {\r\n Color color = null;\r\n if( this.store.contains( key ) ) {\r\n RGB rgb = null;\r\n if( this.store.isDefault( key ) ) {\r\n rgb = PreferenceConverter.getDefaultColor( this.store, key );\r\n } else {\r\n rgb = PreferenceConverter.getColor( this.store, key );\r\n }\r\n if( rgb != null ) {\r\n color = new Color( display, rgb );\r\n }\r\n }\r\n return color;\r\n }", "public Circle(SelectedColor color) {\n super(Name.Circle, color);\n\n Log.i(\"Circle\",\"Created a \" + color + \" Circle\");\n //Need getcolor() to pick random\n //Maybe keep all colors random at create time, then when we add them to data struc\n //we change one of the colors depending on \"correct shape\"\n }", "void createDialogComponents(Color color) {\r\n GridBagConstraints constr = new GridBagConstraints();\r\n constr.gridwidth = 1;\r\n constr.gridheight = 4;\r\n constr.insets = new Insets(0, 0, 0, 10);\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n\r\n constr.gridx = 0;\r\n constr.gridy = 0;\r\n\r\n // Create color wheel canvas\r\n colorCanvas = new ColorCanvas(50, color);\r\n add(colorCanvas, constr);\r\n\r\n // Create input boxes to enter values\r\n Font font = new Font(\"DialogInput\", Font.PLAIN, 10);\r\n redInput = new TextField(3);\r\n redInput.addFocusListener(this);\r\n redInput.setFont(font);\r\n greenInput = new TextField(3);\r\n greenInput.addFocusListener(this);\r\n greenInput.setFont(font);\r\n blueInput = new TextField(3);\r\n blueInput.addFocusListener(this);\r\n blueInput.setFont(font);\r\n\r\n // Add the input boxes and labels to the component\r\n Label label;\r\n constr.gridheight = 1;\r\n constr.fill = GridBagConstraints.HORIZONTAL;\r\n constr.anchor = GridBagConstraints.SOUTH;\r\n constr.insets = new Insets(0, 0, 0, 0);\r\n constr.gridx = 1;\r\n constr.gridy = 0;\r\n label = new Label(\"Red:\", Label.RIGHT);\r\n add(label, constr);\r\n constr.gridy = 1;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n label = new Label(\"Green:\", Label.RIGHT);\r\n add(label, constr);\r\n constr.gridy = 2;\r\n constr.anchor = GridBagConstraints.NORTH;\r\n label = new Label(\"Blue:\", Label.RIGHT);\r\n add(label, constr);\r\n\r\n constr.gridheight = 1;\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.SOUTHWEST;\r\n constr.insets = new Insets(0, 0, 0, 10);\r\n constr.gridx = 2;\r\n constr.gridy = 0;\r\n add(redInput, constr);\r\n constr.gridy = 1;\r\n constr.anchor = GridBagConstraints.WEST;\r\n add(greenInput, constr);\r\n constr.gridy = 2;\r\n constr.anchor = GridBagConstraints.NORTHWEST;\r\n add(blueInput, constr);\r\n\r\n // Add color swatches\r\n Panel panel = new Panel();\r\n panel.setLayout(new GridLayout(1, 2, 4, 4));\r\n oldSwatch = new ColorSwatch(false);\r\n oldSwatch.setForeground(color);\r\n panel.add(oldSwatch);\r\n newSwatch = new ColorSwatch(false);\r\n newSwatch.setForeground(color);\r\n panel.add(newSwatch);\r\n\r\n constr.fill = GridBagConstraints.HORIZONTAL;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n constr.gridx = 1;\r\n constr.gridy = 3;\r\n constr.gridwidth = 2;\r\n add(panel, constr);\r\n\r\n // Add buttons\r\n panel = new Panel();\r\n panel.setLayout(new GridLayout(1, 2, 10, 2));\r\n Font buttonFont = new Font(\"SansSerif\", Font.BOLD, 12);\r\n okButton = new Button(\"Ok\");\r\n okButton.setFont(buttonFont);\r\n okButton.addActionListener(this);\r\n cancelButton = new Button(\"Cancel\");\r\n cancelButton.addActionListener(this);\r\n cancelButton.setFont(buttonFont);\r\n panel.add(okButton);\r\n panel.add(cancelButton);\r\n\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n constr.gridx = 0;\r\n constr.gridy = 4;\r\n constr.gridwidth = 3;\r\n add(panel, constr);\r\n }", "public void testCOLOUR1() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 120, \"gules\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Override\n public Color getMarkingColor(XYCoord xyc)\n {\n int r = 255 - myColor.getRed();\n int g = 255 - myColor.getGreen();\n int b = 255 - myColor.getBlue();\n Color buildCountColor = new Color(r, g, b);\n return buildCountColor;\n }", "protected abstract Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException;", "public Piece(Color color) {\r\n this.type = Type.SINGLE;\r\n this.color = color;\r\n }", "@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(indicateColor);\n\t\tg.fillOval(0, 0, checkerSize, checkerSize);\t\n\t\t\n\t}", "private TextureUniform makeCheckerboardTexture(int textureSize) {\n Uint8Array checkerboard = Uint8ArrayNative.create(4 * textureSize * textureSize);\n\n int maxDiagonal = 2 * (textureSize - 1);\n for (int i = 0; i < textureSize; i++) {\n for (int j = 0; j < textureSize; j++) {\n int index = i * textureSize + j;\n // Checking the parity of the diagonal number gives a checkerboard\n // pattern.\n int diagonal = i + j;\n if (diagonal % 2 == 0) {\n // set the square red. We only need to set the red channel!\n checkerboard.set(4 * index, 255);\n }\n // otherwise we'd set the square to black. But arrays are already\n // initialized to 0s so nothing needed here.\n\n // for the alpha channel, map the diagonal number to [0, 255]\n checkerboard.set(4 * index + 3, (255 * diagonal) / maxDiagonal);\n }\n }\n return new TextureUniform(new TextureUniformOptions()\n .setTypedArray(checkerboard)\n .setWidth(textureSize)\n .setHeight(textureSize)\n .setMinificationFilter(TextureMinificationFilter.NEAREST())\n .setMagnificationFilter(TextureMagnificationFilter.NEAREST()));\n }", "public ColorPaletteBuilder color2(Color color)\n {\n if (color2 == null) colorsCount++;\n this.color2 = color;\n return this;\n }", "public void setColorAccordingToSize() {\n float s = getMeasuredSizeCorrectedByPerspective();\n float hue = 2 * s / chip.getMaxSize();\n if (hue > 1) {\n hue = 1;\n }\n setColor(Color.getHSBColor(hue, 1f, 1f));\n }", "public static\n Color convertStringToColor(String val)\n {\n Color ret_Color;\n\n try\n {\n String workstr1;\n int slen = val.length();\n if (val.startsWith(\"0x\") || val.startsWith(\"0X\"))\n {\n workstr1 = val.substring(2);\n slen -= 2;\n }\n else\n if (val.startsWith(\"#\"))\n {\n workstr1 = val.substring(1);\n slen -= 1;\n }\n else\n { // decimal integer\n return new Color(Integer.parseInt(val));\n }\n\n // process hex string\n if (slen <= 6)\n { // no alpha\n int ival = Integer.parseInt(workstr1, 16);\n ret_Color = new Color(ival);\n }\n else\n { // has alpha of some sort\n String workstr2;\n if (slen == 8)\n {\n workstr2 = workstr1;\n }\n else\n if (slen == 7)\n {\n workstr2 = \"0\" + workstr1;\n }\n else\n {\n workstr2 = workstr1.substring(slen - 8); // get rightmost 8\n }\n\n // System.out.println(\"Color,val=[\" + val + \"],key=[\" + key + \"],slen=\" + slen + \"]\");\n // System.out.println(\" workstr1=[\" + workstr1 + \"],workstr2=[\" + workstr2 + \"]\");\n int a = Integer.parseInt(workstr2.substring(0, 2), 16); // a\n int r = Integer.parseInt(workstr2.substring(2, 4), 16); // r\n int g = Integer.parseInt(workstr2.substring(4, 6), 16); // g\n int b = Integer.parseInt(workstr2.substring(6, 8), 16); // b\n // System.out.println(\" ret_Color1=[\" + r + \":\" + g + \":\" + b +\":\" + a + \"]\");\n // int ival = Integer.parseInt(workstr2, 16);\n // ret_Color = new Color(ival, true);\n // System.out.println(\" ival=\" + ival);\n try {\n ret_Color = new Color(r, g, b, a);\n }\n catch (NoSuchMethodError excp1) {\n System.out.println(\"YutilProperties:convertStringToColor|excp1=[\" + excp1 + \"]\");\n ret_Color = new Color(r, g, b);\n }\n // System.out.println(\" ret_Color1=[\" + ret_Color + \"]\");\n }\n }\n catch(NumberFormatException e)\n {\n ret_Color = Color.black;\n // System.out.println(\"Color,ret_Color3=[\" + ret_Color + \"]\");\n }\n\n return ret_Color;\n }" ]
[ "0.62894833", "0.6278806", "0.62390274", "0.60078263", "0.592103", "0.5895342", "0.5878715", "0.58585125", "0.58415323", "0.5837061", "0.58155614", "0.5803248", "0.57548136", "0.569008", "0.56606805", "0.5643441", "0.5609496", "0.56013757", "0.5543921", "0.55391216", "0.5502719", "0.54732674", "0.5439991", "0.5409844", "0.54030323", "0.5398196", "0.5383177", "0.5370405", "0.5364136", "0.532177", "0.5321042", "0.53047925", "0.53027105", "0.52984923", "0.52859", "0.52831507", "0.52690023", "0.5235886", "0.5231226", "0.5213491", "0.51942605", "0.5193846", "0.5179779", "0.51654285", "0.5160011", "0.51552606", "0.5152335", "0.5142984", "0.5135924", "0.5118898", "0.5111316", "0.51090455", "0.5106932", "0.50939846", "0.50905716", "0.5085682", "0.5075201", "0.5073913", "0.50723267", "0.50717807", "0.5065808", "0.50474936", "0.5046679", "0.5046679", "0.5043249", "0.50417465", "0.5034408", "0.50205606", "0.5014405", "0.5014187", "0.5012614", "0.5012408", "0.50037473", "0.49980658", "0.49906552", "0.49871507", "0.49794406", "0.4978736", "0.49708694", "0.49708083", "0.4964747", "0.496436", "0.49632215", "0.4962428", "0.4958364", "0.49567097", "0.4954267", "0.4942517", "0.49395645", "0.49301213", "0.4929624", "0.49206644", "0.4920455", "0.4914302", "0.49105808", "0.49062803", "0.49058643", "0.49002242", "0.4899985", "0.4897088" ]
0.5786077
12
Will return a color defined by derived class.
abstract public String getColor();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Color getColor();", "abstract Color getColor();", "public abstract BossColor getColor();", "abstract String getColor();", "@Override\n public String getColor() {\n return this.color.name();\n }", "@Override\n public ShapeColor getColor() {\n return new ShapeColor(this.r, this.g, this.b);\n }", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "java.awt.Color getColor();", "public Color getColor();", "public Color getColor();", "public Color getColor();", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "@Override\n public Color getColor() {\n return color;\n }", "default Color getColor() {\r\n\t\treturn Color.RED;\r\n\t}", "public Color getColor() { return color; }", "public static Color getColor() {\n return myColor;\n }", "public Color getColorObject() {\n switch (this) {\n case WHITE:\n return new Color(255,255,255);\n case BLACK:\n return new Color(0,0,0);\n case RED:\n return new Color(255,0,0);\n case GREEN:\n return new Color(0,255,0);\n case BLUE:\n return new Color(0,0,255);\n default:\n return null;\n }\n\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public final Color getColor() {\n return color;\n }", "public Color getColor(){\n return color;\n }", "public Color getColor() \n\t{\n\t\treturn color;\n\t}", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n { \n return color;\n }", "public final Color getColor() {\r\n return color;\r\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor() {\n return color;\r\n }", "@Override\n public String getColor() {\n return this.color;\n }", "public Color getColor() {\n\treturn color;\n }", "public Color getColor() {\n \t\treturn color;\n \t}", "public final Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() { return color.get(); }", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return color;\r\n }", "public abstract int getColour();", "public Color getColor() {\n return color;\n }", "public GameColor getColor();", "public int getColor() {\r\n return Color;\r\n }", "public Color getColor() {\n\t\treturn (Color)p.getPaint();\n\t}", "@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}", "@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}", "public Color getColor() {\r\n\t\tColor retVal = theColor;\r\n\t\treturn retVal;\r\n\t}", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public Color getColor() {\r\n\t\treturn color;\r\n\t}", "public Color getColor() {\r\n\t\treturn color;\r\n\t}", "public Color color()\n {\n return myColor;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "@Override\r\n public Llama.Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return this.color;\r\n }", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public String getColor(){\n\t\treturn color;\n\t}", "@Override\n\t\tpublic Color color() { return color; }", "public java.awt.Color getColor() {\r\n return color;\r\n }", "public Color getCurrentColor();", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public int getColor();", "public int getColor();", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn _color;\n\t}", "@Override\n public Color getColor() {\n return Utils.Pion.BLANC.getCouleur();\n }", "public int getColor() {\n \t\treturn color;\n \t}", "public String getColor(){\n return this._color;\n }", "public Color getColor() {\n\t\treturn this.color;\n\t}", "public String getColor(){\r\n return color;\r\n }", "protected final Color getColor() {\n\t\treturn tile.getColor();\n\t}", "public String getColor()\n {\n return color;\n }", "public String getColor()\n {\n return color;\n }", "public Color getColor()\r\n\t{\r\n\t\treturn _g2.getColor();\r\n\t}", "public java.awt.Color getColor() {\r\n return this.color;\r\n }", "public String getColor(){\n return this.color;\n }", "public String getColor() {\r\n\t\treturn color;\r\n\t}", "@Override\r\n\tpublic String Color() {\n\t\treturn Color;\r\n\t}", "public int getColor() {\n return color;\n }", "public Color get_color() {return this.color;}", "public String getColor()\n {\n return this.color;\n }", "public java.awt.Color getColor() {\n return this.color;\n }", "public java.awt.Color getColor() {\n return this.color;\n }", "public Integer getColor() {\n\t\treturn color;\n\t}", "public Color getColor()\r\n {\r\n return currentColor;\r\n }", "public String getColor() {\n\t\treturn color;\n\t}" ]
[ "0.7767951", "0.77630264", "0.70823675", "0.7019084", "0.6992399", "0.69753426", "0.6894162", "0.6894162", "0.6894162", "0.6894162", "0.6894162", "0.68890893", "0.6879362", "0.6879362", "0.6879362", "0.68737936", "0.68674976", "0.68584", "0.67943525", "0.6787476", "0.6773012", "0.67725515", "0.67725515", "0.67725515", "0.6771471", "0.67702067", "0.6764108", "0.67509586", "0.67507976", "0.6749615", "0.6749177", "0.6742529", "0.6730677", "0.6725826", "0.6716748", "0.67069477", "0.6698757", "0.6675079", "0.6675079", "0.6675079", "0.6669931", "0.66627324", "0.6662403", "0.66623706", "0.66550666", "0.6650887", "0.6648214", "0.6647918", "0.6643966", "0.6639753", "0.6639753", "0.6639397", "0.6638707", "0.66367835", "0.66343313", "0.66343313", "0.66343313", "0.66343313", "0.66343313", "0.66343313", "0.66342753", "0.6623031", "0.6615545", "0.6615545", "0.66102326", "0.6600976", "0.65973556", "0.65883434", "0.65832686", "0.65832686", "0.65832686", "0.65817565", "0.65817565", "0.65800864", "0.65800864", "0.65800864", "0.65800864", "0.6576793", "0.6565228", "0.6562418", "0.6561298", "0.65595645", "0.6557931", "0.6556691", "0.6540016", "0.6540016", "0.65327764", "0.65270966", "0.6518777", "0.65138406", "0.651327", "0.65119827", "0.65116614", "0.65104866", "0.6506179", "0.6506179", "0.6504891", "0.650158", "0.64929575" ]
0.72276604
3
Abstract functions for use by the derived class as direction of the board varies.
abstract public void moveForward();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void easyMove(Board board) {\n\t\t\r\n\t}", "public abstract Move getMove(Board board);", "public abstract void buildMoveData(ChessBoard board);", "public abstract void move( char direction );", "public abstract void buildMoveData(HexagonalBoard board);", "public abstract int getDirection();", "public abstract int makeMove();", "private void mediumMove(Board board) {\n\t}", "@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}", "abstract void move();", "@Override\npublic void processDirection() {\n\t\n}", "public abstract void calculateMoves();", "public abstract void createBoard();", "private Board moveTo(int direction) {\n Board newBoard = new Board(this.state);\n int oZ = this.zero;\n int nZ = oZ;\n switch (direction) {\n case Board.LEFT: nZ = oZ - 1; break;\n case Board.RIGHT: nZ = oZ + 1; break;\n case Board.UP: nZ = oZ - Board.dim; break;\n case Board.DOWN: nZ = oZ + Board.dim; break;\n default: return null;\n }\n newBoard.state[oZ] = state[nZ];\n newBoard.state[nZ] = 0;\n newBoard.zero = nZ;\n\n // update heuristic iteratively except for MAN\n switch(Board.heuristic) {\n case HAM:\n if (state[nZ] == oZ) newBoard.dist = this.dist - 1;\n else if (state[nZ] == nZ) newBoard.dist = this.dist + 1;\n else newBoard.dist = this.dist;\n break;\n case INT: // iterative update the interference\n // this is the most logically complicated code I have\n // done in a while\n int moved = state[nZ];\n int oC;\n newBoard.inter = inter;\n switch (direction) {\n case Board.LEFT:\n case Board.RIGHT: // LEFT AND RIGHT\n if (Board.colOf[state[nZ]] == Board.colOf[nZ]) {\n // we've replaced a piece on its col with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old column\n //System.out.println(\"Took \" + state[nZ] + \" out of its col\");\n for (int i = Board.colOf[nZ]; i < nZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n \n } else if (Board.colOf[state[nZ]] == Board.colOf[oZ]) {\n // we've put a piece on its col that was a zero\n // interference can only increase since we know\n // the piece didn't below to its old column\n //System.out.println(\"Put \" + state[nZ] + \" into its col\");\n for (int i = Board.colOf[oZ]; i < oZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n break;\n default: // UP AND DOWN\n if (Board.rowOf[state[nZ]] == Board.rowOf[nZ]) {\n // we've replaced a piece on its row with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Took \" + state[nZ] + \" out of its row\");\n for (int i = Board.dim*Board.rowOf[nZ]; i < nZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ+1; i < Board.dim*(Board.rowOf[nZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n } else if (Board.rowOf[state[nZ]] == Board.rowOf[oZ]) {\n // we've put a piece on its row that was a zero\n // interference can only increase since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Put \" + state[nZ] + \" into its row\");\n for (int i = Board.dim*Board.rowOf[oZ]; i < oZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ+1; i < Board.dim*(Board.rowOf[oZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n } \n default: // update the manhattan distance\n newBoard.dist = this.dist - \n Board.manhattanTable[state[nZ]][nZ] +\n Board.manhattanTable[state[nZ]][oZ];\n }\n return newBoard;\n }", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void Move();", "public void calRightMove() {\n }", "public interface BoardMoveStrategy {\n\n /**\n * Function that checks if there are any moves possible.\n *\n * <p>Iterates through all gems and looks for pairs or two or\n * constructions like \"xox\" where another x could fill in.\n * For each case a different function is called which checks for\n * a valid move.</p>\n *\n * @return returns two jewels in a list to swap if move is possible.\n */\n List<Jewel> getValidMovePair();\n}", "void move(int row, int col) {\n\n int rowdiff = row - this._row; int coldiff = col - this.column;\n if (((Math.abs(rowdiff)) > 1) || (Math.abs(coldiff)) > 1);\n || (row >= _side) || (col >= _side) || (row < 0) || (col < 0);\n || ((Math.abs(coldiff)) == 1) && ((Math.abs(rowdiff)) == 1))); {\n throw new java.lang.IllegalArgumentException();\n } \n else if (rowdiff == 1) && (coldiff == 0)//up method\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(2)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(2))) {\n up_method(cube)\n } else if (isPaintedFace(2) == true) {\n _facePainted[2] == false\n grid[row][col] == true\n up_method(cube)\n }\n else {\n _facePainted[2] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if ((rowdiff == -1) && (coldiff == 0)) //down method\n\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(4)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(4))) {\n up_method(cube)\n } else if (isPaintedFace(4) == true) {\n _facePainted[4] == false\n grid[row][col] == true\n up_method(cube)\n } else {\n _facePainted[4] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if (rowdiff == 0) && (coldiff == -1) { //left method\n if (((isPaintedSquare(row, col) && isPaintedFace(5)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(5))) {\n up_method(cube)\n } else if (isPaintedFace(5) == true) {\n _facePainted[5] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[5] == true\n grid[row][col] == false \n up_method(cube)}\n }\n else if ((rowdiff == 0) && (coldiff == 1)) { //right method\n if (((isPaintedSquare(row, col) && isPaintedFace(6)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(6))) {\n up_method(cube)\n } else if (isPaintedFace(6) == true) {\n _facePainted[6] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[6] == true\n grid[row][col] == false \n up_method(cube)\n \n }\n }\n\n\n }", "public abstract boolean changeMove();", "@Override\n\tpublic boolean canMoveTo(Integer row, Integer col, ChessBoard board) {\n\t\tif((0<=(this.row - row)<=1 && 0<=(this.col - col)<=1) && (1==(this.row - row) || (this.col - col)==1));\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t\tfor(int i=0; i<=1 i++) {\n\t\t\tfor(int j=0, j<=1, j++) {\n\t\t\t\tif((i=0) && (j=0))\n\t\t\t\t\t\tcontinue;\n\t\t\t\tboard.pieceAt(row, col);\n\t\t\t}\n\t\t}\n\t\tboard.pieceAt(row, col)\n\t\t\n\t\telse if()\n\t}\n\n\t@Override\n\tpublic void moveTo(Integer row, Integer col) {\n\t\t\n\t\t\n\t}\n\n\t@Override\n\tpublic PieceType getType() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n}", "protected int getMove() \t\t\t\t{\treturn move;\t\t}", "@Override\n public void move () {\n }", "@Override\n\tpublic void move() {\n\n\t}", "@Override\r\n\tpublic void move() {\n\r\n\t}", "public abstract void move(int row, int col) throws IllegalMoveException;", "public abstract void doPerMoveWork();", "public abstract void setDirection(int dir);", "public abstract boolean validMove(ChessBoard board, Square from, Square to);", "@Override\n\tpublic void move() {\n\t\t\n\t}", "protected abstract void position(int[][] gameboard, int col, int row);", "@Override\n\tvoid move(int x, int y) {\n\n\t}", "void changeDirection();", "@Override\n\tpublic void move() {\n\t}", "public abstract void move(int direction, double speed);", "@Override\n\tpublic void move(Direction d) {\n\t\t\n\t}", "abstract public int[] makeMove();", "@Override\r\n\tpublic boolean movement(BoardCells[][] chessBoard, Piece targetPiece, int fromX,int fromY,int toX,int toY) {\t\t\r\n\t\t//DEBUG -- System.out.println(\"\"+fromX+fromY+\" \"+toX+toY);\r\n\t\t\r\n\t\tif(fromY == toY){\t\t\t\r\n\t\t\tif(fromX > toX) {\r\n\t\t\t\tfor(int i = fromX-1; i>toX; i--) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} else if (fromX < toX) {\r\n\t\t\t\tfor(int i = fromX+1; i<toX; i++) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\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}\r\n\t\t\t}\r\n\r\n\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\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}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\tif(fromX == toX) {\t\t\t\t\r\n\t\t\tif(fromY > toY) {\t\r\n\t\t\t\tfor(int i = fromY-1; i>toY; i--) {\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} else if (fromY < toY) {\t\t\t\t\r\n\t\t\t\tfor(int i = fromY+1; i<toY; i++) {\t\t\t\t\t\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\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}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\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}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\treturn true;\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn false;\t\t\r\n\t}", "public abstract boolean canMove(Board board, Spot from, Spot to);", "public void move(){\n\t\t\n\t}", "public interface Board\n{\n /** Value for an invalid move */\n int INVALID_MOVE = -1;\n\n /**\n * Returns the height of this Board.\n *\n * @return the height of this Board\n */\n int getHeight();\n\n /**\n * Returns the width of this Board.\n *\n * @return the width of this Board\n */\n int getWidth();\n\n /**\n * Returns the win condition of this Board.\n *\n * @return the win condition of this Board\n */\n int getWinCondition();\n\n /**\n * Returns the winner based on the current state of the board. Assumes that\n * the board is in a valid state and that there is only one player who has\n * n-in-a-row.\n *\n * @return the winner\n */\n Piece getWinner();\n\n /**\n * Returns the piece in the specified column and row.\n *\n * @param col the column\n * @param row the row\n * @return the Piece at the specified position\n */\n Piece getPieceAt(int col, int row);\n\n /**\n * Returns the current turn. Turns start at 0.\n *\n * @return the current turn\n */\n int getCurrentTurn();\n\n /**\n * Returns the next piece to be played. Turns alternate between Black and\n * Red, starting with Black on the first turn.\n *\n * @return the next piece to be played\n */\n Piece getNextPiece();\n\n /**\n * Plays the next piece in the specified column. Columns start from 0 on the\n * far left and end with (width - 1) on the far right. The next piece is\n * determined by the current turn. The piece will be placed in the lowest\n * empty row in the specified column.\n *\n * @param col the column to play the next piece\n * @throws IllegalMoveException if the column is not a valid column or if\n * the column is full\n */\n void play(int col) throws IllegalMoveException;\n\n /**\n * Undoes the last play on this Board.\n *\n * @throws IllegalStateException if the board is empty (i.e. no plays have\n * been made)\n */\n void undoPlay();\n\n /**\n * Checks if playing a piece in the specified column is valid. A move is\n * valid if the column is greater than or equal to 0 (far left column) and\n * less than the width of this Board (far right column) and the column is\n * not full. This method assumes that the board is in a valid state and only\n * checks if the top row of the column is empty.\n *\n * @param col the column to play the next piece\n * @return true if the move is valid, false otherwise.\n */\n boolean isValidMove(int col);\n\n /**\n * Adds a BoardListener to this Board.\n *\n * @param boardListener the BoardListener being added\n */\n void addBoardListener(BoardListener boardListener);\n\n /**\n * Returns an immutable view of this board.\n *\n * @return an immutable view of this board\n */\n ImmutableBoard getImmutableView();\n}", "public abstract void makeBestMove();", "@Override\n public void act()\n {\n Location loc = getLocation();\n int r = loc.getRow();\n int c = loc.getCol();\n int dir = getDirection();\n if(dir == Location.NORTH)\n {\n if(r - START_ROW + 1 > -2*(address & ADDRESS))\n {\n move();\n }\n else\n {\n setDirection(Location.WEST);\n }\n }\n else if(dir == Location.WEST)\n {\n if(c <= RETURN_COL)\n {\n setDirection(Location.SOUTH);\n }\n else\n {\n Bit b = null;\n Actor a = getGrid().get(loc.getAdjacentLocation(Location.SOUTH));\n if(a instanceof Bit) b = (Bit)a;\n if(b != null)\n {\n processBit(b,-c-1);\n }\n move();\n }\n }\n else if(dir == Location.SOUTH)\n {\n if(r == -1)\n {\n setDirection(Location.EAST);\n }\n else\n {\n move();\n }\n }\n else if(dir == Location.EAST)\n {\n move();\n }\n else\n {\n System.err.println(\"yer bus is on an angle bud\");\n }\n }", "@Override\n public void move() {\n System.out.println(\"diagonally\");\n }", "public abstract void move(int newXPosition, int newYPosition, PiecePosition position) throws BoardException;", "public abstract Piece movePiece(Move move);", "protected abstract void paintBoard() throws TilePixelOutOfRangeException;", "@Override\n\tpublic boolean move(int col, int row, piece[][] board) {\n\t\treturn false;\n\t}", "abstract public GameMove computerPlay() throws EndGameException, ColumnFullException;", "@Override\n public boolean isValidMove(Tile target, Board board) {\n if (target == null || board == null) {\n throw new NullPointerException(\"Arguments for the isValidMove method can not be null.\");\n }\n // current and target tiles have to be on a diagonal (delta between row and col index have to be identical)\n int currentCol = this.getTile().getCol();\n int currentRow = this.getTile().getRow();\n int targetCol = target.getCol();\n int targetRow = target.getRow();\n\n int deltaRow = Math.abs(currentRow - targetRow);\n int deltaCol = Math.abs(currentCol - targetCol);\n int minDelta = Math.min(deltaCol, deltaRow);\n\n boolean sameDiagonal = deltaCol == deltaRow;\n\n // check if there are pieces between the tiles\n boolean noPiecesBetween = true;\n // Directions -- (Up and to the left) , -+ (Up and to the right), ++, +-\n if (targetRow < currentRow && targetCol < currentCol) { // --\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n\n } else if (targetRow > currentRow && targetCol < currentCol) { // +-\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow > currentRow && targetCol > currentCol) { // ++\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow < currentRow && targetCol > currentCol) { // -+\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n }\n\n return sameDiagonal && noPiecesBetween;\n }", "public static void move(char dir) {\n if (!canMove()) {\r\n return;\r\n }\r\n //do nothing if is moving\r\n if (isMoving) {\r\n return;\r\n }\r\n //set player to moving\r\n isMoving = true;\r\n String debug = \"a\";\r\n switch (dir) {\r\n case 'r':\r\n if (!GridManager.canMoveRight(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = false;\r\n current = getX();\r\n target = current + moveDistance;\r\n forward = true;\r\n debug = \"rechts\";\r\n break;\r\n case 'l':\r\n if (!GridManager.canMoveLeft(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = false;\r\n current = getX();\r\n target = current - moveDistance;\r\n forward = false;\r\n debug = \"left\";\r\n break;\r\n case 'u':\r\n if (!GridManager.canMoveTop(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = true;\r\n current = getY();\r\n target = current - moveDistance;\r\n forward = false;\r\n debug = \"up\";\r\n break;\r\n case 'd':\r\n if (!GridManager.canMoveDown(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = true;\r\n current = getY();\r\n target = current + moveDistance;\r\n forward = true;\r\n debug = \"down\";\r\n break;\r\n }\r\n System.out.println(debug);\r\n }", "public void move() {\n\r\n\t}", "public abstract void advanceBoard(float deltaTime);", "public void move(int moveDirection) {\n //if same or opposite direction, check if movable\n if ((direction - moveDirection) % 6 == 0) {\n this.direction = moveDirection;\n if (moveable()) {\n if (direction == 12) {\n this.setLocation(new Point(this.getX(),\n this.getY() - speed));\n }\n //move right\n if (direction == 3) {\n this.setLocation(new Point(this.getX() + speed,\n this.getY()));\n\n }\n //move down\n if (direction == 6) {\n this.setLocation(new Point(this.getX(),\n this.getY() + speed));\n }\n //move left\n if (direction == 9) {\n this.setLocation(new Point(this.getX() - speed,\n this.getY()));\n }\n\n }\n } // if it is turning, check if can turn or not. If can turn then turn and move according to the direction before turn, otherwise, just leave the monster there\n else {\n Point snapToGridPoint = GameUtility.GameUtility.snapToGrid(\n this.getLocation());\n Point gridPoint = GameUtility.GameUtility.toGridCordinate(\n this.getLocation());\n Point nextPoint = new Point(gridPoint.x, gridPoint.y);\n //if the distance is acceptable\n if (GameUtility.GameUtility.distance(snapToGridPoint,\n this.getLocation()) < GameUtility.GameUtility.TILE_SIZE / 2.5) {\n\n if (moveDirection == 3) {\n int x = Math.max(0, gridPoint.x + 1);\n nextPoint = new Point(x, gridPoint.y);\n } else if (moveDirection == 6) {\n int y = Math.max(0, gridPoint.y + 1);\n nextPoint = new Point(gridPoint.x, y);\n } else if (moveDirection == 9) {\n int x = Math.min(19, gridPoint.x - 1);\n nextPoint = new Point(x, gridPoint.y);\n } else if (moveDirection == 12) {\n int y = Math.min(19, gridPoint.y - 1);\n nextPoint = new Point(gridPoint.x, y);\n }\n // if the turn is empty, then snap the monster to the grid location\n if (!(GameManager.getGameMap().getFromMap(nextPoint) instanceof Wall) && !(GameManager.getGameMap().getFromMap(\n nextPoint) instanceof Bomb)) {\n if (GameUtility.GameUtility.distance(snapToGridPoint,\n this.getLocation()) < GameUtility.GameUtility.TILE_SIZE / 10) {\n this.setLocation(snapToGridPoint);\n this.direction = moveDirection;\n } else {\n if (direction == 9 || direction == 3) {\n int directionOfMovement = (snapToGridPoint.x - getX());\n directionOfMovement = directionOfMovement / Math.abs(\n directionOfMovement);\n this.setLocation(new Point(\n this.getX() + directionOfMovement * speed,\n this.getY()));\n } else if (direction == 12 || direction == 6) {\n int directionOfMovement = (snapToGridPoint.y - getY());\n directionOfMovement = directionOfMovement / Math.abs(\n directionOfMovement);\n this.setLocation(new Point(\n this.getX(),\n this.getY() + directionOfMovement * speed));\n }\n }\n }\n }\n }\n }", "public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }", "public abstract void gameLogic(Cell currentCell);", "public abstract void makeMove(Move move, PlayerColor playerColor);", "public void move() {\n\n }", "abstract void setDirection(double x, double y, double z);", "public void getMove(){\n\t\t\n\t}", "public abstract boolean canMove();", "public abstract void makeMove(GameStatus gameStatus);", "@Override\n\tpublic int move(int direction) {\n\t\tswitch (direction) {\n\t\tcase LEFT:\n\t\t{\n\t\t\t\tanimator.animateMovement(LEFT, SPEED);\n\t\t\t\tif(animator.dx==-Math.round(25/SPEED)*SPEED) {\n\t\t\t\t\tanimator.resetOffset();\n\t\t\t\t\tif(position.column <= 0) {\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tposition = game.getCurrentMaze().board[position.column-1][position.row];\n\t\t\t\t\t\tcheckForHit();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\treturn MOVE_SUCCESS;\n\t\t\t}\n\t\tcase UP:\n\t\t{\n\t\t\t\tanimator.animateMovement(UP, SPEED);\n\t\t\t\tif(animator.dy==-Math.round(25/SPEED)*SPEED) {\n\t\t\t\t\tanimator.resetOffset();\n\t\t\t\t\tif(position.row <= 0) {\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tposition = game.getCurrentMaze().board[position.column][position.row-1];\n\t\t\t\t\t\tcheckForHit();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\treturn MOVE_SUCCESS;\n\t\t\t}\n\t\tcase RIGHT:\n\t\t\t{\n\t\t\t\t\tanimator.animateMovement(RIGHT, SPEED);\n\t\t\t\t\tif(animator.dx==Math.round(25/SPEED)*SPEED) {\n\t\t\t\t\t\tanimator.resetOffset();\n\t\t\t\t\t\tif(position.column >= (Game.WIDTH/Tile.TILE_SIZE)-2) {\n\t\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tposition = game.getCurrentMaze().board[position.column+1][position.row];\n\t\t\t\t\t\t\tcheckForHit();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\treturn MOVE_SUCCESS;\n\t\t\t}\n\t\tcase DOWN:\n\t\t\t{\n\t\t\t\tanimator.animateMovement(DOWN, SPEED);\n\t\t\t\tif(animator.dy==Math.round(25/SPEED)*SPEED) {\n\t\t\t\t\tanimator.resetOffset();\n\t\t\t\t\tif(position.row >= (Game.WIDTH/Tile.TILE_SIZE)-2) {\n\t\t\t\t\t\tfired = false;\n\t\t\t\t\t\tthis.dispose();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse { \n\t\t\t\t\t\tposition = game.getCurrentMaze().board[position.column][position.row+1];\n\t\t\t\t\t\tcheckForHit();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\treturn MOVE_SUCCESS;\n\t\t\t\t}\n\t\t}\n\t\treturn MOVE_FAIL;\n\t}", "@Override\n public boolean canMoveTo(int x, int y, Board board) {\n \n if (x > this.x && y > this.y){ //move up to the right\n if(lowCh(\"uright\",xt+1,yt+1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x > this.x && y < this.y){ //move down to the right\n if(lowCh(\"dright\",xt+1,yt-1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x < this.x && y > this.y){ //move up to the left\n if (lowCh(\"uleft\",xt-1,yt+1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x < this.x && y < this.y){ //move down to the left\n if (lowCh(\"dleft\",xt-1,yt-1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else {\n return false;\n }\n }", "public abstract void moveDown(int speed);", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}", "@Override\n\tprotected boolean moveRobot(boolean printEachStep) {\n\t\tboolean move=true;\n\t\tint incOrDecR = destRow > curRow ? 1 : -1, \n\t\t\tincOrDecC = destCol > curCol ? 1 : -1, \n\t\t\tcount = diagonalCount();\n\t\t\t// Move diagonally as close to the destination it can get to\n\t\t\tfor(int i=0; i<count; ++i) {\n\t\t\t\tif(move=grid.moveFromTo(this, curRow, curCol, \n\t\t\t\t\t\tblockedRow=curRow+incOrDecR, \n\t\t\t\t\t\tblockedCol=curCol+incOrDecC)) { \n\t\t\t\t\tcurRow+=incOrDecR; \n\t\t\t\t\tcurCol+=incOrDecC;\n\t\t\t\t\t--energyUnits;\n\t\t\t\t\tif(printEachStep)\n\t\t\t\t\t\tgrid.printGrid();\n\t\t\t\t} else {\n\t\t\t\t\treturn move; \n\t\t\t\t}\n\t\t\t}\n\t\tmove=super.moveRobot(printEachStep);\n\t\treturn move;\n\t}", "public void move(FightCell cell);", "void move( int dir ) {\n\t\t//Guard against literal edge cases\n\t\tif (p.y - PADDLE_WIDTH / 2 == 0 && dir == UP) {\n\t\t\treturn;\n\t\t} \n\t\telse if (p.y + PADDLE_WIDTH / 2 == Game.GAME_HEIGHT &&\n\t\t\t\t dir == DOWN){\n\t\t\treturn;\n\t\t}\n\t\t//Handle all three cases of dir\n\t\tif (dir == UP) {\n\t\t\tp.y -= 5; } \n\t\telse if (dir == DOWN) {\n\t\t\tp.y += 5; }\n\t\telse {\n\t\t\treturn;\n\t\t}\n\t}", "Move(int r, int c, int dr, int dc)\n\t{\n\t\tpieceRow = r;\n\t\tpieceCol = c;\n\t\tdestRow = dr;\n\t\tdestCol = dc;\n\t}", "@Override\r\n public void moveCharacter(KeyCode movement) {\r\n switch (movement) {\r\n case LEFT:\r\n if (PlayerPositionRow != 0) {\r\n if (maze.Struct[PlayerPositionRow - 1][PlayerPositionCol] != 1)\r\n PlayerPositionRow--;\r\n }\r\n break;\r\n case NUMPAD9:\r\n if ((PlayerPositionRow != 0)&&(PlayerPositionCol != maze.Struct[0].length - 1)) {\r\n if (maze.Struct[PlayerPositionRow + 1][PlayerPositionCol -1] != 1)\r\n PlayerPositionRow++;\r\n PlayerPositionCol--;\r\n }\r\n break;\r\n case NUMPAD3:\r\n if ((PlayerPositionRow != maze.Struct.length - 1)&&(PlayerPositionCol != maze.Struct[0].length - 1)) {\r\n if (maze.Struct[PlayerPositionRow + 1][PlayerPositionCol +1] != 1)\r\n PlayerPositionRow++;\r\n PlayerPositionCol++;\r\n }\r\n break;\r\n case NUMPAD7:\r\n if ((PlayerPositionRow != 0)&&(PlayerPositionCol != 0)) {\r\n if (maze.Struct[PlayerPositionRow - 1][PlayerPositionCol -1] != 1)\r\n PlayerPositionRow--;\r\n PlayerPositionCol--;\r\n }\r\n break;\r\n case NUMPAD1:\r\n if ((PlayerPositionCol != 0)&&(PlayerPositionRow != maze.Struct.length - 1)) {\r\n if (maze.Struct[PlayerPositionRow - 1][PlayerPositionCol +1] != 1)\r\n PlayerPositionRow--;\r\n PlayerPositionCol++;\r\n }\r\n break;\r\n case NUMPAD4:\r\n if (PlayerPositionRow != 0) {\r\n if (maze.Struct[PlayerPositionRow - 1][PlayerPositionCol] != 1)\r\n PlayerPositionRow--;\r\n }\r\n break;\r\n case RIGHT:\r\n if (PlayerPositionRow != maze.Struct.length - 1) {\r\n if (maze.Struct[PlayerPositionRow + 1][PlayerPositionCol] != 1)\r\n PlayerPositionRow++;\r\n }\r\n break;\r\n case NUMPAD6:\r\n if (PlayerPositionRow != maze.Struct.length - 1) {\r\n if (maze.Struct[PlayerPositionRow + 1][PlayerPositionCol] != 1)\r\n PlayerPositionRow++;\r\n }\r\n break;\r\n case DOWN:\r\n if (PlayerPositionCol != maze.Struct[0].length - 1) {\r\n if (maze.Struct[PlayerPositionRow][PlayerPositionCol + 1] != 1)\r\n PlayerPositionCol++;\r\n }\r\n break;\r\n case NUMPAD2:\r\n if (PlayerPositionCol != maze.Struct[0].length - 1) {\r\n if (maze.Struct[PlayerPositionRow][PlayerPositionCol + 1] != 1)\r\n PlayerPositionCol++;\r\n }\r\n break;\r\n case UP:\r\n if (PlayerPositionCol != 0) {\r\n if (maze.Struct[PlayerPositionRow][PlayerPositionCol - 1] != 1)\r\n PlayerPositionCol--;\r\n }\r\n break;\r\n case NUMPAD8:\r\n if (PlayerPositionCol != 0) {\r\n if (maze.Struct[PlayerPositionRow][PlayerPositionCol - 1] != 1)\r\n PlayerPositionCol--;\r\n }\r\n break;\r\n }\r\n setChanged();\r\n notifyObservers(\"move\");\r\n }", "@Override\n public DirType getMove(GameState state) {\n if (print) System.out.println(\"\\n\\n\");\n this.gb.update(state); // Must be done every turn\n this.findEnemySnake(); // Update Enemy Snake's head Location\n this.markDangerTiles(); // Mark tiles the Enemy Snake can reach and filled\n if (print) this.gb.printBoard();\n if (print) System.out.println(\"DIVEBOMB ENTER -> Us_X: \" + this.us_head_x + \", Us_Y: \" + this.us_head_y + \" -> \" + this.us_num);\n Tile target = this.diveBomb();\n if (print) System.out.print(\"DIVEBOMB EXIT -> Target_X: \" + target.getX() + \" Target_Y: \" + target.getY());\n DirType retVal = getDir(target);\n if (print) System.out.println(\" Dir: \" + retVal);\n\n\n if (this.us_num == 0) {\n System.out.println(\"\\n\\n\\n\");\n GameBoard gb= new GameBoard(state, 1,0);\n gb.update(state);\n float val = USuckUnless.grade(state, this.us_num, DirType.South);\n System.out.println(val);\n this.gb.printBoard();\n }\n return retVal;\n }", "public void Move()\n {\n \n }", "public int move_diagonally(Square[][] squares, int [] move, Boolean turn) {\n\n /* going down and right = f4 h2 [4,5,6,7] */\n if (move[2] > move[0] && move[3] > move[1]) {\n ////System.out.println(\"Down right\");\n int x = move[0];\n int y = move[1];\n x++;\n y++;\n while (x < move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y++;\n }\n }\n /* going down and left */\n else if (move[2] > move[0] && move[3] < move[1]){\n ////System.out.println(\"Down Left\");\n int x = move[0];\n int y = move[1];\n x++;\n y--;\n while (x < move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y--;\n }\n }\n /* going up and left */\n else if (move[2] < move[0] && move[3] < move[1]){\n ////System.out.println(\"Up Left\");\n int x = move[0];\n int y = move[1];\n x--;\n y--;\n while (x > move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y--;\n }\n }\n /* going up and right c1 f4 [7,2,4,5] */\n else if (move[2] < move[0] && move[3] > move[1]){\n ////System.out.println(\"Up right\");\n int x = move[0];\n int y = move[1];\n x--;\n y++;\n while (x > move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y++;\n }\n }\n return 0;\n }", "abstract void move_elevator();", "private void generateBoard(){\n\t}", "public abstract void move(Position position);", "public void moveDown() {\n\t\t\n\t}", "public interface IGameBoard {\r\n int getNumRows();\r\n int getNumColumns();\r\n int getNumToWin();\r\n void placeToken(char p, int c);\r\n boolean checkHorizWin(int r, int c, char p);\r\n boolean checkVertWin(int r, int c, char p);\r\n boolean checkDiagWin(int r, int c, char p);\r\n char whatsAtPos(int r, int c);\r\n\r\n /**\r\n * @pre c > 0, c <= number of columns\r\n * @param c is the column the user selected on the most recent turn\r\n * @return true if the top of the column is free\r\n */\r\n default boolean checkIfFree(int c){ // this function checks the top of each row\r\n if (whatsAtPos(getNumRows()-1, c) == ' ') // if the top of the row is blank, return true (because there is space in the column)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n /**\r\n * @pre c > 0, c <= number of columns\r\n * @param c is the column the user selected on the most recent turn\r\n * @return true if either player won horizontally, vertically, or diagonally\r\n */\r\n default boolean checkForWin(int c){ // this function checks for a win horizontally, vertically, and diagonally\r\n int row = 0;\r\n// for(int i = 0; i < getNumRows(); i++) { // this loop finds the last placed token in the last column chosen (COUNTING UP)\r\n// if (whatsAtPos(i, c) == ' ') {\r\n// row = i - 1;\r\n// break;\r\n// }\r\n// }\r\n for(int i = getNumRows()-1; i >= 0; i--){ // this loop finds the last placed token in the last column chosen (COUNTING DOWN)\r\n if(whatsAtPos(i, c) != ' '){\r\n row = i;\r\n break;\r\n }\r\n }\r\n char player = whatsAtPos(row, c); // set temporary variable player to the last placed token\r\n\r\n if(checkHorizWin(row, c, player)){ // check for win horizontally\r\n return true;\r\n }\r\n if(checkVertWin(row, c, player)){ // check for win vertically\r\n return true;\r\n }\r\n else if(checkDiagWin(row, c, player)){ // check for win diagonally\r\n return true;\r\n }\r\n else{return false;} // return false if none of these are true\r\n }\r\n\r\n /**\r\n * @pre whatsAtPos == 'X', 'O', or ' '\r\n * @return true if board is full\r\n */\r\n default boolean checkTie() { // this function checks for a tie (if the board is full)\r\n int count = 0;\r\n for(int c = 0; c < getNumColumns(); c++) { // check the top of each column\r\n if (!checkIfFree(c)){ // if it is full, increment count\r\n count++;\r\n }\r\n }\r\n if(count == getNumColumns()){ // if count reaches the number of columns, all columns are full; it's tie\r\n return true; // return true\r\n }\r\n else{return false;} // if any columns are not full, then it is not a tie\r\n }\r\n}", "public static void makeEnemyMove() { //all players after index 1 are enemies\n if (gameMode == EARTH_INVADERS) {//find leftmost and rightmost vehicle columns to see if we need to move down\n int leftMost = board[0].length;\n int rightMost = 0;\n int lowest = 0;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//find left-most, right-most and lowest most vehicles (non aircraft/train) to determine how formation should move\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster))\n continue;\n if (curr.getCol() < leftMost)\n leftMost = curr.getCol();\n if (curr.getCol() > rightMost)\n rightMost = curr.getCol();\n if (curr.getRow() > lowest)\n lowest = curr.getRow();\n curr.setHeadDirection(DOWN);\n }\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//***move aircraft and trains\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster)) {\n if (curr.isMoving())\n continue;\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int r = curr.getRow();\n int c = curr.getCol();\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n int rand = 0;\n if (dirs.size() > 0)\n rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying()) { //if aircraft is flying in the visible board, don't change direction\n if (r == 1 && (c == 0 || c == board[0].length - 1)) //we are in the first row but behind a border\n { //we only want aircraft to appear in row 1 in EARTH INVADERS (like the UFO in space invaders)\n if (bodyDir == LEFT || bodyDir == RIGHT) {\n rand = UP;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (c == 0)\n rand = RIGHT;\n else if (c == board[0].length - 1)\n rand = LEFT;\n else\n //if(dirs.contains(bodyDir))\n rand = bodyDir;\n } else if (r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) {\n rand = bodyDir;\n if (r == 0 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == 0 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == board.length - 1 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = UP;\n } else if (r == board.length - 1 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = UP;\n }\n } else if (/*dirs.contains(bodyDir) && */(r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1))\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n }\n }//***end aircraft/train movement\n if (leftMost == 1) //move vehicles down and start them moving right\n {\n if (EI_moving == LEFT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = RIGHT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n }\n }\n } else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n }//***end leftmost is first col\n else if (rightMost == board[0].length - 2) //move vehicles down and start them moving left\n {\n if (EI_moving == RIGHT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = LEFT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n }\n }\n } else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n }//***end rightmost is last col\n else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n return;\n }//***end EARTH INVADERS enemy movements\n for (int i = 2; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n String name = curr.getName();\n int r = curr.getRow();\n int c = curr.getCol();\n if (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1 && (curr instanceof Vehicle))\n ((Vehicle) (curr)).setOnField(true);\n\n if (curr.isFlying() && webs[panel].size() > 0) {\n int x = curr.findX(cellSize);\n int y = curr.findY(cellSize);\n for (int p = 0; p < webs[panel].size(); p++) {\n int[] ray = webs[panel].get(p);\n if (Utilities.isPointOnRay(x, y, ray[0], ray[1], ray[2], ray[3])) {\n explosions.add(new Explosion(\"BIG\", x, y, explosionImages, animation_delay));\n Ordinance.radiusDamage(-1, x, y, 25, panel, .5);\n Spawner.resetEnemy(i);\n webs[panel].remove(p);\n p--;\n Structure str1 = structures[ray[4]][ray[5]][panel];\n Structure str2 = structures[ray[6]][ray[7]][panel];\n if (str1 != null)\n str1.setWebValue(0);\n if (str2 != null)\n str2.setWebValue(0);\n Utilities.updateKillStats(curr);\n break;\n }\n }\n }\n //reset any ground vehicle that ended up in the water\n //reset any train not on tracks - we need this because a player might change panels as a vehicle spawns\n if (name.startsWith(\"TRAIN\")) {\n Structure str = structures[r][c][panel];\n if (str != null && str.getName().equals(\"hole\") && str.getHealth() != 0) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Utilities.updateKillStats(curr);\n Spawner.resetEnemy(i);\n continue;\n } else if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n } else if (!board[r][c][panel].startsWith(\"T\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //ground vehicles\n if (!curr.isFlying() && !curr.getName().startsWith(\"BOAT\") && (curr instanceof Vehicle)) {\n\n if (((Vehicle) (curr)).getStunTime() > numFrames) //ground unit might be stunned by WoeMantis shriek\n continue;\n if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //reset any water vehicle that ended up on land\n if (name.startsWith(\"BOAT\")) {\n if (!board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else if (curr.getHealth() <= 0) {\n Spawner.resetEnemy(i);\n continue;\n }\n\n //if a ground unit has been on the playable field and leaves it, respawn them\n if (!curr.isFlying() && !name.startsWith(\"TRAIN\") && (curr instanceof Vehicle)) {\n if ((r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) && ((Vehicle) (curr)).getOnField()) {\n ((Vehicle) (curr)).setOnField(false);\n Spawner.resetEnemy(i);\n continue;\n }\n }\n if (name.endsWith(\"nukebomber\")) {//for the nukebomber, set the detonation coordinates so nuke fires when the plane exits the field\n int dr = curr.getDetRow();\n int dc = curr.getDetCol();\n int bd = curr.getBodyDirection();\n int dd = curr.getDetDir();\n if (bd == dd && (((bd == LEFT || bd == RIGHT) && c == dc) || (bd == UP || bd == DOWN) && r == dr)) {\n Ordinance.nuke();\n curr.setDetRow(-1);\n curr.setDetCol(-1);\n }\n }\n\n if (curr.isMoving())\n continue;\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int[] target = isMonsterInSight(curr);\n int mDir = target[0]; //direction of the monster, -1 if none\n int monsterIndex = target[1]; //index of the monster in the players array, -1 if none\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n\n if (dirs.size() > 0) {\n if (curr instanceof Monster) {//***MONSTER AI*******************\n double headTurnProb = 0.25;\n double stompProb = 0.5;\n int vDir = isVehicleInSight(curr);\n if (vDir >= 0) {\n boolean airShot = false;\n int vD = vDir;\n if (vD >= 10) {\n airShot = true;\n vD -= 10;\n }\n if (curr.head360() || !Utilities.oppositeDirections(vD, curr.getHeadDirection())) {\n curr.setHeadDirection(vD);\n if ((curr.getName().startsWith(\"Gob\") || curr.getName().startsWith(\"Boo\")) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n Bullet temp = null;\n if (curr.getName().startsWith(\"Boo\")) {\n temp = new Bullet(curr.getName() + vD, curr.getX(), curr.getY(), 50, beamImages, SPEED, \"BEAM\", SPEED * 10, airShot, i, -1, -1);\n } else if (curr.getName().startsWith(\"Gob\")) {\n temp = new Bullet(\"flame\" + vD, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n }\n if (temp != null) {\n temp.setDirection(vD);\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else if (Math.random() < headTurnProb) {\n String hd = \"right\";\n if (Math.random() < .5)\n hd = \"left\";\n Utilities.turnHead(curr, hd);\n }\n Structure str = structures[r][c][panel];\n if (str != null && str.getHealth() > 0 && str.isDestroyable() && !str.getName().startsWith(\"FUEL\") && Math.random() < stompProb)\n playerMove(KeyEvent.VK_SPACE, i);\n else {\n int dir = dirs.get((int) (Math.random() * dirs.size()));\n if (dir == UP) {\n if (curr.getBodyDirection() != UP) {\n curr.setBodyDirection(UP);\n curr.setHeadDirection(UP);\n } else {\n if (!curr.isSwimmer() && board[r - 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r - 1 >= 1) {\n str = structures[r - 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_UP, i);\n }\n } else if (dir == DOWN) {\n if (curr.getBodyDirection() != DOWN) {\n curr.setBodyDirection(DOWN);\n curr.setHeadDirection(DOWN);\n } else {\n if (!curr.isSwimmer() && board[r + 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r + 1 <= structures.length - 1) {\n str = structures[r + 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_DOWN, i);\n }\n } else if (dir == LEFT) {\n if (curr.getBodyDirection() != LEFT) {\n curr.setBodyDirection(LEFT);\n curr.setHeadDirection(LEFT);\n } else {\n if (!curr.isSwimmer() && board[r][c - 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c - 1 >= 1) {\n str = structures[r][c - 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_LEFT, i);\n }\n } else if (dir == RIGHT) {\n if (curr.getBodyDirection() != RIGHT) {\n curr.setBodyDirection(RIGHT);\n curr.setHeadDirection(RIGHT);\n } else {\n if (!curr.isSwimmer() && board[r][c + 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c + 1 <= board[0].length - 1) {\n str = structures[r][c + 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_RIGHT, i);\n }\n }\n }\n continue;\n }//end monster AI movement\n else //shoot at a target\n if (name.endsWith(\"troops\") || name.endsWith(\"jeep\") || name.endsWith(\"police\") || name.startsWith(\"TANK\") || name.endsWith(\"coastguard\") || name.endsWith(\"destroyer\") || name.endsWith(\"fighter\") || name.equals(\"AIR bomber\")) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //we don't want vehicles to shoot each other\n {\n airShot = true;\n curr.setHeadDirection(DOWN);\n }\n if (monsterIndex >= 0 && monsterIndex < players.length && players[monsterIndex].isFlying())\n airShot = true;\n if (curr.getName().endsWith(\"fighter\"))\n curr.setDirection(bodyDir); //keep moving while shooting\n if (mDir != -1 && curr.getRow() > 0 && curr.getCol() > 0 && curr.getRow() < board.length - 1 && curr.getCol() < board[0].length - 1) { //don't shoot from off the visible board\n if ((mDir == bodyDir || ((curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\") || name.equals(\"AIR bomber\")) && (mDir == curr.getHeadDirection() || name.equals(\"AIR bomber\")))) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) { //AIR bomber needs to be able to drop bombs if they see the monster in front of them or behind them, so we need to check the name in two conditions\n Bullet temp;\n if (name.endsWith(\"jeep\") || name.endsWith(\"coastguard\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n temp = new Bullet(\"jeep\" + mDir, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"troops\") || name.endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + mDir, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"destroyer\") || name.endsWith(\"artillery\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"destroyer\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"fighter\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n temp = new Bullet(\"fighter\" + mDir, curr.getX(), curr.getY(), 30, rocketImages, SPEED, \"SHELL\", SPEED * 8, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"missile\")) {\n temp = new Bullet(\"missile\" + mDir, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.endsWith(\"flame\")) {\n temp = new Bullet(\"flame\" + mDir, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.equals(\"AIR bomber\")) {\n temp = null;\n if (!DISABLE_BOMBERS) {\n int mR = players[PLAYER1].getRow(); //main player row & col\n int mC = players[PLAYER1].getCol();\n int mR2 = -99; //possible 2nd monster row & col\n int mC2 = -99;\n if (p1partner) {\n mR2 = players[PLAYER2].getRow();\n mC2 = players[PLAYER2].getCol();\n }\n if (players[PLAYER1].getHealth() > 0 && (Math.abs(r - mR) <= 2 || Math.abs(c - mC) <= 2 || Math.abs(r - mR2) <= 2 || Math.abs(c - mC2) <= 2)) {//our bomber is in the same row & col as a monster + or - 1\n if (bodyDir == UP && r < board.length - 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() + (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() + (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == DOWN && r > 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() - (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() - (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == RIGHT && c < board[0].length - 1) {\n Ordinance.bigExplosion(curr.getX() - (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() - (cellSize * 2), curr.getY(), 50, panel, .25);\n } else if (bodyDir == LEFT && c > 1) {\n Ordinance.bigExplosion(curr.getX() + (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() + (cellSize * 2), curr.getY(), 50, panel, .25);\n }\n }\n }\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 5, airShot, i, -1, -1);\n }\n if (temp != null)\n temp.setDirection(mDir);\n\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") && Math.random() < .5) //make the police move towards the monster half the time\n {\n if (mDir == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol()))\n curr.setDirection(UP);\n else if (mDir == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol()))\n curr.setDirection(DOWN);\n else if (mDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1))\n curr.setDirection(LEFT);\n else if (mDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1))\n curr.setDirection(RIGHT);\n else\n curr.setDirection(-1);\n }\n if (temp != null && players[PLAYER1].getHealth() > 0) {\n if (gameMode == EARTH_INVADERS && !curr.isFlying()) {\n } else {\n if (numFrames >= ceaseFireTime + ceaseFireDuration || gameMode == EARTH_INVADERS) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else //change to face the monster to line up a shot\n {\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.endsWith(\"artillery\")) {\n curr.setDirection(-1); //stop to shoot\n curr.setBodyDirection(mDir);\n } else if (curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\"))\n curr.setHeadDirection(mDir);\n continue;\n }\n }\n }\n int rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying() && (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1)) {\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n\n continue;\n }\n //if no preferred direction, include the option to turn around\n //civilians should prefer to turn around rather than approach the monster\n if (name.endsWith(\"civilian\") || name.endsWith(\"bus\")) {\n if (bodyDir == mDir) //if we are facing the same direction as the monster, turn around\n {\n if (bodyDir == UP && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n } else if (bodyDir == DOWN && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n } else if (bodyDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n } else if (bodyDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n }\n }\n int rand = (int) (Math.random() * 4);\n if (rand == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n }\n if (rand == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n }\n if (rand == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n if (rand == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n }\n\n }\n }", "@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}", "boolean checkMove(int row, int col, int dir) {\r\n\t\tint dimRow = board.getDimRow();\r\n\t\tint dimCol = board.getDimCol();\r\n\r\n\t\tif (row == 0 && dir == Ship.UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == 0 && dir == Ship.LEFT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == 0 && dir == Ship.RIGHT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == 0 && dir == Ship.LEFT) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == 0 && dir == Ship.LEFT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == 0 && dir == Ship.LEFT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == dimRow - 1 && dir == Ship.DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == dimRow - 1 && dir == Ship.LEFT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == dimRow - 1 && dir == Ship.RIGHT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (col == dimCol - 1 && dir == Ship.RIGHT) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == dimCol - 1 && dir == Ship.RIGHT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == dimCol - 1 && dir == Ship.RIGHT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}", "public Move move() {\n\n byte[] piece;\n int pieceIndex;\n Move.Direction direction = null;\n int counter = 0;\n\n Scanner s = new Scanner(System.in);\n\n\n System.out.println(\"Please select piece to move: \");\n\n\n while (true) {\n try {\n pieceIndex = s.nextInt();\n\n if ((piece = getPiece(pieceIndex)) == null) {\n System.out.println(\"invalid index, try again!\");\n// check if selected piece is stuck\n } else if (\n (((player == Board.V) && (piece[1]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O ) || // UP\n ((player == Board.H) && (piece[1]-1 >=0) && (board.layout[piece[0]][piece[1]-1] == O)) || // DOWN\n ((player == Board.V) && (piece[0]-1 >=0) && (board.layout[piece[0]-1][piece[1]] == O)) || // LEFT\n (((player == Board.H) && (piece[0]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O )) // RIGHT\n {\n break;\n// if all are stuck pass turn\n } else if (counter + 1 < Board.getSize()) {\n counter++;\n System.out.println(\"Piece is stuck, pick another, \" + counter + \" pieces stuck.\");\n } else {\n System.out.println(\"Passing\");\n return null;\n }\n } catch (Exception e){\n System.out.println(\"Piece index expects int, try again\");\n s = new Scanner(System.in);\n }\n }\n System.out.println(\"Please select direction ('w' // 'a' // 's' // 'd'): \");\n\n boolean valid = false;\n while (!valid) {\n\n switch (s.next().charAt(0)) {\n // if the move requested is valid, break the loop, make the move on our record of layout and return the\n // move made\n case 'w':\n direction = Move.Direction.UP;\n valid = (((player == Board.V) && (piece[1]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O );\n break;\n\n case 'a':\n direction = Move.Direction.LEFT;\n valid = ((player == Board.V) && (piece[0]-1 >=0) && (board.layout[piece[0]-1][piece[1]] == O));\n break;\n\n case 's':\n direction = Move.Direction.DOWN;\n valid = ((player == Board.H) && (piece[1]-1 >=0) && (board.layout[piece[0]][piece[1]-1] == O));\n break;\n\n case 'd':\n direction = Move.Direction.RIGHT;\n valid = (((player == Board.H) && (piece[0]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O );\n break;\n default:\n System.out.println(\"Invalid key press, controls are wasd\");\n valid = false;\n }\n }\n Move move = makeMove(direction, pieceIndex);\n board.update(move, player);\n\n return move;\n }", "public abstract void randomMoves();", "public abstract ArrayList<Move> possibleMoves(Board board);", "@Override\n public void calculateMove() {\n int xa = 0, ya = 0;\n if (steps <= 0) {\n direction = ep.calculateDirection();\n steps = MAX_STEPS;\n }\n if (direction == 0) {\n ya--;\n }\n if (direction == 2) {\n ya++;\n }\n if (direction == 3) {\n xa--;\n }\n if (direction == 1) {\n xa++;\n }\n if (canMove(xa, ya)) {\n steps -= 1 + rest;\n move(xa * speed, ya * speed);\n moving = true;\n } else {\n steps = 0;\n moving = false;\n }\n }", "public abstract boolean canMove(int originX, int originY, int destX, int destY);", "public void boardSetUp(){\n\t}", "@Override\r\n\tpublic void atacar(int dir) {\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean canMove(Object[][] arrayBoard, Square startSquare, Square endSquare) {\n\t\treturn false;\r\n\t}", "public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "public double getDirectionMove();" ]
[ "0.69885665", "0.6764499", "0.6683394", "0.66371405", "0.663649", "0.6624993", "0.65018916", "0.6458022", "0.6430861", "0.6430634", "0.63994163", "0.6389687", "0.6369846", "0.6365229", "0.635723", "0.635723", "0.635723", "0.635723", "0.635723", "0.635723", "0.635723", "0.6348593", "0.63165796", "0.6294416", "0.62857497", "0.62662315", "0.6260191", "0.62540793", "0.62515193", "0.62461257", "0.6237599", "0.62246925", "0.62118113", "0.6210153", "0.6206398", "0.62037444", "0.61979425", "0.61874545", "0.6166978", "0.6163429", "0.6148011", "0.61359257", "0.6132494", "0.61148685", "0.6112664", "0.6092233", "0.60906285", "0.6087921", "0.60813373", "0.60794795", "0.60746884", "0.6074253", "0.60593057", "0.60511005", "0.6045929", "0.6038383", "0.6028979", "0.598849", "0.59807867", "0.5975567", "0.597417", "0.5966209", "0.5946099", "0.59458286", "0.5936927", "0.59315", "0.5926947", "0.59245706", "0.5919924", "0.5918527", "0.5908836", "0.5905825", "0.589973", "0.5892194", "0.5891394", "0.5878081", "0.587034", "0.58666617", "0.5852956", "0.58480036", "0.58362246", "0.58348507", "0.5833764", "0.58305687", "0.5827019", "0.5822812", "0.58203775", "0.5817181", "0.58120906", "0.5806871", "0.58033836", "0.5799943", "0.5798752", "0.57977825", "0.57953113", "0.57936656", "0.57918143", "0.57914156", "0.5789121", "0.5785698" ]
0.6272775
25
Ensure we're within the board.
public boolean isValid() { return (x >= 0 && x < Board.SIZE && y >= 0 && y < Board.SIZE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkRep() {\n assert(wall.p1().x() >= BOARD_MIN_BOUND && wall.p1().x() <= BOARD_MAX_BOUND) :\n \"x coordinate of p1 must be within in the board\";\n assert(wall.p2().x() >= BOARD_MIN_BOUND && wall.p2().x() <= BOARD_MAX_BOUND) :\n \"x coordinate of p2 must be within in the board\";\n assert(wall.p1().y() >= BOARD_MIN_BOUND && wall.p1().y() <= BOARD_MAX_BOUND) :\n \"y coordinate of p1 must be within in the board\";\n assert(wall.p2().y() >= BOARD_MIN_BOUND && wall.p2().y() <= BOARD_MAX_BOUND) :\n \"y coordinate of p2 must be within in the board\";\n }", "private void checkRep() {\n assert (width <= Board.SIDELENGTH);\n assert (height <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.x() >= 0 && this.boundingBoxPosition.x() <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.y() >= 0 && this.boundingBoxPosition.y() <= Board.SIDELENGTH);\n }", "public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }", "public boolean validRook (int startRow, int startColumn, int endRow, int endColumn, Tile[][] board) {\n\t\t\n\t\tint distanceMovedUpDown =endRow-startRow; \n\t\tint distanceMovedLeftRight = endColumn-startColumn;\n\n\t\tif (distanceMovedUpDown !=0 && distanceMovedLeftRight != 0) { //have to stay in the same column or row to be valid\n\t\t\treturn false;\n\t\t}\n\n\n\t\tif (startRow == endRow) { //moving left or right \n\t\t\tif (Math.abs(distanceMovedLeftRight) > 1) { //checking if there's pieces btwn start and end if moving more than 1\n\t\t\t\tif (distanceMovedLeftRight > 0) {//moving to the right \n\t\t\t\t\tint x=startColumn + 1;\n\t\t\t\t\twhile (x < endColumn) {\n\t\t\t\t\t\tif (board[startRow][x].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif (distanceMovedLeftRight < 0) {//moving to the left\n\t\t\t\t\tint x = startColumn -1;\n\t\t\t\t\twhile (x > endColumn) {\n\t\t\t\t\t\tif (board[startRow][x].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn true;\n\n\t\t}\n\t\tif (startColumn == endColumn) { //moving up or down\n\t\t\tif (Math.abs(distanceMovedUpDown) > 1) { //checking if there's pieces btwn start and end if moving more than 1\n\t\t\t\tif (distanceMovedUpDown > 0) {//moving up the array\n\t\t\t\t\tint x=startRow + 1;\n\t\t\t\t\twhile (x < endRow) {\n\t\t\t\t\t\tif (board[x][startColumn].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif (distanceMovedUpDown < 0) {//moving down the array\n\t\t\t\t\tint x = startRow -1;\n\t\t\t\t\twhile (x > endRow) {\n\t\t\t\t\t\tif (board[x][startColumn].getOccupyingPiece() != null) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "private boolean isInsideBoard(int x, int y){\n if(x < 0 || x > getWidth() - 1 || y < 0 || y > getHeight() - 1)\n return false;\n\n return true;\n }", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public boolean isValidBoard() {\n\t\t\n\t\tif(mainSlots.size() != NUM_MAIN_SLOTS) {\n\t\t\treturn false;\n\t\t} else if ((redHomeZone != null && redHomeZone.size() != NUM_HOME_SLOTS) ||\n\t\t\t\t(greenHomeZone != null && greenHomeZone.size() != NUM_HOME_SLOTS) ||\n\t\t\t\t(yellowHomeZone != null && yellowHomeZone.size() != NUM_HOME_SLOTS) || \n\t\t\t\t(blueHomeZone != null && blueHomeZone.size() != NUM_HOME_SLOTS)) {\n\t\t\treturn false;\n\t\t} else if ((redEndZone != null && redEndZone.size() != NUM_END_SLOTS) ||\n\t\t\t\t(greenEndZone != null && greenEndZone.size() != NUM_END_SLOTS) || \n\t\t\t\t(yellowEndZone != null && yellowEndZone.size() != NUM_END_SLOTS) || \n\t\t\t\t(blueEndZone != null && blueEndZone.size() != NUM_END_SLOTS)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public boolean isValid(Board board) {\n if (!from.isValid(board.size) || !to.isValid(board.size)) {\r\n return false;\r\n }\r\n\r\n // Confirm the 'from' space is occupied\r\n if (!board.b[from.row][from.column]) {\r\n return false;\r\n }\r\n\r\n // Confirm the 'to' space is empty\r\n if (board.b[to.row][to.column]) {\r\n return false;\r\n }\r\n\r\n int rowJump = Math.abs(from.row - to.row);\r\n int colJump = Math.abs(from.column - to.column);\r\n\r\n if (rowJump == 0) {\r\n if (colJump != 2) {\r\n return false;\r\n }\r\n }\r\n else if (rowJump == 2) {\r\n if (colJump != 0 && colJump != 2) {\r\n return false;\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n // Confirm the 'step' space is occupied\r\n return board.b[(from.row + to.row) / 2][(from.column + to.column) / 2];\r\n }", "private boolean onBoard(int x, int y){\n if((x<WIDTH&&y<HEIGHT)){\n if(0<=x&&0<=y){\n return true;\n }\n return false;\n }else{\n return false;\n }\n\t}", "private void checkBounds() {\n\t\t// checks to see if playerX is to the left of the left side of the display\n\t\tif (player.getX() < 0)\n\t\t\tplayer.setX(0);\n\t\t// checks to see if playerX is greater than the width of the display\n\t\tif (player.getX() > displayWidth - sprite.get(\"playerSprite\").getWidth())\n\t\t\tplayer.setX(displayWidth - sprite.get(\"playerSprite\").getWidth());\n\t\t// checks to see if playerY is lower than the bottom of the display\n\t\tif (player.getY() < 0)\n\t\t\tplayer.setY(0);\n\t\t// checks to see if playerY is greater than the height of the display\n\t\tif (player.getY() > displayHeight - sprite.get(\"playerSprite\").getHeight())\n\t\t\tplayer.setY(displayHeight - sprite.get(\"playerSprite\").getHeight());\n\t}", "private boolean boardIsFull() {\n int numberOfFieldsOnBoard = boardSize * boardSize;\n return (numberOfFieldsOnBoard == this.numberOfOccupiedFields);\n }", "@Test\n void checkCannotForceWithForcedCellOccupied() {\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(1, 0)));\n }", "public boolean validBish (int startRow, int startColumn, int endRow, int endColumn, Tile[][] board) {\n\t\t\n\n\t\tif (Math.abs(startRow-endRow)==Math.abs(startColumn-endColumn)) {\n\t\t\tint distanceMovedRows = startRow-endRow;\n\t\t\tint distanceMovedCols =startColumn-endColumn;\n\t\t\tif (distanceMovedRows > 0 && distanceMovedCols < 0) {\n\n\t\t\t\tint x=startRow-1;\n\t\t\t\tint y = startColumn+1;\n\t\t\t\twhile (x > endRow && y < endColumn) { \n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx--; y++;\n\t\t\t\t}\n\t\t\t} \n\t\t\tif (distanceMovedRows > 0 && distanceMovedCols > 0) { \n\n\t\t\t\tint x=startRow-1;\n\t\t\t\tint y = startColumn-1;\n\t\t\t\twhile (x > endRow && y > endColumn) {\n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx--; y--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (distanceMovedRows < 0 && distanceMovedCols < 0) {\n\n\t\t\t\tint x=startRow+1;\n\t\t\t\tint y = startColumn+1;\n\n\t\t\t\twhile (x < endRow && y < endColumn) {\n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx++; y++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (distanceMovedRows < 0 && distanceMovedCols > 0) {\n\n\t\t\t\tint x=startRow+1;\n\t\t\t\tint y = startColumn-1;\n\n\t\t\t\twhile (x < endRow && y > endColumn) {\n\t\t\t\t\tif (board[x][y].getOccupyingPiece() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tx++; y--;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }", "private void CheckWin() throws VictoryException {\n if (!isMiddleSquareEmpty()) {\n checkDiagonalTopRightToBottomLeft();\n checkDiagonalTopLeftToBottomRight();\n }\n\n checkHorozontalWin();\n checkVercticalWin();\n\n if (didAnyoneWin) {resetBoard(myGame);\n throw (new VictoryException());\n }\n }", "private boolean colWin(){ \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tif (checkValue (board[0][i], board[1][i], board[2][i]))\r\n\t\t\t\treturn true; \r\n\t\t}\r\n\t\treturn false; \r\n\t}", "private static boolean checkInBoard(\n \t\t\tde.fhhannover.inform.hnefatafl.vorgaben.Move currentMove,\n \t\t\tBoard board) {\n \t\tif (currentMove.getFromCell().getCol() > boardSize\n \t\t\t\t|| currentMove.getFromCell().getCol() < 0 ||\n \n \t\t\t\tcurrentMove.getToCell().getCol() > boardSize\n \t\t\t\t|| currentMove.getToCell().getCol() < 0 ||\n \n \t\t\t\tcurrentMove.getFromCell().getRow() > boardSize\n \t\t\t\t|| currentMove.getFromCell().getRow() < 0 ||\n \n \t\t\t\tcurrentMove.getToCell().getRow() > boardSize\n \t\t\t\t|| currentMove.getToCell().getRow() < 0) {\n \t\t\tif (gamelog)\n \t\t\t\tGameLog.logDebugEvent(\"Move außerhalb vom Board\");\n \t\t\treturn false;\n \t\t}\n \n \t\telse\n \t\t\treturn true;\n \t}", "public boolean inBounds(Board board) {\n return row >= 0 && column >= 0\n && row < board.nQueens && column < board.nQueens;\n }", "private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }", "public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}", "private boolean tileIsInbounds(int row, int col){\n\t\treturn row >= 0 && col >= 0\n\t\t\t\t&& row < board.length && col < board[0].length;\n\t}", "@Test\n\tpublic void insideRoomTests() {\n\t\t//Tests middle of room\n\t\tSet<BoardCell> testList = board.getAdjList(3, 11);\n\t\tassertEquals(0, testList.size());\n\t\t//Tests a room space that is next to a walkway space\n\t\ttestList = board.getAdjList(16, 10);\n\t\tassertEquals(0, testList.size());\n\n\t}", "public abstract boolean validMove(ChessBoard board, Square from, Square to);", "private boolean beyondBoard(int col, int row) {\n if (col >= size || row >= size || col <= -1 || row <= -1) {\n return true;\n }\n return false;\n }", "private boolean isLegalPos(int row, int col){\r\n return !(row < 0 || row > 7 || col < 0 || col > 7);\r\n }", "public void checkBlankSpace() {\n\t\tif (xOffset < 0) {\n\t\t\txOffset = 0;\n\t\t} else if (xOffset > handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth()) {\n\t\t\txOffset = handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth();\n\t\t}\n\t\t\n\t\tif (yOffset < 0) {\n\t\t\tyOffset = 0;\n\t\t} else if (yOffset > handler.getWorld().getHeight() * Tile.TILEHEIGHT - handler.getHeight()) {\n\t\t\tyOffset = handler.getWorld().getHeight() * Tile.TILEWIDTH - handler.getHeight();\n\t\t}\n\t}", "@Override\n public boolean isValidMove(Tile target, Board board) {\n if (target == null || board == null) {\n throw new NullPointerException(\"Arguments for the isValidMove method can not be null.\");\n }\n // current and target tiles have to be on a diagonal (delta between row and col index have to be identical)\n int currentCol = this.getTile().getCol();\n int currentRow = this.getTile().getRow();\n int targetCol = target.getCol();\n int targetRow = target.getRow();\n\n int deltaRow = Math.abs(currentRow - targetRow);\n int deltaCol = Math.abs(currentCol - targetCol);\n int minDelta = Math.min(deltaCol, deltaRow);\n\n boolean sameDiagonal = deltaCol == deltaRow;\n\n // check if there are pieces between the tiles\n boolean noPiecesBetween = true;\n // Directions -- (Up and to the left) , -+ (Up and to the right), ++, +-\n if (targetRow < currentRow && targetCol < currentCol) { // --\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n\n } else if (targetRow > currentRow && targetCol < currentCol) { // +-\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol - delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow > currentRow && targetCol > currentCol) { // ++\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow + delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n } else if (targetRow < currentRow && targetCol > currentCol) { // -+\n for (int delta = 1; delta < minDelta; delta++) {\n Tile tileInBetween = board.getTile(currentRow - delta, currentCol + delta);\n if (tileInBetween.hasChessPiece()) {\n noPiecesBetween = false;\n }\n }\n }\n\n return sameDiagonal && noPiecesBetween;\n }", "public boolean checkRequirements(PlayerBoard playerBoard);", "public boolean isValidMove(int toRow,int toCol){\n //Stayed in the same spot\n if(myRow == toRow && myCol == toCol){\n return false;\n }\n //if the xy coordinate we are moving to is outside the board\n if(toRow < 0 || toRow > 11 || toCol < 0 || toCol > 11){\n return false;\n }\n return true;\n }", "@Test\n public void testIsPositionValid() {\n assertFalse(this.board.isPositionValid(new Position(-1, -1)));\n assertFalse(this.board.isPositionValid(new Position(11, 11)));\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n assertTrue(this.board.isPositionValid(new Position(line, column)));\n }\n }\n }", "public static boolean isBoardFull() {\n\t\treturn spacesLeft == 0;\n\t}", "@Override\n public boolean checkWin(Box initialPos, Box finalBox) {\n return super.checkWin(initialPos, finalBox);\n }", "public boolean validMove(ChessBoard board, Square from, Square to) {\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = Math.abs(from.getX() - to.getX());\r\n int y = Math.abs(from.getY() - to.getY());\r\n if((from.getX() - to.getX()) > 0 || (from.getY() - to.getY()) > 0){\r\n if ((x == 0 && y >= 1)) {\r\n for(int i = 1; i <= y-1; i++){\r\n if(board.getBox(from.getX(), from.getY() - i).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }else if((x >= 1 && y == 0)){\r\n for(int i = 1; i <= x-1; i++){\r\n if(board.getBox(from.getX() - i, from.getY()).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }else if((from.getX() - to.getX()) < 0 || (from.getY() - to.getY()) < 0){\r\n if (x == 0 && (from.getY() - to.getY()) <= -1) {\r\n for(int i = y-1; i > 0; i--){\r\n if(board.getBox(from.getX(), from.getY() + i).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }else if((from.getX() - to.getX()) <= -1 && y == 0){\r\n for(int i = x-1; i > 0; i--){\r\n if(board.getBox(from.getX() + i, from.getY()).getPiece() != null){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean isInsideBoard(Position pos){\n\t\tboolean inside = false;\n\t\t\n\t\tif (pos.getX()<this.getSize().getWidth() && pos.getX()>=0 &&\n\t\t\t\tpos.getY()<this.getSize().getHeight() && pos.getY()>=0)\n\t\t\tinside=true;\n\t\t\n\t\treturn inside;\n\t\t\n\t}", "private boolean isValidSide(int row, int col) {\n\t\treturn (col >= (super.currentPlayer % 2) * 10 && col < ((super.currentPlayer % 2) + 1) * 10 &&\n\t\t\t\tsuper.getGridPieces()[row][col] == null);\n\t}", "public boolean isValid(Board b) {\n\t\tPosition from = move.oldPosition();\n\t\tPosition to = move.newPosition();\n\n\t\tif (b.pieceAt(from) instanceof Pawn) {\n\t\t\tif (this.isWhite() && to.row() == 8) {\n\t\t\t\treturn true;\n\t\t\t} else if (!this.isWhite() && to.row() == 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean check(piece[][] board) {\n\t\t\n\t\treturn false;\n\t\t\n\t}", "private boolean isBoardFull() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if (boardState[i][j] != 'X' && boardState[i][j] != 'O') {\n return false; \n }\n }\n }\n return true; \n }", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "private static void checkFreeSpace()\n {\n boolean isSpaceAvailable = false;\n int numOfFreeSpaces = 0;\n for(int index=1;index<board.length;index++)\n {\n if((board[index] == ' '))\n {\n isSpaceAvailable = true;\n numOfFreeSpaces++;\n }\n }\n if(isSpaceAvailable == false)\n {\n System.err.println(\"Board is full! You can't make another move\");\n System.exit(0);\n }\n else\n {\n System.out.println(\"Free space is available! you have \"+numOfFreeSpaces+ \" moves left\");\n }\n }", "public void checkBoundaries(Player pl) {\n\t\tPoint loc = gameMap.toGridLocation(pl.getLocation());\n\t\tint locationX = loc.x;\n\t\tint locationY = loc.y;\n\t\t\n\t\tif(gameMap.getType(loc.x, loc.y) == GameMap.WALL)\n\t\t{\n\t\t\tif(loc.x > 0)\n\t\t\t\tpl.getLocation().x -= 1f;\n\t\t\telse\n\t\t\t\tpl.getLocation().x += 1f;\n\t\t}\n\t\t\n\t\tPoint[] surrounding = gameMap.getSurrounding((int) locationX, (int) locationY);\n\t\t\n\t\tRectangle2D.Float player = pl.getLocationAsRect();\n\t\tfor(Point p : surrounding)\n\t\t{\n\t\t\tRectangle2D.Float rect = new Rectangle2D.Float(p.x * 16 + 112, p.y * 16 + 32, 16, 16);\n\t\t\tif(rect.intersects(player))\n\t\t\t{\n\t\t\t\tbyte type = gameMap.getType(p.x, p.y);\n\t\t\t\tif(isSpecial(pl, type))\n\t\t\t\t{\n\t\t\t\t\tspecialMovement(pl, type);\n//\t\t\t\t\tSystem.out.println(pl.getClass().getSimpleName() + \" hit a boundary\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(type == GameMap.ORB)\n\t\t\t\t{\n\t\t\t\t\tgameMap.setType(p.x, p.y, GameMap.EATEN_ORB);\n\t\t\t\t\t\n\t\t\t\t\tonOrbCollect(pl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }", "private boolean checkBoardVictory() {\n boolean topRowStatus = checkRowVictory(getTopRow()) != 0;\n boolean midRowStatus = checkRowVictory(getMidRow()) != 0;\n boolean vertMidStatus = checkRowVictory(getVerticalMidRow()) != 0;\n boolean lowRowStatus = checkRowVictory(getLowRow()) != 0;\n boolean leftMidStatus = checkRowVictory(getVerticalLeftRow()) != 0;\n boolean rightMidStatus = checkRowVictory(getVerticalRightRow()) != 0;\n\n return topRowStatus || midRowStatus || vertMidStatus || lowRowStatus || leftMidStatus\n || rightMidStatus;\n }", "public boolean validMove(ChessBoard board, Square from, Square to) {\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = Math.abs(from.getX() - to.getX());\r\n int y = Math.abs(from.getY() - to.getY());\r\n // to check if the move is 1unit vertically or horizontally\r\n if (x + y == 1) {\r\n return true;\r\n }else if (x == y && x == 1) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "private boolean isMoveValid (int rows, int columns) {\n return rows < this.rows && columns < this.columns && rows >= 0 && columns >= 0;\n }", "public static boolean isLegal(int[][] board) {\nif (!isRectangleLegal(board, 0, 2, 0, 2, \"Block 1\")) return false;\nif (!isRectangleLegal(board, 3, 5, 0, 2, \"Block 2\")) return false;\nif (!isRectangleLegal(board, 6, 8, 0, 2, \"Block 3\")) return false;\nif (!isRectangleLegal(board, 0, 2, 3, 5, \"Block 4\")) return false;\nif (!isRectangleLegal(board, 3, 5, 3, 5, \"Block 5\")) return false;\nif (!isRectangleLegal(board, 6, 8, 3, 5, \"Block 6\")) return false;\nif (!isRectangleLegal(board, 0, 2, 6, 8, \"Block 7\")) return false;\nif (!isRectangleLegal(board, 3, 5, 6, 8, \"Block 8\")) return false;\nif (!isRectangleLegal(board, 6, 8, 6, 8, \"Block 9\")) return false;\n \n// check the nine columns\nif (!isRectangleLegal(board, 0, 0, 0, 8, \"Column 0\")) return false;\nif (!isRectangleLegal(board, 1, 1, 0, 8, \"Column 1\")) return false;\nif (!isRectangleLegal(board, 2, 2, 0, 8, \"Column 2\")) return false;\nif (!isRectangleLegal(board, 3, 3, 0, 8, \"Column 3\")) return false;\nif (!isRectangleLegal(board, 4, 4, 0, 8, \"Column 4\")) return false;\nif (!isRectangleLegal(board, 5, 5, 0, 8, \"Column 5\")) return false;\nif (!isRectangleLegal(board, 6, 6, 0, 8, \"Column 6\")) return false;\nif (!isRectangleLegal(board, 7, 7, 0, 8, \"Column 7\")) return false;\nif (!isRectangleLegal(board, 8, 8, 0, 8, \"Column 8\")) return false;\n \n// check the nine rows\nif (!isRectangleLegal(board, 0, 8, 0, 0, \"Row 0\")) return false;\nif (!isRectangleLegal(board, 0, 8, 1, 1, \"Row 1\")) return false;\nif (!isRectangleLegal(board, 0, 8, 2, 2, \"Row 2\")) return false;\nif (!isRectangleLegal(board, 0, 8, 3, 3, \"Row 3\")) return false;\nif (!isRectangleLegal(board, 0, 8, 4, 4, \"Row 4\")) return false;\nif (!isRectangleLegal(board, 0, 8, 5, 5, \"Row 5\")) return false;\nif (!isRectangleLegal(board, 0, 8, 6, 6, \"Row 6\")) return false;\nif (!isRectangleLegal(board, 0, 8, 7, 7, \"Row 7\")) return false;\nif (!isRectangleLegal(board, 0, 8, 8, 8, \"Row 8\")) return false;\nreturn true;\n }", "public boolean validMove(ChessBoard board, Square from, Square to) {\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = from.getX() - to.getX();\r\n int y = from.getY() - to.getY();\r\n \r\n if (x < 0 && Math.abs(x) == Math.abs(y) && y > 0){\r\n int j = from.getY()-1;\r\n for( int i = from.getX()+1 ; i < to.getX() ; i++){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j--;\r\n } \r\n return true;\r\n }\r\n else if(x > 0 && Math.abs(x) == Math.abs(y) && y > 0){\r\n int j = from.getY()-1;\r\n for( int i = from.getX()-1 ; i > to.getX() ; i--){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j--;\r\n }\r\n return true;\r\n }\r\n else if( x > 0 && Math.abs(x) == Math.abs(y) && y < 0){\r\n int j = from.getY()+1;\r\n for( int i = from.getX()-1 ; i > to.getX() ; i--){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j++;\r\n }\r\n return true; \r\n }\r\n else if (x < 0 && Math.abs(x) == Math.abs(y) && y < 0){\r\n int j = from.getY()+1;\r\n for( int i = from.getX()+1 ; i < to.getX() ; i++){\r\n if (board.getBox(i,j).getPiece()!=null){\r\n return false;}\r\n j++;\r\n } \r\n return true;\r\n }\r\n\r\n return false;\r\n }", "private void checkWalls() {\n\t\tcheckSideWalls();\n\t\tcheckTopWall();\n\t\tcheckBottomWall();\n\t}", "public static boolean isBasicJumpValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\r\n\t\tboolean ans = false;\r\n\t\t//is the impot is legal\r\n\t\tif(fromRow<8&fromCol<8&toRow<8&toCol<8&fromRow>-1&fromCol>-1&toRow>-1&toCol>-1&player>-2&player<2&player!=0){\r\n\t\t\tif (board [toRow][toCol]==0){/*is the target slot avalibel*/\r\n\t\t\t\tif (board[fromRow][fromCol]==1||board[fromRow][fromCol]==2){/*is the player is red*/\t\t\t\r\n\t\t\t\t\tif((board[(fromRow+toRow)/2][(fromCol+toCol)/2]==-1)||(board[(fromRow+toRow)/2][(fromCol+toCol)/2]==-2)){/*is thier enemy solduers between the begning and the target*/\r\n\t\t\t\t\t\tif (board[fromRow][fromCol]==1){/*is thie simpol soldiuer in the bignning slot*/\r\n\t\t\t\t\t\t\tif(fromRow==toRow-2&&(fromCol==toCol+2||fromCol==toCol-2)){/*is eating diagonally upward and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\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{/*is thir queen in the starting slot*/\r\n\t\t\t\t\t\t\tif(((fromRow==toRow+2)||(fromRow==toRow-2))&&((fromCol==toCol+2)||(fromCol==toCol-2))){\r\n\t\t\t\t\t\t\t\t/*if is eating diagonally and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\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 (board[fromRow][fromCol]==-1|board[fromRow][fromCol]==-2){/*is the solduer is blue*/\r\n\t\t\t\t\tif((board[(fromRow+toRow)/2][(fromCol+toCol)/2]==1)||(board[(fromRow+toRow)/2][(fromCol+toCol)/2]==2)){/*thie is an enemu betwen the teget and the begning*/\r\n\t\t\t\t\t\tif (board[fromRow][fromCol]==-1){\r\n\t\t\t\t\t\t\tif(fromRow==toRow+2&&(fromCol==toCol+2||fromCol==toCol-2)){/*is eating diagonally downward and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\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(((fromRow==toRow+2)||(fromRow==toRow-2))&&((fromCol==toCol+2)||(fromCol==toCol-2))){\r\n\t\t\t\t\t\t\t\t/*if is eating diagonally and the move is two square*/\r\n\t\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\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}\r\n\t\treturn ans;\r\n\t}", "public boolean checkBoardFull() {\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (grid[i][j].getSymbol() == '-')\n return false;\n }\n }\n return true;\n }", "private void checkRep() {\n for (Ball ball : balls) {\n assert ball.getPosition().d1 >= 0\n && ball.getPosition().d1 <= WIDTH - 1;\n assert ball.getPosition().d2 >= 0\n && ball.getPosition().d2 <= HEIGHT - 1;\n }\n for (Gadget gadget : gadgets) {\n assert gadget.getPosition().d1 >= 0\n && gadget.getPosition().d1 <= WIDTH - 1;\n assert gadget.getPosition().d2 >= 0\n && gadget.getPosition().d2 <= HEIGHT - 1;\n }\n\n assert GRAVITY > 0 && MU2 > 0 && MU > 0;\n }", "private boolean computerWin(Board board)\n {\n return check(board, COMPUTER);\n }", "protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }", "public boolean validMove(ChessBoard board, Square from, Square to){\r\n // check if piece killing his ally\r\n if(to.getPiece() != null){\r\n if (to.getPiece().isBlue() == this.isBlue()) {\r\n return false;\r\n }\r\n } \r\n\r\n int x = Math.abs(from.getX() - to.getX()); \r\n int y = Math.abs(from.getY() - to.getY()); \r\n if(( x == 2 && y == 1 ) || ( x == 1 && y == 2 )){\r\n return true; \r\n }\r\n\r\n return false;\r\n }", "boolean checkWin(Tile initialTile);", "public static boolean isFull() {\n return (board[0][0] > 0 && board[0][1] > 0 && board[0][2] > 0\n && board[1][0] > 0 && board[1][1] > 0 && board[1][2] > 0\n && board[2][0] > 0 && board[2][1] > 0 && board[2][2] > 0\n && board[0][0] > 0 && board[1][0] > 0 && board[2][0] > 0\n && board[0][1] > 0 && board[1][1] > 0 && board[2][1] > 0\n && board[0][2] > 0 && board[1][2] > 0 && board[2][2] > 0\n && board[0][0] > 0 && board[1][1] > 0 && board[2][2] > 0\n && board[0][2] > 0 && board[1][1] > 0 && board[2][0] > 0);\n }", "@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }", "private boolean cell_in_bounds(int row, int col) {\n return row >= 0\n && row < rowsCount\n && col >= 0\n && col < colsCount;\n }", "private boolean playerWin(Board board)\n {\n return check(board, PLAYER);\n }", "@Override\n public boolean isBoardFull() {\n //assume board is full\n boolean isFull = true;\n\n int i = 0;\n try {\n //if a column is not full => the board is not full and the loop ends\n while (isFull && i < NUM_COLS) {\n isFull = isColumnFull(i);\n i++;\n }\n } catch (IllegalColumnException e) {\n System.out.println(e + \" in MyGameState.java Method isBoardFull\");\n }\n\n return isFull;\n }", "public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }", "private static boolean checkCellsNotNull(\n \t\t\tde.fhhannover.inform.hnefatafl.vorgaben.Move currentMove){\n \t\t\t\tif (currentMove.getFromCell() == null ||\n \t\t\t\t\tcurrentMove.getToCell() == null){\n \t\t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t\treturn true;\t\t\n \t}", "private boolean checkUpSpace(Position p,\n int len, int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j < y + len; j += 1) {\n for (int i = x - leftWid; i < x + rightWid + 1; i += 1) {\n if (j >= worldHeight) {\n return false;\n }\n if (i < 0 || i >= worldWidth) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void test9() { \n Board board9 = new Board();\n board9.put(1,1,2);\n board9.put(1,2,2);\n board9.put(1,3,2);\n assertTrue(board9.checkWin());\n }", "public boolean isLegalStep(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tint[] toCheckPos = new int[2];\n\t\tint[] existingPos = new int[2];\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\ttoCheckPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\ttoCheckPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t}\n\t\t//0 = column, 1 = row\n\t\tif(dir == MoveDirection.North) {\n\t\t\tif(toCheckPos[1] == 1) return false;\n\t\t\tif(toCheckPos[1] - 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), -1, 0);\n\t\t} else if(dir == MoveDirection.South) {\n\t\t\tif(toCheckPos[1] == 9) return false;\n\t\t\tif(toCheckPos[1] + 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 1, 0);\n\t\t} else if(dir == MoveDirection.East) {\n\t\t\tif(toCheckPos[0] == 9) return false;\n\t\t\tif(toCheckPos[0] + 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, 1);\n\t\t} else if(dir == MoveDirection.West) {\n\t\t\tif(toCheckPos[0] == 1) return false;\n\t\t\tif(toCheckPos[0] - 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, -1);\n\t\t}\n\t\t\n\t\treturn false;\r\n }", "private boolean isOccupied(int col, int row) {\n if (_board[col][row] != EMP) {\n return true;\n }\n return false;\n }", "void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }", "@Test\n public void isValidMoveTest() {\n\n //get the board of the enemy with the method getBoard() from enemyGameBoard\n board = enemyGameBoard.getBoard();\n\n //Try two times for a existing point on the board\n assertTrue(enemyGameBoard.isValidMove(1,1));\n assertTrue(enemyGameBoard.isValidMove(2,4));\n\n //Try two times for a non-existing point on the board\n assertFalse(enemyGameBoard.isValidMove(15,5)); // x-value outside the board range\n assertFalse(enemyGameBoard.isValidMove(5,11)); // y-value outside the board range\n\n //hit a water field\n enemyGameBoard.makeMove(2, 3, false);\n assertTrue(board[2][3].equals(EnemyGameBoard.WATER_HIT));\n\n //try isValidMove() on the already hit water field\n assertFalse(enemyGameBoard.isValidMove(2,3));\n\n //hit a ship field\n enemyGameBoard.makeMove(5, 4, true);\n assertTrue(board[5][4].equals(EnemyGameBoard.SHIP_HIT));\n\n //try isValidMove() on the already hit water field\n assertFalse(enemyGameBoard.isValidMove(5,4));\n }", "private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }", "private boolean isLegalCoordinate(int row, int col) {\n return row > 0 && row <= getSize() && col > 0 && col <= getSize();\n }", "@Test\n public void testIsActionable_FirstCornerCase() {\n board.getCell(3, 4).addLevel();\n board.getCell(3, 3).addLevel();\n board.getCell(4, 3).addLevel();\n assertFalse(godPower.isActionable(board, player.getWorker1()));\n }", "private void checkEdges() {\n\n //Check for alive cells on right hand side\n for (int y = 0; y < height; y++) {\n if (getCell(this.width - 1, y).isAlive()) {\n grid = increaseWidthRight(grid);\n break;\n }\n }\n\n //Check for alive cells on left side\n for (int y = 0; y < height; y++) {\n if (getCell(0, y).isAlive()) {\n grid = increaseWidthLeft(grid);\n break;\n }\n }\n\n // Check for alive cells at bottom\n for (int x = 0; x < width; x++) {\n if (getCell(x, this.height - 1).isAlive()) {\n grid = increaseHeightBottom(grid);\n break;\n }\n }\n\n //Check for alive cells at top\n for (int x = 0; x < width; x++) {\n if (getCell(x, 0).isAlive()) {\n grid = increaseHeightTop(grid);\n break;\n }\n }\n\n }", "public boolean validMove(int col){\n\t\tif (col > board.getCOLS() || col < 0 ){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tint row = 5;\n\t\t\twhile(row >=0 ){\n\t\t\t\tif(board.getPlayField()[row][col].getGamePiece().equals(SharedConstants.PlayableItem.EMPTY))\n\t\t\t\t\treturn true;\n\t\t\t\trow--;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean inBound(int x, int y) {\n\n if (x < 0 || x >= boardSize.x || y < 0 || y >= boardSize.y) {\n return false;\n } else {\n return true;\n }\n }", "public boolean coordOnBoard(int row, int col, ArrayList<ArrayList<GamePiece>> board) {\n return (0 <= row && row < board.size()) && (0 <= col && col < board.get(0).size());\n }", "public void isMoveLegal(int row, int col) \r\n\t\t\tthrows IllegalMoveException {\r\n\t\tif(row < 0 || row > 7 || col < 0 || col > 7){\r\n\t\t\tthrow new IllegalMoveException();\r\n\t\t}\r\n\t}", "public boolean canMoveUpIn(GameBoard b) {\n boolean checker = true;\n\n if(this.topLeftY==0) //wall\n checker = false;\n\n if(this.topLeftY>0){//not hitting top wall\n for (int i = 0; i < b.getNumGamePieces(); i++) {//go through game pieces\n if(b.getGamePieces()[i].topLeftY< this.topLeftY){//only checking pieces on above of this.\n if(b.getGamePieces()[i].topLeftY + b.getGamePieces()[i].height == this.topLeftY){//checking if y-axis line up\n if(this.topLeftX>=b.getGamePieces()[i].topLeftX){\n if(b.getGamePieces()[i].topLeftX+ b.getGamePieces()[i].width>this.topLeftX){//checking if x blocks\n checker=false;//then cant move\n break;\n }\n }\n }\n }\n\n\n }\n }return checker;\n\n }", "@Test\n public void test12() { \n Board board12 = new Board();\n board12.put(1,3,1);\n \n assertFalse(board12.checkWin());\n }", "private void checkBoundaries() {\n if (!isDestroyed()) {\n float upperEdge = screen.getGameCam().position.y + screen.getGameViewPort().getWorldHeight() / 2;\n float bottomEdge = screen.getGameCam().position.y - screen.getGameViewPort().getWorldHeight() / 2;\n if (bottomEdge <= getY() + getHeight() && getY() <= upperEdge) {\n b2body.setActive(true);\n currentState = b2body.getLinearVelocity().x > 0 ? State.MOVING_RIGHT : State.MOVING_LEFT;\n } else {\n if (b2body.isActive()) { // Was on camera...\n // It's outside bottom edge\n if (bottomEdge > getY() + getHeight()) {\n if(!world.isLocked()) {\n world.destroyBody(b2body);\n }\n currentState = State.FINISHED;\n }\n }\n }\n }\n }", "private boolean moveIsValid(Move move){\n BoardSpace[][] boardCopy = new BoardSpace[Constants.BOARD_DIMENSIONS][Constants.BOARD_DIMENSIONS];\n for(int i = 0; i < Constants.BOARD_DIMENSIONS; i++){\n for(int j = 0; j < Constants.BOARD_DIMENSIONS; j++){\n boardCopy[i][j] = new BoardSpace(boardSpaces[i][j]);\n }\n }\n int row = move.getStartRow();\n int col = move.getStartCol();\n String ourWord = \"\";\n String currentWord = \"\";\n for (Tile tile: move.getTiles()){\n ourWord += tile.getLetter();\n if (move.isAcross()){\n col++;\n } else {\n row++;\n }\n }\n currentWord = ourWord;\n if(move.isAcross()){\n //check if we keep going right we invalidate the word\n while(col+1 < boardCopy.length && !boardCopy[row][++col].isEmpty() ){\n if( isValidWord(currentWord += boardCopy[row][col].getTile().getLetter()) == false ) return false;\n }\n //check if we keep going left we invalidate the word\n col = move.getStartCol();\n currentWord = ourWord;\n while(col-1 >= 0 && !boardCopy[row][--col].isEmpty() ){\n if(!isValidWord( currentWord = boardCopy[row][col].getTile().getLetter() + currentWord ) ) return false;\n }\n } else if(!move.isAcross()){\n row = move.getStartRow(); col = move.getStartCol();\n currentWord = ourWord;\n //check if we keep going down we invalidate the word;\n while(row+1 < boardCopy.length && !boardCopy[++row][col].isEmpty()){\n if( !isValidWord(currentWord += boardCopy[row][col].getTile().getLetter() )) return false;\n }\n row = move.getStartRow();\n currentWord = ourWord;\n while(row-1 >= 0 && !boardCopy[--row][col].isEmpty()){\n if( !isValidWord( currentWord = boardCopy[row][col].getTile().getLetter() + currentWord )) return false;\n }\n }\n return true;\n }", "protected boolean positionCorrect(BoatDrawing activeBoat) {\n // Gets the active rectangle's bound\n Rectangle activeRectangle = activeBoat.getBoatRectangle();\n Bounds boundR1 = activeRectangle.getBoundsInParent();\n\n // Tries to find any intersection with the other boats.\n for (Rectangle myRectangle : boatMap.keySet()) {\n if(activeRectangle.equals(myRectangle)) {} else {\n Bounds boundR2 = myRectangle.getBoundsInParent();\n if (boundR1.intersects(boundR2)) {\n return false ;\n }\n }\n } \n // Checks the boat's position in relation to the grid.\n int index ;\n if(activeBoat.isRotation()) {\n index= activeBoat.getGridRow();\n } else {\n index= activeBoat.getGridCol();\n }\n\n return activeBoat.getBoatSize()+index <= NB_CASES_GRID ; \n }", "private boolean checkWin(Integer playerMove, Location loc)\n\t{\n\t\tboolean isWinAcross = true, isWinDown = true, isWinDiag1 = true, isWinDiag2 = true;\n\t\tfor (int col = 0; col < super.getRows() && isWinAcross; col++) //ends loop after isWinAcross is true\n\t\t\tif (grid[loc.getRow()][col] == null || !grid[loc.getRow()][col].equals(playerMove))\n\t\t\t\tisWinAcross = false;\n\t\tfor (int row = 0; row < super.getCols() && isWinDown; row++) //ends loop after isWinDown is true\n\t\t\tif (grid[row][loc.getCol()] == null || !grid[row][loc.getCol()].equals(playerMove))\n\t\t\t\tisWinDown = false;\n\t\tfor (int diagonal = 0; diagonal < super.getCols() && isWinDiag1; diagonal++) //ends loop after isWinDiag1 is true\n\t\t\tif (grid[diagonal][diagonal] == null || !grid[diagonal][diagonal].equals(playerMove))\n\t\t\t\tisWinDiag1 = false;\n\t\tfor (int diagonal2 = 0; diagonal2 < super.getCols() && isWinDiag2; diagonal2++) //ends loop after isWinDiag2 is true\n\t\t\tif (grid[getCols() - diagonal2 - 1][diagonal2] == null || !grid[getCols() - diagonal2 - 1][diagonal2].equals(playerMove))\n\t\t\t\tisWinDiag2 = false;\n\t\treturn isWinAcross || isWinDown || isWinDiag1 || isWinDiag2;\n\t}", "public void testBoardAvailablePositions() {\n \tassertTrue(board6.hasAvailablePositionsForTile());\n \tList<PlacementLocation> expected = new ArrayList<PlacementLocation>();\n \tboard6.place(new Placement(Color.RED, 5, 21, Color.RED, 4, 16));\n \tboard6.place(new Placement(Color.RED, 4, 12, Color.RED, 5, 14));\n \tboard6.place(new Placement(Color.RED, 4, 8, Color.RED, 5, 11));\n \tboard6.place(new Placement(Color.RED, 5, 4, Color.RED, 4, 4));\n \tboard6.place(new Placement(Color.RED, 5, 1, Color.RED, 4, 0));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(5, 26))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 20))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(5, 24))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 29))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 30))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(6, 31))));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(5, 23))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(3, 15))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(5, 27))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 33))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 35))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 37))));\n \t\n \t\n \tfor (PlacementLocation location : board6.getAvailablePositionsForTile()) {\n \t\tif (!expected.contains(location))\n \t\t\tSystem.out.println(\"expected does not contain location: \" + location);\n \t}\n \tSet<PlacementLocation> locations = board6.getAvailablePositionsForTile();\n \tfor (PlacementLocation location : locations) {\n \t\tSystem.out.println(location);\n \t}\n \tfor (PlacementLocation location : expected) {\n \t\tif (!locations.contains(location))\n \t\t\tSystem.out.println(\"expected2 does not contain location: \" + location);\n \t}\n \t\n \tassertEquals(expected, board6.getAvailablePositionsForTile());\n \t\n \t\n }", "public boolean isBoardFull() {\n\t\t// REPLACE NEXT LINE WITH YOUR IMPLEMENTATION\n\t\tint boardSize = getBoardSize();\n\t\t\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t\n\t\t\t\tif (isSpotBlank(i,j)) {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "private static boolean isValidBoard(byte[][] board) {\n for(int columnIndex = 0; columnIndex < board.length; columnIndex++) {\n for(int rowIndex = 0; rowIndex < board[columnIndex].length; rowIndex++) {\n byte value = board[columnIndex][rowIndex];\n if((value != IBoardState.symbolOfInactiveCell) && (value != IBoardState.symbolOfEmptyCell) && (value != IBoardState.symbolOfFirstPlayer) && (value != IBoardState.symbolOfSecondPlayer)) {\n return false;\n }\n }\n }\n return true;\n }", "@Test\n public void test11() { \n Board board11 = new Board();\n board11.put(1,3,1);\n board11.put(2,3,1);\n board11.put(3,3,1);\n assertTrue(board11.checkWin());\n }", "public static boolean isMoveValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\r\n\t\tboolean ans = false;\r\n\t\t\r\n\t\tif (board[toRow][toCol]==0){/*is the target slot ia emtey*/\r\n\t\t\tif (player==1){\r\n\t\t\t\tif (board[fromRow][fromCol]==1||board[fromRow][fromCol]==2){ /*is the starting slot is red player queen olayer solduer*/\r\n\t\t\t\t\tif (isBasicJumpValid(board,player,fromRow,fromCol,toRow,toCol)){/*is the eating is legal*/\r\n\t\t\t\t\t\tans = true;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tif (canJump(board,player)==false){/*is ther no eating jump?*/\r\n\t\t\t\t\t\t\tif (isBasicMoveValid(board,player,fromRow,fromCol,toRow,toCol)){/*is this is legal move*/\r\n\t\t\t\t\t\t\t\tans = true;\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}\t\t\r\n\t\t\tif (player==-1){\r\n\t\t\t\tif (board[fromRow][fromCol]==-1||board[fromRow][fromCol]==-2){/*is the starting slot is blue player queen olayer solduer*/\r\n\t\t\t\t\tif (isBasicJumpValid(board,player,fromRow,fromCol,toRow,toCol)){/*is the eating is legal*/\r\n\t\t\t\t\t\tans = true;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tif (canJump(board,player)==false){/*is ther are no eating move*/\r\n\t\t\t\t\t\t\tif (isBasicMoveValid(board,player,fromRow,fromCol,toRow,toCol)){/*is the move is legal*/\r\n\t\t\t\t\t\t\t\tans = true;\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}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "void inBounds(int boardWidth) {\n if (getXCoord() >= boardWidth) {\n setXCoord(boardWidth - getHSpeed());\n } else if (getXCoord() < getHSpeed()) {\n setXCoord(0);\n }\n }", "@Test\n public void testBoardInit(){\n Assert.assertTrue(!board.isBoatInitDone());\n\n // check board dimensions\n Assert.assertTrue(BOARD_SIZE == board.getBoardSize());\n }", "private static boolean checkWin() {\n\t\tfor (int i = 0; i < nRows; i++)\n\t\t\tfor (int j = 0; j < nColumns; j++) {\n\t\t\t\tCell cell = field.getCellAt(i, j);\n\t\t\t\tif (cell.hasMine() && !cell.hasSign())\t // if the cell has a mine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// but has no flag\n\t\t\t\t\treturn false;\n\t\t\t\tif (cell.getFlag() >= 0 && !cell.getVisiblity()) // if the cell has no\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mine in it but\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// it is not visible\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\twin = gameOver = true;\n\t\treturn true;\n\t}", "@Test\n\t\t\tpublic void testRoomEntry()\n\t\t\t{\n\t\t\t\t// two steps from a room two steps away\n\t\t\t\tboard.calcTargets(13, 10, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 9)));\n\t\t\t\t\n\t\t\t\t//Test entering a door when steps are greater than distance to room\n\t\t\t\tboard.calcTargets(8, 7, 8);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 6)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "@Test\n void checkCanForcePush() {\n assertTrue(abilities.checkCanMove(turn, board.getCellFromCoords(1, 1)));\n }", "@Test\n\t\t\tpublic void besidesRoomTests() {\n\t\t\t\t//Testing walkway space that is next to the kitchen with no door\n\t\t\t\tSet<BoardCell> testList = board.getAdjList(6, 1);\n\t\t\t\tassertEquals(3, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 1)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 0)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 2)));\n\t\t\t\t//Testing walkway space that is next to two kitchen spaces with no door\n\t\t\t\ttestList = board.getAdjList(6, 20);\n\t\t\t\tassertEquals(2, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 20)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 19)));\n\t\t\t\t//Testing walkway space that is between two room spaces and an edge\n\t\t\t\ttestList = board.getAdjList(20, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(19, 15)));\n\t\t\t\tassertEquals(1, testList.size());\n\n\t\t\t}", "public static boolean isBasicMoveValid(int[][] board, int player, int fromRow, int fromCol, int toRow, int toCol) {\r\n\t\t\t\r\n\t\tboolean ans = false;\r\n\t\t\r\n\t\t/*Checking if coordinates are OK*/\r\n\t\tif(fromRow<8&fromCol<8&toRow<8&toCol<8&fromRow>-1&fromCol>-1&toRow>-1&toCol>-1&player>-2&player<2&player!=0){\r\n\t\t\tif (board [toRow][toCol]==0){/*Checks if the tile is empty*/\r\n\t\t\t\tif (player==1){/*Checks if player is red*/\r\n\t\t\t\t\tif (board[fromRow][fromCol]==1){/*Checks if in tile there is soldier red */\r\n\t\t\t\t\t\tif(fromRow==toRow-1&&(fromCol==toCol+1||fromCol==toCol-1)){/*Did he move diagonally upward*/\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tif (board[fromRow][fromCol]==2){/*Checks if in tile there is queen red*/\r\n\t\t\t\t\t\tif(((fromRow==toRow+1)||(fromRow==toRow-1))&&((fromCol==toCol+1)||(fromCol==toCol-1))){/*Did he move diagonally */\r\n\t\t\t\t\t\t\tans = true;\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\tif (player==-1){/*Checks if player is blue*/\r\n\t\t\t\t\tif (board[fromRow][fromCol]==-1){/*Checks if in tile there is soldier blue */\r\n\t\t\t\t\t\tif(fromRow==toRow+1&(fromCol==toCol+1||fromCol==toCol-1)){/*Did he move diagonally down*/\r\n\t\t\t\t\t\t\tans = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (board[fromRow][fromCol]==-2){/*Checks if in tile there is queen blue*/\r\n\t\t\t\t\t\tif(((fromRow==toRow+1)||(fromRow==toRow-1))&&((fromCol==toCol+1)||(fromCol==toCol-1))){/*Did he move diagonally */\r\n\t\t\t\t\t\t\tans = true;\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}\r\n\t\treturn ans;\r\n\t}", "public boolean isLegalMove (int row, int col, BoardModel board, int side) {\n\t\t\n\t\tboolean valid = false;\n\t\t//look if the position is valid\n\t\tif(board.getBoardValue(row, col) == 2) {\n\t\t\t//look for adjacent position\n\t\t\tfor(int[] surround : surroundingCoordinates(row, col)) {\n\t\t\t\t//the adjacent poision has to be of the opponent\n\t\t\t\tif(board.getBoardValue(surround[0], surround[1]) == getOpponent(side)){\n\t\t\t\t\t//now check if we come across with a color of ourselves\n\t\t\t\t\tint row_diff = surround[0] - row;\n\t\t\t\t\tint col_diff = surround[1] - col;\t\t\t\t\t\n\t\t\t\t\tif(!valid && checkNext((row+row_diff), (col+col_diff), row_diff, col_diff, side, board) ){\n\t\t\t\t\t\tvalid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn valid;\n\t}", "protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}", "public boolean isValidMove(Location from, Location to, Piece[][]b) {\n\t\t// Bishop\n\t\tboolean pieceInWay = true;\n\t\tint direction =0; \n\t\tboolean finalLocation = false;\n\t\tboolean verticalUp = false, verticalDown = false, horizontalLeft = false, horizontalRight = false;\n\t\t\n\t\tif(to.getColumn()>from.getColumn() && to.getRow()<from.getRow()){\n\t\t\tdirection = 1;\n\t\t}\n\t\telse if (to.getColumn()<from.getColumn() && to.getRow()>from.getRow()){\n\t\t\tdirection = 2;\n\t\t}\n\t\telse if (to.getColumn()<from.getColumn() && to.getRow()<from.getRow()){\n\t\t\tdirection = 4;\n\t\t}\n\t\telse\n\t\t\tdirection = 3;\t\n\t\t\n\t\t\n\t\tif (Math.abs(from.getColumn() - to.getColumn()) == Math.abs(from.getRow() - to.getRow())\n\t\t\t\t&& b[to.getRow()][to.getColumn()].getPlayer() != getPlayer()\n\t\t\t\t&& !pieceInWay/*b[to.getRow()][to.getColumn()].getPlayer() == 0 b[from.getRow()+1][from.getColumn()+1]*/) {\n\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Rook\n\n\t\t//This line checks to see if the final destination of the piece contains anything but a friendly piece. This is here, because\n\t\t//anything other than a friendly piece would make the move valid, given that every space in between is blank.\n\t\tif(b[to.getRow()][to.getColumn()].getPlayer() != b[from.getRow()][from.getColumn()].getPlayer())\n\t\t\tfinalLocation = true;\n\t\telse\n\t\t\tfinalLocation = false;\n\t\t\n\t\t//verticalUp\n\t\tif(from.getRow() == to.getRow() && from.getColumn() > to.getColumn()){\n\t\t\tverticalUp = true;\n\t\t\tfor(int i = to.getColumn(); i < from.getColumn() && verticalUp; i++){\n\t\t\t\tif(b[to.getRow()][i].getPlayer() == 0 && verticalUp){\n\t\t\t\t\tverticalUp = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tverticalUp = false;\n\t\t\t}\n\t\t}\n\t\t//verticalDown\n\t\telse if(from.getRow() == to.getRow() && from.getColumn() < to.getColumn()){\n\t\t\tverticalDown = true;\n\t\t\tfor(int i = from.getColumn(); i < to.getColumn() && verticalDown; i++){\n\t\t\t\tif(b[from.getRow()][i].getPlayer() == 0 && verticalDown){\n\t\t\t\t\tverticalDown = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tverticalDown = false;\n\t\t\t}\n\t\t}\n\t\t//horizontalLeft\n\t\telse if(from.getColumn() == to.getColumn() && from.getRow() > to.getRow()){\n\t\t\thorizontalLeft = true;\n\t\t\tfor(int i = to.getRow(); i < from.getRow() && horizontalLeft; i++){\n\t\t\t\tif(b[i][to.getColumn()].getPlayer() == 0 && horizontalLeft){\n\t\t\t\t\thorizontalLeft = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\thorizontalLeft = false;\n\t\t\t}\n\t\t}\n\t\t//horizontalRight\n\t\telse if(from.getColumn() == to.getColumn() && from.getRow() < to.getRow()){\n\t\t\thorizontalRight = true;\n\t\t\tfor(int i = from.getRow(); i < to.getRow() && horizontalRight; i++){\n\t\t\t\tif(b[i][from.getColumn()].getPlayer() == 0 && horizontalRight){\n\t\t\t\t\thorizontalRight = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\thorizontalRight = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(verticalUp || verticalDown || horizontalLeft || horizontalRight && finalLocation){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Test\n void RookMoveDownBlocked() {\n Board board = new Board(8, 8);\n Piece rook1 = new Rook(board, 7, 1, 1);\n Piece rook2 = new Rook(board, 7, 4, 1);\n\n board.getBoard()[7][1] = rook1;\n board.getBoard()[7][4] = rook2;\n\n board.movePiece(rook1, 7, 7);\n\n Assertions.assertEquals(rook1, board.getBoard()[7][1]);\n Assertions.assertEquals(rook2, board.getBoard()[7][4]);\n Assertions.assertNull(board.getBoard()[7][7]);\n }" ]
[ "0.7490428", "0.7372147", "0.72023433", "0.6804962", "0.6721428", "0.6703071", "0.6684151", "0.66794264", "0.66353476", "0.66327673", "0.6616616", "0.6579864", "0.65707195", "0.65360266", "0.65353906", "0.6453019", "0.64471334", "0.6441727", "0.64133257", "0.6395298", "0.63772106", "0.6367996", "0.6367615", "0.6360136", "0.63533044", "0.63130033", "0.6309346", "0.63076013", "0.63038313", "0.63031983", "0.62840515", "0.6248564", "0.6248498", "0.6245026", "0.6242548", "0.62397105", "0.62343365", "0.6225375", "0.6223699", "0.6223286", "0.6219736", "0.6212881", "0.6207861", "0.6206651", "0.6201613", "0.62010205", "0.6200181", "0.61993444", "0.6198813", "0.6193242", "0.61791724", "0.61772037", "0.6168306", "0.61663544", "0.6153178", "0.6149658", "0.6146318", "0.6145876", "0.61423856", "0.6140486", "0.61394083", "0.61377627", "0.6135648", "0.61280584", "0.6127641", "0.6126366", "0.61261266", "0.61249554", "0.61208427", "0.61123395", "0.6108119", "0.60863525", "0.60852325", "0.607134", "0.6069941", "0.6069252", "0.6067694", "0.60675305", "0.6067074", "0.60649383", "0.6061866", "0.60548615", "0.6049545", "0.60492045", "0.6045881", "0.6042654", "0.60422933", "0.6038228", "0.6034592", "0.60295844", "0.6025899", "0.6021453", "0.6017177", "0.6011039", "0.6006503", "0.60045564", "0.6002963", "0.6001345", "0.59981", "0.5996768" ]
0.6768546
4
Used to help with kings.
public boolean endOfBoard() { return (y == 0 || y == Board.SIZE - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private FlyWithWings(){\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n protected void start() {\n System.out.println(\"Bike Specific Brake\");\n }", "@Override\n protected void brake() {\n System.out.println(\"Bike Specific Brake\");\n }", "void printParking();", "@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}", "public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}", "void show() {\n\t\tSystem.out.println(\"k: \" + k);\n\t}", "public Poke() {\n\t\tsuper(\"POKE\");\n\t}", "@Override\n\tpublic void goToStings() {\n\t\t\n\t}", "private void kNN(List<Room> roomList, HashMap<String, Integer> query) {\n resultList.clear();\n kNearestRooms.clear();\n\n calculateDistances(roomList, query);\n initializeKClosest();\n String majority = findMajority();\n setCurrTextView(majority);\n currTextView.setBackgroundColor(Color.parseColor(\"#FFA500\"));\n // textLocate.setText(\"You are in room : \" + majority);\n }", "public void setKP(java.lang.String KP) {\n this.KP = KP;\n }", "@Override\n public void kickBox() {\n\n System.out.println(\"kangaroo with name \"+name+\" is boxing\");\n }", "private void addKey() {\t\n\t\t// Remember you can use Processing's graphics methods here\n\t\tfill(255, 250, 240);\n\t\t\n\t\tint xbase = 25;\n\t\tint ybase = 50;\n\t\t\n\t\trect(xbase, ybase, 250, 240);\n\t\t\n\t\tfill(0);\n\t\ttextAlign(LEFT, CENTER);\n\t\ttextSize(12);\n\t\ttext(\"Route Info\", xbase+25, ybase+25);\n\t\t\n\t\tfill(150, 30, 30);\n\n\n\t\tfill(0, 0, 0);\n\t\ttextAlign(LEFT, CENTER);\n\t\tString name0 = station0 == null ? \"\" : station0.getName();\n\t\tString name1 = station1 == null ? \"\" : station1.getName();\n\t\t\n\t\t// If two stations are currently selected, generate an API call\n\t\tString peak = \"\";\n\t\tString offPeak = \"\";\n\t\tString discount = \"\";\n\t\tString time = \"\";\n\t\tString distance = \"\";\n\t\tif(routeInfo != null){\n\t\t\tpeak = routeInfo.getPeak();\n\t\t\toffPeak = routeInfo.getOffPeak();\n\t\t\tdiscount = routeInfo.getDiscount();\n\t\t\ttime = routeInfo.getTime();\n\t\t\tdistance = routeInfo.getDistance();\n\t\t}\n\t\ttext(\"Station 1: \" + name0, xbase+25, ybase+65);\n\t\ttext(\"Station 2: \" + name1, xbase+25, ybase+85);\n\t\ttext(\"Peak fare: $\" + peak, xbase+25, ybase+125);\n\t\ttext(\"Off-peak fare: $\" + offPeak, xbase+25, ybase+145);\n\t\ttext(\"Discount fare: $\" + discount, xbase+25, ybase+165);\n\t\ttext(\"Est. travel time: \" + time + \" min\", xbase+25, ybase+205);\n\t\ttext(\"Distance: \" + distance + \" miles\", xbase+25, ybase+225);\t\n\t}", "public void startBike() {\n\t\tSystem.out.println(\"Self start the bike\");\n\t}", "void kiemTraThangHopLi() {\n }", "@Override\n\tpublic void getTenHocKy() {\n\t\tSystem.out.println(tenHK);\n\t}", "public void kek() {\r\n System.out.println(\"answer\" + answer);\r\n checkColors = getColorPinValues(answer, guess);\r\n checkPosition = getPositionPinValues(answer,guess);\r\n change(checkColors, checkPosition);\r\n\r\n }", "private String showKitDetails(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn \"\";\n\t}", "private void displayListings() {\r\n\r\n //Lists all current listings\r\n System.out.println(\"Current Listings: \\n\" + cars.getListings());\r\n placeBid();\r\n }", "public boolean isKing() {\n\t\treturn id == KING;\n\t}", "public void playTopHat() {\n\t\tSystem.out.println(\"ding ding da-ding\");\n\t\t\n\t}", "public void run() {\n\t\t/* HOOKE POTENTIAL PARAMETERS */\n\t\t/* ************************** */\n\t\tPotentialLookup hookeLook;\n\t\tdouble tolerance = 1e-4;\n\t\t\n\t\tHookePotential hooke;\n\t\tdouble cBrDist = 1.91;\n\t\t// nu = 267 cm-1 from handbook of chemistry and physics\n\t\t// mu = 12.01 * 79.9 / (12.01 + 79.9) / 1000 / 6.022e23 = 1.73e-26\n\t\t// k = (2*PI*3e10*267)^2 * 1.73e-26 = 43.82\n\t\tdouble cBrSpringConstant;\n\t\tcBrSpringConstant = 43.82;\t// upper Limit\n//\t\tcBrSpringConstant /= 4;\t\t// lower limit\n\t\t\n\t\t/* ********************************** */\n\t\t/* LENNARD JONES POTENTIAL PARAMETERS */\n\t\t/* ********************************** */\n\t\tPotentialLookup ljl;\n\t\tLennardJonesPotential ljp;\n\t\tdouble lookupPrecision = 0.001;\n\t\tint Z1 = 35;\n\t\tint Z2 = 35;\n\t\tdouble Z1Z2_distance = 3.8;\n\t\tdouble zeroPotentialDistance;\n\t\tdouble wellDepth = 0.034891;\n\t\t\n\t\tzeroPotentialDistance = Z1Z2_distance / Math.pow(2., (1./6.));\n\t\tljp = new LennardJonesPotential(Z1, Z2, zeroPotentialDistance, wellDepth);\n\t\thooke = new HookePotential(6, 35, cBrDist, cBrSpringConstant);\n\n\t\tJAtom center = new JAtom(6, new JVector(0, 0, 0));\n\t\tJVector ligandPos = new JVector(1, 1, 1).unit();\n\t\tligandPos.multiply(1.91);\n\t\tJAtom ligand = new JAtom(35, ligandPos);\n\t\tIdealTetrahedron test = new IdealTetrahedron(center, ligand);\n\t\t\n\t\tVector<JAtom> tempAtoms = new Vector<JAtom>();\n\t\tfor(JAtom atom : test.getAtoms())\n\t\t\ttempAtoms.add(atom);\n\t\t\n\t\tJAtom[] atoms = new JAtom[tempAtoms.size()]; \n\t\tatoms = tempAtoms.toArray(atoms);\n//\t\twhile(true) {\n\t\t\n\t\tJAtom br = atoms[1];\n\t\tJVector brBrforce = new JVector();\n\t\tJVector betweenBr;\n\t\tdouble distBetweenBr;\n\t\tfor(int i = 2; i < atoms.length; i++) {\n\t\t\tbetweenBr = JVector.subtract(br.getPosition(), atoms[i].getPosition());\n\t\t\tdistBetweenBr = betweenBr.length();\n\t\t\tbrBrforce.add_inPlace(JVector.multiply(betweenBr.unit(), ljp.calcF(distBetweenBr)));\n\t\t\t\n\t\t}\n\t\tdouble brBrDistBefore = JVector.distance(atoms[1].getPosition(), atoms[2].getPosition());\n\t\tdouble brBrForceBefore = ljp.calcF(brBrDistBefore);\n\t\tdouble cBrDistBefore = JVector.distance(atoms[0].getPosition(), atoms[1].getPosition());\n\t\tdouble newRestingPosition = cBrDist-(brBrforce.length() / cBrSpringConstant);\n\t\thooke = new HookePotential(6, 35, newRestingPosition, cBrSpringConstant);\n\t\tdouble cBrForceBefore = hooke.calcF(cBrDistBefore);\n\t\t\n\t\t\n\t\tJAtom[][] allSurroundings = buildSurroundings(atoms);\n\t\tfor(int i = 0; i < allSurroundings.length; i++) {\n\t\t\tSystem.out.println(\"Atom type/idx: \" + atoms[i].getZ() + \"/\" + atoms[i].atomID);\n\t\t\tfor(int j = 0; j < allSurroundings[i].length; j++) {\n\t\t\t\tSystem.out.println(\"\\tSurrounding atom type/idx: \" + allSurroundings[i][j].getZ() + \n\t\t\t\t\t\t\"/\" + allSurroundings[i][j].atomID);\n\t\t\t}\n\t\t}\n\t\tJVector[] force = new JVector[atoms.length];\n\t\tfor(int i = 0; i < force.length; i++)\n\t\t\tforce[i] = new JVector();\n\t\tpotentials = new Vector<Potential>();\n\t\tpotentials.add(ljp);\n\t\tpotentials.add(hooke);\n\t\tMyPrintStream movie = new MyPrintStream(new File(\"test.xyz\"));\n\t\tmovie.println(atoms.length);\n\t\tmovie.println();\n\t\t\n\t\tint idx = 0;\n\t\twhile(idx < 100) {\n\t\t\tfor(int i = 0; i < force.length; i++) {\n\t\t\t\tforce[i].setI(0);\n\t\t\t\tforce[i].setJ(0);\n\t\t\t\tforce[i].setK(0);\n\t\t\t}\n\t\t\tcalcForces(atoms, allSurroundings, force);\n\t\t\tmoveAtoms(atoms, force);\n\t\t\tprintPositions(movie, atoms);\n//\t\t\tmovie.println();\n\t\t\tidx++;\n\t\t}\n\t\tmovie.flush();\n\t\tmovie.close();\n//\t\t}\n//\t\tSystem.out.println(\"Br-Br intramolecular force: \" + ljp.calcF(3.118993));\n//\t\tSystem.out.println(\"C-Br intramolecular force: \" + ljp.calcF(3.118993));\n\n\t\tdouble step = .05;\n\t\tdouble startVal = 1;\n\t\tdouble finishVal = 3;\n\t\tint numSteps = (int) Math.rint((finishVal - startVal) / step);\n\t\tJAtom c = atoms[0];\n\t\tbr = atoms[1];\n\t\tJVector cBrVec = JVector.subtract(br.getPosition(), c.getPosition()),\n\t\t\t\tintraMolecVec;\n\t\tdouble potVal, forceVal;\n\t\tJAtom a1, a2;\n\t\tSystem.out.println(\"Distance\\tPotentialEnergy\\tForce:\");\n\t\tfor(int i = 0; i < numSteps; i++) {\n\t\t\tcBrVec = cBrVec.unit();\n\t\t\tcBrVec.multiply(startVal + i*step);\n\t\t\tbr.setNewPos(cBrVec);\n\t\t\tforceVal = potVal = 0;\n\t\t\tfor(int a = 0; a < atoms.length; a++) {\n\t\t\t\ta1 = atoms[a];\n\t\t\t\tif(a1 == br)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tintraMolecVec = JVector.subtract(br.getPosition(), a1.getPosition());\n\t\t\t\tfor(Potential pot : potentials)\n\t\t\t\t\tif(pot.check(br.getZ(), a1.getZ())) {\n\t\t\t\t\t\tforceVal += pot.calcF(intraMolecVec.length());\n\t\t\t\t\t\tpotVal += pot.calcU(intraMolecVec.length());\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println((startVal + i*step) + \"\\t\" + potVal + \"\\t\" + forceVal);\n\t\t}\n\t\tdouble brBrDistAfter = JVector.distance(atoms[1].getPosition(), atoms[2].getPosition());\n\t\tdouble cBrDistAfter = JVector.distance(atoms[0].getPosition(), atoms[1].getPosition());\n\t\tdouble brBrForceAfter = ljp.calcF(brBrDistAfter);\n\t\tdouble cBrForceAfter = hooke.calcF(cBrDistAfter);\n\t\tSystem.out.println(\"Br-Br intermolecular distance/force before relaxing: \" + \n\t\t\t\tbrBrDistBefore + \"/\" + brBrForceBefore);\n\t\tSystem.out.println(\"Br-Br intermolecular distance/force after relaxing: \" + \n\t\t\t\tbrBrDistAfter + \"/\" + brBrForceAfter);\n\t\tSystem.out.println(\"C-Br intermolecular distance/force before relaxing: \" + \n\t\t\t\tcBrDistBefore + \"/\" + cBrForceBefore);\n\t\tSystem.out.println(\"C-Br intermolecular distance/force after relaxing: \" + \n\t\t\t\tcBrDistAfter + \"/\" + cBrForceAfter);\n\t\t\n\t\tSystem.out.println(\"New C-Br bond distance: \" + newRestingPosition);\n\t\tSystem.out.println(\"Total Br-Br force: \" + brBrforce.length());\n\t\t\n\t}", "public java.lang.String getKP() {\n return KP;\n }", "private static void printUsage()\n {\n HelpFormatter hf = new HelpFormatter();\n String header = String.format(\n \"%nAvailable commands: ring, cluster, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, bootstrap\");\n String usage = String.format(\"java %s -host <arg> <command>%n\", NodeProbe.class.getName());\n hf.printHelp(usage, \"\", options, header);\n }", "private void listParkingLots() {\n for (ParkingLot pl: parkinglots) {\n System.out.println(pl.getName() + \" | price: \" + pl.getPrice() + \" /hour\");\n }\n }", "protected void brkt() {\n println(breakPoints.toString());\n }", "private void poetries() {\n\n\t}", "public final void beK() {\n AppMethodBeat.i(88975);\n if (this.kaS.aZV().vTW != null && this.kaS.aZV().vTW.size() > 0) {\n tm tmVar = (tm) this.kaS.aZV().vTW.get(0);\n if (this.iPD != null) {\n this.iPD.setText(tmVar.title);\n }\n if (this.ksp != null) {\n if (TextUtils.isEmpty(tmVar.kbW)) {\n this.ksp.setVisibility(8);\n } else {\n this.ksp.setText(tmVar.kbW);\n }\n }\n if (this.ksq != null) {\n if (TextUtils.isEmpty(tmVar.kbX)) {\n this.ksq.setVisibility(8);\n } else {\n this.ksq.setText(tmVar.kbX);\n AppMethodBeat.o(88975);\n return;\n }\n }\n }\n AppMethodBeat.o(88975);\n }", "private void requestBucks() {\n\n\t}", "public void mo21786K() {\n }", "@Override\r\n\t\tvoid k() {\n\t\t\tSystem.out.println(\"k\");\r\n\t\t}", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "@Override\r\n\tpublic String hatches() {\n\t\treturn \"Hatches eggs\";\r\n\t}", "public void setK(int k) {\n this.k = k;\n }", "public void tellJoke(){\n new EndpointAsyncTask().execute(this);\n }", "private String[] findSuitableK(String[] trainingDataSet){\n\t\ttry{\n\t\t\t\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t\t\n\t\treturn new String[]{\"neighbor1\", \"neighbor2\", \"neighbor3\"};\n\t}", "void printTicketSeat(String soldSeat)\n {\n\tSystem.out.println(hostName + \",\" + threadName + \" got one ticket\");\n\n }", "public void makeKing() {\n // Set king variable to true\n this.king = true;\n\n // Add stroke effect to piece to represent as a king\n setStroke(Color.GOLD);\n }", "private void doPing()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n CHARGE_NODE_JSON_DATA, \r\n PING_URL,\r\n SN_HOST,\r\n null, \r\n cookieData,\r\n false,\r\n token,\r\n secret ) );\r\n }", "long getSpokes();", "public Knuckels(){\n super(\"Knuckels\",10);\n }", "public synchronized void msgHereIsKitConfiguration(Configuration c) {\n\t\tAgentKit k = new AgentKit(c,(int)(Math.random()*1000));\n\t\tMyKit mk = new MyKit(k);\n\t\tmk.status = KitStatus.Available;\n\t\tmyKits.add(mk);\n\t\tstateChanged();\n\t}", "public final void Kh() {\n AppMethodBeat.i(33907);\n super.Kh();\n this.label = getIntent().getStringExtra(\"label\");\n this.zon = getIntent().getIntExtra(\"list_attr\", 0);\n this.gnG = new HashSet();\n this.zol = new HashSet();\n String stringExtra = getIntent().getStringExtra(\"always_select_contact\");\n if (!bo.isNullOrNil(stringExtra)) {\n this.zol.addAll(bo.P(stringExtra.split(\",\")));\n }\n stringExtra = getIntent().getStringExtra(\"already_select_contact\");\n if (!bo.isNullOrNil(stringExtra)) {\n this.gnG.addAll(bo.P(stringExtra.split(\",\")));\n }\n AppMethodBeat.o(33907);\n }", "public void carParking() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\tSystem.out.println(\"Jeep车行驶\");\r\n\r\n\t}", "private static void dealwithelp() {\r\n\t\tSystem.out.println(\"1 ) myip - to see your ip address.\");\r\n\t\tSystem.out.println(\"2 ) myport - to see your port number.\");\r\n\t\tSystem.out.println(\"3 ) connect <ip> <port> - connect to peer.\");\r\n\t\tSystem.out.println(\"4 ) list Command - list all the connected peer/peers.\");\r\n\t\tSystem.out.println(\"5 ) send <id> - to send message to peer.\");\r\n\t\tSystem.out.println(\"6 ) terminate <id> - terminate the connection\");\r\n\t\tSystem.out.println(\"7 ) exit - exit the program.\");\r\n\t}", "protected void drink() {\n\t\tSystem.out.println(\"Ape drinking\");\n\t}", "public void kick();", "private void brewCoffeeGrinds() {\r\n LOG.debug( \"Brewing coffee grinds\" );\r\n }", "PaulEigon() {\n\treadCurrentPingisState();\n\tscanState();\n\tprintResult();\n }", "@Override\r\n\tpublic void zjedz(Kost k) {\n\t}", "public abstract VKRequest mo118418h();", "@Override\n\tpublic void parked() {\n\t\t\n\t}", "public void setK(boolean k) {\n\tthis.k = k;\n }", "public void tune() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "public void displayWithKeyword()\r\n {\r\n System.out.print(\"[Key]: \" + keyword + \"\\n[Events]: \");\r\n displayWithKeyword(head);\r\n System.out.println(\"\\n-----------------------\");\r\n }", "public void setKs(java.lang.String param) {\r\n localKsTracker = param != null;\r\n\r\n this.localKs = param;\r\n }", "private void ini_MapPaks()\r\n\t{\r\n\r\n\t}", "public void requestJoke(){\n SharedPreferences preferences = activity.getPreferences(Activity.MODE_PRIVATE);\r\n String firstName = activity.getResources().getString(R.string.default_first_name);\r\n String lastName = activity.getResources().getString(R.string.default_last_name);\r\n jokeRetriever.getJoke(firstName, lastName, this);\r\n }", "private void askForAPizza() {\n\t\tconnectToServer();\n\t\tout.println(\"Give me a pizza\");\n\t\tout.flush();\n\t\tdisconnectFromServer();\n\t}", "public ThingsWithWings(Context context) {\r\n super(context);\r\n ThingsWithWingsConstructor();\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void dumpRemoteKeggPathways() throws IOException {\n\t\tList<Short> pathwayIDs = new ArrayList<Short>();\n\t\t\n\t\t// get pathway tree structure\n\t\tTreeNode pathwayRoot = Constants.KEGG_ORTHOLOGY_MAP.getRoot();\n\t\tEnumeration<TreeNode> dfEnum = ((DefaultMutableTreeNode) pathwayRoot).depthFirstEnumeration();\n\t\t// iterate nodes of pathway\n\t\twhile (dfEnum.hasMoreElements()) {\n\t\t\tTreeNode treeNode = (TreeNode) dfEnum.nextElement();\n\t\t\t// extract data from leaf nodes only\n\t\t\tif (treeNode.isLeaf()) {\n\t\t\t\tString leafName = (String) ((DefaultMutableTreeNode) treeNode).getUserObject();\n\t\t\t\t// extract numeric identifier and store in list\n\t\t\t\tpathwayIDs.add(Short.parseShort(leafName.substring(0, 5)));\n\t\t\t}\n\t\t}\n\n\t\tko2pathway = new HashMap<Short, List<Short>>();\n\t\tpathway2ko = new HashMap<Short, List<Short>>();\n\t\tec2pathway = new HashMap<short[], List<Short>>();\n\t\tpathway2ec = new HashMap<Short, List<short[]>>();\n\t\tint i = 1;\n\t\t// iterate list of pathway IDs\n\t\tfor (Short pathwayID : pathwayIDs) {\n\t\t\tSystem.out.println(\"\" + (i++) + \"/\" + pathwayIDs.size());\n\t\t\tString pathway = \"path:map\" + String.format(\"%05d\", pathwayID);\n\t\t\t\n\t\t\tString[] koStrings = serv.get_kos_by_pathway(pathway);\n\t\t\tList<Short> koList = new ArrayList<Short>();\n\t\t\tfor (String koString : koStrings) {\n\t\t\t\tShort ko = Short.parseShort(koString.substring(4));\n\t\t\t\tList<Short> pathwayList = ko2pathway.get(ko);\n\t\t\t\tif (pathwayList == null) {\n\t\t\t\t\tpathwayList = new ArrayList<Short>();\n\t\t\t\t}\n\t\t\t\tif (!pathwayList.contains(pathwayID)) {\n\t\t\t\t\tpathwayList.add(pathwayID);\n\t\t\t\t}\n\t\t\t\tko2pathway.put(ko, pathwayList);\n\t\t\t\t\n\t\t\t\tkoList.add(ko);\n\t\t\t}\n\t\t\tif (!koList.isEmpty()) {\n\t\t\t\tpathway2ko.put(pathwayID, koList);\n\t\t\t}\n\n\t\t\tString[] ecStrings = serv.get_enzymes_by_pathway(pathway);\n\t\t\tList<short[]> ecList = new ArrayList<short[]>();\n\t\t\tfor (String ecString : ecStrings) {\n\t\t\t\tshort[] ec = ECReader.toArray(ecString.substring(3));\n\t\t\t\tList<Short> pathwayList = ec2pathway.get(ec);\n\t\t\t\tif (pathwayList == null) {\n\t\t\t\t\tpathwayList = new ArrayList<Short>();\n\t\t\t\t}\n\t\t\t\tif (!pathwayList.contains(pathwayID)) {\n\t\t\t\t\tpathwayList.add(pathwayID);\n\t\t\t\t}\n\t\t\t\tec2pathway.put(ec, pathwayList);\n\t\t\t\t\n\t\t\t\tecList.add(ec);\n\t\t\t}\n\t\t\tpathway2ec.put(pathwayID, ecList);\n\t\t\t\n\t\t}\n\t\t\n\t\t// dump objects to file\n\t\tFile output = new File(\"conf/keggKO2PW.map\");\n\t\tFileOutputStream fos = new FileOutputStream(output);\n\t\tObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(fos)));\n\n\t\toos.writeObject(ko2pathway);\n\t\toos.writeObject(pathway2ko);\n\t\toos.writeObject(ec2pathway);\n\t\toos.writeObject(pathway2ec);\n\t\toos.flush();\n\t\toos.close();\n\t}", "private void ZeigeAlleKontakte() throws Exception {\n\t\r\n\t\tList<Kontakt> kontaktarray = new ArrayList<Kontakt>();\r\n\t\r\n\t\tKontaktService service = (KontaktService) Naming.lookup (\"rmi://localhost:1099/KontaktService\");\r\n\t\t\r\n\t\tkontaktarray = service.getKontakte();\r\n\t\r\n\t\tKontakt k = new Kontakt();\r\n\t\t\r\n\t\tString xAusgabe = \"\"; \r\n\t\tIterator<Kontakt> iterator = kontaktarray.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\t\r\n\t\t\tk = iterator.next();\r\n\t\t\t\r\n\t\t\txAusgabe = Objects.toString(k.getcId());\r\n\t\t\txAusgabe += \" ; \";\r\n\t\t\txAusgabe += k.getcNName();\r\n\t\t\txAusgabe += \" ; \";\r\n\t\t\txAusgabe += k.getcVName();\r\n\t\t\t// TODO: Restliche Felder ausgeben\r\n\t\t\t\r\n\t\t\tSystem.out.println(xAusgabe);\t\t\t\t\r\n\t\t\t}\r\n\t}", "@Override\n public String ping() {\n return super.ping();\n }", "public void werkPlaats (boolean wp) throws LuchthavenException\r\n\t{\r\n\t\tluchthaven.setWerkPlaats(wp);\r\n\t}", "@Override\r\n\tpublic void actionKnife() {\n\t\tSystem.out.println(\"검 있다.\");\r\n\t}", "public void activateWings() {\n\t\tSystem.out.println(\"Wings are activated\");\n\t}", "private void printKAT(String banner,\n\t\tMakwa mpub, Makwa mpriv)\n\t\tthrows IOException\n\t{\n\t\tbyte[] input = new byte[150];\n\t\tfor (int i = 0; i < input.length; i ++) {\n\t\t\tinput[i] = (byte)(17 + 73 * i);\n\t\t}\n\t\tprintKAT(banner, mpub, mpriv, input);\n\n\t\t/*\n\t\t * Some 13-byte inputs, rotating over the 256 possible bytes.\n\t\t * One of them has an embedded 0.\n\t\t */\n\t\tinput = new byte[13];\n\t\tfor (int i = 0; i < 22; i ++) {\n\t\t\tfor (int j = 0; j < 13; j ++) {\n\t\t\t\tinput[j] = (byte)(13 * i + j + 8);\n\t\t\t}\n\t\t\tprintKAT(banner, mpub, mpriv, input);\n\t\t}\n\t}", "public Object run(){\n\t\t\t List nameList = keyRing.getX500NameFromNameMapping(name);\n\t\t\t //List nameList = keyRing.findDNFromNS(name);\n\t\t\t if (log.isDebugEnabled()) {\n\t\t\t log.debug(\"List of names for \" + name + \": \" + nameList);\n\t\t\t }\n\t\t\t List keyList = new ArrayList();\n\t\t\t for (int i = 0; i < nameList.size(); i++) {\n\t\t\t X500Name dname = (X500Name)nameList.get(i);\n\t\t\t List pkCerts = keyRing.findPrivateKey(dname);\n\t\t\t if (pkCerts == null) {\n\t\t\t\t return keyList;\n\t\t\t }\n keyList.addAll(pkCerts);\n\t\t\t }\n\t\t\t return keyList;\n\t\t }", "public void kinged(){this.king = true;}", "private void wifiName() {\n\t\tSystem.out.println(\"The wifi name is Redmi\");\n\t}", "@Override\r\n\tpublic int runn(int k) {\n\t\treturn 0;\r\n\t}", "String generateJoke();", "default void trip() {\n\t\tSystem.out.println(\"Oh no you fell! :(\");\n\t}", "public boolean isKing(){return this.king;}", "public void hungry()\r\n {\r\n \tSystem.out.println(\"I'm hungry!! Feed me!!\");\r\n \tbarking();\r\n }", "@ApiMethod(name = \"tellJoke\", path = \"joke\", httpMethod = \"GET\")\n public JokeBean tellJoke() {\n JokeBean response = new JokeBean();\n int i = new Random().nextInt(JOKES.length);\n response.setData(JOKES[i]);\n return response;\n }", "@Override\r\n\tpublic void start() {\n\t\tSystem.out.println(\"Jeep车启动\");\r\n\t}", "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 gears(){\n\t\t System.out.println(\"bike has 4 gears ....\");\r\n\t\t//system : system is a class in java language.lang package\r\n\t\t \t//out : out is the static member of system class.It's type PrintStream\r\n\t\t \t//println: which is used to print the output.\r\n\r\n\r\n\t}", "public void park();", "public void showBoomKeyTip() {\n }", "private USI_KICKO() {}", "public KNN() {\r\n\t\tallowRun = true;\r\n\t}", "public void correr(double km){\n System.out.println(\"He corrido\"+km+\"kilometros\");\n }", "public boolean King (){\n Node N = head;\n int numWk = 0;\n int numBK = 0;\n for (int i = 1; i < numItems; i++){\n if (N.p == 'k'){\n numWk +=1;\n }else if (N.p == 'K'){ \n numBK +=1 ;\n }\n N = N.next;\n }\n if (numWk == 1 && numBK == 1){\n return true;\n } \n else {\n return false;\n }\n }", "public static void giveKIT(Player p) {\r\n\t\tp.getInventory().clear();\r\n\t\tfor (String kitget : kit.keySet()) {\r\n\t\t\tString[] kitdojogador = kit.get(kitget).split(\":\");\r\n\t\t\tString kit1 = kitdojogador[0];\r\n\t\t\tString kit2 = kitdojogador[1];\r\n\t\t\tif (kit1.equalsIgnoreCase(\"PvP\") || kit2.equalsIgnoreCase(\"PvP\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.WOOD_SWORD));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Archer\") || kit2.equalsIgnoreCase(\"Minerador\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.BOW));\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.ARROW, 10));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Barbarian\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.WOOD_SWORD));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Beastmaster\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.BONE, 3));\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.MONSTER_EGG, 3, EntityType.WOLF.getTypeId()));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Grandpa\")) {\r\n\t\t\t\tItemStack g = new ItemStack(Material.STICK);\r\n\t\t\t\tItemMeta gm =g.getItemMeta();\r\n\t\t\t\tgm.addEnchant(Enchantment.KNOCKBACK, 2, true);\r\n\t\t\t\tg.setItemMeta(gm);\r\n\t\t\t\tp.getInventory().addItem(g);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setKing() {\n this.isKing = true;\n\n this.setupPiece();\n }", "public void setKinkenriyou25(Long kinkenriyou25) {\r\n this.kinkenriyou25 = kinkenriyou25;\r\n }", "public void klikkaa(Tavarat tavarat, Klikattava klikattava);", "private void ErstelleKontakt(Kontakt k) throws Exception {\n\t\tKontaktService service = (KontaktService) Naming.lookup (\"rmi://localhost:1099/KontaktService\");\r\n\t\t\r\n\t\tk = service.createKontakt(k);\r\n\t\t\r\n\t\tSystem.out.println(\"Kontakt erstellt: \");\r\n\t\tSystem.out.println(\"ID: \" + k.getcId());\r\n\t\tSystem.out.println(\"Nachname: \" + k.getcNName());\r\n\t\tSystem.out.println(\"Vorname: \" + k.getcVName());\r\n\r\n\t}", "public void barking()\r\n {\r\n \tSystem.out.println (\"Woof Woof\");\r\n }", "@Override\r\n\tpublic void drive() {\n\t\tSystem.out.println( aname + \"Berkendara\");\r\n\t}", "private static void getJokeOrProverb(String username, String userkey, String servername, int port){\n\t\tSocket socket;\n\t\tBufferedReader fromServer;\n\t\tPrintStream toServer;\n\n\t\ttry{\n\t\t\t// Open a new socket connection to the server with the specified port number\n\t\t\tsocket = new Socket(servername, port);\n\t\t\tfromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\ttoServer = new PrintStream(socket.getOutputStream());\n\t\t\t// Send user name and user key to server\n\t\t\ttoServer.println(username + \" \" + userkey);\n\t\t\ttoServer.flush();\n\n\t\t\t// There is nothing special for the number(50) of iteration times\n\t\t\tString strOutput;\n\t\t\tfor (int ix = 1; ix <= 50; ix++){\n\t\t\t\tstrOutput = fromServer.readLine();\n\t\t\t\tif (strOutput == null){ // There is no more messages\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Write log and print\n\t\t\t\t\twriteLog(strOutput);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Close the socket\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\twriteLog(\"Exception occurs, see the below details:\");\n\t\t\tex.printStackTrace ();\n\t\t}\n\t}", "void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}", "public final void zzaka() {\n zza(zzbwn.zzfur);\n }", "public void showParking(List<Parking> parkings) {\n\t\tint size = parkings.size();\n\t\tif (size == 0)\n\t\t\treturn;\n\t\tif (size == 1) {\n\t\t\tshowParking(parkings.get(0), true);\n\t\t\treturn;\n\t\t}\n\n\t\tclearMap();\n\t\tLatLngBounds.Builder positions = new LatLngBounds.Builder();\n\t\tfor (Parking parking : parkings) {\n\t\t\tshowParking(parking, false);\n\t\t\tpositions.include(parking.getLocation());\n\t\t}\n\t\tMapCamera.moveCamera(map, positions.build());\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void readDumpedKeggPathways() {\n\t\ttry {\n\t\t\t// read dumped file contents\n//\t\t\tFile input = new File(\"conf/keggKO2PW.map\");\n\t\t\tInputStream is = getClass().getResourceAsStream(\"/de/mpa/resources/conf/keggKO2PW.map\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(is)));\n\n\t\t\tko2pathway = (HashMap<Short, List<Short>>) ois.readObject();\n\t\t\tpathway2ko = (HashMap<Short, List<Short>>) ois.readObject();\n\t\t\t\n//\t\t\tec2pathway = (HashMap<short[], List<Short>>) ois.readObject();\n\t\t\tec2pathway = new TreeMap<short[], List<Short>>(\n\t\t\t\t\tnew Comparator<short[]>() {\n\t\t\t\t\t\tpublic int compare(short[] o1, short[] o2) {\n\t\t\t\t\t\t\tint delta = 0;\n\t\t\t\t\t\t\tfor (int i = 0; i < o1.length; i++) {\n\t\t\t\t\t\t\t\tdelta = o1[i] - o2[i];\n\t\t\t\t\t\t\t\tif (delta != 0) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn delta;\n\t\t\t\t\t\t}\n\t\t\t});\n\t\t\tec2pathway.putAll((Map<? extends short[], ? extends List<Short>>) ois.readObject());\n\t\t\t\n\t\t\tpathway2ec = (HashMap<Short, List<short[]>>) ois.readObject();\n\t\t\tois.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void startServer() {\n\t\tlogger.trace(\"startServer() is called\");\n\n\t\tKKModellable model = new KKModel(jokeFile);\n\t\tList<KKJoke> kkJokeList = model.getListOfKKJokes();\n\t\tint numOfJokes = kkJokeList.size();\n\t\ttotalJokesLabel.setText(\"Total jokes: \" + String.valueOf(numOfJokes));\n\t\t\n\t\tif (numOfJokes > 0){\n\t\t\tif (socketListeningTask == null){\n\t\t\t\tsocketListeningTask = new BackgroundSocketListener(kkServerPort, serverStatusLabel);\n\t\t\t\tsocketListeningTask.execute();\n\t\t\t\tConnectionCounter.resetConnectionCounter();\n\t\t\t\tserverStatusLabel.setText(serverStarted);\n\t\t\t\ttotalClientConectionLabel.setText(\"Client connections: 0\");\n\n\t\t\t\tstartServerToolBarButton.setEnabled(false);\n\t\t\t\tstopServerToolBarButton.setEnabled(true);\n\t\t\t\t\n\t\t\t\tconnectionCheckingTask = new BackgroundConnectionCheck(totalClientConectionLabel);\n\t\t\t\tconnectionCheckingTask.execute();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//Do not start server because joke list is empty\n\t\t\tserverStatusLabel.setText(jokesNotFound);\n\t\t\tSystem.err.println(\"Empty joke source\");\n\t\t\tlogger.info(\"Empty joke source\");\n\t\t\tUtility.displayErrorMessage(\"Jokes not found or missing the \\\" kk-jokes.txt \\\" file which must be stored in the same path as this server app. \"\n\t\t\t+ \"Each line or joke in the \\\" kk-jokes.txt \\\" file must also be formatted as \\\" clue ### answer \\\" without the quotes.\");\n\t\t}\n\t}", "public void printAllMeetings(RedBlackBST<Date,Meeting> meetings)\n {\n for (Date d:meetings.keys()) {\n System.out.println(d+\" \"+meetings.get(d));\n }\n }" ]
[ "0.61811656", "0.61472636", "0.5740804", "0.56825864", "0.5637156", "0.55588394", "0.5557547", "0.5505076", "0.54773766", "0.54638493", "0.54370487", "0.5436354", "0.5411514", "0.53416073", "0.5339527", "0.5330921", "0.5274987", "0.52593464", "0.52534354", "0.5235969", "0.52282655", "0.5215957", "0.52116954", "0.5165522", "0.5164008", "0.5162622", "0.5161055", "0.51560915", "0.5154439", "0.51450175", "0.514031", "0.5135928", "0.51267654", "0.51263255", "0.5123377", "0.5118257", "0.5117136", "0.5090025", "0.5073774", "0.5069905", "0.5063114", "0.5063008", "0.50604296", "0.5053168", "0.5052564", "0.5051884", "0.5037116", "0.50332844", "0.502277", "0.50218624", "0.50117576", "0.49988762", "0.49940225", "0.49835584", "0.49810958", "0.49807304", "0.4978275", "0.49571827", "0.49529135", "0.49439713", "0.49411175", "0.49385217", "0.4931873", "0.49269912", "0.49210414", "0.49020714", "0.49006948", "0.4900425", "0.48984933", "0.48972583", "0.48906732", "0.48884192", "0.48857293", "0.48852605", "0.48846135", "0.48830923", "0.48779583", "0.4863491", "0.48608962", "0.48607928", "0.48444486", "0.48437208", "0.48435742", "0.48432487", "0.48422003", "0.48389798", "0.48325992", "0.4830693", "0.48277637", "0.48274356", "0.48271656", "0.48253828", "0.4825314", "0.4820065", "0.48174983", "0.4813469", "0.48132893", "0.4810437", "0.48098183", "0.4808916", "0.48047987" ]
0.0
-1
Get all possible jump moves; second parameter to only allow chainable moves (used when double jumping).
public ArrayList<Move> getJumpMoves(Board curBoard, boolean onlyChainable) { return myType.getJumpMoves(curBoard, onlyChainable, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "public ArrayList<Move> getPossibleMoves() \n\t{\n\t\tArrayList<Move> possibleMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(int i = - 1; i <= 1; i += 2)\n\t\t{\n\t\t\tfor(int j = -1; j <= 1; j += 2)\n\t\t\t{\n\t\t\t\tLocation currentLoc = new Location(getLoc().getRow() + j, getLoc().getCol() + i);\n\t\t\t\t\n\t\t\t\tif(getBoard().isValid(currentLoc))\n\t\t\t\t{\n\t\t\t\t\tif(getBoard().getPiece(currentLoc) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tArrayList<Node> move = new ArrayList<Node>();\n\t\t\t\t\t\tmove.add(getNode());\n\t\t\t\t\t\tmove.add(getBoard().getNode(currentLoc));\n\t\t\t\t\t\t\n\t\t\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(ArrayList<Node> move : getNextJumps(getLoc(), new ArrayList<Location>()))\n\t\t{\n\t\t\tif(move.size() > 1)\n\t\t\t{\n\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Move> jumpMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(Move possibleMove : possibleMoves)\n\t\t{\n\t\t\tif(!possibleMove.getJumped().isEmpty())\n\t\t\t{\n\t\t\t\tjumpMoves.add(possibleMove);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!jumpMoves.isEmpty())\n\t\t{\n\t\t\treturn jumpMoves;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn possibleMoves;\n\t\t}\n\t}", "abstract public List<Move> getPossibleMoves();", "private void getJumps(ArrayList<Move> moves, int k) {\n if (!jumpPossible(k)) {\n return;\n }\n\n for (int i = -2; i <= 2; i += 2) {\n for (int j = -2; j <= 2; j += 2) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (validSquare(nextCol, nextRow)) {\n Move rec = Move.move(col(k),\n row(k), nextCol, nextRow);\n if (checkJump(rec, true)) {\n PieceColor middle = get(nextCol, nextRow);\n set(nextCol, nextRow, get(k));\n ArrayList<Move> record = new ArrayList<>();\n getJumps(record, index(nextCol, nextRow));\n if (record.size() == 0) {\n record.add(null);\n }\n set(nextCol, nextRow, middle);\n for (Move mov : record) {\n Move jump = Move.move(rec, mov);\n moves.add(jump);\n }\n }\n }\n }\n }\n }", "public ArrayList<Cell> getPseudoLegalMoves() {\n\n Cell[][] board = Board.getBoard();\n ArrayList<Cell> moves = new ArrayList<Cell>();\n\n //Possible ways to move a knight\n int[][] possibleOffsets = {{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,1},{2,-1}};\n\n for(int i=0; i<possibleOffsets.length; i++){\n int x = possibleOffsets[i][0] + getRow();\n int y = possibleOffsets[i][1] + getColumn();\n\n //Making sure we dont leave the board\n if(x >= board.length || x < 0\n || y >= board.length || y < 0)\n continue;\n\n //Making sure destination does not contain a friendly piece\n if(Board.containsPieceOfColor(x,y,this.getColor()))\n continue;\n\n moves.add(board[x][y]);\n }\n\n return moves;\n }", "public PossibleMove[] getPossibleMoves(Coordinate from);", "public static int[][] getAllBasicJumps(int[][] board, int player) {\r\n\t\t\t\r\n\t\tint[][] moves = new int [0][4];\r\n\t\tint[][] SaveMoves = new int [0][4]; /*save our moves of the soldures*/\r\n\t\tint[][] positions = playerDiscs(board,player);\r\n\t\tint SumAllJump=0; /*varibel ho count all the posible Jumps*/\r\n\t\t\t\r\n\t\tfor(int IPD=0;IPD<positions.length;IPD=IPD+1){/*running on all the solduers*/\r\n\t\t\t/*Building an array with all the move possible for a specific soldier*/\r\n\t\t\tint[][] JumpsPossible = getRestrictedBasicJumps (board,player,positions[IPD][0],positions[IPD][1]); \r\n\t\t\t/*if the move legal enter the move in the arry*/\r\n\t\t\tif (JumpsPossible.length>0){/*If the soldier has jumps legality, From one with jumps by other soldiers*/\t\t\t\t\r\n\t\t\t\tSumAllJump=SumAllJump+JumpsPossible.length;\r\n\t\t\t\tSaveMoves = moves;\r\n\t\t\t\tmoves = new int [SumAllJump][4];\r\n\t\t\t\tif (SumAllJump>1) {\r\n\t\t\t\t\tfor (int idxSAM1=SaveMoves.length-1;idxSAM1>-1;idxSAM1=idxSAM1-1){\r\n\t\t\t\t\t\tfor (int idxSAM2=0;idxSAM2<4;idxSAM2=idxSAM2+1){\r\n\t\t\t\t\t\t\tmoves[idxSAM1][idxSAM2]=SaveMoves[idxSAM1][idxSAM2];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tfor(int indx=0;indx<JumpsPossible.length;indx=indx+1){\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][0]=JumpsPossible [indx][0];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][1]=JumpsPossible [indx][1];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][2]=JumpsPossible [indx][2];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][3]=JumpsPossible [indx][3];\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn moves;\r\n\t}", "void getMoves(ArrayList<Move> moves) {\n if (gameOver()) {\n return;\n }\n if (jumpPossible()) {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n getJumps(moves, k);\n }\n } else {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n getMoves(moves, k);\n }\n }\n }", "private Cell[] allPossibleMoves(Cell source) {\n\t\tCell[] moves = new Cell[2 * Board.BOARD_SIZE - 2]; // Вертикаль и горизонталь, которые бьет ладья\n\t\tint columnIndex = source.getColumn();\n\t\tint rowIndex = source.getRow();\n\t\tint k = 0;\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != rowIndex) {\n\t\t\t\tmoves[k++] = new Cell(columnIndex, i);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != columnIndex) {\n\t\t\t\tmoves[k++] = new Cell(i, rowIndex);\n\t\t\t}\n\t\t}\n\t\treturn moves;\n\t}", "@Override\n ArrayList<Cell> findPossibleMoves(Cell workerPosition) {\n ArrayList<Cell> neighbors = board.getNeighbors(workerPosition);\n ArrayList<Cell> possibleMoves = new ArrayList<Cell>();\n for (Cell cell : neighbors) {\n // + allow movement to cells occupied by opponents, if they can be pushed away\n Cell nextCell;\n int nextX = cell.getPosX() + (cell.getPosX() - workerPosition.getPosX());\n int nextY = cell.getPosY() + (cell.getPosY() - workerPosition.getPosY());\n try {\n nextCell = board.getCell(nextX, nextY);\n } catch (ArrayIndexOutOfBoundsException e) {\n nextCell = null;\n }\n if ((!cell.hasWorker() || (nextCell != null && !nextCell.hasWorker() && !nextCell.isDomed())) &&\n !cell.isDomed() && (cell.getBuildLevel() <= workerPosition.getBuildLevel() + 1))\n possibleMoves.add(cell);\n //\n }\n return findLegalMoves(workerPosition, possibleMoves);\n }", "public PossibleMoves getPossibleMoves(State state){\n if(possibleMoves == null){\n possibleMoves = new PossibleMoves(state);\n }\n return possibleMoves;\n }", "public Move getNextJumps(CheckersSetup setup, checkersSetup.Board board, ArrayList<Move> multiJumpChoices) {\n\t\tMove move = desiredTurn.getMovesFor1Turn().get(numJumpsAlreadyDoneThisTurn);\n\t\t\n\t\t//Testing\n\t\tBasicCheckersAIFunctions.doSanityCheckMakeSureCompMoveIsRealMove(desiredTurn.getMovesFor1Turn().get(numJumpsAlreadyDoneThisTurn), multiJumpChoices);\n\t\t//Testing\n\t\t\n\t\tnumJumpsAlreadyDoneThisTurn++;\n\t\t\n\t\treturn move;\n\t}", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public Iterable<Board> solution()\n {\n Stack<Board> solution = new Stack<Board>();\n \n // for case where initial board is goal board\n if (moves == 0) {\n solution.push(goalNode.board);\n return solution;\n }\n\n step = goalNode;\n \n // add chain of previous node from goal node \n while (step != null) {\n solution.push(step.board);\n step = step.prev;\n }\n \n return solution;\n }", "@Override\n public void getMoves(ArrayList<Move> moves) {\n // WARNING: This function must not return duplicate moves\n moves.clear();\n\n for (int i = 0; i < 81; ++i) {\n if (board[i] == currentPlayer) {\n getMovesSingleStep(moves, i);\n getMovesJump(moves, i, i);\n }\n }\n }", "public ArrayList<Cell> getPseudoLegalMoves() {\n\n int[][] offsetMultiplier = {{-1,-1},{-1,1},{1,-1},{1,1}}; //4 directions NW, NE, SW, SE\n int x = getRow(); int y = getColumn();\n\n\n return Piece.slidingPieceMoves(x,y,this.getColor(),offsetMultiplier);\n\n }", "public LinkedList<Move> getPossibleMoves() {\n\t\tAIPossibleMoves.clear();\n\t\tint xOrigin = 0, yOrigin = 0, xMove1 = 0, xMove2 = 0, yMove1 = 0, yMove2 = 0;\n\t\tMove move = null;\t\n\t\t\tint type = 0;\n\t\t\tfor(Checker checker: model.whitePieces) {\n\t\t\t\t\n\t\t\t\txOrigin = checker.getCurrentXPosition();\n\t\t\t\tyOrigin = checker.getCurrentYPosition();\n\t\t\t\txMove1 = (checker.getCurrentXPosition() - 1);\n\t\t\t\txMove2 = (checker.getCurrentXPosition() + 1);\n\t\t\t\tyMove1 = (checker.getCurrentYPosition() - 1);\n\t\t\t\tyMove2 = (checker.getCurrentYPosition() + 1);\n\t\t\t\ttype = checker.getType();\n\t\t\t\tswitch(type) {\n\t\t\t\tcase 2:\n\n\t\t\t\t\tif((xMove1 < 0) || (yMove1 <0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t\t//System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t\t// System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t\t//Moving up and left isMovingRight,IsMovingDown\n\t\t\t\t\tif((xMove1 <0) || (yMove1 < 0)) {\n\t\t\t\t\t\t//continue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving up and right\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove1 < 0) || (yMove2 > 7)) {\n\t\t\t\t//\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving down and left isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove2, false, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove2, false, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove2 > 7)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t//moving down and right isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove2, true, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove2, true, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\n\t\t\treturn AIPossibleMoves;\n\t\t\t\n\t\t}", "ArrayList<Move> legalMoves() {\n ArrayList<Move> result = new ArrayList<Move>();\n int f, b;\n Move m;\n for (int i = 1; i < 8; i++) {\n for (int j = 1; j < 8; j++) {\n if (get(i,j).side() == _turn) {\n f = forward(j, i);\n b = backward(j, i);\n c = _col[j];\n r = _row[i];\n m = Move.create(j, i, j - b, i - b);\n addMove(result, m);\n m = Move.create(j, i, j + b, i + b);\n addMove(result, m);\n m = Move.create(j, i, j + f, i - f);\n addMove(result, m);\n m = Move.create(j, i, j - f, i + f);\n addMove(result, m);\n m = Move.create(j, i, j + c, i);\n addMove(result, m);\n m = Move.create(j, i, j - c, i);\n addMove(result, m);\n m = Move.create(j, i, j, i + r);\n addMove(result, m);\n m = Move.create(j, i, j, i - r);\n addMove(result, m);\n } else {\n continue;\n }\n }\n }\n return result;\n }", "protected abstract T jump(T neighbor, T current, Set<T> goals);", "public Move[] getAllPossibleMoves(boolean isWhitesMove)\r\n\t{\r\n\t\tArrayList<Move> legalMoves = new ArrayList<Move>();\r\n\r\n\t\tPiece[] piecesToMove = isWhitesMove ? whitePieces : blackPieces;\r\n\t\tfor (int i = 0; i < piecesToMove.length; i++)\r\n\t\t{\r\n\t\t\tlegalMoves.addAll(getPieceMove(piecesToMove[i]));\r\n\t\t}\r\n\r\n\t\tlegalMoves.trimToSize();\r\n\t\tMove[] moves = legalMoves.toArray(new Move[legalMoves.size()]);\r\n\t\tisKingCheck(moves, isWhitesMove);\r\n\t\treturn moves;\r\n\t}", "private void getKingJumpPos(Point kingPoint, Orientation or, Movement m, JumpPosition jumpPosit,Color c, boolean b) throws CloneNotSupportedException {\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n Color oposite = c==Color.black?Color.red:Color.black;\n \n Point soldierPoint , nextPoint;\n for(OrientationMove orM:orientationMoveCombs){\n Point currentPoint = foo;\n for(int i=0;i<8;i++){\n if(i!=0) currentPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n if( !isValidSquare(currentPoint.x, currentPoint.y)) \n break;\n if( !isEmpty(new Soldier(currentPoint.x, currentPoint.y, Color.white), gamePieces)) \n break;\n //soldierPoint = getXandYgivenOrientation(currentPoint, or,m);\n\n soldierPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n nextPoint = getXandYgivenOrientation(soldierPoint, orM.or,orM.m);\n Soldier foe = new Soldier(soldierPoint.x, soldierPoint.y, oposite);\n if(isJumpable(soldierPoint, orM.or, orM.m, c , jumpPosit))\n addAllRelevantSquares(jumpPosit, foo, nextPoint, soldierPoint, orM.or, orM.m ,oposite );\n\n\n nextPoint = getXandYgivenOrientation(soldierPoint, or,m);\n if(!isEmpty(soldierPoint, gamePieces, jumpPosit.jumpPosition)\n &&!isEmpty(nextPoint, gamePieces, jumpPosit.jumpPosition)) break; \n }\n }\n \n \n \n //If it is, add it to the movement path\n// if(isJumpable(soldierPoint, or, m, c , jumpPositions)){ \n// addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n// }\n \n }", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "public int[] findMove(){\n int[] blackCheckerSpots = new int[12];\n int i =0;\n while(mCheckerBoard.indexOf(new Checker(1, false)) != -1){\n int startPosition = mCheckerBoard.indexOf(new Checker(1, false)); //need to override Checker equals method\n Checker current = mCheckerBoard.get(startPosition);\n int[] answer = jumpRight(startPosition, false, current);\n if(answer.length > 1)\n {\n //jumped right downwards\n return answer;\n }\n answer = jumpLeft(startPosition, false, current);\n if(answer.length > 1){\n //jumped left downwards\n return answer;\n }\n answer = moveDiagonalRight(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal right downwards\n return;\n }\n answer = moveDiagonalLeft(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal left downwards\n return;\n }\n\n //end of loop\n //these are the ones that need to be set back to black at the end\n current.setIsRed(true);\n blackCheckerSpots[i]=startPosition;\n i++;\n }\n\n for(int j =0; j<blackCheckerSpots.length; j++){\n Checker changed = mCheckerBoard.get(blackCheckerSpots[j]);\n changed.setIsRed(false);\n mCheckerBoard.set(blackCheckerSpots[j], changed);\n }\n\n }", "public List<MovePath> getNextMoves(boolean backward, boolean forward) {\n final ArrayList<MovePath> result = new ArrayList<MovePath>();\n final MoveStep last = getLastStep();\n// if (isJumping()) {\n// final MovePath left = clone();\n// final MovePath right = clone();\n//\n// // From here, we can move F, LF, RF, LLF, RRF, and RRRF.\n// result.add(clone().addStep(MovePath.MoveStepType.FORWARDS));\n// for (int turn = 0; turn < 2; turn++) {\n// left.addStep(MovePath.MoveStepType.TURN_LEFT);\n// right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n// result.add(left.clone().addStep(MovePath.MoveStepType.FORWARDS));\n// result.add(right.clone().addStep(MovePath.MoveStepType.FORWARDS));\n// }\n// right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n// result.add(right.addStep(MovePath.MoveStepType.FORWARDS));\n//\n// // We've got all our next steps.\n// return result;\n// }\n\n // need to do a separate section here for Aeros.\n // just like jumping for now, but I could add some other stuff\n // here later\n if (getEntity() instanceof Aero) {\n MovePath left = clone();\n MovePath right = clone();\n\n // From here, we can move F, LF, RF, LLF, RRF, and RRRF.\n result.add((clone()).addStep(MovePath.MoveStepType.FORWARDS));\n for (int turn = 0; turn < 2; turn++) {\n left.addStep(MovePath.MoveStepType.TURN_LEFT);\n right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n result.add(left.clone().addStep(MovePath.MoveStepType.FORWARDS));\n result.add(right.clone().addStep(MovePath.MoveStepType.FORWARDS));\n }\n right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n result.add(right.addStep(MovePath.MoveStepType.FORWARDS));\n\n // We've got all our next steps.\n return result;\n }\n\n // If the unit is prone or hull-down it limits movement options, unless\n // it's a tank; tanks can just drive out of hull-down and they cannot\n // be prone.\n if (getFinalProne() || (getFinalHullDown() && !(getEntity() instanceof Tank))) {\n if ((last != null) && (last.getType() != MoveStepType.TURN_RIGHT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_LEFT));\n }\n if ((last != null) && (last.getType() != MoveStepType.TURN_LEFT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_RIGHT));\n }\n\n if (getEntity().isCarefulStand()) {\n result.add(clone().addStep(MovePath.MoveStepType.CAREFUL_STAND));\n } else {\n result.add(clone().addStep(MovePath.MoveStepType.GET_UP));\n }\n return result;\n }\n if (canShift()) {\n if (forward && (!backward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_LEFT)))) {\n result.add(clone().addStep(MoveStepType.LATERAL_RIGHT));\n }\n if (forward && (!backward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_RIGHT)))) {\n result.add(clone().addStep(MovePath.MoveStepType.LATERAL_LEFT));\n }\n if (backward\n && (!forward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_LEFT_BACKWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.LATERAL_RIGHT_BACKWARDS));\n }\n if (backward\n && (!forward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_RIGHT_BACKWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.LATERAL_LEFT_BACKWARDS));\n }\n }\n if (forward && (!backward || ((last == null) || (last.getType() != MovePath.MoveStepType.BACKWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.FORWARDS));\n }\n if ((last == null) || (last.getType() != MovePath.MoveStepType.TURN_LEFT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_RIGHT));\n }\n if ((last == null) || (last.getType() != MovePath.MoveStepType.TURN_RIGHT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_LEFT));\n }\n if (backward && (!forward || ((last == null) || (last.getType() != MovePath.MoveStepType.FORWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.BACKWARDS));\n }\n return result;\n }", "List<Direction> getValidDirectionsForMovement();", "@Test(timeout=2000) public void testMovesToReach(){\r\n GameStateSpace states = new GameStateSpace(this.initial);\r\n // For every target state based on the initial game look at a\r\n // target and calculate the moves to reach it\r\n for(int target=0; target<this.targetGameMoves.size(); target++){\r\n GameAndMoves gm = this.targetGameMoves.get(target);\r\n ZombieTrapGame targetGame = gm.game;\r\n List<String> expectMoves = gm.moves;\r\n List<String> actualMoves = states.movesToReach(targetGame);\r\n StringBuilder sb = new StringBuilder(this.name+\"\\n\");\r\n sb.append(\"TARGET GAME NUMBER \"+target+\"\\n\");\r\n \r\n // Check if the moves are equal to the expectation\r\n if(expectMoves==null && actualMoves==null){\r\n continue;\r\n }\r\n else if(expectMoves !=null && expectMoves.equals(actualMoves)){\r\n continue;\r\n }\r\n else if(expectMoves!=null && actualMoves==null){\r\n sb.append(\"State misidentified as NOT reachable\\n\");\r\n sb.append(String.format(\"Expect sequence: %s\\n\",expectMoves));\r\n sb.append(String.format(\"Actual sequence: %s\\n\",actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n\r\n // ALREADY THERE\r\n // If equal length do they produce the correct board: could be\r\n // alternate paths to the same state\r\n ZombieTrapGame game = this.initial.copy();\r\n for(String move : actualMoves){\r\n doShift(game,move);\r\n }\r\n\r\n // ADD THIS CODE to fix a bug in the original test cases\r\n if(expectMoves==null && actualMoves!=null){\r\n sb.append(\"State misidentified as IS reachable\\n\");\r\n sb.append(String.format(\"Expect sequence: %s\\n\",expectMoves));\r\n sb.append(String.format(\"Actual sequence: %s\\n\",actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(String.format(\"Actual End Game:\\n%s\",game));\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n\r\n // ALREADY THERE\r\n if(!game.equals(targetGame)){ // Moves don't lead to target state\r\n sb.append(\"Actual move sequence does not lead to target state\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Actual End Game:\\n%s\",game));\r\n } \r\n // Different path but same length, not an error\r\n else if(actualMoves.size() == expectMoves.size()){\r\n continue;\r\n }\r\n // Check if the moves are longer than the expected\r\n else if(actualMoves.size() > expectMoves.size()){\r\n sb.append(\"Actual move sequence is longer than the expected move sequence\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n }\r\n // A shorter path!?\r\n else {\r\n sb.append(\"Actual move sequence is SHORTER than the expected move sequence\\n\");\r\n sb.append(\"YOU HAVE DISCOVERED A BUG IN THE TEST CASES: NOTIFY THE COURSE INSTRUCTOR\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n }\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n }", "boolean jumpPossible() {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n if (jumpPossible(k)) {\n return true;\n }\n }\n return false;\n }", "List<ValidMove> getValidMoves();", "@Override\n public ArrayList<xMCTSStringGameState> getPossibleMoves(xMCTSStringGameState gameState)\n {\n\t ArrayList<xMCTSStringGameState> posMoves = new ArrayList<xMCTSStringGameState>();\n\t if (gameStatus(gameState) == xMCTSGame.status.ONGOING) {\n\t \t String activeCard = gameState.toString().substring(gameState.toString().length() - 2, gameState.toString().length());\n\t \t int gridSize = SIZE*2;\n\t for (int i = 0; i < gridSize; i += 2) {\n\t for (int j = 0; j < gridSize; j += 2) {\n\t int pos = i * SIZE + j;\n\t if (gameState.toString().charAt(pos) == '_') {\n\t String temp = gameState.toString().substring(0, pos)\n\t \t\t + activeCard\n\t + gameState.toString().substring(pos + 2,\n\t gameState.toString().length());\n\t posMoves.add(new xMCTSStringGameState(temp, 0.0, 0));\n\t }\n\t }\n\n\t }\n\t }\n\t else {\n\t \t // System.out.println(\"No moves can be made from this state\");\n\t \t// callsFromFullBoards++;\n\t \t// System.out.println(\"There have been \" + callsFromFullBoards + \"attempts to get possible moves from a full board\");\n\t }\n\t return posMoves;\n }", "List<Move> getLegalMoves(Player player);", "boolean jumpPossible(int k) {\n if (get(k) != _whoseMove) {\n return false;\n }\n for (int i = -2; i <= 2; i += 2) {\n for (int j = -2; j <= 2; j += 2) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (k % 2 == 0) {\n if (validSquare(nextCol, nextRow)) {\n int mid = (k + index(nextCol, nextRow)) / 2;\n if (get(nextCol, nextRow)\n == EMPTY && get(mid) == get(k).opposite()) {\n return true;\n }\n }\n } else {\n if (i == 0 || j == 0) {\n if (validSquare(nextCol, nextRow)) {\n int mid = (k + index(nextCol, nextRow)) / 2;\n if (get(nextCol, nextRow)\n == EMPTY && get(mid) == get(k).opposite()) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }", "public Collection<Key> getAllPossibleMoves(Key currentKey,\n\t\t\tint numberGeneratedSoFarLength) {\n\n\t\tif (KeyPad.isFirstTwoRows(currentKey)) {\n\t\t\tif (isFirstMove(numberGeneratedSoFarLength)) {\n\t\t\t\taddTwoStepForwardToPositionCache(currentKey);\n\t\t\t} else if (isSecondMove(numberGeneratedSoFarLength)) {\n\t\t\t\tremoveTwoStepForwardFromPositionCache(currentKey);\n\t\t\t}\n\t\t}\n\n\t\treturn positionCache.get(currentKey);\n\t}", "public List<BoardPos> getMoves(BoardPos from) {\n List<BoardPos> result;\n\n // strike check\n if (board.get(from).isCrown())\n result = getStrikesCrown(from);\n else result = getStrikes(from);\n\n // regular moves\n final int[] shifts = {-1, 1};\n if (result.isEmpty() && !board.get(from).isEmpty()) {\n if (board.get(from).isCrown())\n for (int shiftX : shifts)\n for (int shiftY : shifts) {\n BoardPos to = from.add(shiftX, shiftY);\n while (to.inBounds(board.side()) && board.get(to).isEmpty()) {\n result.add(to);\n to = to.add(shiftX, shiftY);\n }\n }\n else for (int shift : shifts) { // add adjacent empty positions\n BoardPos move = from.add(new BoardPos(shift,\n board.get(from).color() ? 1 : -1));\n if (board.get(move) != null && board.get(move).isEmpty())\n result.add(new BoardPos(move));\n } }\n\n // complete by adding the start position to every legal route, so that\n // it will be cleared as well when the player will move\n for (BoardPos pos : result)\n pos.addToRoute(new BoardPos(from));\n\n return result;\n }", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "public String[] getPossibleMoves(Position p)\r\n\t{\r\n\t\tint x,y,z,counter = 0; \r\n\t\tString[] moves;\r\n\t\t\r\n\t\tx = p.getX();\r\n\t\ty = p.getY();\r\n\t\tz = p.getZ();\r\n\t\t\r\n\t\tif(y+1 < maze.length)\r\n\t\t\tif(this.maze[y+1][z][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(y-1 >= 0)\r\n\t\t\tif(this.maze[y-1][z][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(z+1 < maze[0].length)\r\n\t\t\tif(this.maze[y][z+1][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(z-1 >= 0)\r\n\t\t\tif(this.maze[y][z-1][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(x+1 < maze[0][0].length)\r\n\t\t\tif(this.maze[y][z][x+1] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(x-1 >= 0)\r\n\t\t\tif(this.maze[y][z][x-1] == 0)\r\n\t\t\t\tcounter++;\r\n\t\t\r\n\t\tmoves = new String[counter];\r\n\t\tint j = 0;\r\n\t\t\r\n\t\tif(y+1 < maze.length)\r\n\t\t\tif(this.maze[y+1][z][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Up\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(y-1 >= 0)\r\n\t\t\tif(this.maze[y-1][z][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Down\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(z+1 < maze[0].length)\r\n\t\t\tif(this.maze[y][z+1][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Forward\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(z-1 >= 0)\r\n\t\t\tif(this.maze[y][z-1][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Backward\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(x+1 < maze[0][0].length)\r\n\t\t\tif(this.maze[y][z][x+1] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Right\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(x-1 >= 0)\r\n\t\t\tif(this.maze[y][z][x-1] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Left\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\r\n\t\treturn moves;\r\n\t\t\r\n\t}", "public Cell[] way(Cell source, Cell destination) throws ImpossibleMoveException {\n\t\t/*\n\t\t*Если фигура так не ходит, выбрасываем исключение.\n\t\t*/\n\t\tif (!this.validate(source, destination)) {\n\t\t\tthrow new ImpossibleMoveException(\"Rook is not able to move in this destination\");\n\t\t}\n\t\tint wayLength = 0;\n\t\tint startIndex = 0;\n\t\tint endIndex = 0;\n\t\tif (destination.getColumn() == source.getColumn()) {\n\t\t\tif (destination.getRow() > source.getRow()) {\n\t\t\t\twayLength = destination.getRow() - source.getRow();\n\t\t\t\tstartIndex = source.getRow() + 1;\n\t\t\t\tendIndex = destination.getRow() + 1;\n\t\t\t} else {\n\t\t\t\twayLength = source.getRow() - destination.getRow();\n\t\t\t\tstartIndex = destination.getRow();\n\t\t\t\tendIndex = source.getRow();\n\t\t\t}\n\t\t} else {\n\t\t\tif (destination.getColumn() > source.getColumn()) {\n\t\t\t\twayLength = destination.getColumn() - source.getColumn();\n\t\t\t\tstartIndex = source.getColumn() + 1;\n\t\t\t\tendIndex = destination.getColumn() + 1;\n\t\t\t} else {\n\t\t\t\twayLength = source.getColumn() - destination.getColumn();\n\t\t\t\tstartIndex = destination.getColumn();\n\t\t\t\tendIndex = source.getColumn();\n\t\t\t}\n\t\t}\n\t\tCell[] way = new Cell[wayLength];\n\t\tif (destination.getColumn() == source.getColumn()) {\n\t\t\tfor (int k = 0; startIndex < endIndex; startIndex++, k++) {\n\t\t\t\tway[k] = new Cell(destination.getColumn(), startIndex);\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int k = 0; startIndex < endIndex; startIndex++, k++) {\n\t\t\t\tway[k] = new Cell(startIndex, destination.getRow());\n\t\t\t}\n\t\t}\n\t\treturn way;\n\t}", "public static HashSet<gameState> Actions(gameState currentState) {\n\t\t\n\t\tHashSet<gameState> possibleStates = new HashSet<gameState>();\n\t\t\n\t\t\n\t\t// Store which player goes next after this player plays\n\t\tint nextNextUp;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tnextNextUp = 1;\n\t\t} else {\n\t\t\tnextNextUp = 0;\n\t\t}\n\t\t\n\t\t// Store corresponding characters for each player\n\t\t// DARK(X) - 0, LIGHT(O) - 1\n\t\tchar myTile;\n\t\tchar opponentTile;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tmyTile = 'x';\n\t\t\topponentTile = 'o';\n\t\t} else {\n\t\t\tmyTile = 'o';\n\t\t\topponentTile = 'x';\n\t\t}\n\n\t\t\n\n\t\t// Check the entire board of the state \n\t\tfor (int i = 0; i<boardSize; i++) {\n\t\t\tfor (int j = 0; j<boardSize; j++) {\n\t\t\t\t\n\t\t\t\t// If the tile is my tile\n\t\t\t\tif (currentState.getBoard()[i][j] == '_') {\n\t\t\t\t\t\n\t\t\t\t\tchar[][] moveBoard = createNewBoard(currentState);\n\t\t\t\t\t\n\t\t\t\t\t// Up\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If it is an opponent tile, then you keep going up until you either my tile (fail) or\n\t\t\t\t\t\t// a blank space (success/move possible)\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=i;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Down\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=i;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j-1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=j;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j+1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=j;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j-1] == opponentTile) { \n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j+1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j-1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\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} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j+1] == opponentTile) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\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} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\tif (!compareBoards(moveBoard, currentState.getBoard())) {\n\t\t\t\t\t\tgameState move = new gameState(moveBoard, nextNextUp);\t\t\n\t\t\t\t\t\tpossibleStates.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\n\t\treturn possibleStates;\n\t\t\n\t\t\n\t\t\n\t}", "public GameBoard jump(APlayer opponent, Piece piece, int x, int y) {\n GameBoard newBoard = new GameBoard();\n newBoard.getPlayer2().getCheckers().clear();\n newBoard.getPlayer1().getCheckers().clear();\n newBoard.getPlayer1().getCheckers().addAll(this.getCheckers());\n newBoard.getPlayer2().getCheckers().addAll(opponent.getCheckers());\n newBoard.setCurrentTurn(1);\n int row = piece.getRow();\n int column = piece.getColumn();\n Piece piece1 = new Piece(row+2,getColumn(column-2),piece.isKing());\n Piece piece2 = new Piece(row+2,getColumn(column+2),piece.isKing());\n if(piece.isKing() && x < row) {\n Piece piece3 = new Piece(row-2, getColumn(column-2), true);\n Piece piece4 = new Piece(row-2, getColumn(column+2), true);\n if(newBoard.getPlayer1().isValidJump(newBoard.getPlayer2(),piece3,x,y,4) || x==row-2 && y==getColumn(column-2) && hasPlayers(opponent, row-1, getColumn(column-1)) &&\n isEmpty(opponent, row-2, getColumn(column-2))) {\n newBoard.getPlayer2().getCheckers().remove(new Piece(row-1,getColumn(column-1)));\n newBoard.getPlayer1().getCheckers().remove(piece);\n newBoard.getPlayer1().getCheckers().add(piece3);\n return newBoard.getPlayer1().jump(newBoard.getPlayer2(), piece3, x, y);\n }\n if (newBoard.getPlayer1().isValidJump(newBoard.getPlayer2(),piece4,x,y,4) || x==row-2 && y==getColumn(column+2) && hasPlayers(opponent, row-1,getColumn(column+1)) &&\n isEmpty(opponent, row-2, getColumn(column+2))) {\n newBoard.getPlayer2().getCheckers().remove(new Piece(row-1, getColumn(column+1)));\n newBoard.getPlayer1().getCheckers().remove(piece);\n newBoard.getPlayer1().getCheckers().add(piece4);\n return newBoard.getPlayer1().jump(newBoard.getPlayer2(), piece4, x, y);\n }\n } else if (newBoard.getPlayer1().isValidJump(newBoard.getPlayer2(),piece1,x,y,4) || x==row+2 && y== getColumn(column-2) && hasPlayers(opponent, row +1, getColumn(column -1)) &&\n isEmpty(opponent, row +2, getColumn(column -2))) {\n newBoard.getPlayer2().getCheckers().remove(new Piece(row+1, getColumn(column-1)));\n newBoard.getPlayer1().getCheckers().remove(piece);\n if (x == 7) {\n piece1.setKing(true);\n }\n newBoard.getPlayer1().getCheckers().add(piece1);\n return newBoard.getPlayer1().jump(newBoard.getPlayer2(), piece1, x, y);\n } else if (newBoard.getPlayer1().isValidJump(newBoard.getPlayer2(),piece2,x,y,4) || x==row+2 && y== getColumn(column+2) && hasPlayers(opponent, row +1, getColumn(column +1)) &&\n isEmpty(opponent, row +2, getColumn(column +2))) {\n newBoard.getPlayer2().getCheckers().remove(new Piece(row+1, getColumn(column+1)));\n newBoard.getPlayer1().getCheckers().remove(piece);\n if (x == 7) {\n piece2.setKing(true);\n }\n newBoard.getPlayer1().getCheckers().add(piece2);\n return newBoard.getPlayer1().jump(newBoard.getPlayer2(), piece2, x, y);\n }\n newBoard.getPlayer1().getCheckers().remove(piece);\n if (x == 7) {\n piece.setKing(true);\n }\n newBoard.getPlayer1().getCheckers().add(new Piece(x,y,piece.isKing()));\n return newBoard;\n }", "protected ArrayList<ArrayList<Node>> getNextJumps(Location loc, ArrayList<Location> pastJumpLocs)\n\t{\n\t\tArrayList<ArrayList<Node>> retVal = new ArrayList<ArrayList<Node>>();\n\t\t\n\t\tArrayList<Location> jumps = new ArrayList<Location>();\n\t\t\n\t\tfor(int i = -1 ; i <= 1; i += 2)\n\t\t{\n\t\t\tfor(int j = -1 ; j <= 1; j += 2)\n\t\t\t{\n\t\t\t\tLocation possibleJumpLoc = new Location(loc.getRow() + 2*j, loc.getCol() + 2*i);\n\t\t\t\t\n\t\t\t\tLocation interJumpLoc = new Location(loc.getRow() + j, loc.getCol() + i);\n\t\t\t\t\n\t\t\t\tif(getBoard().isValid(possibleJumpLoc) && getBoard().getPiece(possibleJumpLoc) == null && getBoard().getPiece(interJumpLoc) != null && getBoard().getPiece(interJumpLoc).getLoyalty() != this.getLoyalty())\n\t\t\t\t{\n\t\t\t\t\tboolean isValid = true;\n\t\t\t\t\t\n\t\t\t\t\tfor(Location pastJumpLoc : pastJumpLocs)\n\t\t\t\t\t{\n\t\t\t\t\t\tif((interJumpLoc.getRow() == pastJumpLoc.getRow()) && (interJumpLoc.getCol() == pastJumpLoc.getCol()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif(isValid)\n\t\t\t\t\t{\n\t\t\t\t\t\tjumps.add(possibleJumpLoc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Location jump : jumps)\n\t\t{\n\t\t\tArrayList<Location> newPastJumpLocs = (ArrayList<Location>) pastJumpLocs.clone();\n\t\t\t\n\t\t\tnewPastJumpLocs.add(new Location((loc.getRow() + jump.getRow())/2, (loc.getCol() + jump.getCol())/2));\n\t\t\t\n\t\t\tArrayList<ArrayList<Node>> movesOfCurrent = getNextJumps(jump, newPastJumpLocs);\n\t\t\t\n\t\t\tfor(ArrayList<Node> thisMoveOfCurrent : movesOfCurrent)\n\t\t\t{\n\t\t\t\tthisMoveOfCurrent.add(0, getBoard().getNode(loc));\n\t\t\t\tretVal.add(thisMoveOfCurrent);\n\t\t\t}\n\t\t}\n\n\t\tif(retVal.isEmpty())\n\t\t{\n\t\t\tArrayList<Node> thisLoc = new ArrayList<Node>();\n\t\t\tthisLoc.add(getBoard().getNode(loc));\n\t\t\t\n\t\t\tretVal.add(thisLoc);\n\t\t}\n\t\t\n\t\treturn retVal;\n\t}", "public List<Grid> getPossibleMoves(Grid g){\n\t\tint i=g.row, j=g.col;\n\t\tif(i>=0 && i<data.length && j>=0 && j<data[i].length){\n\t\t\tList<Grid> list=new ArrayList<>();\n\t\t\tif(isFree(i, j-1)) list.add(new Grid(i,j-1));\n\t\t\tif(isFree(i-1, j-1)) list.add(new Grid(i-1,j-1));\n\t\t\tif(isFree(i-1, j)) list.add(new Grid(i-1,j));\n\t\t\tif(isFree(i-1, j+1)) list.add(new Grid(i-1,j+1));\n\t\t\tif(isFree(i, j+1)) list.add(new Grid(i,j+1));\n\t\t\tif(isFree(i+1, j+1)) list.add(new Grid(i+1,j+1));\n\t\t\tif(isFree(i+1, j)) list.add(new Grid(i+1,j));\n\t\t\tif(isFree(i+1, j-1)) list.add(new Grid(i+1,j-1));\n\t\t\treturn list;\n\t\t}\n\t\treturn null;\n\t}", "public abstract HashSet<Location> getPossibleMovements(GameBoard board);", "public ArrayList<ArrayList<Move>> getMoves(int color){//TODO\n \tArrayList<ArrayList<Move>> moves = new ArrayList<ArrayList<Move>>();\n \tboolean jumpsExist = false;\n \t//look for jumps\n \t//search the board for pieces of your color\n for (int i=0; i<8; i++){\n \tfor(int j=0; j<8; j++){\n \t\t//if the piece is the right color\n \t\tif ((gameState.getStateOfSquare(i, j) != 0)&&(gameState.getStateOfSquare(i, j)%2 == color)){\n// \t\t\tSystem.out.println(\"found a piece you own\");\n \t\t\t//find all jumps of that piece\n \t\t\t//get jumps\n \t\t\tArrayList<ArrayList<Move>> jumps = getJumps(color, i, j);\n \t\t\t//if there are jumps return only the jumps\n \t\t\tif (jumps.isEmpty() == false){\n \t\t\t\tmoves.addAll(jumps);\n \t\t\t\tjumpsExist = true;\n \t\t\t}\n \t\t}\n \t}\n }\n if (jumpsExist == false){\n\t //look for diagonals\n\t \t//search the board for pieces of your color\n\t for (int i=0; i<8; i++){\n\t \tfor(int j=0; j<8; j++){\n\t \t\t//if the piece is the right color\n\t \t\tif ((gameState.getStateOfSquare(i, j) != 0)&&(gameState.getStateOfSquare(i, j)%2 == color)){\n//\t \t\t\tSystem.out.println(\"found a piece you own\");\n\t \t\t\t//get diagonals\n\t \t\t\t//try up right\n\t \t\t\tMove tryMove = new Move(i,j,i+1,j+1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try up left\n\t \t\t\ttryMove = new Move(i,j,i-1,j+1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try down right\n\t \t\t\ttryMove = new Move(i,j,i+1,j-1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try down left\n\t \t\t\ttryMove = new Move(i,j,i-1,j-1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t }\n\t }\n if (moves.isEmpty() == true){\n \tnoMoves = true;\n }\n \t\t\t//\n \treturn moves;\n }", "public ArrayList<Location> getMoveLocations()\n {\n ArrayList<Location> locs = new ArrayList<Location>();\n ArrayList<Location> validLocations = getGrid().getValidAdjacentLocations(getLocation());\n for (Location neighborLoc : validLocations)\n {\n if (getGrid().get(neighborLoc) == null || getGrid().get(neighborLoc) instanceof AbstractPokemon || getGrid().get(neighborLoc) instanceof PokemonTrainer)\n locs.add(neighborLoc);\n }\n return locs;\n }", "void simulateMove(CheckersData cur_board, CheckersMove move, int player) {\n\n cur_board.makeMove(move);\n\n /* If the move was a jump, it's possible that the player has another\n jump. Check for legal jumps starting from the square that the player\n just moved to. If there are any, the player must jump. The same\n player continues moving. That means their could be another choice to make.\n */\n if (move.isJump()) {\n CheckersMove[] newMoves;\n newMoves = cur_board.getLegalJumpsFrom(player, move.toRow, move.toCol);\n if (newMoves != null) {\n simulateMove(cur_board, newMoves[0], player);\n }\n \t // we have to keep jumping until we can't! If there is more than one jump\n // we are just going to have to pick the first one. More logic could go here\n }\n return;\n }", "public static int[][] getPlayerFullMove(int[][] board, int player) {\r\n\t\t// Get first move/jump\r\n\t\tint fromRow = -1, fromCol = -1, toRow = -1, toCol = -1;\r\n\t\tboolean jumpingMove = canJump(board, player);\r\n\t\tboolean badMove = true;\r\n\t\tgetPlayerFullMoveScanner = new Scanner(System.in);//I've modified it\r\n\t\twhile (badMove) {\r\n\t\t\tif (player == 1){\r\n\t\t\t\tSystem.out.println(\"Red, Please play:\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Blue, Please play:\");\r\n\t\t\t}\r\n\r\n\t\t\tfromRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\tfromCol = getPlayerFullMoveScanner.nextInt();\r\n\r\n\t\t\tint[][] moves = jumpingMove ? getAllBasicJumps(board, player) : getAllBasicMoves(board, player);\r\n\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, MARK);\r\n\t\t\ttoRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\ttoCol = getPlayerFullMoveScanner.nextInt();\r\n\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, EMPTY);\r\n\r\n\t\t\tbadMove = !isMoveValid(board, player, fromRow, fromCol, toRow, toCol); \r\n\t\t\tif (badMove)\r\n\t\t\t\tSystem.out.println(\"\\nThis is an illegal move\");\r\n\t\t}\r\n\r\n\t\t// Apply move/jump\r\n\t\tboard = playMove(board, player, fromRow, fromCol, toRow, toCol);\r\n\t\tshowBoard(board);\r\n\r\n\t\t// Get extra jumps\r\n\t\tif (jumpingMove) {\r\n\t\t\tboolean longMove = (getRestrictedBasicJumps(board, player, toRow, toCol).length > 0);\r\n\t\t\twhile (longMove) {\r\n\t\t\t\tfromRow = toRow;\r\n\t\t\t\tfromCol = toCol;\r\n\r\n\t\t\t\tint[][] moves = getRestrictedBasicJumps(board, player, fromRow, fromCol);\r\n\r\n\t\t\t\tboolean badExtraMove = true;\r\n\t\t\t\twhile (badExtraMove) {\r\n\t\t\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, MARK);\r\n\t\t\t\t\tSystem.out.println(\"Continue jump:\");\r\n\t\t\t\t\ttoRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\t\t\ttoCol = getPlayerFullMoveScanner.nextInt();\r\n\t\t\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, EMPTY);\r\n\r\n\t\t\t\t\tbadExtraMove = !isMoveValid(board, player, fromRow, fromCol, toRow, toCol); \r\n\t\t\t\t\tif (badExtraMove)\r\n\t\t\t\t\t\tSystem.out.println(\"\\nThis is an illegal jump destination :(\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply extra jump\r\n\t\t\t\tboard = playMove(board, player, fromRow, fromCol, toRow, toCol);\r\n\t\t\t\tshowBoard(board);\r\n\r\n\t\t\t\tlongMove = (getRestrictedBasicJumps(board, player, toRow, toCol).length > 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn board;\r\n\t}", "public Iterable<Board> solution() {\n if (!isSolvable()) {\n return null;\n }\n\n Stack<Board> solution = new Stack<Board>();\n\n Move current = finalMove;\n while (current.previous != null) {\n solution.push(current.board);\n current = current.previous;\n }\n solution.push(current.board);\n\n return solution;\n }", "public AgentAction getNextMove(GameTile [][] visibleMap) {\r\n\t\t//Possible things to add to your moves\r\n//\t\tnextMove = AgentAction.doNothing;\r\n//\t\tnextMove = AgentAction.moveDown;\r\n//\t\tnextMove = AgentAction.moveUp;\r\n//\t\tnextMove = AgentAction.moveUp;\r\n//\t\tnextMove = AgentAction.moveLeft;\r\n//\t\tnextMove = AgentAction.pickupSomething;\r\n//\t\tnextMove = AgentAction.declareVictory;\r\n//\r\n//\t\tnextMove = AgentAction.shootArrowNorth;\r\n//\t\tnextMove = AgentAction.shootArrowSouth;\r\n//\t\tnextMove = AgentAction.shootArrowEast;\r\n//\t\tnextMove = AgentAction.shootArrowWest;\r\n//\t\tnextMove = AgentAction.quit\r\n\t\t\r\n\t\t\r\n\r\n\t\t//Ideally you would remove all this code, but I left it in so the keylistener would work\r\n\t\tif(keyboardPlayOnly) {\r\n\t\t\tif(nextMove == null) {\r\n\t\t\t\treturn AgentAction.doNothing;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tAgentAction tmp = nextMove;\r\n\t\t\t\tnextMove = null;\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//This code plays 5 \"games\" and then quits\r\n\t\t\t//Just does random things\r\n\t\t\tif(numGamesPlayed > 19) {\r\n\t\t\t\treturn AgentAction.quit;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(nextMoves.isEmpty()) {\r\n\t\t\t\t\tsetStartingPosition(visibleMap);\r\n//\t\t\t\t\tfindWumpus(visibleMap);\r\n//\t\t\t\t\tfindWumpus(visibleMap);\r\n//\t\t\t\t\tWumpusState currentState = huntTheWumpus(visibleMap);\r\n//\t\t\t\t\tSystem.out.println(wumpusHunted);\r\n//\t\t\t\t\tif(wumpusHunted) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\t\taddToNextMoves(currentState);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//this is the code to collect the gold\r\n//\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\tcurrentState = findTheGold(currentState);\r\n//\t\t\t\t\tif(currentState.getGoldCollected()) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\t\taddToNextMoves(currentState);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tif(!goldCollected) {\r\n\t\t\t\t\t\twellItsDarkNow(visibleMap);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(goldCollected) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n\t\t\t\t\t\taddToNextMoves(visibleMap);\r\n//\t\t\t\t\t\tgoldCollected = false;\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\tif(!nextMoves.isEmpty()) {\r\n\t\t\t\t\tSystem.out.println(nextMoves.peek());\r\n\t\t\t\t\tsetNextMove(nextMoves.remove());\r\n//\t\t\t\t\tSystem.out.println(nextMove);\r\n//\t\t\t\t\treturn nextMove;\r\n\t\t\t\t}\r\n\t\t\t\treturn nextMove;\r\n//\t\t\t\tcurrentNumMoves++;\r\n//\t\t\t\tif(currentNumMoves < 20) {\r\n//\t\t\t\t\treturn AgentAction.randomAction();\r\n//\t\t\t\t}\r\n//\t\t\t\telse {\r\n//\t\t\t\t\treturn AgentAction.declareVictory;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public Position[] getCanMoves() {\n PieceWay way = new PieceWay(getPosition());\n Position[] PawnWay = way.waysPawnPos(color);\n return PawnWay;\n }", "List<Moves> getMoveSet();", "public List<String> legalMoves() {\n List<String> result = new ArrayList<>();\n for (int col = 1; col < _board.length + 1; col += 1) {\n for (int row = 1; row < _board.length + 1; row += 1) {\n String move = row + \",\" + col;\n if (isLegal(move)) {\n result.add(move);\n }\n }\n }\n return result;\n }", "public void getPossibleMoves() {\n\t\tGameWindow.potentialMoves.clear();\n\t}", "@Override\r\n\tpublic ArrayList<String> allPossibleMoves(boolean whoPlays) {\r\n\t\t\r\n\t\tArrayList<String> Moves = new ArrayList<String>();\r\n\t\t\r\n\t\tif(whoPlays) {\r\n\t\t\tif( (new Board2048model(this)).moveUP()) \r\n\t\t\tMoves.add(\"UP\");\r\n\t\t\tif( (new Board2048model(this)).moveDOWN()) \r\n\t\t\tMoves.add(\"DOWN\");\r\n\t\t\tif( (new Board2048model(this)).moveRIGHT()) \r\n\t\t\tMoves.add(\"RIGHT\");\r\n\t\t\tif( (new Board2048model(this)).moveLEFT()) \r\n\t\t\tMoves.add(\"LEFT\");\r\n\t\t\t}\r\n\t\telse { \r\n\t\t\tfor( int i = 0; i < rows_size ; i++) {\r\n\t\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\t\tif(isEmpty(i,j)) {\r\n\t\t\t\t\t\tMoves.add(new String(Integer.toString(i) + \",\" + Integer.toString(j) + \",\" + Integer.toString(2)));\r\n\t\t\t\t\t\tMoves.add(new String(Integer.toString(i) + \",\" + Integer.toString(j) + \",\" + Integer.toString(4)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\treturn Moves;\r\n\t}", "public static int [][] getRestrictedBasicJumps(int[][] board, int player, int row, int col) {\r\n\t\t\r\n\t\tint[][] moves = new int [0][4];\r\n\t\tint[][] SaveMoves = new int [0][4];/*save our moves of the soldures*/\r\n\t\tint SumAllMove=0; /*varibel ho count all the posible moves*/\r\n\t\t\r\n\t\t//tow loops running in the 4 Jumps of the soldures\r\n\t\tfor(int indxMove1=-2;indxMove1<3;indxMove1=indxMove1+4){\r\n\t\t\tfor(int indxMove2=-2;indxMove2<3;indxMove2=indxMove2+4){\r\n\t\t\t\tboolean MovePossible = isBasicJumpValid (board,player,row,col,row+indxMove1,col+indxMove2);/*Check if the move is legal*/\r\n\t\t\t\tif (MovePossible){/*if the move legal enter the move in the arry*/\r\n\t\t\t\t\tSumAllMove=SumAllMove+1;\r\n\t\t\t\t\tSaveMoves = moves;\r\n\t\t\t\t\tmoves = new int [SumAllMove][4];\r\n\t\t\t\t\tmoves [SumAllMove-1][0]=row;\r\n\t\t\t\t\tmoves [SumAllMove-1][1]=col;\r\n\t\t\t\t\tmoves [SumAllMove-1][2]=row+indxMove1;\r\n\t\t\t\t\tmoves [SumAllMove-1][3]=col+indxMove2;\t\t\t\r\n\t\t\t\t\tif (SumAllMove>1) {\r\n\t\t\t\t\t\tfor (int idxSAM1=SumAllMove-2;idxSAM1>-1;idxSAM1=idxSAM1-1){\r\n\t\t\t\t\t\t\tfor (int idxSAM2=0;idxSAM2<4;idxSAM2=idxSAM2+1){\r\n\t\t\t\t\t\t\t\tmoves[idxSAM1][idxSAM2]=SaveMoves[idxSAM1][idxSAM2];\r\n\t\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}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn moves;\r\n\t}", "List<Cell> getPossibleMoves(Board board,\n Color color) {\n List<Cell> possible_moves = new ArrayList<Cell>();\n boolean flip_dir = false;\n //loop through all cells in board\n for (int i = 0; i < board.getRows(); i++) {\n for (int j = 0; j < board.getCols(); j++) {\n //check in all directions if move will flip cells\n for (Direction d : Direction.values()) {\n flip_dir = flipInDirection(board, i, j, d, color);\n if (flip_dir) {\n possible_moves.add(board.getCell(i,j));\n break;\n }\n }\n }\n }\n return possible_moves;\n }", "public boolean attemptMove(Move move, int color) {\n //ArrayList<Move> jumps = canJump(color);\n //make sure the to and from values don't go out of bounds\n if (move.xFrom > 7 || move.yFrom > 7 || move.xTo > 7 || move.yTo > 7 ||\n \tmove.xFrom < 0 || move.yFrom < 0 || move.xTo < 0 || move.yTo < 0 ){\n// System.out.println(\"out of bounds\");\n return false;\n }\n int stateOfFrom = gameState.getStateOfSquare(move.xFrom, move.yFrom);\n int stateOfTo = gameState.getStateOfSquare(move.xTo, move.yTo);\n \n\n //if there in no piece in the \"from\" location return false\n if (stateOfFrom == 0){\n// System.out.println(\"no piece at 'from'\");\n return false;\n }\n \n //if there is a piece in the \"to\" location return false\n if (!(stateOfTo == 0)){\n// System.out.println(\"'to' is not empty\");\n return false;\n }\n \n //if the \"from\" piece is not the correct color return false\n if (!(gameState.getStateOfSquare(move.xFrom, move.yFrom)%2 == color))\n {\n// System.out.println(\"that is not your piece\");\n return false;\n }\n \n //check if the \"from\" piece is moving in the right direction\n \n /*if (jumps.isEmpty() == false) //if there are jumps.\n {\n System.out.println(\"there are jumps\");\n //for every possible jump\n for (int i=0; i<jumps.size(); i++){\n \t//if this move matches a possible jump then it is valid\n \tSystem.out.println(\"is this jump \"+ i + \"?\");\n \tif ((move.xFrom == jumps.get(i).xFrom)&&\n \t\t\t(move.yFrom == jumps.get(i).yFrom)&&\n \t\t\t(move.xTo == jumps.get(i).xTo)&&\n \t\t\t(move.yTo == jumps.get(i).yTo)){\n \t\tSystem.out.println(\"yes\");\n \t\treturn true;\n \t}\n \telse{\n \t\tSystem.out.println(\"there are possible jumps\");\n \t}\n \t\t\n \t\n }\n //return false;\n \n //handle jumps\n }\n */\n //moving diagonally\n else{\n if (move.xTo == move.xFrom + 1 || move.xTo == move.xFrom - 1){\n //if (stateOfFrom >= 3) \n //if piece is king it can move both forward and back\n if (stateOfFrom >= 3 && (move.yTo == move.yFrom + 1 || move.yTo == move.yFrom - 1)){\n \treturn true;\n }\n //red can only move up\n else if(color == 0 && (move.yTo == move.yFrom + 1)){\n \treturn true;\n }\n //black can only move down\n else if(color == 1 && (move.yTo == move.yFrom - 1)){\n \treturn true;\n }\n else{\n// System.out.println(\"wrong way\");\n return false;\n }\n }\n else{\n// System.out.println(\"too far away\");\n return false;\n }\n }\n //return true;\n \n \n }", "public List<PossibleMove> getPossibleMoves(char color) {\r\n\t\tif (color != 'B' && color != 'W') {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Error! Invalid color. Expected B or W.\");\r\n\t\t}\r\n\r\n\t\tList<PossibleMove> posMoves = new ArrayList<PossibleMove>();\r\n\t\tthis.findPossibleMoves(color);\r\n\t\tCollections.sort(possibleMoves);\r\n\t\tfor (PossibleMove p : possibleMoves) {\r\n\t\t\tposMoves.add(new PossibleMove(p.getColumn(), p.getLine()));\r\n\t\t}\r\n\t\treturn posMoves;\r\n\t}", "public void doubleJump() {\n\t\tmultipleJump = true;\n\t\tint pieceJumping = arr[prevPosX][prevPosY];\n\t\tLogic.arr[prevPosX][prevPosY] = 0;\n\t\tLogic.arr[prevPosX + (xdiff * 2)][prevPosY + (ydiff * 2)] = 0;\n\t\tLogic.arr[prevPosX + (xdiff * 3)][prevPosY + (ydiff * 3)] = 0;\n\t\tif (prevPosX + (xdiff * 4) == 7 || prevPosX + (xdiff * 4) == 0) {\n\t\t\tif (pieceJumping < 3) // If the piece is a pawn\n\t\t\t\tsetPieceJumpingToArr(pieceJumping + 2); // Make a king\n\t\t\telse\n\t\t\t\tsetPieceJumpingToArr(pieceJumping); // Set the king on row 0 or 7\n\t\t} else\n\t\t\tsetPieceJumpingToArr(pieceJumping); // Set the piece\n\t\tP2P.pieceMoveChanger();\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(arr[i][j]);\n\t\t}\n\t}", "public abstract ArrayList<Move> possibleMoves(Board board);", "public ArrayList<PentagoGame> nextPossibleMoves() {\n ArrayList<PentagoGame> children = new ArrayList<>();\n for(int i = 0; i < 6; i++) { // for each row I can place a piece\n for(int j = 0; j < 6; j++) { // for each column\n for(int k = 0; k < 4; k++ ) { // for each board to rotate\n for(int d = 0; d < 2; d ++) {// for each direction to rotate\n boolean leftRotate = false;\n if(d == 0) {\n leftRotate = true;\n }\n Move move = new Move(i, j, k, leftRotate);\n if(validMove(whosTurn(), move)) {\n PentagoGame tempGame = new PentagoGame(this);\n tempGame.playPiece(whosTurn(), move);\n tempGame.rotateBoard(whosTurn(), move);\n tempGame.turnOver();\n move.setGameState(tempGame);\n move.setUtility(calulateUtility(move));\n // todo\n children.add(tempGame);\n }\n }\n }\n }\n }\n\n return children;\n }", "@Override\n public Map<Coordinate, List<Coordinate>> getAllLegalMoves(List<Integer> playerStates) {\n Map<Coordinate, List<Coordinate>> allLegalMoves = new TreeMap<>();\n for (List<GamePiece> row: myGamePieces) {\n for(GamePiece currPiece: row){\n if (playerStates.contains(currPiece.getState()) || currPiece.getState() == myEmptyState) {\n Coordinate currCoord = currPiece.getPosition();\n List<Coordinate> moves = currPiece.calculateAllPossibleMoves(getNeighbors(currPiece), playerStates.get(0));\n if (moves.size() > 0) {\n allLegalMoves.put(currCoord, moves);\n }\n }\n }\n }\n return allLegalMoves;\n }", "public ArrayList<MoveType> getMoves(BotState state, long timeout) {\n ArrayList<MoveType> moves = new ArrayList<MoveType>();\n\n Field field = state.getMyField();\n ShapeType current = state.getCurrentShape();\n ShapeType next = state.getNextShape();\n int myCombo = state.getMyCombo();\n\n Shape piece = new Shape(current, field, state.getShapeLocation());\n Shape nextPiece = new Shape(next, field, (next == ShapeType.O) ? new Point(4, -1) : new Point(3, -1));\n\n Best best = getBestFitness(field, piece, myCombo, nextPiece);\n\n int bestRot = best.bestRot;\n int bestLeft = best.bestLeft;\n\n for (; bestRot > 0; bestRot--)\n moves.add(MoveType.TURNRIGHT);\n if (bestLeft < 0)\n for (; bestLeft < 0; bestLeft++)\n moves.add(MoveType.RIGHT);\n else\n for (; bestLeft > 0; bestLeft--)\n moves.add(MoveType.LEFT);\n\n moves.add(MoveType.DROP);\n return moves;\n }", "private List<Swap> getJumpingSwaps(int[] cycle) {\n List<Swap> jumpingSwaps = new ArrayList<>();\n for (int i = 0; i < cycle.length; i++) {\n for (int j = i + 2; j < cycle.length; j++) {\n int a = cycle[i], b = cycle[j];\n if (robot[a][b]) jumpingSwaps.add(new Swap(a, b));\n }\n }\n\n return jumpingSwaps;\n }", "@Override\r\n public List<Move> getLegalMoves(MachineState state, Role role)\r\n throws MoveDefinitionException {\r\n \tclearpropnet();\r\n \tmarkbases(state.getContents());\r\n \tMap<Role, Set<Proposition>> legalPropositions = propNet.getLegalPropositions();\r\n \tSet<Proposition> legals = legalPropositions.get(role);\r\n \tList<Move> actions = new ArrayList<Move>();\r\n \tfor(Proposition p: legals){\r\n \t\tif(p.propmark()){\r\n \t\t\tactions.add(getMoveFromProposition(p));\r\n \t\t}\r\n \t}\r\n\t\treturn actions;\r\n }", "public List<Move> getAvailableSpaces() {\n List<Move> availableMoves = new ArrayList<>();\n for (int i = 0; i < LENGTH; i++) {\n for (int j = 0; j < LENGTH; j++) {\n Move move = new Move(i, j);\n if (isValidMove(move)) {\n availableMoves.add(move);\n }\n }\n }\n return availableMoves;\n }", "public int[] getAllPossibleMoves(boolean ignore) {\n int[] validMoves;\n int[] validMovesResized;\n int validMovesIndex = 0;\n int startRow = this.getRow();\n int startCol = this.getCol();\n \n validMoves = new int[28]; // For a bishop, there are a maximum of 14 possible squares it could move to\n\n // First move from the bishops spot up diagonally to the right (ie col++, row++)\n for (int i = startCol+1, j = startRow+1; i<=8 && j<8; i++,j++) {\n validMoves[validMovesIndex] = i; // the col\n validMoves[validMovesIndex + 1] = j; // the row\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the right (ie col++, row--)\n for (int i = startCol+1, j = startRow-1; i<=8 && j>0; i++,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the left (ie col--, row--)\n for (int i = startCol-1, j = startRow-1; i>0 && j>0; i--,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n // Next move from the bishops start spot up diagonally to the left (ie col--, row++)\n for (int i = startCol-1, j = startRow+1; i>0 && j<=8; i--,j++) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n \n // depending on the position of the bishop, the final array of possible moves may not have 14 squares\n // although that is the maximum. Create a new array of the actual size and copy into it.\n validMovesResized = Arrays.copyOf(validMoves, validMovesIndex);\n return validMovesResized;\n }", "@Override\n\tpublic Collection<Move> calculateLegalMoves(final Board board) {\n\t\t\n\t\t//Array that will hold of the legal moves for the Pawn\n\t\tfinal List<Move> legalMoves = new ArrayList<>();\n\t\t\n\t\t//Loop through all possible moves by applying of the offsets to the Pawn's current position\n\t\tfor(final int currentCandidateOffset: CANDIDATE_MOVE_COORDINATES){\n\t\t\t\n\t\t\t//Apply the offset to the Pawn's current position\n\t\t\tfinal int candidateDestinationCoordinate = this.piecePosition + (this.getPieceTeam().getDirection() * currentCandidateOffset);\n\t\t\t\n\t\t\t//Checks if the Destination Coordinate is valid\n\t\t\tif(!BoardUtils.isValidTileCoordinate(candidateDestinationCoordinate)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Checks if this tile is occupied\n\t\t\tif(currentCandidateOffset == 8 && !board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnMove(board, this, candidateDestinationCoordinate)));\n\t\t\t\telse\n\t\t\t\t\tlegalMoves.add(new Move.PawnMove(board, this, candidateDestinationCoordinate));\t\n\t\t\t}\n\t\t\t//Checks if the Pawn is on it's first move\n\t\t\telse if(currentCandidateOffset == 16 && this.isFirstMove() && ((BoardUtils.SEVENTH_RANK[this.piecePosition] && \n\t\t\t\t\tthis.getPieceTeam().isBlack()) || (BoardUtils.SECOND_RANK[this.piecePosition] && this.getPieceTeam().isWhite()))) {\n\t\t\t\t\n\t\t\t\t//Calculate coordinate of the tile behind candidate coordinate\n\t\t\t\tfinal int behindCandidateDestinationCoordinate = this.piecePosition + (this.pieceTeam.getDirection() * 8);\n\t\t\t\t\n\t\t\t\t//Checks if the tile behind the candidate destination is NOT occupied & if the Tile at the Candidate Destination is NOT occupied\n\t\t\t\tif(!board.getTile(behindCandidateDestinationCoordinate).isTileOccupied() && \n\t\t\t !board.getTile(candidateDestinationCoordinate).isTileOccupied())\n\t\t\t\t\t\tlegalMoves.add(new Move.PawnJump(board, this, candidateDestinationCoordinate));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t//Checks for edge cases in the 7 direction\t\n\t\t\t} else if(currentCandidateOffset == 7 &&\n\t\t\t\t\t!((BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t\n\t\t\t\t//This basically checks if En Passant Pawn is next to Player's pawn\t\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition + (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\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//Checks for edge cases in the 9 direction\t\n\t\t\t} else if(currentCandidateOffset == 9 && \n\t\t\t\t\t!((BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition - (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\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}\n\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn ImmutableList.copyOf(legalMoves);\n\t}", "public ArrayList<Pair<Coord,Coord>> returnMoves(Board b) {\r\n\t\t//copy Piece grid\r\n\t\tPiece[][] g = b.getGrid();\r\n\t\t\r\n\t\t//return array of all the possible moves\r\n\t\tArrayList<Pair<Coord,Coord>> possibleMoves = new ArrayList<Pair<Coord,Coord>>();\r\n\r\n\t\t//System.out.println(team + \": (\" + c.y + \", \" + c.x + \")\");\r\n\t\t//if the team is moving north (white team)\r\n\t\tif(team) {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y-1][c.x] == null && g[c.y-2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-2,c.x),null));\r\n\t\t\t\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y-1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y-1][c.x-1]!=null && (!g[c.y-1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y-1][c.x+1]!=null && (!g[c.y-1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==3 && g[c.y-1][c.x-1]==null && g[c.y][c.x-1]!=null && !g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==3 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && !g[c.y][c.x+1].team\r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t//if the team is moving south (black team)\r\n\t\t} else {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y+1][c.x] == null && g[c.y+2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+2,c.x),null));\r\n\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y+1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y+1][c.x-1]!=null && (g[c.y+1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y+1][c.x+1]!=null && (g[c.y+1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==4 && g[c.y+1][c.x-1]==null && g[c.y][c.x-1]!=null && g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==4 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && g[c.y][c.x+1].team \r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\treturn possibleMoves;\r\n\t}", "public List<ScoredMove> allValidMoves(GameState gm){\n\t\tList<ScoredMove> validMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\t// check for draw move\n\t\tif (getDeckSize() > 0) {\n\t\t\tvalidMoves.add(new ScoredMove(ACTION.DRAW, null, null));\n\t\t}\n\t\t/*\n\t\telse {\n\t\t\t// check for discarding move (note: only allowing if decksize is empty)\n\t\t\tfor (Card c: getHand().getCards()){\n\t\t\t\tif (!(c instanceof MerchantShip)) {\n\t\t\t\t\tvalidMoves.add(new ScoredMove(ACTION.DISCARD, c, null));\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t\t\n\t\tvalidMoves.addAll(allDiscardMoves(gm));\n\t\t\n\t\t// check for playing merchant ships\n\t\tvalidMoves.addAll(allmShipMoves(gm));\n\t\t\n\t\t// add all attacks\n\t\tvalidMoves.addAll(allAttackMoves(gm));\n\t\t\n\t\tif (super.getVerbosity()) {\n\t\t\tSystem.out.println(\"Valid moves found: \" + validMoves.size());\n\t\t}\n\t\treturn validMoves;\n\t}", "public abstract List<Move> getLegalMoves(MachineState state, Role role) throws MoveDefinitionException, StateMachineException;", "@Test\n public void isJumpActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P21,\n CheckersPosition.P17);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentWhite, CheckersPosition.P09,\n CheckersPosition.P14);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P22,\n CheckersPosition.P18);\n action.doIt();\n }\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can jump his token over a red token to an empty space.\n assertTrue(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P21));\n\n // Agent white cannot jump his token to an occupied space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P23));\n\n // Agent white cannot jump his token to an adjacent empty space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P10,\n CheckersPosition.P15));\n\n // Agent white cannot jump his own token.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P08,\n CheckersPosition.P15));\n }", "private Collection<KeyPadPosition> getStandardPossibleMovesFromCentre() {\n\t\tif (possibleStandardMovesFromOrigin == null) {\n\t\t\tpossibleStandardMovesFromOrigin = new HashSet<KeyPadPosition>();\n\t\t\tpossibleStandardMovesFromOrigin.add(STAY_STILL);\n\t\t\tpossibleStandardMovesFromOrigin.add(ONE_STEP_FORWARD);\n\t\t}\n\n\t\treturn possibleStandardMovesFromOrigin;\n\t}", "boolean checkJump(Move mov, boolean allowPartial) {\n if (!mov.isJump()) {\n return false;\n }\n PieceColor compare = get(mov.fromIndex()).opposite();\n PieceColor init = get(mov.fromIndex());\n ArrayList<Integer> record = new ArrayList<>();\n if (allowPartial) {\n return partialJump(mov);\n } else {\n Move rec = mov;\n while (rec != null) {\n PieceColor from = get(rec.fromIndex());\n PieceColor to = get(rec.toIndex());\n record.add(rec.toIndex());\n char mCol = rec.jumpedCol();\n char mRow = rec.jumpedRow();\n if (rec.fromIndex() % 2 == 0) {\n set(rec.fromIndex(), init);\n if (get(mCol, mRow)\n == compare && to == EMPTY) {\n set(rec.fromIndex(), from);\n rec = rec.jumpTail();\n } else {\n set(rec.fromIndex(), from);\n return false;\n }\n } else {\n set(rec.fromIndex(), init);\n if (index(mCol, mRow) % 2 == 0\n && get(mCol, mRow) == compare\n && to == EMPTY) {\n set(rec.fromIndex(), from);\n rec = rec.jumpTail();\n } else {\n set(rec.fromIndex(), from);\n return false;\n }\n }\n }\n for (int i : record) {\n set(i, init);\n }\n if (jumpPossible(record.get(record.size() - 1))) {\n for (int i : record) {\n set(i, EMPTY);\n }\n return false;\n }\n for (int i : record) {\n set(i, EMPTY);\n }\n return true;\n }\n }", "@Override\n public Collection<Move> calculateLegalMoves(Board board) {\n System.out.println(\"INSIDE Knight: calculateLegalMoves()\");\n System.out.println(\"------------------------------>\\n\");\n\n //ArrayList of moves used to store all possible legal moves.\n final List<Move> legalMoves = new ArrayList<>();\n\n //Iterate the constant class array of piece offsets.\n for(final int currentCandidate : CANDIDATE_MOVE_COORDS){\n //Add the current coordinate of the piece to each offset, storing as a destination coordinate.\n final int candidateDestinationCoord = this.piecePosition + currentCandidate;\n\n //If the destination coordinate is within legal board bounds (between 0 and 64)...\n if(BoardUtils.isValidCoord(candidateDestinationCoord)){\n //Check to see if the piece is in the first column and its destination would move it outside the board.\n if(isfirstColumnExclusion(this.piecePosition, currentCandidate) ||\n isSecondColumnExclusion(this.piecePosition, currentCandidate) ||\n isSeventhColumnExclusion(this.piecePosition, currentCandidate) ||\n isEighthColumnExclusion(this.piecePosition, currentCandidate)){\n continue; //Continue the loop if any of these methods return true\n }\n\n //Store the tile of the destination coordinate.\n final Tile candidateDestinationTile = board.getTile(candidateDestinationCoord);\n\n //If the tile is not marked as occupied by the Tile class...\n if(!candidateDestinationTile.isOccupied()){\n //Add the move to the list of legal moves as a non-attack move.\n legalMoves.add(new MajorMove(board, this, candidateDestinationCoord));\n }\n else{\n //Otherwise, get the type and alliance of the piece at the destination.\n final Piece pieceAtDestination = candidateDestinationTile.getPiece();\n final Alliance pieceAlliance = pieceAtDestination.getPieceAlliance();\n\n //If the piece at the occupied tile's alliance differs...\n if(this.pieceAlliance != pieceAlliance){\n //Add the move to the list of legal moves as an attack move.\n legalMoves.add(new MajorAttackMove(board, this, candidateDestinationCoord, pieceAtDestination));\n }\n }\n }\n }\n\n //Return the list of legal moves.\n return legalMoves;\n }", "@Override\n\tpublic List<Point> getAvailableMoves() {\n\t\treturn new ArrayList<Point>();\n\t}", "private Move getBestMove(RaceTrack track, CellData[][] cells,\n\t\t\tPair<Integer, Integer> pos, Pair<Integer, Integer> speed, int depth) {\n\t\tCellData cellData = cells[pos.getLeft()][pos.getRight()];\n\n\t\tMap<Pair<Integer, Integer>, Character> availableMoves = new HashMap<>();\n\t\tint contX = pos.getLeft() + speed.getLeft();\n\t\tint contY = pos.getRight() + speed.getRight();\n\n\t\tPair<Integer, Integer> cont0 = Pair.of(contX, contY);\n\t\tif (cellData.getLegalMoves().contains(cont0)) {\n\t\t\tavailableMoves.put(cont0, '0');\n\t\t}\n\t\tPair<Integer, Integer> contL = Pair.of(contX - 1, contY);\n\t\tif (cellData.getLegalMoves().contains(contL)) {\n\t\t\tavailableMoves.put(contL, 'L');\n\t\t}\n\t\tPair<Integer, Integer> contR = Pair.of(contX + 1, contY);\n\t\tif (cellData.getLegalMoves().contains(contR)) {\n\t\t\tavailableMoves.put(contR, 'R');\n\t\t}\n\t\tPair<Integer, Integer> contU = Pair.of(contX, contY - 1);\n\t\tif (cellData.getLegalMoves().contains(contU)) {\n\t\t\tavailableMoves.put(contU, 'U');\n\t\t}\n\t\tPair<Integer, Integer> contD = Pair.of(contX, contY + 1);\n\t\tif (cellData.getLegalMoves().contains(contD)) {\n\t\t\tavailableMoves.put(contD, 'D');\n\t\t}\n\t\tfinal Map<Pair<Integer, Integer>, Integer> moveMap = new HashMap<>();\n\n\t\tfor (Pair<Integer, Integer> move : availableMoves.keySet()) {\n\t\t\tint moveValue = getMoveValue(cells, pos.getLeft(), pos.getRight(),\n\t\t\t\t\tmove.getLeft(), move.getRight());\n\t\t\tmoveMap.put(move, moveValue);\n\t\t}\n\n\t\tList<Pair<Integer, Integer>> allMoves = new ArrayList<>(\n\t\t\t\tmoveMap.keySet());\n\t\tCollections.sort(allMoves, new Comparator<Pair<Integer, Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Pair<Integer, Integer> o1,\n\t\t\t\t\tPair<Integer, Integer> o2) {\n\t\t\t\treturn Integer.compare(moveMap.get(o2), moveMap.get(o1));\n\t\t\t}\n\t\t});\n\t\tPair<Integer, Integer> bestMove = allMoves.get(0);\n\n\t\tif ((depth == 0) || (moveMap.get(bestMove) > 0)) {\n\t\t\treturn new Move(bestMove, moveMap.get(bestMove),\n\t\t\t\t\tavailableMoves.get(bestMove));\n\t\t}\n\t\tfinal Map<Pair<Integer, Integer>, Integer> newMoveMap = new HashMap<>();\n\t\tfor (Pair<Integer, Integer> move : allMoves) {\n\t\t\tPair<Integer, Integer> newSpeed = Pair.of(\n\t\t\t\t\tmove.getLeft() - pos.getLeft(),\n\t\t\t\t\tmove.getRight() - pos.getRight());\n\t\t\tint moveValue = getBestMove(track, cells, move, newSpeed, depth - 1).value;\n\t\t\tnewMoveMap.put(move, moveValue);\n\t\t}\n\t\tCollections.sort(allMoves, new Comparator<Pair<Integer, Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Pair<Integer, Integer> o1,\n\t\t\t\t\tPair<Integer, Integer> o2) {\n\t\t\t\treturn Integer.compare(newMoveMap.get(o2), newMoveMap.get(o1));\n\t\t\t}\n\t\t});\n\t\tbestMove = allMoves.get(0);\n\t\treturn new Move(bestMove, moveMap.get(bestMove),\n\t\t\t\tavailableMoves.get(bestMove));\n\t}", "private List<Coordinate> getAvailableMoves(ImmutableGameBoard gameBoard) {\n List<Coordinate> availableMoves = new ArrayList<Coordinate>();\n\n for (int x = 0; x < gameBoard.getWidth(); x++) {\n for (int y = 0; y < gameBoard.getHeight(); y++) {\n if(gameBoard.getSquare(x, y) == TicTacToeGame.EMPTY)\n availableMoves.add(new Coordinate(x, y));\n }\n }\n\n return availableMoves;\n }", "public int[][] legalMoves() {\n return legalMoves[nextPiece];\n }", "Iterator<Move> legalMoves() {\n return new MoveIterator();\n }", "public HashSet<Point> getValidMoves(){\n HashSet<Point> set = new HashSet<Point>();\n if(this.validMove(this.x() + 2, this.y() + 1)){\n set.add(new Point(this.x() + 2, this.y() + 1));\n }\n if(this.validMove(this.x() + 2, this.y() - 1)){\n set.add(new Point(this.x() + 2, this.y() - 1));\n }\n if(this.validMove(this.x() - 2, this.y() + 1)){\n set.add(new Point(this.x() - 2, this.y() + 1));\n }\n if(this.validMove(this.x() - 2, this.y() - 1)){\n set.add(new Point(this.x() - 2, this.y() - 1));\n }\n if(this.validMove(this.x() + 1, this.y() + 2)){\n set.add(new Point(this.x() + 1, this.y() + 2));\n }\n if(this.validMove(this.x() + 1, this.y() - 2)){\n set.add(new Point(this.x() + 1, this.y() - 2));\n }\n if(this.validMove(this.x() - 1, this.y() + 2)){\n set.add(new Point(this.x() - 1, this.y() + 2));\n }\n if(this.validMove(this.x() - 1, this.y() - 2)){\n set.add(new Point(this.x() - 1, this.y() - 2));\n }\n return set;\n }", "@Test\n public void testCanJump() {\n world.add(new Location(2, 2), jumper);\n world.add(new Location(0, 2), rock);\n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(0, 4), flower);\n assertEquals(true, jumper.canJump());\n jumper.jump();\n assertEquals(false, jumper.canJump());\n jumper.turn();\n jumper.turn();\n jumper.turn();\n world.add(new Location(2, 4), jumper2); \n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(2, 2), bug);\n assertEquals(false, jumper.canJump());\n }", "Iterator<BoardPosition> possibleMovingPositions(BoardPosition from, Game game, Map<BoardPosition, Piece> pieceMap);", "public static void compute_possible_moves(Board s){\n\t\tint b [][] = s.board;\n\t\tint x = -1;\n\t\tint y = -1;\n\t\tfor (int i = 0;i < b.length;i++) {\n\t\t\tfor (int j = 0;j < b[i].length;j++) {\n\t\t\t\tif(b[i][j] == 0){\n\t\t\t\t\tx = i;\n\t\t\t\t\ty = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\tint left [][];\n\t\tint right [][];\n\t\tint up [][];\n\t\tint down [][];\n\t\tpossible_boards.clear();\n\t\tif(x - 1 != -1 && x >= 0 && x < 3){\n\t\t\t//up is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\n\t\t\tint temp = temporary_board[x - 1][y];\n\t\t\ttemporary_board[x - 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tup = temporary_board;\n\n\t\t\tBoard up_board = new Board(up);\n\t\t\tpossible_boards.add(up_board);\n\n\t\t}\n\t\tif(x + 1 != 3 && x >= 0 && x < 3){\n\t\t\t//down is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x + 1][y];\n\t\t\ttemporary_board[x + 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tdown = temporary_board;\n\t\t\tBoard down_board = new Board(down);\n\t\t\tpossible_boards.add(down_board);\n\t\t}\n\t\tif(y - 1 != -1 && y >= 0 && y < 3){\n\t\t\t//left move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y - 1];\n\t\t\ttemporary_board[x][y - 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tleft = temporary_board;\n\t\t\tBoard left_board = new Board(left);\n\t\t\tpossible_boards.add(left_board);\n\n\t\t}\n\t\tif(y + 1 != 3 && y >= 0 && y < 3){\n\t\t\t//right move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y + 1];\n\t\t\ttemporary_board[x][y + 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tright = temporary_board;\n\t\t\tBoard right_board = new Board(right);\n\t\t\tpossible_boards.add(right_board);\n\n\t\t}\n\n\t}", "public void makeMove() {\n ArrayList<Field> myFields = new ArrayList<>();\n for (Field[] fieldsRow : fields) {\n for (Field field : fieldsRow) {\n if(field != null && this.equals(field.getPlayer())) {\n myFields.add(field);\n }\n }\n }\n bestMove[0] = myFields.get(0);\n bestMove[1] = myFields.get(0);\n\n Random rand = new Random();\n for(Field destination : destinationFields) {\n if(canMove()) break;\n destinationField = destination;\n for (Field origin : myFields) {\n for(int i = 0; i < origin.getNeighbours().length; ++i) {\n Field neighbour = origin.getNeighbours()[i];\n if(neighbour != null) {\n if(neighbour.getPlayer() == null) {\n if(valueOfMove(origin, neighbour) > valueOfMove(bestMove[0], bestMove[1])) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n } else if(valueOfMove(origin, neighbour) == valueOfMove(bestMove[0], bestMove[1])) {\n if(rand.nextBoolean()) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n }\n }\n } else {\n Field nextField = neighbour.getNeighbours()[i];\n if(nextField != null) {\n correctJumpPaths(origin,null, origin);\n }\n }\n }\n }\n }\n }\n }", "@Override\n\tpublic List<Move> getPossibleMoves(Chessboard chessboard) {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}", "public int[] getPlayableMovesNaive() {\n\t\tint ret[];\n\t\t\n\t\tint curNumPlayable = 0;\n\t\t\n\t\tfor(int i=0; i<Constants.SIZE; i++) {\n\t\t\tfor(int j=0; j<Constants.SIZE; j++) {\n\t\t\t\tif(P1turn && P1Movable[i][j]) {\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t} else if(P1turn == false && P2Movable[i][j]) {\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tret = new int[curNumPlayable];\n\t\tcurNumPlayable = 0;\n\t\t\n\t\tfor(int i=0; i<Constants.SIZE; i++) {\n\t\t\tfor(int j=0; j<Constants.SIZE; j++) {\n\t\t\t\tif(P1turn && P1Movable[i][j]) {\n\t\t\t\t\tret[curNumPlayable] = i * Constants.SIZE + j;\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t\t\n\t\t\t\t} else if(P1turn == false && P2Movable[i][j]) {\n\t\t\t\t\tret[curNumPlayable] = i * Constants.SIZE + j;\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "public int getMaxJump() {return 2;}", "public Set<Line> getPossibleMoves(Square[][] board) {\n Set<Line> empty = new HashSet<Line>();\n return getPossibleMoves(board, empty, 0);\n }", "private ArrayList<Coordinates> freeMoves(Maze maze) {\n\t\tArrayList<Coordinates> dirs = new ArrayList<>();\n\n\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\t\tif (x == 0 ^ y == 0) {\n\t\t\t\t\tCoordinates move = find().add(x, y);\n\t\t\t\t\tif (!maze.outOfRange(move)) {\n\t\t\t\t\t\tif (!maze.getMCell(move).wall()) {\n\t\t\t\t\t\t\tdirs.add(new Coordinates(x, y));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dirs;\n\t}", "List<Jewel> getValidMovePair();", "private List<SearchNode<T>> performMoves(final SearchNode<T> parent) {\n\t\tfinal List<SearchNode<T>> succesors = new ArrayList<SearchNode<T>>(Move.values().length);\n\t\tfor (Move direction : Move.values()) {\n\t\t\t// Get board to move empty tile on\n\t\t\tfinal Board<T> tmp = parent.getBoard()\n\t\t\t\t\t\t\t\t\t\t.clone();\n\t\t\ttry {\n\t\t\t\t// perform the moves\n\t\t\t\tswitch (direction) {\n\t\t\t\tcase UP:\n\t\t\t\t\ttmp.moveUp();\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\ttmp.moveDown();\n\t\t\t\t\tbreak;\n\t\t\t\tcase LEFT:\n\t\t\t\t\ttmp.moveLeft();\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\ttmp.moveRight();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new UnsupportedOperationException(\"Direction with name '\" + direction.name() + \"' cannot not handled\");\n\t\t\t\t}\n\t\t\t\t// Add found successor in case of valid move\n\t\t\t\tsuccesors.add(new SearchNode<T>(parent.getCostsFormStart() + 1, parent, tmp, goal, direction));\n\t\t\t} catch (InvalidMoveException e) {\n\t\t\t\t// do nothing on invalid move\n\t\t\t}\n\t\t}\n\n\t\treturn succesors;\n\t}", "private List<int[]> generatePossibleMoveActions(LabyrinthGameState state) {\n List<Tile> tiles = new ArrayList<>();\n Tile orig = state.getPlayerLoc(Player.values()[playerNum]);\n tiles.add(orig);\n this.calculatePossibleMoves(orig, tiles);\n List<int[]> locations = new ArrayList<>();\n for (Tile spot : tiles) {\n int[] loc = new int[2];\n loc[0] = spot.getX();\n loc[1] = spot.getY();\n locations.add(loc);\n }\n return locations;\n }", "public ArrayList<Move> getPossibilities(Move letters, ArrayList<Tile> rack) {\n\t\t// check for an empty letter list (invalid input)\n\t\tif (letters == null || letters.size() == 0)\n\t\t\treturn new ArrayList<Move>();\n\t\t// check if the move is the first move of the game\n\t\tif (isEmpty())\n\t\t\treturn getFirstMoves(letters, rack);\n\t\t// create list of possible moves\n\t\tArrayList<Move> moves = new ArrayList<Move>();\n\t\tint r = 0;\n\t\tint c = 0;\n\t\t// create a list of empty squares adjacent to letters on the board\n\t\tArrayList<Coord> adj = new ArrayList<Coord>();\n\t\t// for each letter on the board, check if the word can be added in the\n\t\t// vertical or horizontal direction using the letter already on the\n\t\t// board, which is compared with every letter in the word\n\t\tfor (int i = 0; i < lettersInPlay.size(); i++) {\n\t\t\tfor (int j = 0; j < letters.size(); j++) {\n\t\t\t\tif (lettersInPlay.get(i).getChar() == letters.get(j).getChar()) {\n\t\t\t\t\t// move is a singular possible move for a list of letters\n\t\t\t\t\tMove move;\n\t\t\t\t\tif (letters.size() > 1) {\n\t\t\t\t\t\tmove = findVerticalIntersections(letters, j, i, rack);\n\t\t\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\t\t\tmoves.add(move);\n\t\t\t\t\t\tmove = findHorizontalIntersections(letters, j, i, rack);\n\t\t\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\t\t\tmoves.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if there are enough blanks to cover for the letters that aren't in\n\t\t// the rack of the player, initialize the list of empty tiles adjacent\n\t\t// to tiles already on the board\n\t\tfor (int i = 0; i < lettersInPlay.size(); i++) {\n\t\t\tr = lettersInPlay.get(i).getLoc().getRow();\n\t\t\tc = lettersInPlay.get(i).getLoc().getCol();\n\t\t\tif (r - 1 >= 0 && board[r - 1][c].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r - 1, c)))\n\t\t\t\tadj.add(new Coord(r - 1, c));\n\t\t\tif (c - 1 >= 0 && board[r][c - 1].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r, c - 1)))\n\t\t\t\tadj.add(new Coord(r, c - 1));\n\t\t\tif (r + 1 < len && board[r + 1][c].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r + 1, c)))\n\t\t\t\tadj.add(new Coord(r + 1, c));\n\t\t\tif (c + 1 < len && board[r][c + 1].getLetter() == null\n\t\t\t\t\t&& !adj.contains(new Coord(r, c + 1)))\n\t\t\t\tadj.add(new Coord(r, c + 1));\n\t\t}\n\t\t// move is a singular possible move for a list of letters\n\t\tMove move;\n\t\t// for every coordinate in the list of adjacent sqaures, check if\n\t\t// the word can be added in the vertical or horizontal direction,\n\t\t// using the coordinate as the starting point for each letter in the\n\t\t// word being checked\n\t\tfor (int i = 0; i < adj.size(); i++) {\n\t\t\tfor (int j = 0; j < letters.size(); j++) {\n\t\t\t\tmove = findVerticalAdj(letters, j, adj.get(i), rack);\n\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\tmoves.add(move);\n\t\t\t\tmove = findHorizontalAdj(letters, j, adj.get(i), rack);\n\t\t\t\tif (move != null && !moves.contains(move))\n\t\t\t\t\tmoves.add(move);\n\t\t\t}\n\t\t}\n\t\tif (moves.size() == 0)\n\t\t\treturn new ArrayList<Move>();\n\t\treturn moves;\n\t}", "@Override\r\n\tpublic void getLegalMoves() {\r\n\t\tint pawnX = this.getX();\r\n\t\tint pawnY = this.getY();\r\n\t\tchar pawnColor = getColor();\r\n\t\tTile[][] chessBoard = SimpleChess.getChessBoard();\r\n\t\tcheckInFront(chessBoard,pawnX,pawnY,pawnColor);\r\n\t\tcheckDiagonal(chessBoard,pawnX,pawnY,pawnColor);\r\n\t}", "public static boolean moveking() //returns false if valid move is there\n{ System.out.println(\"IN FUNCTION MOVE KING.....\");\n flag=0;\n int kx,ky;\n if(q==2)\n {\n kx=p2.ka.kbx; //WHITE KING....\n ky=p2.ka.kby;\n } \nelse\n {\n kx=p1.ka.kax; //BLACK KING....\n\tky=p1.ka.kay;\n }\n//CHECKS WHETHER KING CAN MOVE TO THE 8 adjacent places...\n if(kx-1>=0)\n {\n move2(kx,ky,kx-1,ky);\n \n if(flag==1)\n {\n revert(kx,ky,kx-1,ky);\n return false;\n }\n }\n //r\n if(kx+1<=7)\n { move2(kx,ky,kx+1,ky);\n if(flag==1)\n {revert(kx,ky,kx+1,ky);\n return false;\n \n }\n }\n \n //u\n if(ky-1>=0)\n {\n move2(kx,ky,kx,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx,ky-1);\n return false;\n \n }\n }\n //d\n if(ky+1<=7)\n {\n move2(kx,ky,kx,ky+1);\n \n if(flag==1)\n { revert(kx,ky,kx,ky+1);\n return false;\n \n }\n }\n //lu\n if(kx-1>=0&&ky-1>=0)\n {\n move2(kx,ky,kx-1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky-1);\n return false;\n \n }\n }\n //ld\n if(kx-1>=0&&ky+1<=7)\n {\n move2(kx,ky,kx-1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky+1);\n return false;\n \n }\n }\n //ru\n if(kx+1<=7&&ky-1>=0)\n {\n move2(kx,ky,kx+1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky-1);\n return false;\n \n }\n }\n //rd\n if(kx+1<=7&&ky+1<=7)\n {\n move2(kx,ky,kx+1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky+1);\n return false;\n \n }\n }\n return true; \n }", "public abstract List<Direction> searchForCheese(Maze maze);", "boolean jump(int posx, int posy, int prevPiece) {\n\t\tbool = false;\n\t\txdiff = (posx - prevPosX) / 2; \n\t\tydiff = (posy - prevPosY) / 2;\n\t\tif ((xdiff < 2 || xdiff > -2 && ydiff < 2) && prevPiece == 1) {\n\t\t\tSystem.out.println(\"Norm jump 1 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4))\n\t\t\t\tbool = true;\n\t\t\telse if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if ((xdiff < 2 || xdiff > -2 && ydiff < -2) && prevPiece == 2) {\n\t\t\tSystem.out.println(\"Norm jump 2 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 3 || prevPiece == 4 && (xdiff < 2 || xdiff > -2 && ydiff < 2 || ydiff > -2)) {\n\t\t\tSystem.out.println(\"King jump \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4)) {\n\t\t\t\tSystem.out.println(curPlayer + \" Player 1 jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3)){\n\t\t\t\tSystem.out.println(curPlayer + \" jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else \n\t\t\t\tbool = false;\n\t\t}\n\t\tjumping = bool;\n\t\treturn bool;\n\t}", "public abstract void calculateMoves();", "public ArrayList<SlidingPuzzleState> getPossibleNextMoves(){\n\t\tArrayList<SlidingPuzzleState> moves = new ArrayList<SlidingPuzzleState>();\n\t\tint holeNum = 0;\n\t\tfor (Coordinate h: _holes){\n\t\t\t\n\t\t\t//for every hole, check if its not on the edges\n\t\t\t//of the puzzle and if his next position is not\n\t\t\t//already a hole\n\t\t\t\n\t\t\tif (h.getI() > 0 && _puzzle[h.getI()-1][h.getJ()]!=0){\n\t\t\t\t\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.UP));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getI() < (_rows-1) && _puzzle[h.getI()+1][h.getJ()]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.DOWN));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() > 0 && _puzzle[h.getI()][h.getJ()-1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.LEFT));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() < (_cols-1) && _puzzle[h.getI()][h.getJ()+1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.RIGHT));\n\t\t\t}\n\t\t\tholeNum++;\n\t\t}\n\t\treturn moves;\n\t}", "public int dFSJumps(Color c, Orientation or, Movement m, JumpPosition jumpPosit, boolean initial) throws CloneNotSupportedException{\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n //Search if there is a soldier and is jumpble from this position\n Point soldierPoint;\n soldierPoint = getXandYgivenOrientation(foo, or, m);\n //If it is, add it to the movement path\n if(isJumpable(soldierPoint, or, m, c , jumpPosit)){ \n addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n }\n return 0;\n }", "ArrayList<Location> getMoveLocations();" ]
[ "0.71677554", "0.7055636", "0.678712", "0.66032624", "0.65720993", "0.63490844", "0.6251342", "0.6146449", "0.6110943", "0.6026488", "0.5916114", "0.5895848", "0.57675815", "0.575854", "0.5749435", "0.57343656", "0.5733479", "0.5732532", "0.57058716", "0.5703099", "0.5692605", "0.5669717", "0.5663588", "0.5638179", "0.5611452", "0.55956376", "0.5594076", "0.5571412", "0.556504", "0.5555606", "0.55553347", "0.5540873", "0.55311435", "0.5529535", "0.55208945", "0.55115163", "0.5509919", "0.54957855", "0.5484489", "0.54840803", "0.54819983", "0.5464827", "0.54582757", "0.5451044", "0.54507625", "0.5448187", "0.5439956", "0.54364014", "0.54343396", "0.5423171", "0.5421759", "0.54141617", "0.53779715", "0.5364359", "0.5361796", "0.5361503", "0.53613466", "0.5360481", "0.5353163", "0.5346964", "0.5339435", "0.5329023", "0.53210896", "0.532071", "0.5317854", "0.53162074", "0.5291923", "0.52907634", "0.52894413", "0.52830005", "0.5280488", "0.5278241", "0.5264606", "0.5247282", "0.52299315", "0.52286786", "0.5218097", "0.52137524", "0.5205338", "0.52038115", "0.5203255", "0.5183123", "0.51665854", "0.51664984", "0.5166428", "0.5162043", "0.51580673", "0.5156869", "0.51428837", "0.51376384", "0.51332027", "0.51261276", "0.51131636", "0.51096535", "0.5101644", "0.51012325", "0.5097276", "0.50947356", "0.50929666", "0.5087096" ]
0.6532638
5
Get all possible regular moves; second parameter to only allow chainable moves (used when double jumping).
public ArrayList<Move> getRegularMoves(Board curBoard, boolean onlyChainable) { return myType.getRegularMoves(curBoard, onlyChainable, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public List<Move> getPossibleMoves();", "public ArrayList<Cell> getPseudoLegalMoves() {\n\n Cell[][] board = Board.getBoard();\n ArrayList<Cell> moves = new ArrayList<Cell>();\n\n //Possible ways to move a knight\n int[][] possibleOffsets = {{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,1},{2,-1}};\n\n for(int i=0; i<possibleOffsets.length; i++){\n int x = possibleOffsets[i][0] + getRow();\n int y = possibleOffsets[i][1] + getColumn();\n\n //Making sure we dont leave the board\n if(x >= board.length || x < 0\n || y >= board.length || y < 0)\n continue;\n\n //Making sure destination does not contain a friendly piece\n if(Board.containsPieceOfColor(x,y,this.getColor()))\n continue;\n\n moves.add(board[x][y]);\n }\n\n return moves;\n }", "public ArrayList<Move> getPossibleMoves() \n\t{\n\t\tArrayList<Move> possibleMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(int i = - 1; i <= 1; i += 2)\n\t\t{\n\t\t\tfor(int j = -1; j <= 1; j += 2)\n\t\t\t{\n\t\t\t\tLocation currentLoc = new Location(getLoc().getRow() + j, getLoc().getCol() + i);\n\t\t\t\t\n\t\t\t\tif(getBoard().isValid(currentLoc))\n\t\t\t\t{\n\t\t\t\t\tif(getBoard().getPiece(currentLoc) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tArrayList<Node> move = new ArrayList<Node>();\n\t\t\t\t\t\tmove.add(getNode());\n\t\t\t\t\t\tmove.add(getBoard().getNode(currentLoc));\n\t\t\t\t\t\t\n\t\t\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(ArrayList<Node> move : getNextJumps(getLoc(), new ArrayList<Location>()))\n\t\t{\n\t\t\tif(move.size() > 1)\n\t\t\t{\n\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Move> jumpMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(Move possibleMove : possibleMoves)\n\t\t{\n\t\t\tif(!possibleMove.getJumped().isEmpty())\n\t\t\t{\n\t\t\t\tjumpMoves.add(possibleMove);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!jumpMoves.isEmpty())\n\t\t{\n\t\t\treturn jumpMoves;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn possibleMoves;\n\t\t}\n\t}", "ArrayList<Move> legalMoves() {\n ArrayList<Move> result = new ArrayList<Move>();\n int f, b;\n Move m;\n for (int i = 1; i < 8; i++) {\n for (int j = 1; j < 8; j++) {\n if (get(i,j).side() == _turn) {\n f = forward(j, i);\n b = backward(j, i);\n c = _col[j];\n r = _row[i];\n m = Move.create(j, i, j - b, i - b);\n addMove(result, m);\n m = Move.create(j, i, j + b, i + b);\n addMove(result, m);\n m = Move.create(j, i, j + f, i - f);\n addMove(result, m);\n m = Move.create(j, i, j - f, i + f);\n addMove(result, m);\n m = Move.create(j, i, j + c, i);\n addMove(result, m);\n m = Move.create(j, i, j - c, i);\n addMove(result, m);\n m = Move.create(j, i, j, i + r);\n addMove(result, m);\n m = Move.create(j, i, j, i - r);\n addMove(result, m);\n } else {\n continue;\n }\n }\n }\n return result;\n }", "public PossibleMove[] getPossibleMoves(Coordinate from);", "Iterator<Move> legalMoves() {\n return new MoveIterator();\n }", "private Cell[] allPossibleMoves(Cell source) {\n\t\tCell[] moves = new Cell[2 * Board.BOARD_SIZE - 2]; // Вертикаль и горизонталь, которые бьет ладья\n\t\tint columnIndex = source.getColumn();\n\t\tint rowIndex = source.getRow();\n\t\tint k = 0;\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != rowIndex) {\n\t\t\t\tmoves[k++] = new Cell(columnIndex, i);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != columnIndex) {\n\t\t\t\tmoves[k++] = new Cell(i, rowIndex);\n\t\t\t}\n\t\t}\n\t\treturn moves;\n\t}", "List<ValidMove> getValidMoves();", "public PossibleMoves getPossibleMoves(State state){\n if(possibleMoves == null){\n possibleMoves = new PossibleMoves(state);\n }\n return possibleMoves;\n }", "public ArrayList<Cell> getPseudoLegalMoves() {\n\n int[][] offsetMultiplier = {{-1,-1},{-1,1},{1,-1},{1,1}}; //4 directions NW, NE, SW, SE\n int x = getRow(); int y = getColumn();\n\n\n return Piece.slidingPieceMoves(x,y,this.getColor(),offsetMultiplier);\n\n }", "public Move[] getAllPossibleMoves(boolean isWhitesMove)\r\n\t{\r\n\t\tArrayList<Move> legalMoves = new ArrayList<Move>();\r\n\r\n\t\tPiece[] piecesToMove = isWhitesMove ? whitePieces : blackPieces;\r\n\t\tfor (int i = 0; i < piecesToMove.length; i++)\r\n\t\t{\r\n\t\t\tlegalMoves.addAll(getPieceMove(piecesToMove[i]));\r\n\t\t}\r\n\r\n\t\tlegalMoves.trimToSize();\r\n\t\tMove[] moves = legalMoves.toArray(new Move[legalMoves.size()]);\r\n\t\tisKingCheck(moves, isWhitesMove);\r\n\t\treturn moves;\r\n\t}", "public LinkedList<Move> getPossibleMoves() {\n\t\tAIPossibleMoves.clear();\n\t\tint xOrigin = 0, yOrigin = 0, xMove1 = 0, xMove2 = 0, yMove1 = 0, yMove2 = 0;\n\t\tMove move = null;\t\n\t\t\tint type = 0;\n\t\t\tfor(Checker checker: model.whitePieces) {\n\t\t\t\t\n\t\t\t\txOrigin = checker.getCurrentXPosition();\n\t\t\t\tyOrigin = checker.getCurrentYPosition();\n\t\t\t\txMove1 = (checker.getCurrentXPosition() - 1);\n\t\t\t\txMove2 = (checker.getCurrentXPosition() + 1);\n\t\t\t\tyMove1 = (checker.getCurrentYPosition() - 1);\n\t\t\t\tyMove2 = (checker.getCurrentYPosition() + 1);\n\t\t\t\ttype = checker.getType();\n\t\t\t\tswitch(type) {\n\t\t\t\tcase 2:\n\n\t\t\t\t\tif((xMove1 < 0) || (yMove1 <0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t\t//System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t\t// System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t\t//Moving up and left isMovingRight,IsMovingDown\n\t\t\t\t\tif((xMove1 <0) || (yMove1 < 0)) {\n\t\t\t\t\t\t//continue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving up and right\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove1 < 0) || (yMove2 > 7)) {\n\t\t\t\t//\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving down and left isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove2, false, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove2, false, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove2 > 7)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t//moving down and right isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove2, true, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove2, true, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\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}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\n\t\t\treturn AIPossibleMoves;\n\t\t\t\n\t\t}", "public List<ScoredMove> allValidMoves(GameState gm){\n\t\tList<ScoredMove> validMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\t// check for draw move\n\t\tif (getDeckSize() > 0) {\n\t\t\tvalidMoves.add(new ScoredMove(ACTION.DRAW, null, null));\n\t\t}\n\t\t/*\n\t\telse {\n\t\t\t// check for discarding move (note: only allowing if decksize is empty)\n\t\t\tfor (Card c: getHand().getCards()){\n\t\t\t\tif (!(c instanceof MerchantShip)) {\n\t\t\t\t\tvalidMoves.add(new ScoredMove(ACTION.DISCARD, c, null));\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t\t\n\t\tvalidMoves.addAll(allDiscardMoves(gm));\n\t\t\n\t\t// check for playing merchant ships\n\t\tvalidMoves.addAll(allmShipMoves(gm));\n\t\t\n\t\t// add all attacks\n\t\tvalidMoves.addAll(allAttackMoves(gm));\n\t\t\n\t\tif (super.getVerbosity()) {\n\t\t\tSystem.out.println(\"Valid moves found: \" + validMoves.size());\n\t\t}\n\t\treturn validMoves;\n\t}", "public List<String> legalMoves() {\n List<String> result = new ArrayList<>();\n for (int col = 1; col < _board.length + 1; col += 1) {\n for (int row = 1; row < _board.length + 1; row += 1) {\n String move = row + \",\" + col;\n if (isLegal(move)) {\n result.add(move);\n }\n }\n }\n return result;\n }", "@Override\n public ArrayList<xMCTSStringGameState> getPossibleMoves(xMCTSStringGameState gameState)\n {\n\t ArrayList<xMCTSStringGameState> posMoves = new ArrayList<xMCTSStringGameState>();\n\t if (gameStatus(gameState) == xMCTSGame.status.ONGOING) {\n\t \t String activeCard = gameState.toString().substring(gameState.toString().length() - 2, gameState.toString().length());\n\t \t int gridSize = SIZE*2;\n\t for (int i = 0; i < gridSize; i += 2) {\n\t for (int j = 0; j < gridSize; j += 2) {\n\t int pos = i * SIZE + j;\n\t if (gameState.toString().charAt(pos) == '_') {\n\t String temp = gameState.toString().substring(0, pos)\n\t \t\t + activeCard\n\t + gameState.toString().substring(pos + 2,\n\t gameState.toString().length());\n\t posMoves.add(new xMCTSStringGameState(temp, 0.0, 0));\n\t }\n\t }\n\n\t }\n\t }\n\t else {\n\t \t // System.out.println(\"No moves can be made from this state\");\n\t \t// callsFromFullBoards++;\n\t \t// System.out.println(\"There have been \" + callsFromFullBoards + \"attempts to get possible moves from a full board\");\n\t }\n\t return posMoves;\n }", "List<Move> getLegalMoves(Player player);", "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "public ArrayList<PentagoGame> nextPossibleMoves() {\n ArrayList<PentagoGame> children = new ArrayList<>();\n for(int i = 0; i < 6; i++) { // for each row I can place a piece\n for(int j = 0; j < 6; j++) { // for each column\n for(int k = 0; k < 4; k++ ) { // for each board to rotate\n for(int d = 0; d < 2; d ++) {// for each direction to rotate\n boolean leftRotate = false;\n if(d == 0) {\n leftRotate = true;\n }\n Move move = new Move(i, j, k, leftRotate);\n if(validMove(whosTurn(), move)) {\n PentagoGame tempGame = new PentagoGame(this);\n tempGame.playPiece(whosTurn(), move);\n tempGame.rotateBoard(whosTurn(), move);\n tempGame.turnOver();\n move.setGameState(tempGame);\n move.setUtility(calulateUtility(move));\n // todo\n children.add(tempGame);\n }\n }\n }\n }\n }\n\n return children;\n }", "public void getPossibleMoves() {\n\t\tGameWindow.potentialMoves.clear();\n\t}", "static List<Move> generateLegalMoves(Position pos) {\n\t\tList<Move> moves = new ArrayList<>();\n\n\t\t// for (int square : pos.pieces) {\n\t\t// \tif (pos.pieces.size() > 32) {\n\t\t// \t\tSystem.out.println(\"problem\" + pos.pieces.size());\n\t\t// \t}\n\t\t// \tif (pos.at(square) != 0 && Piece.isColor(pos.at(square), pos.toMove)) {\n\t\t// \t\tint piece = pos.at(square);\n\t\t// \t\tint name = Piece.name(piece);\n\t\t// \t\tif (name == Piece.Pawn) {\n\t\t// \t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t// \t\t\tif (square + step >= 0 && square + step < 64) {\n\t\t// \t\t\t\t// 1 square\n\t\t// \t\t\t\tif (pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'q'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'b'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'n'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'r'));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step));\n\t\t// \t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// 2 squares\n\t\t// \t\t\t\tif ((square < 16 && pos.toMove == 'w') || square > 47 && pos.toMove == 'b') {\n\t\t// \t\t\t\t\tif (pos.board.squares[square + 2*step] == 0 && pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + 2*step));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t\t// capture\n\t\t// \t\t\t\t// right\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][3] > 0) {\n\t\t// \t\t\t\t\tint target = square + step + 1;\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t\telse {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t} \n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// left\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][2] > 0) {\n\t\t// \t\t\t\t\tint target = square + step - 1;\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t\telse {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\tfor (int offset : MoveData.KnightOffsets.get(square)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\tif (!Piece.isColor(pos.board.squares[square + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tMove move = new Move(square, square + offset);\n\t\t// \t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse {\n\t\t// \t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t// \t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t// \t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t// \t\t\t\tint maxDist = MoveData.DistanceToEdge[square][dir];\n\t\t// \t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\n\t\t// \t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t// \t\t\t\t\tint squareIdx = square + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, squareIdx));\n\t\t// \t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\t\t\t\t\t\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }\n\n\t\tfor (int i = 0; i < 64; i++) {\n\t\t\tif (pos.board.squares[i] != 0 && Piece.isColor(pos.board.squares[i], pos.toMove)) {\n\t\t\t\tint piece = pos.board.squares[i];\n\t\t\t\tint name = Piece.name(piece);\n\t\t\t\tif (name == Piece.Pawn) {\n\t\t\t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t\t\t\tif (i + step >= 0 && i + step < 64) {\n\t\t\t\t\t\t// 1 square\n\t\t\t\t\t\tif (pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'q'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'b'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'n'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'r'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step));\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2 squares\n\t\t\t\t\t\tif ((i < 16 && pos.toMove == 'w') || i > 47 && pos.toMove == 'b') {\n\t\t\t\t\t\t\tif (pos.board.squares[i + 2*step] == 0 && pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + 2*step));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// capture\n\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][3] > 0) {\n\t\t\t\t\t\t\tint target = i + step + 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// left\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][2] > 0) {\n\t\t\t\t\t\t\tint target = i + step - 1;\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tfor (int offset : MoveData.KnightOffsets.get(i)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[i + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMove move = new Move(i, i + offset);\n\t\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t\t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t\t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t\t\t\t\tint maxDist = MoveData.DistanceToEdge[i][dir];\n\t\t\t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\t\t\t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t\t\t\t\t\tint squareIdx = i + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, squareIdx));\n\t\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// castling\t\t\n\t\tif (pos.toMove == 'w' && !underAttack(pos, pos.whiteKing, 'b')) {\t\t\t\n\t\t\tif (pos.castlingRights.whiteKingSide && pos.at(Board.H1) == (Piece.Rook | Piece.White)) {\n\t\t\t\tif (pos.at(Board.F1) == Piece.Empty && pos.at(Board.G1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F1, 'b') && !underAttack(pos, Board.G1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.G1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif (pos.castlingRights.whiteQueenSide && pos.at(Board.A1) == (Piece.Rook | Piece.White)) {\t\t\t\t\n\t\t\t\tif (pos.at(Board.B1) == Piece.Empty && pos.at(Board.C1) == Piece.Empty && pos.at(Board.D1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D1, 'b') && !underAttack(pos, Board.C1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.C1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse if (pos.toMove == 'b' && !underAttack(pos, pos.blackKing, 'w')){\n\t\t\tif (pos.castlingRights.blackKingSide && pos.at(Board.H8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.F8) == Piece.Empty && pos.at(Board.G8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F8, 'w') && !underAttack(pos, Board.G8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.G8));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pos.castlingRights.blackQueenSide && pos.at(Board.A8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.B8) == Piece.Empty && pos.at(Board.C8) == Piece.Empty && pos.at(Board.D8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D8, 'w') && !underAttack(pos, Board.C8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.C8));\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filter illegal moves\n\t\tList<Move> legalMoves = new ArrayList<>();\n\t\tchar color = pos.toMove;\n\t\tfor (Move move : moves) {\n\t\t\tpos.makeMove(move);\n\t\t\tif (!kingInCheck(pos, color)) {\n\t\t\t\tlegalMoves.add(move);\n\t\t\t}\t\t\t\n\t\t\tpos.undoMove();\n\t\t}\n\n\t\treturn legalMoves;\n\t}", "public List<BoardPos> getMoves(BoardPos from) {\n List<BoardPos> result;\n\n // strike check\n if (board.get(from).isCrown())\n result = getStrikesCrown(from);\n else result = getStrikes(from);\n\n // regular moves\n final int[] shifts = {-1, 1};\n if (result.isEmpty() && !board.get(from).isEmpty()) {\n if (board.get(from).isCrown())\n for (int shiftX : shifts)\n for (int shiftY : shifts) {\n BoardPos to = from.add(shiftX, shiftY);\n while (to.inBounds(board.side()) && board.get(to).isEmpty()) {\n result.add(to);\n to = to.add(shiftX, shiftY);\n }\n }\n else for (int shift : shifts) { // add adjacent empty positions\n BoardPos move = from.add(new BoardPos(shift,\n board.get(from).color() ? 1 : -1));\n if (board.get(move) != null && board.get(move).isEmpty())\n result.add(new BoardPos(move));\n } }\n\n // complete by adding the start position to every legal route, so that\n // it will be cleared as well when the player will move\n for (BoardPos pos : result)\n pos.addToRoute(new BoardPos(from));\n\n return result;\n }", "List<Direction> getValidDirectionsForMovement();", "private ArrayList<Move> generatePossibleMovesFor(Player player) {\n ArrayList<Point> selfStonePlacements = new ArrayList<>();\n ArrayList<Point> opponentStonePlacements = new ArrayList<>();\n for (int x = 0; x < field.length; x++)\n for (int y = 0; y < field[x].length; y++) {\n if (field[x][y] == null)\n continue;\n if (field[x][y] == this.color)\n selfStonePlacements.add(new FieldPoint(x, y));\n if (field[x][y] == opponent.getColor())\n opponentStonePlacements.add(new FieldPoint(x, y));\n }\n\n ArrayList<Move> possibleMoves = new ArrayList<>();\n\n // Check if player is in set phase or only has three stones left\n if (!player.isDoneSetting()) {\n // Every free field is a possible move\n for (Point point : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(null, point));\n }\n } else if (player.isDoneSetting() && getCountOfStonesFor(player) > 3) {\n // Move is only possible if the neighbour field of a stone is free\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point neighbour : neighbourPoints.get(point)) {\n if (opponentStonePlacements.contains(neighbour) || selfStonePlacements.contains(neighbour))\n continue;\n possibleMoves.add(new StoneMove(point, neighbour));\n }\n }\n } else {\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point another : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(point, another));\n }\n }\n }\n\n Collections.shuffle(possibleMoves);\n return possibleMoves;\n }", "public ArrayList<Move> getJumpMoves(Board curBoard, boolean onlyChainable) {\n\t\treturn myType.getJumpMoves(curBoard, onlyChainable, this);\n\t}", "public List<Grid> getPossibleMoves(Grid g){\n\t\tint i=g.row, j=g.col;\n\t\tif(i>=0 && i<data.length && j>=0 && j<data[i].length){\n\t\t\tList<Grid> list=new ArrayList<>();\n\t\t\tif(isFree(i, j-1)) list.add(new Grid(i,j-1));\n\t\t\tif(isFree(i-1, j-1)) list.add(new Grid(i-1,j-1));\n\t\t\tif(isFree(i-1, j)) list.add(new Grid(i-1,j));\n\t\t\tif(isFree(i-1, j+1)) list.add(new Grid(i-1,j+1));\n\t\t\tif(isFree(i, j+1)) list.add(new Grid(i,j+1));\n\t\t\tif(isFree(i+1, j+1)) list.add(new Grid(i+1,j+1));\n\t\t\tif(isFree(i+1, j)) list.add(new Grid(i+1,j));\n\t\t\tif(isFree(i+1, j-1)) list.add(new Grid(i+1,j-1));\n\t\t\treturn list;\n\t\t}\n\t\treturn null;\n\t}", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "@Override\r\n public List<Move> getLegalMoves(MachineState state, Role role)\r\n throws MoveDefinitionException {\r\n \tclearpropnet();\r\n \tmarkbases(state.getContents());\r\n \tMap<Role, Set<Proposition>> legalPropositions = propNet.getLegalPropositions();\r\n \tSet<Proposition> legals = legalPropositions.get(role);\r\n \tList<Move> actions = new ArrayList<Move>();\r\n \tfor(Proposition p: legals){\r\n \t\tif(p.propmark()){\r\n \t\t\tactions.add(getMoveFromProposition(p));\r\n \t\t}\r\n \t}\r\n\t\treturn actions;\r\n }", "public Collection<Key> getAllPossibleMoves(Key currentKey,\n\t\t\tint numberGeneratedSoFarLength) {\n\n\t\tif (KeyPad.isFirstTwoRows(currentKey)) {\n\t\t\tif (isFirstMove(numberGeneratedSoFarLength)) {\n\t\t\t\taddTwoStepForwardToPositionCache(currentKey);\n\t\t\t} else if (isSecondMove(numberGeneratedSoFarLength)) {\n\t\t\t\tremoveTwoStepForwardFromPositionCache(currentKey);\n\t\t\t}\n\t\t}\n\n\t\treturn positionCache.get(currentKey);\n\t}", "@Override\r\n\tpublic ArrayList<String> allPossibleMoves(boolean whoPlays) {\r\n\t\t\r\n\t\tArrayList<String> Moves = new ArrayList<String>();\r\n\t\t\r\n\t\tif(whoPlays) {\r\n\t\t\tif( (new Board2048model(this)).moveUP()) \r\n\t\t\tMoves.add(\"UP\");\r\n\t\t\tif( (new Board2048model(this)).moveDOWN()) \r\n\t\t\tMoves.add(\"DOWN\");\r\n\t\t\tif( (new Board2048model(this)).moveRIGHT()) \r\n\t\t\tMoves.add(\"RIGHT\");\r\n\t\t\tif( (new Board2048model(this)).moveLEFT()) \r\n\t\t\tMoves.add(\"LEFT\");\r\n\t\t\t}\r\n\t\telse { \r\n\t\t\tfor( int i = 0; i < rows_size ; i++) {\r\n\t\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\t\tif(isEmpty(i,j)) {\r\n\t\t\t\t\t\tMoves.add(new String(Integer.toString(i) + \",\" + Integer.toString(j) + \",\" + Integer.toString(2)));\r\n\t\t\t\t\t\tMoves.add(new String(Integer.toString(i) + \",\" + Integer.toString(j) + \",\" + Integer.toString(4)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\treturn Moves;\r\n\t}", "private Collection<KeyPadPosition> getStandardPossibleMovesFromCentre() {\n\t\tif (possibleStandardMovesFromOrigin == null) {\n\t\t\tpossibleStandardMovesFromOrigin = new HashSet<KeyPadPosition>();\n\t\t\tpossibleStandardMovesFromOrigin.add(STAY_STILL);\n\t\t\tpossibleStandardMovesFromOrigin.add(ONE_STEP_FORWARD);\n\t\t}\n\n\t\treturn possibleStandardMovesFromOrigin;\n\t}", "public int[][] legalMoves() {\n return legalMoves[nextPiece];\n }", "public abstract List<Move> getLegalMoves(MachineState state, Role role) throws MoveDefinitionException, StateMachineException;", "private Set<Line> getPossibleMoves(Square[][] board, Set<Line> moves, int sides) {\n if (moves.size() >= width || sides > 3) return moves;\n else {\n Set<Square> squares = squaresWithMarkedSides(board, order[sides]);\n for (Square square : squares) {\n for (Line line : square.openLines()) {\n if (moves.size() < width)\n moves.add(line);\n }\n }\n return getPossibleMoves(board, moves, sides+1);\n }\n }", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "private String easyMove() {\n int randomHole = evaluate();\n while (!isValidMove(randomHole)) {\n randomHole = evaluate();\n }\n\n return super.makeAMove(randomHole);\n }", "public int[] getAllPossibleMoves(boolean ignore) {\n int[] validMoves;\n int[] validMovesResized;\n int validMovesIndex = 0;\n int startRow = this.getRow();\n int startCol = this.getCol();\n \n validMoves = new int[28]; // For a bishop, there are a maximum of 14 possible squares it could move to\n\n // First move from the bishops spot up diagonally to the right (ie col++, row++)\n for (int i = startCol+1, j = startRow+1; i<=8 && j<8; i++,j++) {\n validMoves[validMovesIndex] = i; // the col\n validMoves[validMovesIndex + 1] = j; // the row\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the right (ie col++, row--)\n for (int i = startCol+1, j = startRow-1; i<=8 && j>0; i++,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the left (ie col--, row--)\n for (int i = startCol-1, j = startRow-1; i>0 && j>0; i--,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n // Next move from the bishops start spot up diagonally to the left (ie col--, row++)\n for (int i = startCol-1, j = startRow+1; i>0 && j<=8; i--,j++) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n \n // depending on the position of the bishop, the final array of possible moves may not have 14 squares\n // although that is the maximum. Create a new array of the actual size and copy into it.\n validMovesResized = Arrays.copyOf(validMoves, validMovesIndex);\n return validMovesResized;\n }", "@Override\n public Position[] getCanMoves() {\n PieceWay way = new PieceWay(getPosition());\n Position[] PawnWay = way.waysPawnPos(color);\n return PawnWay;\n }", "public abstract ArrayList<Move> possibleMoves(Board board);", "public Set<Line> getPossibleMoves(Square[][] board) {\n Set<Line> empty = new HashSet<Line>();\n return getPossibleMoves(board, empty, 0);\n }", "public int[] getPlayableMovesNaive() {\n\t\tint ret[];\n\t\t\n\t\tint curNumPlayable = 0;\n\t\t\n\t\tfor(int i=0; i<Constants.SIZE; i++) {\n\t\t\tfor(int j=0; j<Constants.SIZE; j++) {\n\t\t\t\tif(P1turn && P1Movable[i][j]) {\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t} else if(P1turn == false && P2Movable[i][j]) {\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tret = new int[curNumPlayable];\n\t\tcurNumPlayable = 0;\n\t\t\n\t\tfor(int i=0; i<Constants.SIZE; i++) {\n\t\t\tfor(int j=0; j<Constants.SIZE; j++) {\n\t\t\t\tif(P1turn && P1Movable[i][j]) {\n\t\t\t\t\tret[curNumPlayable] = i * Constants.SIZE + j;\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t\t\n\t\t\t\t} else if(P1turn == false && P2Movable[i][j]) {\n\t\t\t\t\tret[curNumPlayable] = i * Constants.SIZE + j;\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "public HashSet<Point> getValidMoves(){\n HashSet<Point> set = new HashSet<Point>();\n if(this.validMove(this.x() + 2, this.y() + 1)){\n set.add(new Point(this.x() + 2, this.y() + 1));\n }\n if(this.validMove(this.x() + 2, this.y() - 1)){\n set.add(new Point(this.x() + 2, this.y() - 1));\n }\n if(this.validMove(this.x() - 2, this.y() + 1)){\n set.add(new Point(this.x() - 2, this.y() + 1));\n }\n if(this.validMove(this.x() - 2, this.y() - 1)){\n set.add(new Point(this.x() - 2, this.y() - 1));\n }\n if(this.validMove(this.x() + 1, this.y() + 2)){\n set.add(new Point(this.x() + 1, this.y() + 2));\n }\n if(this.validMove(this.x() + 1, this.y() - 2)){\n set.add(new Point(this.x() + 1, this.y() - 2));\n }\n if(this.validMove(this.x() - 1, this.y() + 2)){\n set.add(new Point(this.x() - 1, this.y() + 2));\n }\n if(this.validMove(this.x() - 1, this.y() - 2)){\n set.add(new Point(this.x() - 1, this.y() - 2));\n }\n return set;\n }", "@Override\r\n\tpublic void getLegalMoves() {\r\n\t\tint pawnX = this.getX();\r\n\t\tint pawnY = this.getY();\r\n\t\tchar pawnColor = getColor();\r\n\t\tTile[][] chessBoard = SimpleChess.getChessBoard();\r\n\t\tcheckInFront(chessBoard,pawnX,pawnY,pawnColor);\r\n\t\tcheckDiagonal(chessBoard,pawnX,pawnY,pawnColor);\r\n\t}", "public ArrayList<MoveType> getMoves(BotState state, long timeout) {\n ArrayList<MoveType> moves = new ArrayList<MoveType>();\n\n Field field = state.getMyField();\n ShapeType current = state.getCurrentShape();\n ShapeType next = state.getNextShape();\n int myCombo = state.getMyCombo();\n\n Shape piece = new Shape(current, field, state.getShapeLocation());\n Shape nextPiece = new Shape(next, field, (next == ShapeType.O) ? new Point(4, -1) : new Point(3, -1));\n\n Best best = getBestFitness(field, piece, myCombo, nextPiece);\n\n int bestRot = best.bestRot;\n int bestLeft = best.bestLeft;\n\n for (; bestRot > 0; bestRot--)\n moves.add(MoveType.TURNRIGHT);\n if (bestLeft < 0)\n for (; bestLeft < 0; bestLeft++)\n moves.add(MoveType.RIGHT);\n else\n for (; bestLeft > 0; bestLeft--)\n moves.add(MoveType.LEFT);\n\n moves.add(MoveType.DROP);\n return moves;\n }", "List<Moves> getMoveSet();", "public ArrayList<Pair<Coord,Coord>> returnMoves(Board b) {\r\n\t\t//copy Piece grid\r\n\t\tPiece[][] g = b.getGrid();\r\n\t\t\r\n\t\t//return array of all the possible moves\r\n\t\tArrayList<Pair<Coord,Coord>> possibleMoves = new ArrayList<Pair<Coord,Coord>>();\r\n\r\n\t\t//System.out.println(team + \": (\" + c.y + \", \" + c.x + \")\");\r\n\t\t//if the team is moving north (white team)\r\n\t\tif(team) {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y-1][c.x] == null && g[c.y-2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-2,c.x),null));\r\n\t\t\t\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y-1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y-1][c.x-1]!=null && (!g[c.y-1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y-1][c.x+1]!=null && (!g[c.y-1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==3 && g[c.y-1][c.x-1]==null && g[c.y][c.x-1]!=null && !g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==3 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && !g[c.y][c.x+1].team\r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t//if the team is moving south (black team)\r\n\t\t} else {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y+1][c.x] == null && g[c.y+2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+2,c.x),null));\r\n\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y+1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y+1][c.x-1]!=null && (g[c.y+1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y+1][c.x+1]!=null && (g[c.y+1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==4 && g[c.y+1][c.x-1]==null && g[c.y][c.x-1]!=null && g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==4 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && g[c.y][c.x+1].team \r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\treturn possibleMoves;\r\n\t}", "@Override\n public Map<Coordinate, List<Coordinate>> getAllLegalMoves(List<Integer> playerStates) {\n Map<Coordinate, List<Coordinate>> allLegalMoves = new TreeMap<>();\n for (List<GamePiece> row: myGamePieces) {\n for(GamePiece currPiece: row){\n if (playerStates.contains(currPiece.getState()) || currPiece.getState() == myEmptyState) {\n Coordinate currCoord = currPiece.getPosition();\n List<Coordinate> moves = currPiece.calculateAllPossibleMoves(getNeighbors(currPiece), playerStates.get(0));\n if (moves.size() > 0) {\n allLegalMoves.put(currCoord, moves);\n }\n }\n }\n }\n return allLegalMoves;\n }", "@Override\n public Collection<Move> calculateLegalMoves(Board board) {\n System.out.println(\"INSIDE Knight: calculateLegalMoves()\");\n System.out.println(\"------------------------------>\\n\");\n\n //ArrayList of moves used to store all possible legal moves.\n final List<Move> legalMoves = new ArrayList<>();\n\n //Iterate the constant class array of piece offsets.\n for(final int currentCandidate : CANDIDATE_MOVE_COORDS){\n //Add the current coordinate of the piece to each offset, storing as a destination coordinate.\n final int candidateDestinationCoord = this.piecePosition + currentCandidate;\n\n //If the destination coordinate is within legal board bounds (between 0 and 64)...\n if(BoardUtils.isValidCoord(candidateDestinationCoord)){\n //Check to see if the piece is in the first column and its destination would move it outside the board.\n if(isfirstColumnExclusion(this.piecePosition, currentCandidate) ||\n isSecondColumnExclusion(this.piecePosition, currentCandidate) ||\n isSeventhColumnExclusion(this.piecePosition, currentCandidate) ||\n isEighthColumnExclusion(this.piecePosition, currentCandidate)){\n continue; //Continue the loop if any of these methods return true\n }\n\n //Store the tile of the destination coordinate.\n final Tile candidateDestinationTile = board.getTile(candidateDestinationCoord);\n\n //If the tile is not marked as occupied by the Tile class...\n if(!candidateDestinationTile.isOccupied()){\n //Add the move to the list of legal moves as a non-attack move.\n legalMoves.add(new MajorMove(board, this, candidateDestinationCoord));\n }\n else{\n //Otherwise, get the type and alliance of the piece at the destination.\n final Piece pieceAtDestination = candidateDestinationTile.getPiece();\n final Alliance pieceAlliance = pieceAtDestination.getPieceAlliance();\n\n //If the piece at the occupied tile's alliance differs...\n if(this.pieceAlliance != pieceAlliance){\n //Add the move to the list of legal moves as an attack move.\n legalMoves.add(new MajorAttackMove(board, this, candidateDestinationCoord, pieceAtDestination));\n }\n }\n }\n }\n\n //Return the list of legal moves.\n return legalMoves;\n }", "@Override\n\tpublic List<Move> getPossibleMoves(Chessboard chessboard) {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}", "public List<MovePath> getNextMoves(boolean backward, boolean forward) {\n final ArrayList<MovePath> result = new ArrayList<MovePath>();\n final MoveStep last = getLastStep();\n// if (isJumping()) {\n// final MovePath left = clone();\n// final MovePath right = clone();\n//\n// // From here, we can move F, LF, RF, LLF, RRF, and RRRF.\n// result.add(clone().addStep(MovePath.MoveStepType.FORWARDS));\n// for (int turn = 0; turn < 2; turn++) {\n// left.addStep(MovePath.MoveStepType.TURN_LEFT);\n// right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n// result.add(left.clone().addStep(MovePath.MoveStepType.FORWARDS));\n// result.add(right.clone().addStep(MovePath.MoveStepType.FORWARDS));\n// }\n// right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n// result.add(right.addStep(MovePath.MoveStepType.FORWARDS));\n//\n// // We've got all our next steps.\n// return result;\n// }\n\n // need to do a separate section here for Aeros.\n // just like jumping for now, but I could add some other stuff\n // here later\n if (getEntity() instanceof Aero) {\n MovePath left = clone();\n MovePath right = clone();\n\n // From here, we can move F, LF, RF, LLF, RRF, and RRRF.\n result.add((clone()).addStep(MovePath.MoveStepType.FORWARDS));\n for (int turn = 0; turn < 2; turn++) {\n left.addStep(MovePath.MoveStepType.TURN_LEFT);\n right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n result.add(left.clone().addStep(MovePath.MoveStepType.FORWARDS));\n result.add(right.clone().addStep(MovePath.MoveStepType.FORWARDS));\n }\n right.addStep(MovePath.MoveStepType.TURN_RIGHT);\n result.add(right.addStep(MovePath.MoveStepType.FORWARDS));\n\n // We've got all our next steps.\n return result;\n }\n\n // If the unit is prone or hull-down it limits movement options, unless\n // it's a tank; tanks can just drive out of hull-down and they cannot\n // be prone.\n if (getFinalProne() || (getFinalHullDown() && !(getEntity() instanceof Tank))) {\n if ((last != null) && (last.getType() != MoveStepType.TURN_RIGHT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_LEFT));\n }\n if ((last != null) && (last.getType() != MoveStepType.TURN_LEFT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_RIGHT));\n }\n\n if (getEntity().isCarefulStand()) {\n result.add(clone().addStep(MovePath.MoveStepType.CAREFUL_STAND));\n } else {\n result.add(clone().addStep(MovePath.MoveStepType.GET_UP));\n }\n return result;\n }\n if (canShift()) {\n if (forward && (!backward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_LEFT)))) {\n result.add(clone().addStep(MoveStepType.LATERAL_RIGHT));\n }\n if (forward && (!backward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_RIGHT)))) {\n result.add(clone().addStep(MovePath.MoveStepType.LATERAL_LEFT));\n }\n if (backward\n && (!forward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_LEFT_BACKWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.LATERAL_RIGHT_BACKWARDS));\n }\n if (backward\n && (!forward || ((last == null) || (last.getType() != MovePath.MoveStepType.LATERAL_RIGHT_BACKWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.LATERAL_LEFT_BACKWARDS));\n }\n }\n if (forward && (!backward || ((last == null) || (last.getType() != MovePath.MoveStepType.BACKWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.FORWARDS));\n }\n if ((last == null) || (last.getType() != MovePath.MoveStepType.TURN_LEFT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_RIGHT));\n }\n if ((last == null) || (last.getType() != MovePath.MoveStepType.TURN_RIGHT)) {\n result.add(clone().addStep(MovePath.MoveStepType.TURN_LEFT));\n }\n if (backward && (!forward || ((last == null) || (last.getType() != MovePath.MoveStepType.FORWARDS)))) {\n result.add(clone().addStep(MovePath.MoveStepType.BACKWARDS));\n }\n return result;\n }", "public List<Move> getAvailableSpaces() {\n List<Move> availableMoves = new ArrayList<>();\n for (int i = 0; i < LENGTH; i++) {\n for (int j = 0; j < LENGTH; j++) {\n Move move = new Move(i, j);\n if (isValidMove(move)) {\n availableMoves.add(move);\n }\n }\n }\n return availableMoves;\n }", "Iterator<BoardPosition> possibleMovingPositions(BoardPosition from, Game game, Map<BoardPosition, Piece> pieceMap);", "@Override\n public void getMoves(ArrayList<Move> moves) {\n // WARNING: This function must not return duplicate moves\n moves.clear();\n\n for (int i = 0; i < 81; ++i) {\n if (board[i] == currentPlayer) {\n getMovesSingleStep(moves, i);\n getMovesJump(moves, i, i);\n }\n }\n }", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "private List<Coordinate> getAvailableMoves(ImmutableGameBoard gameBoard) {\n List<Coordinate> availableMoves = new ArrayList<Coordinate>();\n\n for (int x = 0; x < gameBoard.getWidth(); x++) {\n for (int y = 0; y < gameBoard.getHeight(); y++) {\n if(gameBoard.getSquare(x, y) == TicTacToeGame.EMPTY)\n availableMoves.add(new Coordinate(x, y));\n }\n }\n\n return availableMoves;\n }", "private List<Move> generateMoves(boolean debug) {\r\n\r\n\t\tList<Piece> pieces = this.chessGame.getPieces();\r\n\t\tList<Move> validMoves = new ArrayList<Move>();\r\n\t\tMove testMove = new Move(0,0,0,0);\r\n\t\t\r\n\t\tint pieceColor = (this.chessGame.getGameState()==ChessGame.GAME_STATE_WHITE\r\n\t\t\t?Piece.COLOR_WHITE\r\n\t\t\t:Piece.COLOR_BLACK);\r\n\r\n\t\t// iterate over all non-captured pieces\r\n\t\tfor (Piece piece : pieces) {\r\n\r\n\t\t\t// only look at pieces of current players color\r\n\t\t\tif (pieceColor == piece.getColor()) {\r\n\t\t\t\t// start generating move\r\n\t\t\t\ttestMove.sourceRow = piece.getRow();\r\n\t\t\t\ttestMove.sourceColumn = piece.getColumn();\r\n\r\n\t\t\t\t// iterate over all board rows and columns\r\n\t\t\t\tfor (int targetRow = Piece.ROW_1; targetRow <= Piece.ROW_8; targetRow++) {\r\n\t\t\t\t\tfor (int targetColumn = Piece.COLUMN_A; targetColumn <= Piece.COLUMN_H; targetColumn++) {\r\n\r\n\t\t\t\t\t\t// finish generating move\r\n\t\t\t\t\t\ttestMove.targetRow = targetRow;\r\n\t\t\t\t\t\ttestMove.targetColumn = targetColumn;\r\n\r\n\t\t\t\t\t\tif(debug) System.out.println(\"testing move: \"+testMove);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// check if generated move is valid\r\n\t\t\t\t\t\tif (this.validator.isMoveValid(testMove, true)) {\r\n\t\t\t\t\t\t\t// valid move\r\n\t\t\t\t\t\t\tvalidMoves.add(testMove.clone());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// generated move is invalid, so we skip it\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn validMoves;\r\n\t}", "List<Move> legalMoves(Piece side) {\r\n legalMovesArr = new ArrayList<Move>();\r\n HashSet<Square> pieceSide = pieceLocations(side);\r\n for (Square pieces : pieceSide) {\r\n for (int i = 0; i <= 8; i++) {\r\n Move x = mv(pieces, sq(pieces.col(), i));\r\n legalMovesArr.add(x);\r\n }\r\n for (int j = 0; j <= 8; j++) {\r\n Move y = mv(pieces, sq(j, pieces.row()));\r\n legalMovesArr.add(y);\r\n }\r\n while (legalMovesArr.remove(null));\r\n }\r\n return legalMovesArr;\r\n }", "public List<String> allSquaresNoMove ()\n {\n List<Square> squareList = new ArrayList<>();\n List<String> stringList = new ArrayList<>();\n\n squareList.addAll(player.getSquare().getGameBoard().getArena().squareReachableNoWall(player.getSquare().getX() , player.getSquare().getY(),2));\n\n for (Square square : squareList)\n stringList.add(square.toStringCoordinates());\n\n return stringList;\n\n }", "@Override\n\tpublic List<Point> getAvailableMoves() {\n\t\treturn new ArrayList<Point>();\n\t}", "ArrayList<Move> getMoves() {\n ArrayList<Move> result = new ArrayList<>();\n getMoves(result);\n return result;\n }", "private List<int[]> generatePossibleMoveActions(LabyrinthGameState state) {\n List<Tile> tiles = new ArrayList<>();\n Tile orig = state.getPlayerLoc(Player.values()[playerNum]);\n tiles.add(orig);\n this.calculatePossibleMoves(orig, tiles);\n List<int[]> locations = new ArrayList<>();\n for (Tile spot : tiles) {\n int[] loc = new int[2];\n loc[0] = spot.getX();\n loc[1] = spot.getY();\n locations.add(loc);\n }\n return locations;\n }", "@Override\n\tpublic Collection<Move> calculateLegalMoves(final Board board) {\n\t\t\n\t\t//Array that will hold of the legal moves for the Pawn\n\t\tfinal List<Move> legalMoves = new ArrayList<>();\n\t\t\n\t\t//Loop through all possible moves by applying of the offsets to the Pawn's current position\n\t\tfor(final int currentCandidateOffset: CANDIDATE_MOVE_COORDINATES){\n\t\t\t\n\t\t\t//Apply the offset to the Pawn's current position\n\t\t\tfinal int candidateDestinationCoordinate = this.piecePosition + (this.getPieceTeam().getDirection() * currentCandidateOffset);\n\t\t\t\n\t\t\t//Checks if the Destination Coordinate is valid\n\t\t\tif(!BoardUtils.isValidTileCoordinate(candidateDestinationCoordinate)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Checks if this tile is occupied\n\t\t\tif(currentCandidateOffset == 8 && !board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnMove(board, this, candidateDestinationCoordinate)));\n\t\t\t\telse\n\t\t\t\t\tlegalMoves.add(new Move.PawnMove(board, this, candidateDestinationCoordinate));\t\n\t\t\t}\n\t\t\t//Checks if the Pawn is on it's first move\n\t\t\telse if(currentCandidateOffset == 16 && this.isFirstMove() && ((BoardUtils.SEVENTH_RANK[this.piecePosition] && \n\t\t\t\t\tthis.getPieceTeam().isBlack()) || (BoardUtils.SECOND_RANK[this.piecePosition] && this.getPieceTeam().isWhite()))) {\n\t\t\t\t\n\t\t\t\t//Calculate coordinate of the tile behind candidate coordinate\n\t\t\t\tfinal int behindCandidateDestinationCoordinate = this.piecePosition + (this.pieceTeam.getDirection() * 8);\n\t\t\t\t\n\t\t\t\t//Checks if the tile behind the candidate destination is NOT occupied & if the Tile at the Candidate Destination is NOT occupied\n\t\t\t\tif(!board.getTile(behindCandidateDestinationCoordinate).isTileOccupied() && \n\t\t\t !board.getTile(candidateDestinationCoordinate).isTileOccupied())\n\t\t\t\t\t\tlegalMoves.add(new Move.PawnJump(board, this, candidateDestinationCoordinate));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t//Checks for edge cases in the 7 direction\t\n\t\t\t} else if(currentCandidateOffset == 7 &&\n\t\t\t\t\t!((BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t\n\t\t\t\t//This basically checks if En Passant Pawn is next to Player's pawn\t\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition + (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\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//Checks for edge cases in the 9 direction\t\n\t\t\t} else if(currentCandidateOffset == 9 && \n\t\t\t\t\t!((BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition - (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\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}\n\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn ImmutableList.copyOf(legalMoves);\n\t}", "public static HashSet<gameState> Actions(gameState currentState) {\n\t\t\n\t\tHashSet<gameState> possibleStates = new HashSet<gameState>();\n\t\t\n\t\t\n\t\t// Store which player goes next after this player plays\n\t\tint nextNextUp;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tnextNextUp = 1;\n\t\t} else {\n\t\t\tnextNextUp = 0;\n\t\t}\n\t\t\n\t\t// Store corresponding characters for each player\n\t\t// DARK(X) - 0, LIGHT(O) - 1\n\t\tchar myTile;\n\t\tchar opponentTile;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tmyTile = 'x';\n\t\t\topponentTile = 'o';\n\t\t} else {\n\t\t\tmyTile = 'o';\n\t\t\topponentTile = 'x';\n\t\t}\n\n\t\t\n\n\t\t// Check the entire board of the state \n\t\tfor (int i = 0; i<boardSize; i++) {\n\t\t\tfor (int j = 0; j<boardSize; j++) {\n\t\t\t\t\n\t\t\t\t// If the tile is my tile\n\t\t\t\tif (currentState.getBoard()[i][j] == '_') {\n\t\t\t\t\t\n\t\t\t\t\tchar[][] moveBoard = createNewBoard(currentState);\n\t\t\t\t\t\n\t\t\t\t\t// Up\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If it is an opponent tile, then you keep going up until you either my tile (fail) or\n\t\t\t\t\t\t// a blank space (success/move possible)\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=i;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Down\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=i;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j-1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=j;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j+1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=j;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j-1] == opponentTile) { \n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j+1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j-1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\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} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j+1] == opponentTile) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\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} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\tif (!compareBoards(moveBoard, currentState.getBoard())) {\n\t\t\t\t\t\tgameState move = new gameState(moveBoard, nextNextUp);\t\t\n\t\t\t\t\t\tpossibleStates.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\n\t\treturn possibleStates;\n\t\t\n\t\t\n\t\t\n\t}", "public Iterable<Board> solution()\n {\n Stack<Board> solution = new Stack<Board>();\n \n // for case where initial board is goal board\n if (moves == 0) {\n solution.push(goalNode.board);\n return solution;\n }\n\n step = goalNode;\n \n // add chain of previous node from goal node \n while (step != null) {\n solution.push(step.board);\n step = step.prev;\n }\n \n return solution;\n }", "public ArrayList<Point> moves() {\n\t\tmoves = new ArrayList<Point>();\n\t\tif (point.x > 0 && board.pieceAt(point.x - 1, point.y) == null)\n\t\t\tmoves.add(board.left(point));\n\t\tif (point.x < board.getXDim() - 1 && board.pieceAt(point.x + 1, point.y) == null)\n\t\t\tmoves.add(board.right(point));\n\t\tif (point.y > 0 && board.pieceAt(point.x, point.y - 1) == null)\n\t\t\tmoves.add(board.above(point));\n\t\tif (point.y < board.getYDim() - 1 && board.pieceAt(point.x, point.y + 1) == null)\n\t\t\tmoves.add(board.below(point));\n\t\treturn (ArrayList<Point>) moves.clone();\n\t}", "public List<Integer> getLegalMoves()\n\t{\n\t\tArrayList<Integer> moves = new ArrayList<Integer>();\n\t\tfor (int col = 0; col < cols; col++)\n\t\t{\n\t\t\tif (isEmpty(0,col))\n\t\t\t\tmoves.add(col);\n\t\t}\n\t\treturn moves;\n\t}", "@Override\n ArrayList<Cell> findPossibleMoves(Cell workerPosition) {\n ArrayList<Cell> neighbors = board.getNeighbors(workerPosition);\n ArrayList<Cell> possibleMoves = new ArrayList<Cell>();\n for (Cell cell : neighbors) {\n // + allow movement to cells occupied by opponents, if they can be pushed away\n Cell nextCell;\n int nextX = cell.getPosX() + (cell.getPosX() - workerPosition.getPosX());\n int nextY = cell.getPosY() + (cell.getPosY() - workerPosition.getPosY());\n try {\n nextCell = board.getCell(nextX, nextY);\n } catch (ArrayIndexOutOfBoundsException e) {\n nextCell = null;\n }\n if ((!cell.hasWorker() || (nextCell != null && !nextCell.hasWorker() && !nextCell.isDomed())) &&\n !cell.isDomed() && (cell.getBuildLevel() <= workerPosition.getBuildLevel() + 1))\n possibleMoves.add(cell);\n //\n }\n return findLegalMoves(workerPosition, possibleMoves);\n }", "boolean[][][] getNewAvailMoves() {\n\t\tboolean[][][] newAvailMoves = new boolean[boardSize][boardSize][boardSize];\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tnewAvailMoves[i][j][k] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn newAvailMoves;\n\t}", "public ArrayList<Move> getLegalMoves() {\n return Logic.legalMoves(turn, this);\n }", "private String getMoves(String[] all) {\n boolean addNow = false;\n String curr = \"\";\n for (String s : all) {\n if (addNow) {\n curr += s;\n }\n if (s.equals(\"S\") || s.equals(\"s\")) {\n addNow = true;\n }\n }\n return curr;\n }", "private ArrayList<Coordinates> freeMoves(Maze maze) {\n\t\tArrayList<Coordinates> dirs = new ArrayList<>();\n\n\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\t\tif (x == 0 ^ y == 0) {\n\t\t\t\t\tCoordinates move = find().add(x, y);\n\t\t\t\t\tif (!maze.outOfRange(move)) {\n\t\t\t\t\t\tif (!maze.getMCell(move).wall()) {\n\t\t\t\t\t\t\tdirs.add(new Coordinates(x, y));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dirs;\n\t}", "void getMoves(ArrayList<Move> moves) {\n if (gameOver()) {\n return;\n }\n if (jumpPossible()) {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n getJumps(moves, k);\n }\n } else {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n getMoves(moves, k);\n }\n }\n }", "public List<Move> getMoves(ChessBoard chessBoard) {\r\n\t\tList<Move> moves = new ArrayList<>();\r\n\t\tfor (Direction direction : directions) {\r\n\t\t\tfor (int n = 1; n <= maxRange ; n++) {\r\n\t\t\t\tMove move = new Move(x, y, direction, n);\r\n\t\t\t\tif (chessBoard.allows(move)) {\r\n\t\t\t\t\tif (move.isTake(chessBoard)) {\r\n\t\t\t\t\t\tTakeMove takeMove = new TakeMove(x, y, direction, n);\r\n\t\t\t\t\t\ttakeMove.setPiece(this);\r\n\t\t\t\t\t\tPiece pieceAtDestination = chessBoard.pieceAtField(move.getToX(), move.getToY());\r\n\t\t\t\t\t\ttakeMove.setTaken(pieceAtDestination);\r\n\t\t\t\t\t\tmoves.add(takeMove);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmove.setPiece(this);\r\n\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\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\treturn moves;\r\n\t}", "public ArrayList<Location> getMoveLocations()\n {\n ArrayList<Location> locs = new ArrayList<Location>();\n ArrayList<Location> validLocations = getGrid().getValidAdjacentLocations(getLocation());\n for (Location neighborLoc : validLocations)\n {\n if (getGrid().get(neighborLoc) == null || getGrid().get(neighborLoc) instanceof AbstractPokemon || getGrid().get(neighborLoc) instanceof PokemonTrainer)\n locs.add(neighborLoc);\n }\n return locs;\n }", "public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}", "public static void compute_possible_moves(Board s){\n\t\tint b [][] = s.board;\n\t\tint x = -1;\n\t\tint y = -1;\n\t\tfor (int i = 0;i < b.length;i++) {\n\t\t\tfor (int j = 0;j < b[i].length;j++) {\n\t\t\t\tif(b[i][j] == 0){\n\t\t\t\t\tx = i;\n\t\t\t\t\ty = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\tint left [][];\n\t\tint right [][];\n\t\tint up [][];\n\t\tint down [][];\n\t\tpossible_boards.clear();\n\t\tif(x - 1 != -1 && x >= 0 && x < 3){\n\t\t\t//up is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\n\t\t\tint temp = temporary_board[x - 1][y];\n\t\t\ttemporary_board[x - 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tup = temporary_board;\n\n\t\t\tBoard up_board = new Board(up);\n\t\t\tpossible_boards.add(up_board);\n\n\t\t}\n\t\tif(x + 1 != 3 && x >= 0 && x < 3){\n\t\t\t//down is a legal move\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x + 1][y];\n\t\t\ttemporary_board[x + 1][y] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tdown = temporary_board;\n\t\t\tBoard down_board = new Board(down);\n\t\t\tpossible_boards.add(down_board);\n\t\t}\n\t\tif(y - 1 != -1 && y >= 0 && y < 3){\n\t\t\t//left move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y - 1];\n\t\t\ttemporary_board[x][y - 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tleft = temporary_board;\n\t\t\tBoard left_board = new Board(left);\n\t\t\tpossible_boards.add(left_board);\n\n\t\t}\n\t\tif(y + 1 != 3 && y >= 0 && y < 3){\n\t\t\t//right move is legal\n\t\t\tint temporary_board [][] = new int[b.length][];\n\t\t\tfor(int q = 0; q < b.length; q++)\n\t\t\t temporary_board [q] = b[q].clone();\n\t\t\t\n\t\t\tint temp = temporary_board[x][y + 1];\n\t\t\ttemporary_board[x][y + 1] = temporary_board[x][y];\n\t\t\ttemporary_board[x][y] = temp;\n\t\t\tright = temporary_board;\n\t\t\tBoard right_board = new Board(right);\n\t\t\tpossible_boards.add(right_board);\n\n\t\t}\n\n\t}", "public Set<Move> getMovesForPlayer(Player player) {\n\t\tfinal Set<Move> moveList = new HashSet<Move>();\n\t\tfor (Map.Entry<Position, Piece> entry : positionToPieceMap.entrySet()) {\n\t\t\tfinal Position positionFrom = entry.getKey();\n\t\t\tfinal Piece piece = entry.getValue();\n\t\t\tif (player == piece.getOwner()) {\n\t\t\t\tfor (char column = Position.MIN_COLUMN; column <= Position.MAX_COLUMN; column++) {\n\t\t\t\t\tfor (int row = Position.MIN_ROW; row <= Position.MAX_ROW; row++) {\n\t\t\t\t\t\tfinal Position positionTo = new Position(column, row);\n\t\t\t\t\t\tif (!positionFrom.equals(positionTo)) {\n\t\t\t\t\t\t\tfinal Piece possiblePieceOnPosition = getPieceAt(positionTo);\n\t\t\t\t\t\t\tif (possiblePieceOnPosition == null || possiblePieceOnPosition.getOwner() != player) { //can move to free position \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //or position where enemy is placed\n\t\t\t\t\t\t\t\tif (piece instanceof Pawn) {\n\t\t\t\t\t\t\t\t\tPawn pawn = (Pawn) piece;\n\t\t\t\t\t\t\t\t\tpawn.isValidFightMove(positionFrom, positionTo);\n\t\t\t\t\t\t\t\t\tmoveList.add(new Move(positionFrom, positionTo));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinal boolean isKnight = (piece instanceof Knight); // knight can jump over sheets\n\t\t\t\t\t\t\t\tif (piece.isValidMove(positionFrom, positionTo) && !isBlocked(positionFrom, positionTo, isKnight)) {\n\t\t\t\t\t\t\t\t\tmoveList.add(new Move(positionFrom, positionTo));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn moveList;\n\t}", "abstract public int[] makeMove();", "public ArrayList<Move> generateMoves(Board board, Piece piece, boolean getMoves, boolean getCaptures){\r\n\r\n\t\tArrayList<Move> list = new ArrayList<Move>();\r\n\t\tint moveNumber = piece.getMoveNumber();\r\n\t\tif(!(moveNumber >= minMove && moveNumber <= maxMove)) {\r\n\t\t\treturn list;\r\n\t\t}\r\n\t\tint i = 0;\r\n\t\tint x = piece.getPosition().getXNumeral();\r\n\t\tint y = piece.getPosition().getYNumeral();\r\n\t\twhile(board.isValidSquare(new Touple(x + dx, y + dy)) && i < limit) {\r\n\t\t\tx += dx;\r\n\t\t\ty += dy;\r\n\t\t\ti++;\r\n\t\t\t\r\n\t\t\tif(board.spaceEmpty(new Touple(x,y))) {\r\n\t\t\t\tif(move && getMoves) {\r\n\t\t\t\t\tlist.add(new Move(x-piece.getPosition().getXNumeral(),y-piece.getPosition().getYNumeral()));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tTouple proposedCapture = new Touple(x,y);\r\n\t\t\t\t//if(capture && getMoves && !board.getPiece(proposedCapture).getColor().equals(piece.getColor())) {\r\n\t\t\t\tif(capture && getMoves && !board.pieceColorIs(proposedCapture, piece.getColor())) {\r\n\t\t\t\t\tlist.add(new Move(x-piece.getPosition().getXNumeral(),y-piece.getPosition().getYNumeral()));\r\n\t\t\t\t}\r\n\t\t\t\tif(blockable) {\t//if this move class is blockable\r\n\t\t\t\t\ti = limit; //allow no futher moves.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public AgentAction getNextMove(GameTile [][] visibleMap) {\r\n\t\t//Possible things to add to your moves\r\n//\t\tnextMove = AgentAction.doNothing;\r\n//\t\tnextMove = AgentAction.moveDown;\r\n//\t\tnextMove = AgentAction.moveUp;\r\n//\t\tnextMove = AgentAction.moveUp;\r\n//\t\tnextMove = AgentAction.moveLeft;\r\n//\t\tnextMove = AgentAction.pickupSomething;\r\n//\t\tnextMove = AgentAction.declareVictory;\r\n//\r\n//\t\tnextMove = AgentAction.shootArrowNorth;\r\n//\t\tnextMove = AgentAction.shootArrowSouth;\r\n//\t\tnextMove = AgentAction.shootArrowEast;\r\n//\t\tnextMove = AgentAction.shootArrowWest;\r\n//\t\tnextMove = AgentAction.quit\r\n\t\t\r\n\t\t\r\n\r\n\t\t//Ideally you would remove all this code, but I left it in so the keylistener would work\r\n\t\tif(keyboardPlayOnly) {\r\n\t\t\tif(nextMove == null) {\r\n\t\t\t\treturn AgentAction.doNothing;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tAgentAction tmp = nextMove;\r\n\t\t\t\tnextMove = null;\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//This code plays 5 \"games\" and then quits\r\n\t\t\t//Just does random things\r\n\t\t\tif(numGamesPlayed > 19) {\r\n\t\t\t\treturn AgentAction.quit;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(nextMoves.isEmpty()) {\r\n\t\t\t\t\tsetStartingPosition(visibleMap);\r\n//\t\t\t\t\tfindWumpus(visibleMap);\r\n//\t\t\t\t\tfindWumpus(visibleMap);\r\n//\t\t\t\t\tWumpusState currentState = huntTheWumpus(visibleMap);\r\n//\t\t\t\t\tSystem.out.println(wumpusHunted);\r\n//\t\t\t\t\tif(wumpusHunted) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\t\taddToNextMoves(currentState);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//this is the code to collect the gold\r\n//\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\tcurrentState = findTheGold(currentState);\r\n//\t\t\t\t\tif(currentState.getGoldCollected()) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n//\t\t\t\t\t\taddToNextMoves(currentState);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tif(!goldCollected) {\r\n\t\t\t\t\t\twellItsDarkNow(visibleMap);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(goldCollected) {\r\n//\t\t\t\t\t\tcurrentState.setParent(null);\r\n\t\t\t\t\t\taddToNextMoves(visibleMap);\r\n//\t\t\t\t\t\tgoldCollected = false;\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\tif(!nextMoves.isEmpty()) {\r\n\t\t\t\t\tSystem.out.println(nextMoves.peek());\r\n\t\t\t\t\tsetNextMove(nextMoves.remove());\r\n//\t\t\t\t\tSystem.out.println(nextMove);\r\n//\t\t\t\t\treturn nextMove;\r\n\t\t\t\t}\r\n\t\t\t\treturn nextMove;\r\n//\t\t\t\tcurrentNumMoves++;\r\n//\t\t\t\tif(currentNumMoves < 20) {\r\n//\t\t\t\t\treturn AgentAction.randomAction();\r\n//\t\t\t\t}\r\n//\t\t\t\telse {\r\n//\t\t\t\t\treturn AgentAction.declareVictory;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "protected Direction selectMove() {\n Map<Integer, Direction> positive, negative;\n // Add the directions that contains negative stations in a negative set\n // And every other direction in a positive set\n positive = new HashMap<Integer,Direction>(16);\n negative = new HashMap<Integer,Direction>(16);\n for (Direction d : Direction.directions) {\n int result = checkMove(d);\n if (result == 1) {\n positive.put(positive.size(), d);\n } else if (result == 0) {\n negative.put(negative.size(), d);\n } else {\n continue;\n }\n }\n // If there is no positive move, choose a RANDOM negative move\n if (positive.isEmpty()) {\n return negative.get(rand.nextInt(negative.size()));\n } else { // Otherwise choose a RANDOM positive move\n return positive.get(rand.nextInt(positive.size()));\n }\n }", "private void generateMoves(AINode root, int i) {\n\n //Make All Rotates\n AINode rotateNode = new AINode(root.copyState());\n for (int j = 0; j <= i; j++) {\n rotateNode.getState().checkRotate(true);\n }\n\n //Checks all possible slide locations\n for (int j = 0; j < 12; j++ ) {\n if (rotateNode.getState().getDisabledArrow().ordinal() == j) {\n continue;\n }\n AINode slideNode = new AINode(rotateNode.copyState());\n slideNode.getState().checkSlideTile(Arrow.values()[j]);\n\n //Checks all possible move locations for each slide location\n List<int[]> movePlaces = generatePossibleMoveActions(\n slideNode.getState());\n for (int[] spot : movePlaces) {\n AINode moveNode = new AINode(slideNode.copyState());\n moveNode.getState().checkMovePawn(spot[0], spot[1]);\n\n double eval = evalState(moveNode.getState());\n synchronized (possibleMoves) {\n possibleMoves.add(new double[]{i, j, spot[0], spot[1], eval});\n }\n }\n }\n }", "private Move defaultMoveInGoodPlace(PentagoBoard b0) {\n \tPentagoBoard b = (PentagoBoard)b0.clone();\n \tList<Move> moves = b.getMovesFor(getColor());\n \tfor(Move m: moves) {\n \t\tPentagoMove pM = (PentagoMove)m;\n \t\tif(havMyNeighbour(b,getColor(), pM.getPlaceX(), pM.getPlaceY()) == false)\n \t\t\tcontinue;\n \t\tif(canWinInRow(b,pM.getPlaceY(),getColor())) {\n \t\t\tb.doMove(m);\n \t\t\tif(canWinOpponentNow(b) != null) { // przeciwnik nie moze wygrac po moim ruchu\n \t\t\tb.undoMove(m);\n \t\t\tcontinue;\n \t\t}\n \t\t\treturn m;\n \t\t}\n \t\tif(canWinInColumn(b,pM.getPlaceX(),getColor())) {\n \t\t\tb.doMove(m);\n \t\t\tif(canWinOpponentNow(b) != null) { // przeciwnik nie moze wygrac po moim ruchu\n \t\t\tb.undoMove(m);\n \t\t\tcontinue;\n \t\t}\n \t\t\treturn m;\n \t\t}\n \t}\n \treturn null;\n }", "public Iterator<Move> getMoves() {\n\t\treturn new MoveSetIterator<CMNMove>(movesLeft);\n\t}", "public ArrayList<ArrayList<Tile>> getAllMovePaths(Board board) {\n ArrayList<ArrayList<Tile>> result = new ArrayList<>();\n for (int row = 0; row < board.getRows(); row++) {\n for (int col = 0; col < board.getColumns(); col++) {\n if(isValidMove(row,col)){\n result.add(getMovePath(board, row, col));\n }\n }\n }\n return result;\n }", "public Collection<Move> getLegalMoves(){\n return legalMoves;\n }", "private ArrayList<String> getPossibleMoves(String boardString) {\n ArrayList<String> reachableBoards = new ArrayList<>();\n for (int i = 0; i < 9; i++) {\n if ((new AIBoard(boardString, 0)).isValidMove(i)) {\n Board board = new Board(boardString);\n board.makeAMove(i);\n reachableBoards.add(board.toString());\n }\n }\n\n return reachableBoards;\n }", "public ArrayList<SlidingPuzzleState> getPossibleNextMoves(){\n\t\tArrayList<SlidingPuzzleState> moves = new ArrayList<SlidingPuzzleState>();\n\t\tint holeNum = 0;\n\t\tfor (Coordinate h: _holes){\n\t\t\t\n\t\t\t//for every hole, check if its not on the edges\n\t\t\t//of the puzzle and if his next position is not\n\t\t\t//already a hole\n\t\t\t\n\t\t\tif (h.getI() > 0 && _puzzle[h.getI()-1][h.getJ()]!=0){\n\t\t\t\t\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.UP));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getI() < (_rows-1) && _puzzle[h.getI()+1][h.getJ()]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.DOWN));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() > 0 && _puzzle[h.getI()][h.getJ()-1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.LEFT));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() < (_cols-1) && _puzzle[h.getI()][h.getJ()+1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.RIGHT));\n\t\t\t}\n\t\t\tholeNum++;\n\t\t}\n\t\treturn moves;\n\t}", "public List<ScoredMove> allmShipMoves(GameState gm){\n\t\t\n\t\tList<ScoredMove> mShipMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\tif (getHand().hasMShip()) {\n\t\t\tfor (Card c: getHand().getCards()) {\n\t\t\t\tif (c instanceof MerchantShip) {\n\t\t\t\t\tmShipMoves.add(new ScoredMove(ACTION.PLAY_MERCHANT_SHIP, c, null));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn mShipMoves;\n\t}", "private String hardMove() {\n return super.makeAMove(getBestMoveForBlack(FORESEEN_MOVES * 2));\n }", "public static int[][] getPlayerFullMove(int[][] board, int player) {\r\n\t\t// Get first move/jump\r\n\t\tint fromRow = -1, fromCol = -1, toRow = -1, toCol = -1;\r\n\t\tboolean jumpingMove = canJump(board, player);\r\n\t\tboolean badMove = true;\r\n\t\tgetPlayerFullMoveScanner = new Scanner(System.in);//I've modified it\r\n\t\twhile (badMove) {\r\n\t\t\tif (player == 1){\r\n\t\t\t\tSystem.out.println(\"Red, Please play:\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Blue, Please play:\");\r\n\t\t\t}\r\n\r\n\t\t\tfromRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\tfromCol = getPlayerFullMoveScanner.nextInt();\r\n\r\n\t\t\tint[][] moves = jumpingMove ? getAllBasicJumps(board, player) : getAllBasicMoves(board, player);\r\n\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, MARK);\r\n\t\t\ttoRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\ttoCol = getPlayerFullMoveScanner.nextInt();\r\n\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, EMPTY);\r\n\r\n\t\t\tbadMove = !isMoveValid(board, player, fromRow, fromCol, toRow, toCol); \r\n\t\t\tif (badMove)\r\n\t\t\t\tSystem.out.println(\"\\nThis is an illegal move\");\r\n\t\t}\r\n\r\n\t\t// Apply move/jump\r\n\t\tboard = playMove(board, player, fromRow, fromCol, toRow, toCol);\r\n\t\tshowBoard(board);\r\n\r\n\t\t// Get extra jumps\r\n\t\tif (jumpingMove) {\r\n\t\t\tboolean longMove = (getRestrictedBasicJumps(board, player, toRow, toCol).length > 0);\r\n\t\t\twhile (longMove) {\r\n\t\t\t\tfromRow = toRow;\r\n\t\t\t\tfromCol = toCol;\r\n\r\n\t\t\t\tint[][] moves = getRestrictedBasicJumps(board, player, fromRow, fromCol);\r\n\r\n\t\t\t\tboolean badExtraMove = true;\r\n\t\t\t\twhile (badExtraMove) {\r\n\t\t\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, MARK);\r\n\t\t\t\t\tSystem.out.println(\"Continue jump:\");\r\n\t\t\t\t\ttoRow = getPlayerFullMoveScanner.nextInt();\r\n\t\t\t\t\ttoCol = getPlayerFullMoveScanner.nextInt();\r\n\t\t\t\t\tmarkPossibleMoves(board, moves, fromRow, fromCol, EMPTY);\r\n\r\n\t\t\t\t\tbadExtraMove = !isMoveValid(board, player, fromRow, fromCol, toRow, toCol); \r\n\t\t\t\t\tif (badExtraMove)\r\n\t\t\t\t\t\tSystem.out.println(\"\\nThis is an illegal jump destination :(\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply extra jump\r\n\t\t\t\tboard = playMove(board, player, fromRow, fromCol, toRow, toCol);\r\n\t\t\t\tshowBoard(board);\r\n\r\n\t\t\t\tlongMove = (getRestrictedBasicJumps(board, player, toRow, toCol).length > 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn board;\r\n\t}", "public String[] getPossibleMoves(Position p)\r\n\t{\r\n\t\tint x,y,z,counter = 0; \r\n\t\tString[] moves;\r\n\t\t\r\n\t\tx = p.getX();\r\n\t\ty = p.getY();\r\n\t\tz = p.getZ();\r\n\t\t\r\n\t\tif(y+1 < maze.length)\r\n\t\t\tif(this.maze[y+1][z][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(y-1 >= 0)\r\n\t\t\tif(this.maze[y-1][z][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(z+1 < maze[0].length)\r\n\t\t\tif(this.maze[y][z+1][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(z-1 >= 0)\r\n\t\t\tif(this.maze[y][z-1][x] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(x+1 < maze[0][0].length)\r\n\t\t\tif(this.maze[y][z][x+1] == 0)\r\n\t\t\t\tcounter++;\r\n\t\tif(x-1 >= 0)\r\n\t\t\tif(this.maze[y][z][x-1] == 0)\r\n\t\t\t\tcounter++;\r\n\t\t\r\n\t\tmoves = new String[counter];\r\n\t\tint j = 0;\r\n\t\t\r\n\t\tif(y+1 < maze.length)\r\n\t\t\tif(this.maze[y+1][z][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Up\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(y-1 >= 0)\r\n\t\t\tif(this.maze[y-1][z][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Down\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(z+1 < maze[0].length)\r\n\t\t\tif(this.maze[y][z+1][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Forward\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(z-1 >= 0)\r\n\t\t\tif(this.maze[y][z-1][x] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Backward\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(x+1 < maze[0][0].length)\r\n\t\t\tif(this.maze[y][z][x+1] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Right\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\tif(x-1 >= 0)\r\n\t\t\tif(this.maze[y][z][x-1] == 0)\r\n\t\t\t{\r\n\t\t\t\tmoves[j] = \"Left\";\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\r\n\t\treturn moves;\r\n\t\t\r\n\t}", "protected ArrayList<Location> getMovesInDirection(int xIncr, int yIncr, Team sameTeam, Team oppositeTeam, ArrayList<Location>possibleMoves)\n\t{\n\t\tboolean canStillMove = true;\n\t\tLocation currLoc = new Location(l.getX(), l.getY());\n\t\twhile(canStillMove)\n\t\t{\n\t\t\tcurrLoc = new Location(currLoc.getX()+xIncr, currLoc.getY()+yIncr);\n\t\t\tif(!currLoc.isValid() || sameTeam.containsPieceOnLocation(currLoc))\n\t\t\t{\n\t\t\t\tcanStillMove = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpossibleMoves.add(currLoc);\n\t\t\t\tif(oppositeTeam.containsPieceOnLocation(currLoc))\n\t\t\t\t{\n\t\t\t\t\tcanStillMove = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn possibleMoves;\n\t}", "List<Cell> getPossibleMoves(Board board,\n Color color) {\n List<Cell> possible_moves = new ArrayList<Cell>();\n boolean flip_dir = false;\n //loop through all cells in board\n for (int i = 0; i < board.getRows(); i++) {\n for (int j = 0; j < board.getCols(); j++) {\n //check in all directions if move will flip cells\n for (Direction d : Direction.values()) {\n flip_dir = flipInDirection(board, i, j, d, color);\n if (flip_dir) {\n possible_moves.add(board.getCell(i,j));\n break;\n }\n }\n }\n }\n return possible_moves;\n }", "boolean makeMove(Bouger m) {\n\tlong oldBits[] = { pieceBits[LIGHT], pieceBits[DARK] };\n\n\tint from, to;\n\t/*\n\t* test to see if a castle move is legal and move the rook (the king is\n\t* moved with the usual move code later)\n\t*/\n\tif ((m.bits & 2) != 0) {\n\n\tif (inCheck(side))\n\treturn false;\n\tswitch (m.getTo()) {\n\tcase 62:\n\tif (color[F1] != EMPTY || color[G1] != EMPTY\n\t|| attack(F1, xside) || attack(G1, xside))\n\treturn false;\n\tfrom = H1;\n\tto = F1;\n\tbreak;\n\tcase 58:\n\tif (color[B1] != EMPTY || color[C1] != EMPTY\n\t|| color[D1] != EMPTY || attack(C1, xside)\n\t|| attack(D1, xside))\n\treturn false;\n\tfrom = A1;\n\tto = D1;\n\tbreak;\n\tcase 6:\n\tif (color[F8] != EMPTY || color[G8] != EMPTY\n\t|| attack(F8, xside) || attack(G8, xside))\n\treturn false;\n\tfrom = H8;\n\tto = F8;\n\tbreak;\n\tcase 2:\n\tif (color[B8] != EMPTY || color[C8] != EMPTY\n\t|| color[D8] != EMPTY || attack(C8, xside)\n\t|| attack(D8, xside))\n\treturn false;\n\tfrom = A8;\n\tto = D8;\n\tbreak;\n\tdefault: /* shouldn't get here */\n\tfrom = -1;\n\tto = -1;\n\tbreak;\n\t}\n\tcolor[to] = color[from];\n\tpiece[to] = piece[from];\n\tcolor[from] = EMPTY;\n\tpiece[from] = EMPTY;\n\tpieceBits[side] ^= (1L << from) | (1L << to);\n\t}\n\t/* back up information so we can take the move back later. */\n\n\tHistoryData h = new HistoryData();\n\th.m = m;\n\tto = m.getTo();\n\tfrom = m.getFrom();\n\th.capture = piece[to];\n\th.castle = castle;\n\th.ep = ep;\n\th.fifty = fifty;\n\th.pawnBits = new long[] { pawnBits[LIGHT], pawnBits[DARK] };\n\th.pieceBits = oldBits;\n\thistDat[hply++] = h;\n\n\t/*\n\t* update the castle, en passant, and fifty-move-draw variables\n\t*/\n\tcastle &= castleMask[from] & castleMask[to];\n\tif ((m.bits & 8) != 0) {\n\tif (side == LIGHT)\n\tep = to + 8;\n\telse\n\tep = to - 8;\n\t} else\n\tep = -1;\n\tif ((m.bits & 17) != 0)\n\tfifty = 0;\n\telse\n\t++fifty;\n\n\t/* move the piece */\n\tint thePiece = piece[from];\n\tif (thePiece == KING)\n\tkingSquare[side] = to;\n\tcolor[to] = side;\n\tif ((m.bits & 32) != 0) {\n\tpiece[to] = m.promote;\n\tpieceMat[side] += pieceValue[m.promote];\n\t} else\n\tpiece[to] = thePiece;\n\tcolor[from] = EMPTY;\n\tpiece[from] = EMPTY;\n\tlong fromBits = 1L << from;\n\tlong toBits = 1L << to;\n\tpieceBits[side] ^= fromBits | toBits;\n\tif ((m.bits & 16) != 0) {\n\tpawnBits[side] ^= fromBits;\n\tif ((m.bits & 32) == 0)\n\tpawnBits[side] |= toBits;\n\t}\n\tint capture = h.capture;\n\tif (capture != EMPTY) {\n\tpieceBits[xside] ^= toBits;\n\tif (capture == PAWN)\n\tpawnBits[xside] ^= toBits;\n\telse\n\tpieceMat[xside] -= pieceValue[capture];\n\t}\n\n\t/* erase the pawn if this is an en passant move */\n\tif ((m.bits & 4) != 0) {\n\tif (side == LIGHT) {\n\tcolor[to + 8] = EMPTY;\n\tpiece[to + 8] = EMPTY;\n\tpieceBits[DARK] ^= (1L << (to + 8));\n\tpawnBits[DARK] ^= (1L << (to + 8));\n\t} else {\n\tcolor[to - 8] = EMPTY;\n\tpiece[to - 8] = EMPTY;\n\tpieceBits[LIGHT] ^= (1L << (to - 8));\n\tpawnBits[LIGHT] ^= (1L << (to - 8));\n\t}\n\t}\n\n\t/*\n\t* switch sides and test for legality (if we can capture the other guy's\n\t* king, it's an illegal position and we need to take the move back)\n\t*/\n\tside ^= 1;\n\txside ^= 1;\n\tif (inCheck(xside)) {\n\ttakeBack();\n\treturn false;\n\t}\n\treturn true;\n\t}", "public List<ScoredMove> allAttackMoves(GameState gm) {\n\t\tList<ScoredMove> attackMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\t// check for attacking battles\n\t\tif (gm.getBattleList().size() > 0) {\n\t\t\tfor (Battle b: gm.getBattleList()) {\n\t\t\t\tif (!b.isBattleUsingTrumps()) {\n\t\t\t\t\tfor (Card c: getHand().getCards()){\n\t\t\t\t\t\tif (c instanceof PirateShip) {\n\t\t\t\t\t\t\tif (canPirateShipCardAttack(b, (PirateShip)c)){\n\t\t\t\t\t\t\t\tattackMoves.add(new ScoredMove(ACTION.PLAY_ATTACK, c, b));\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}\n\t\t\t\tfor (Card c: getHand().getCards()) {\n\t\t\t\t\tif (c instanceof Trump) {\n\t\t\t\t\t\tif (canTrumpCardAttack(b, (Trump)c)) {\n\t\t\t\t\t\t\tattackMoves.add(new ScoredMove(ACTION.PLAY_ATTACK, c, b));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn attackMoves;\n\t}", "private List<SearchNode<T>> performMoves(final SearchNode<T> parent) {\n\t\tfinal List<SearchNode<T>> succesors = new ArrayList<SearchNode<T>>(Move.values().length);\n\t\tfor (Move direction : Move.values()) {\n\t\t\t// Get board to move empty tile on\n\t\t\tfinal Board<T> tmp = parent.getBoard()\n\t\t\t\t\t\t\t\t\t\t.clone();\n\t\t\ttry {\n\t\t\t\t// perform the moves\n\t\t\t\tswitch (direction) {\n\t\t\t\tcase UP:\n\t\t\t\t\ttmp.moveUp();\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\ttmp.moveDown();\n\t\t\t\t\tbreak;\n\t\t\t\tcase LEFT:\n\t\t\t\t\ttmp.moveLeft();\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\ttmp.moveRight();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new UnsupportedOperationException(\"Direction with name '\" + direction.name() + \"' cannot not handled\");\n\t\t\t\t}\n\t\t\t\t// Add found successor in case of valid move\n\t\t\t\tsuccesors.add(new SearchNode<T>(parent.getCostsFormStart() + 1, parent, tmp, goal, direction));\n\t\t\t} catch (InvalidMoveException e) {\n\t\t\t\t// do nothing on invalid move\n\t\t\t}\n\t\t}\n\n\t\treturn succesors;\n\t}", "public ArrayList<GameActionSet> getPossibleActions(GameMap map, GamePath movePath)\n {\n return getPossibleActions(map, movePath, false);\n }", "public void makeMove() {\n ArrayList<Field> myFields = new ArrayList<>();\n for (Field[] fieldsRow : fields) {\n for (Field field : fieldsRow) {\n if(field != null && this.equals(field.getPlayer())) {\n myFields.add(field);\n }\n }\n }\n bestMove[0] = myFields.get(0);\n bestMove[1] = myFields.get(0);\n\n Random rand = new Random();\n for(Field destination : destinationFields) {\n if(canMove()) break;\n destinationField = destination;\n for (Field origin : myFields) {\n for(int i = 0; i < origin.getNeighbours().length; ++i) {\n Field neighbour = origin.getNeighbours()[i];\n if(neighbour != null) {\n if(neighbour.getPlayer() == null) {\n if(valueOfMove(origin, neighbour) > valueOfMove(bestMove[0], bestMove[1])) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n } else if(valueOfMove(origin, neighbour) == valueOfMove(bestMove[0], bestMove[1])) {\n if(rand.nextBoolean()) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n }\n }\n } else {\n Field nextField = neighbour.getNeighbours()[i];\n if(nextField != null) {\n correctJumpPaths(origin,null, origin);\n }\n }\n }\n }\n }\n }\n }", "public List<Integer> GetMoves(boolean growthMoves, boolean expandMoves, boolean captureMoves, int maxGrowthValue) {\n List<Integer> moves = new ArrayList<>();\n\n if (Winner != PlayerType.Empty) {\n return moves;\n } else if (GetMoveTypeForTurn(Turn) == MoveType.AllGrow) {\n moves.add(Constants.AllGrowMove);\n } else {\n for (int i = 0; i < 80; i++) {\n // Grow existing tiles\n if (growthMoves && ((Tiles[i] > 0 && Player == PlayerType.One) || (Tiles[i] < 0 && Player == PlayerType.Two)) && Math.abs(Tiles[i]) < maxGrowthValue) {\n if (!Settings.AllowDormantVolcanoes || !Dormant[i]) {\n moves.add(i);\n }\n }\n\n // Claim new tiles\n if (expandMoves && Tiles[i] == 0) {\n moves.add(i);\n }\n\n // Capture enemy tiles\n if (captureMoves) {\n PlayerType opponent = Player == PlayerType.One ? PlayerType.Two : PlayerType.One;\n if (Settings.AllowMagmaChamberCaptures &&\n ((Tiles[i] > 0 && opponent == PlayerType.One) || (Tiles[i] < 0 && opponent == PlayerType.Two)) &&\n Math.abs(Tiles[i]) <= Settings.MaxMagmaChamberLevel) {\n moves.add(i);\n }\n if (Settings.AllowVolcanoCaptures &&\n ((Tiles[i] > 0 && opponent == PlayerType.One) || (Tiles[i] < 0 && opponent == PlayerType.Two)) &&\n Math.abs(Tiles[i]) > Settings.MaxMagmaChamberLevel) {\n moves.add(i);\n }\n }\n }\n }\n\n if (moves.size() == 0) {\n if (growthMoves && expandMoves & captureMoves && maxGrowthValue >= Settings.MaxVolcanoLevel) {\n // There are no moves in this position\n return moves;\n } else {\n return GetMoves(true, true, true, Settings.MaxVolcanoLevel);\n }\n }\n\n return moves;\n }", "public static int[][] getAllBasicJumps(int[][] board, int player) {\r\n\t\t\t\r\n\t\tint[][] moves = new int [0][4];\r\n\t\tint[][] SaveMoves = new int [0][4]; /*save our moves of the soldures*/\r\n\t\tint[][] positions = playerDiscs(board,player);\r\n\t\tint SumAllJump=0; /*varibel ho count all the posible Jumps*/\r\n\t\t\t\r\n\t\tfor(int IPD=0;IPD<positions.length;IPD=IPD+1){/*running on all the solduers*/\r\n\t\t\t/*Building an array with all the move possible for a specific soldier*/\r\n\t\t\tint[][] JumpsPossible = getRestrictedBasicJumps (board,player,positions[IPD][0],positions[IPD][1]); \r\n\t\t\t/*if the move legal enter the move in the arry*/\r\n\t\t\tif (JumpsPossible.length>0){/*If the soldier has jumps legality, From one with jumps by other soldiers*/\t\t\t\t\r\n\t\t\t\tSumAllJump=SumAllJump+JumpsPossible.length;\r\n\t\t\t\tSaveMoves = moves;\r\n\t\t\t\tmoves = new int [SumAllJump][4];\r\n\t\t\t\tif (SumAllJump>1) {\r\n\t\t\t\t\tfor (int idxSAM1=SaveMoves.length-1;idxSAM1>-1;idxSAM1=idxSAM1-1){\r\n\t\t\t\t\t\tfor (int idxSAM2=0;idxSAM2<4;idxSAM2=idxSAM2+1){\r\n\t\t\t\t\t\t\tmoves[idxSAM1][idxSAM2]=SaveMoves[idxSAM1][idxSAM2];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tfor(int indx=0;indx<JumpsPossible.length;indx=indx+1){\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][0]=JumpsPossible [indx][0];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][1]=JumpsPossible [indx][1];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][2]=JumpsPossible [indx][2];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][3]=JumpsPossible [indx][3];\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn moves;\r\n\t}" ]
[ "0.71157384", "0.67832166", "0.67566746", "0.653827", "0.6455479", "0.63458335", "0.6307706", "0.6266227", "0.62627006", "0.6242111", "0.6211819", "0.6200217", "0.61959463", "0.6195052", "0.6130961", "0.6101517", "0.6078783", "0.6071811", "0.60663307", "0.60454726", "0.6005497", "0.5991555", "0.59795463", "0.5971061", "0.59620184", "0.59521127", "0.5940045", "0.5936521", "0.5921275", "0.59104705", "0.59057206", "0.5901629", "0.5894446", "0.58828366", "0.5881398", "0.5864545", "0.5844889", "0.58380556", "0.5832342", "0.58267987", "0.58236885", "0.5820923", "0.57905805", "0.5776967", "0.5776727", "0.5775821", "0.57686484", "0.57485646", "0.5748378", "0.57397306", "0.5719373", "0.57160497", "0.57126415", "0.56989163", "0.5698674", "0.5687346", "0.56872267", "0.5675057", "0.566546", "0.5664092", "0.5651544", "0.56513786", "0.5645086", "0.5634795", "0.56334066", "0.56317353", "0.5619407", "0.5609696", "0.5586526", "0.5585798", "0.5578239", "0.5556725", "0.5547365", "0.55435234", "0.55313", "0.5521873", "0.5519981", "0.55120105", "0.549831", "0.5494182", "0.54937273", "0.54930055", "0.54898083", "0.5487237", "0.5486973", "0.54607743", "0.54514337", "0.543056", "0.54190105", "0.5414178", "0.5412548", "0.53992707", "0.53970635", "0.53889686", "0.53870994", "0.5383433", "0.53818816", "0.5373614", "0.53733116", "0.53725874" ]
0.6812016
1
Created by HuangYanfei on 2018/11/8.
public interface CaptureImgService { String captureImg(HttpServletRequest re, String url, String size) throws IOException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\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 comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void mo4359a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private void init() {\n\n\t}", "public void mo6081a() {\n }", "@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\tprotected void interr() {\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void strin() {\n\n\t}", "Petunia() {\r\n\t\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\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo55254a() {\n }", "@Override\n public void initialize() {\n \n }", "@Override\n public void init() {}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void init() {}", "Constructor() {\r\n\t\t \r\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}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private TMCourse() {\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "private void init() {\n\n\n\n }", "public void mo9848a() {\n }", "protected void mo6255a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void gored() {\n\t\t\n\t}", "private UsineJoueur() {}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}" ]
[ "0.6035497", "0.6011667", "0.5731827", "0.5731827", "0.56960946", "0.56871814", "0.56711954", "0.56466347", "0.5628532", "0.56116945", "0.5604931", "0.5599245", "0.55548716", "0.5550231", "0.5549911", "0.55456764", "0.5530675", "0.55154276", "0.55152076", "0.549629", "0.54884905", "0.54873365", "0.5479559", "0.5475715", "0.5472509", "0.5472045", "0.5462351", "0.5450919", "0.5444896", "0.5443112", "0.5443112", "0.5443112", "0.5443112", "0.5443112", "0.5443112", "0.5434642", "0.5429064", "0.5428965", "0.5428965", "0.5428965", "0.5428965", "0.5428965", "0.5428965", "0.5428965", "0.5407788", "0.5406767", "0.5405427", "0.5405427", "0.5370341", "0.5365066", "0.5365066", "0.5365066", "0.5365066", "0.5365066", "0.53529465", "0.5349308", "0.5336429", "0.5333279", "0.5333279", "0.5333279", "0.5322492", "0.5321492", "0.5321492", "0.5316769", "0.5316769", "0.5316769", "0.53039044", "0.5303578", "0.530198", "0.5298421", "0.52900773", "0.52900773", "0.52884555", "0.5283585", "0.52814317", "0.5276621", "0.5274712", "0.5269912", "0.5266494", "0.52640957", "0.52624804", "0.52582103", "0.52582103", "0.52582103", "0.5249167", "0.52460957", "0.52456945", "0.52224123", "0.5222069", "0.5221627", "0.5216407", "0.5214147", "0.52106166", "0.5210038", "0.5208736", "0.5195434", "0.51941645", "0.51941437", "0.5191738", "0.51896363", "0.5185835" ]
0.0
-1
Add a player in the list only if inclusion of new players is allowed.
public boolean addPlayer(Player player){ if(this.canAdd){ this.players.add(player); if(this.players.size() == 2) this.nextElem = 1; } return this.canAdd; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }", "public boolean addPlayer(Player player)\n\t{\n\t\treturn playerList.add(player);\n\t}", "@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 }", "public void addPlayer(Player player) {\n playerList.add(player);\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}", "public void addPlayer(Player player){\n players.add(player);\n }", "public void addPlayer(Player p) {\n if (gameState != GameState.AWAITING_PLAYERS) {\n throw new GameStateInvalidException(\"Cannot add players once game is underway...\");\n }\n\n // ok, just add...\n if (!players.contains(p)) {\n players.add(p);\n }\n }", "default boolean addPlayer(Player player) {\n return addPlayer(Objects.requireNonNull(player, \"player\").getName());\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 addPlayer(Player newPlayer);", "public void addUser(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\t\r\n\t\tif(flag)\r\n\t\t\tlist.add(new NimPlayer(U,F,G,0,0,\"Human\"));\r\n\t\tSystem.out.println(\"\");\r\n\t}", "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 final void addPlayer(Player player) {\n\n\t\tif (player instanceof CulturePlayer) {\t\t\t\t\t\t\t\t// not too pretty but simple\n\t\t\tif (((CulturePlayer)player).isDissect()) { // instead of the culture player\n\t\t\t\tplayers.addAll(((CulturePlayer)player).getCulture()); // add all masters of the culture\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tplayers.add(player);\n\t}", "public void addPlayer(Player player) {\r\n players.add(player);\r\n ((DefaultListModel<Player>) playerListGui.getModel()).addElement(player);\r\n }", "boolean addPlayer(String player);", "private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }", "public void addPlayer(Player player) {\n\t\tif(players.isEmpty()) {\n\t\t\tcurrent=player;\n\t\t\tplayers.add(current);\n\t\t}\n\t\telse {\n\t\t\tplayers.add(player);\n\t\t}\n\t}", "public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}", "public boolean addPlayerItem(PlayerItem playerItem);", "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 void addPlayer(Player player) {\n this.add(player);\n this.players.add(player);\n }", "public synchronized void addPlayer(PlayerHandler player) {\n\n if (activePlayers < numMaxPlayers) {\n\n players[activePlayers] = player;\n System.out.println(player.getName() + \" added to game as player \" + (activePlayers + 1));\n activePlayers++;\n return;\n }\n\n System.out.println(\"This room (\" + this.toString() + \") is full\");\n }", "public void addPlayer(String p) {\n this.playersNames.add(p);\n }", "public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}", "public void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }", "public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }", "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 }", "public void addPlayer(Player inPlayer) {\n\t\tgetPlayersInRoom().add(inPlayer);\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}", "void addEventPlayers(Player player, boolean team);", "public void addPlayers(List<Player> players) {\n\n\t\tthis.players.addAll(players);\n\t}", "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 }", "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 addMember(Player player) {\n\t\tif (members.isEmpty()) {\n\t\t\tcacheParty(this); // Caches the party if it went from empty to not empty\n\t\t}\n\t\tmembers.add(player.getUniqueId());\n\t}", "public boolean checkIfPlayerInList(Player player, Player player1) {\n for(int i = 0; i < core.getPlayers().get(player).size(); i++) {\n /*\n if(core.getPlayers().get(player).contains(configList.get(i))) {\n core.getPlayers().get(player).add(configList.get(i));\n }\n */\n if (core.getPlayers().get(player).get(i).equalsIgnoreCase(player1.getName())) {\n return true;\n }\n }\n return false;\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}", "void newPlayer(String name, String institution){\n Player newPlayer = new Player(name, institution,0);\n boolean x = players.add(newPlayer);\n }", "private boolean addRestrictedCard2Player(Card card)\n\t{\n\t\treturn restrictedCard2PlayerList.add(card);\n\t}", "private static void addNewlyArrivedUsersAsPlayers(Match match, boolean hasTheGameStarted) {\n LinkedList<Player> playersInGame = match.getGame().listOfAllPlayersAndDealer_LastPosition();\n LinkedList<User> allUsers = match.getUsers();\n List<User> newUsers = getUsersWhoAreNotRegisteredAsPlayers(playersInGame, allUsers);\n\n for (User newUser : newUsers) {\n Player newPlayer = new Player(newUser);\n match.getGame().preparePlayerForNextRound(newPlayer, hasTheGameStarted);\n match.getGame().addPlayer(newPlayer);\n }\n }", "public boolean isAvailable(Player player) {\n return playerList.contains(player);\n }", "public boolean addPlayerCard(GreenPlayerCard card) {\r\n\t\tthis.playerCards.add(card);\r\n\t\treturn true;\r\n\t}", "public void addPlayer(String name) {\n\t\tcreateGameLobbyController.addPlayerToList(name);\n\t}", "@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }", "void addPlayer(IPlayer player);", "public void addPlayer(EntityPlayerMP player)\r\n {\r\n int var2 = (int)player.posX >> 4;\r\n int var3 = (int)player.posZ >> 4;\r\n player.managedPosX = player.posX;\r\n player.managedPosZ = player.posZ;\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 this.getPlayerInstance(var4, var5, true).addPlayer(player);\r\n }\r\n }\r\n\r\n this.players.add(player);\r\n this.filterChunkLoadQueue(player);\r\n }", "public abstract boolean canAddItem(Player player, Item item, int slot);", "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}", "public void addPlayer(String name) {\n players.add(new Player(name));\n }", "public void addPlayerToTheFirstEmptyPlace(Player p) {\r\n\t\tfor (int i = 0; i < NB_PLAYER_MAX; i++) {\r\n\t\t\tif (players.get(i) == null) {\r\n\t\t\t\tplayers.put(i, p);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "abstract boolean allowedToAdd(Card card);", "@Override\n\tpublic void onAddToLocalList(Player player) {\n\t\tsuper.onAddToLocalList(player);\n\n\t\tif (phase == AbyssalSirePhase.SLEEPING || phase == AbyssalSirePhase.AWAKE) {\n\t\t\tgetEventHandler().addEvent(this, new CycleEvent<Entity>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void execute(CycleEventContainer<Entity> container) {\n\t\t\t\t\tcontainer.stop();\n\n\t\t\t\t\tif (phase == AbyssalSirePhase.SLEEPING) {\n\t\t\t\t\t\tsetIdleAnimation(4527);\n\t\t\t\t\t} else if (phase == AbyssalSirePhase.AWAKE) {\n\t\t\t\t\t\tsetIdleAnimation(4529);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void stop() {\n\n\t\t\t\t}\n\t\t\t}, 2);\n\t\t}\n\t}", "public void addMember(Player player) {\n this.members.add(player.getUniqueId().toString());\n }", "void addPerson(Player player);", "public static void addPlayer(MovingUnit player) {\r\n\t\t_players.add(player);\r\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 void addPlayer(FootballPlayer aPlayer) {\n\t\tplayers.add(aPlayer);\n\t}", "public void registerPlayer(BlackjackPlayer player) {\r\n getPlayers().add(player);\r\n }", "@Override\r\n\tpublic Player add(final Player player) {\r\n\t\tfinal String sql = \"insert into player (playerid, name, balance, updated, deleted) values (?,?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\r\n\t\t\tjdbcTemplate.update(\r\n\t\t\t\t\tnew PreparedStatementCreator() {\r\n\t\t\t\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection) throws SQLException {\r\n\t\t\t\t\t\t\tPreparedStatement ps = connection.prepareStatement(sql, new String[] {\"id\"});\r\n\t\t\t\t\t\t\tps.setString(1, player.getPlayerId());\r\n\t\t\t\t\t\t\tps.setString(2, player.getName());\r\n\t\t\t\t\t\t\tps.setDouble(3, player.getBalance());\r\n\t\t\t\t\t\t\tps.setTimestamp(4, CommonUtils.getCurrentTimestamp());\r\n\t\t\t\t\t\t\tps.setBoolean(5, false);;\r\n\t\t\t\t\t\t\treturn ps;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tkeyHolder);\r\n\t\t\tplayer.setId(keyHolder.getKey().longValue());\r\n\t\t\treturn player;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public PlayList[] addPlayList(String namePlayList, User[] usersRestrictedPlayLists){\n boolean space4 = false;\n for(int i = 0; i<MAX_PLAYLIST && !space4; i++){\n if(thePlayLists[i] == null){\n PlayList restritecPlayList = new RestrictedP(namePlayList, usersRestrictedPlayLists);\n thePlayLists[i] = restritecPlayList;\n numPlayList++;\n space4 = true;\n }\n }\n return thePlayLists;\n }", "public boolean registerPlayer(Player p);", "public void addPlayerToTable(Player player){\n\t\tgamePlayers.add(player);\n\t}", "public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\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}", "public void addVps(Player player) {\n }", "public World addPlayer(Player p){\r\n players.add(p);\r\n return this;\r\n }", "@Override\r\n public void addPlayerHandler(Player player) {\r\n // add new player to current TreeSet\r\n playerByIdTreeSet.add(player);\r\n\r\n if(successor!=null){\r\n // there are more handlers - trigger them to add this player as well\r\n successor.addPlayerHandler(player);\r\n }\r\n }", "public void addPlayerToRandomRoom(Player player) {\n\n randomRoomPlayers.add(player);\n synchronized (this) {\n notify();\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}", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "void playerAdded();", "public abstract BossBar addPlayer(UUID player);", "public void addPlayerDuringGame(String playerName) {\n System.out.println(\"I want to add player \" + playerName + \" to the game!\");\n addPlayer(playerName);\n Collections.shuffle(players);\n }", "public void addParticipants(Player rating) {\n\t\tparticipants.add(rating);\n\t}", "public void addGameToList(String name, String maxPlayers, String playeramount) {\n String gameInformation = \"Game name: #\" + name + \"# max players: #\" + maxPlayers + \"# current amount of players: #\" + playeramount;\n for(int i = 0; i < gamesModel.getSize(); i++) {\n if(gamesModel.contains(name)) {\n gamesModel.remove(i);\n break;\n }\n }\n gamesModel.addElement(gameInformation);\n\n }", "public int addPlayer(PlayerListener player) {\n\t\tfinal int playerID = this.players.size();\n\n\t\tthis.players.add(new Player(\"Player \" + playerID,\n\t\t\t\tgenerateRandomStartLocation(), player));\n\n\t\tif (this.players.size() == 1) {\n\t\t\tstartNewGame();\n\t\t}\n\n\t\treturn playerID;\n\t}", "@Test\n public void testaddPlayer() {\n session.addPlayer(new Player(\"127.0.0.1\", \"Lars\"));\n // Test if the size of the list now is 2.\n assertEquals(2, session.getPlayers().size());\n }", "public void addPlayer(String name, double attackStat, double blockStat){\n players.add(new Player(name, attackStat, blockStat));\n }", "protected void updatePlayer(Player player, PacketBuilder packet) {\n\n /*\n * The update block packet holds update blocks and is send after the\n * master packet.\n */\n PacketBuilder updateBlock = new PacketBuilder();\n\n /*\n * Updates this player.\n */\n manageMovement(true, player, packet);\n masks(player, updateBlock, false);\n\n /*\n * Write the current size of the player list.\n */\n packet.putBits(8, player.getLocalPlayers().size());\n\n /*\n * Iterate through the local player list.\n */\n for (Iterator<Player> it$ = player.getLocalPlayers().iterator(); it$.hasNext(); ) {\n /*\n * Get the next player.\n */\n Player otherPlayer = it$.next();\n\n /*\n * If the player should still be in our list.\n */\n if (WorldModule.getLogic().getPlayers().contains(otherPlayer)\n && !otherPlayer.basicSettings().isTeleporting()\n && otherPlayer.getLocation().withinRange(\n player.getLocation())) {\n /*\n * Update the movement.\n */\n manageMovement(false, otherPlayer, packet);\n\n /*\n * Check if an update is required, and if so, send the update.\n */\n if (otherPlayer.getMasks().requiresUpdate()) {\n masks(otherPlayer, updateBlock, false);\n }\n } else {\n /*\n * Otherwise, remove the player from the list.\n */\n it$.remove();\n\n /*\n * Tell the client to remove the player from the list.\n */\n packet.putBits(1, 1);\n packet.putBits(2, 3);\n }\n }\n\n /*\n * Loop through every player.\n */\n for (Player otherPlayer : WorldModule.getLogic().getLocalPlayers(player.getLocation())) {\n /*\n * Check if there is room left in the local list.\n */\n if (player.getLocalPlayers().size() >= 255) {\n /*\n * There is no more room left in the local list. We cannot\n * add more players, so we just ignore the extra ones. They\n * will be added as other players get removed.\n */\n break;\n }\n\n /*\n * If they should not be added ignore them.\n */\n if (otherPlayer == null || otherPlayer == player\n || player.getLocalPlayers().contains(otherPlayer) || otherPlayer.isReleased()) {\n continue;\n }\n\n /*\n * Add the player to the local list if it is within distance.\n */\n player.getLocalPlayers().add(otherPlayer);\n\n /*\n * Add the player in the packet.\n */\n addPlayer(packet, player, otherPlayer);\n\n /*\n * Update the player, forcing the appearance flag.\n */\n masks(otherPlayer, updateBlock, true);\n }\n\n /*\n * Check if the update block is not empty.\n */\n if (updateBlock.getPosition() != 0) {\n /*\n * Write a magic id indicating an update block follows.\n */\n packet.putBits(11, 2047);\n packet.recalculateBitPosition();\n\n /*\n * Add the update block at the end of this packet.\n */\n packet.put(updateBlock.toPacket().getBytes());\n } else {\n /*\n * Terminate the packet normally.\n */\n packet.recalculateBitPosition();\n }\n /*\n * Write the packet.\n */\n player.write(packet.toPacket());\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}", "public boolean idNewPlayerCheck(TennisPlayer inPlayer) {\n \t\n TennisPlayerContainerNode node = this.root;\n \n for (int i = 0; i < playerCount; i++) {\n \t\n if (node.getPlayer().getId().equals(inPlayer.getId())) {\n return true;\n }\n }\n return false;\n }", "public void addPlayer(final Player aPlayer)\r\n\t{\r\n\t\tmPlayer.setX(mStartX * Block.SIZE);\r\n\t\tmPlayer.setY(mStartY * Block.SIZE);\r\n\t\taddEntity(mPlayer);\r\n\t}", "@Override\n public boolean add(List<Buyer> buyers) {\n return false;\n }", "private void addPlayer(long gameId, long memberId)\r\n\t{\r\n\t\tGame game = gameService.lookupGame(gameId);\r\n\t\tMember member = memberDao.findById(memberId);\r\n\t\tlogger.debug(\"addPlayer game=\"+game.getName()+ \" member=\"+ member.getId());\r\n\t\t\r\n\t\t// check if member already in game, if so do not add (throw error too?)\r\n\t\tfor (Player p : game.getPlayers()) {\r\n\t\t\tif (p.getMember().getId() == member.getId()) {\r\n\t\t\t\tlogger.error(\"Member is already a player\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tPlayer player = new Player();\r\n\t\tplayer.setGame(game);\r\n\t\tplayer.setMember(member);\r\n\t\tplayer.setOrder(findNextPlayerOrder(game));\r\n\t\tplayerDao.create(player);\r\n\t\t\r\n\r\n\t}", "public static void addPlayer(){\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the player\");\n int player = scanner.nextInt();\n if(player >=2) {\n System.out.println(\"Enter the 2 more than player\");\n cardsPlayer(player);\n }\n\n }", "public boolean addGame(Game g)\n {\n \n list.add(g);\n \n return true;\n }", "public void addPlayer(int place, Player p) {\r\n\t\tif (!players.containsKey(place))\r\n\t\t\tplayers.put(place, p);\r\n\t}", "private void addPlayerToGroup(Scoreboard board, Player player) {\n String playername = player.getName();\n board.registerNewTeam(playername);\n board.getTeam(playername).addPlayer(player);\n }", "public void action(Player myPlayer)\n {\n if (getNbUtilisation() == 0) {\n System.out.println(\"Not possible\");\n } else {\n int nHealthy = getPointsHealthy();\n myPlayer.addLifePoints(nHealthy);\n\n }\n }", "void addAttack(AttackObject newAttack) {\n if (canAddAttack(newAttack)) {\n attacksToAdd.add(newAttack);\n if(newAttack.isPlayerAttack()){\n playerAttackCount++;\n }\n }\n }", "public String addPlayerRecord(PlayerRecord playerRecord){\n String str = \"Player record has been saved\";\n Collections.sort(this.topPlayers);\n if (topPlayers.size() < MAX_LIST_SIZE)\n topPlayers.add(playerRecord);\n else{\n if(topPlayers.get(MAX_LIST_SIZE-1).getScore() < playerRecord.getScore()){\n topPlayers.remove(MAX_LIST_SIZE-1);\n topPlayers.add(playerRecord);\n }\n else\n str = \"Player's score is too low to be added\";\n }\n Collections.sort(this.topPlayers);\n return str;\n }", "private void utilAddPartnerToHistory(String playerKey, String parnerKey) {\n\t\tif (playerKey.equals(parnerKey)) {\n\t\t\tthrow new IllegalStateException(playerKey + \" was paired against himself! \");\n\t\t}\n\t\tList<String> partners = this.partnerHistory.get(playerKey);\n\t\tif (partners.contains(parnerKey)) {\n\t\t\t// for the moment just throw exception\n\t\t\tthrow new IllegalStateException(playerKey + \" was paired with \" + parnerKey + \" more then once\");\n\t\t}\n\t\tpartners.add(parnerKey);\n\t}", "public boolean addPlayerVisible(Integer levelIndex) {\n\t\treturn playerVisible.add(levelIndex);\n\t}", "public void register(final Player player) {\n\t\t// do final checks e.g. is player online? is world full?\n\t\tint returnCode = 2;\n\t\tif(!players.add(player)) {\n\t\t\treturnCode = 7;\n\t\t\tlogger.info(\"Could not register player : \" + player + \" [world full]\");\n\t\t}\n\t\tfinal int fReturnCode = returnCode;\n\t\tPacketBuilder bldr = new PacketBuilder();\n\t\tbldr.put((byte) returnCode);\n\t\tbldr.put((byte) player.getRights().toInteger());\n\t\tbldr.put((byte) 0);\n\t\tplayer.getSession().write(bldr.toPacket()).addListener(new IoFutureListener<IoFuture>() {\n\t\t\t@Override\n\t\t\tpublic void operationComplete(IoFuture future) {\n\t\t\t\tif(fReturnCode != 2) {\n\t\t\t\t\tplayer.getSession().close(false);\n\t\t\t\t} else {\n\t\t\t\t\tif(Constants.CONNNECT_TO_LOGIN_SERVER) {\n\t\t\t\t\t\tconnector.sendPrivateMessagingStatus(player);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint mySetting = player.getSettings().getPrivateChatSetting()[1];\n\t\t\t\t\t\tfor(Player p : players) {\n\t\t\t\t\t\t\tint setting = p.getSettings().getPrivateChatSetting()[1];\n\t\t\t\t\t\t\tif(mySetting == 2 && p.getFriends().contains(player.getNameAsLong())\n\t\t\t\t\t\t\t\t\t|| mySetting == 1 && p.getFriends().contains(player.getNameAsLong())\n\t\t\t\t\t\t\t\t\t&& !player.getFriends().contains(p.getNameAsLong()))\n\t\t\t\t\t\t\t\tp.getActionSender().sendPrivateMessageStatus(player.getNameAsLong(), -9);\n\t\t\t\t\t\t\telse if(p.getFriends().contains(player.getNameAsLong()))\n\t\t\t\t\t\t\t\tp.getActionSender().sendPrivateMessageStatus(player.getNameAsLong(), getWorldId());\n\n\t\t\t\t\t\t\tif(setting == 2 && player.getFriends().contains(p.getNameAsLong())\n\t\t\t\t\t\t\t\t\t|| setting == 1 && player.getFriends().contains(p.getNameAsLong())\n\t\t\t\t\t\t\t\t\t&& !p.getFriends().contains(player.getNameAsLong()))\n\t\t\t\t\t\t\t\tplayer.getActionSender().sendPrivateMessageStatus(p.getNameAsLong(), -9);\n\t\t\t\t\t\t\telse if(player.getFriends().contains(p.getNameAsLong()))\n\t\t\t\t\t\t\t\tplayer.getActionSender().sendPrivateMessageStatus(p.getNameAsLong(), getWorldId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tplayer.getActionSender().sendLogin();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif(returnCode == 2) {\n\t\t\tlogger.info(\"Registered player : \" + player + \" [online=\" + players.size() + \"]\");\n\t\t}\n\t}", "public void townAdd(Player player, String[] names, boolean matchOnline) {\n\t\tResident resident;\n\t\tTown town;\n\t\ttry {\n\t\t\tresident = plugin.getTownyUniverse().getResident(player.getName());\n\t\t\ttown = resident.getTown();\n\t\t\tif (!resident.isMayor())\n\t\t\t\tif (!town.hasAssistant(resident))\n\t\t\t\t\tthrow new TownyException(\"You are not the mayor or an assistant.\");\n\t\t} catch (TownyException x) {\n\t\t\tplugin.sendErrorMsg(player, x.getError());\n\t\t\treturn;\n\t\t}\n\n\t\ttownAddResidents(player, town, (matchOnline ? plugin.getTownyUniverse().getOnlineResidents(player, names) : getResidents(player, names)));\n\t\t\n\t\tplugin.updateCache();\n\t}", "@Override\npublic void addPlayer(Player<T> x) {\n\tif (getNumPlayers() == 0) {\n\t\tcurrentPlayer = x;\n\t\tx.setNext(x);\n\t\tnumPlayer++;\n\t} else {\n\t\tPlayer<T> prevNode = this.currentPlayer;\n\t\tfor (int i = 0; i < getNumPlayers(); i++) {\n\t\t\tif (prevNode.getNext().equals(this.currentPlayer)) {\n\t\t\t\tx.setNext(currentPlayer);\n\t\t\t\tprevNode.setNext(x);\n\t\t\t}\n\t\tprevNode = prevNode.getNext(); \n\t\t}\n\tnumPlayer++;\n\t}\n}", "public void addParticipant()\n {\n boolean addFlg = false;\n do\n {\n Scanner scan = new Scanner(System.in);\n flg = scan.nextLine();\n if(flg.equalsIgnoreCase(\"y\") || flg.equalsIgnoreCase(\"Y\"))\n {\n this.autoAdd();\n addFlg = true;\n } else if(flg.equalsIgnoreCase(\"n\")|| flg.equalsIgnoreCase(\"N\"))\n {\n System.out.println(\"Athletes ID list: \");\n switch (this.getGameType()) // print out every athletes who can join the games\n {\n case 1:\n for(int j = 0; j < swimmers.size(); j++)\n {\n System.out.println(swimmers.get(j).getId());\n }\n break;\n case 2:\n for(int j = 0; j < runners.size(); j++)\n {\n System.out.println(runners.get(j).getId());\n }\n break;\n case 3:\n for(int j = 0; j < cyclists.size(); j++)\n {\n System.out.println(cyclists.get(j).getId());\n }\n break;\n }\n for(int j = 0; j < superAthletes.size(); j++)\n {\n System.out.println(superAthletes.get(j).getId());\n }\n addFlg = true;\n this.manualAdd();\n }else {\n System.out.println(\"Invalid Typing\");\n }\n }while (!addFlg);\n }", "public void addParticipant(String uid) {\n\r\n if (!participants.contains(uid))\r\n participants.add(uid);\r\n }", "@Override\n\tpublic boolean addParticipant(String name) throws IOException {\n\t\tif (!name.trim().equalsIgnoreCase(\"\")) {\n\t\t\tmakeRequest(\"?action=addParticipant&name=\"\n\t\t\t\t\t+ URLEncoder.encode(clientName, \"UTF-8\"));\n\t\t\tgetParticipants();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void addEntity(Player player) {\n\t\tentities.add(player);\n\t}", "public boolean pickedup(Player player) {\n\t\treturn false;\n\t}" ]
[ "0.7770727", "0.73560065", "0.71622", "0.7138201", "0.6948595", "0.69124067", "0.682152", "0.66753227", "0.66713953", "0.66440326", "0.66412574", "0.6588741", "0.6534106", "0.6513277", "0.6496004", "0.6480239", "0.6473668", "0.6469277", "0.6417994", "0.63870263", "0.6382772", "0.63805175", "0.6370307", "0.63630885", "0.6344305", "0.6338263", "0.6337006", "0.6333763", "0.6309669", "0.62942046", "0.6258839", "0.62421864", "0.62065727", "0.6192149", "0.61668354", "0.6141429", "0.61395174", "0.6112122", "0.6046821", "0.60288507", "0.6021301", "0.6018447", "0.60028636", "0.59998983", "0.5999251", "0.59938073", "0.5982121", "0.5964871", "0.5958144", "0.5943995", "0.59375983", "0.5932685", "0.5897112", "0.5873194", "0.5860905", "0.58537024", "0.5844793", "0.58355594", "0.583236", "0.5811167", "0.57952684", "0.579523", "0.5791739", "0.5760134", "0.5752604", "0.5747061", "0.57410115", "0.5730627", "0.57129204", "0.5690684", "0.5688891", "0.5667833", "0.566252", "0.56577724", "0.5654714", "0.56493837", "0.5636572", "0.5606222", "0.5605837", "0.5602013", "0.5601791", "0.5593468", "0.55789703", "0.55768704", "0.5561478", "0.5556017", "0.5547912", "0.5538203", "0.55156904", "0.5514862", "0.550578", "0.5504818", "0.5504669", "0.54848295", "0.54776454", "0.5466149", "0.54578084", "0.54572695", "0.5454", "0.54434294" ]
0.6996374
4
Return the status of the players. This status is a formated string composed by manys "PlayerName : NumberOfCards".
public String getPlayersStatus(){ String pStatus = ""; Player player; for(int i = 0; i < this.players.size(); i++){ player = this.players.get(i); pStatus += "[" +player.getName() + ": "; pStatus += Integer.toString(player.numCards()) + "] "; } return pStatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStateOfPlayer(PlayerController playerController)\n {\n // This function is used to print the state of the player\n String str = \"\";\n str += \"Player ID:\"+playerController.getPlayerId()+\" Points-> \"+playerController.getPoints()+\" Total_Fouls_Count-> \"+ playerController.getTotalFoulsCount()+ \" Recent_Unsuccessful_Attempts_Count -> \"+ playerController.getRecentUnsuccessfulAttemptsCount();\n return str;\n }", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public String playerStatsToString() {\r\n\t\t\tString stats = \"\";\r\n\t\t\tstats = stats + username + \"\\n\";\r\n\t\t\tstats = stats + numberOfWins + \"\\n\";\r\n\t\t\tstats = stats + numberOfGames + \"\\n\";\r\n\t\t\tstats = stats + numberOfAttacks + \"\\n\";\r\n\t\t\tstats = stats + numberOfSPAttacks + \"\\n\";\r\n\t\t\tstats = stats + numberOfMeals + \"\\n\";\r\n\t\t\treturn stats;\r\n\t\t}", "public String getStatus() {\n\n if (this.health > 0) {\n StringBuilder stringBuilder = new StringBuilder();\n\n String[] carrierSelfStatus = {\n \"HP: \" + this.health,\n \"Aircraft count: \" + this.aircrafts.size(),\n \"Ammo Storage: \" + this.ammoStorage,\n \"Total damage: \" + this.getAllDamageDone(),\n };\n stringBuilder.append(String.join(\", \", carrierSelfStatus));\n stringBuilder.append(\"\\nAircrafts:\");\n\n List<String> jetStatus = new ArrayList<>();\n for (Jet jet : this.aircrafts) {\n jetStatus.add(\"\\n\");\n jetStatus.add(jet.getStatus());\n }\n stringBuilder.append(String.join(\"\", jetStatus));\n\n return stringBuilder.toString();\n } else {\n return \"It's dead Jim :(\";\n }\n }", "private char getGameStatus() {\n int row;\n int col;\n\n Map<Character, Integer> lineCounts = new HashMap<>();\n\n for (row = 0; row < this.boardSize; row++) {\n countLine(getLineStatus(this.board[row]), lineCounts);\n }\n\n for (col = 0; col < this.boardSize; col++) {\n countLine(getLineStatus(getColumn(col)), lineCounts);\n }\n\n countLine(getLineStatus(getMajorDiag()), lineCounts);\n countLine(getLineStatus(getSubDiag()), lineCounts);\n\n boolean player1Won = lineCounts.getOrDefault(players[0].symbol, 0) > 0;\n boolean player2Won = lineCounts.getOrDefault(players[1].symbol, 0) > 0;\n boolean boardIsFull = lineCounts.getOrDefault(' ', 0) == 0;\n if (player1Won && player2Won) // both players completed lines, it is a tie\n return 'T';\n if (player1Won)\n return players[0].symbol;\n if (player2Won)\n return players[1].symbol;\n if (boardIsFull)\n return 'T';\n return '?';\n }", "public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }", "@Override\r\n public String toString() {\r\n\r\n int num = 1;\r\n String output = String.format(\"Player Name: %s%n%nCurrent \"\r\n + \"Card Ranks:%n\", getName());\r\n for (Card x : currentCards) {\r\n output += String.format(\"%d. %s%n\", num, x.getRank().name());\r\n num++;\r\n\r\n }\r\n return output;\r\n }", "public String toString()\n {\n return \"Player's name: \" + playersName + \". Player's current score: \" + currentScore;\n }", "public String getStatus() {\n\t\tString result = getName() + \"\\n-----------------------------\\n\\n\";\n\t\tfor(int i = 0; i < lines.size(); i++) {\n\t\t\tresult = result + lines.get(i).getStatus() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}", "public String getGameStatus() {\n return gameStatus;\n }", "public String toString()\n {\n String result;\n result = \"Player Name: \" + playerName + \"\\tPlayer Score: \" + playerScore;\n return result;\n }", "@Override\r\n public String toString()\r\n {\r\n //Returns String representation of this Player object\r\n return (\"Player: \" + username + \" is a \" + title + \" ranked \" + rank\r\n + \", has completed \" + gamesCompleted \r\n + \" with a fastest time of \" + fastestTime + \", and an average time of \" + averageTime\r\n + \" currently completing a game: \" + isCompletingGame);\r\n }", "@Override\n public String toString() {\n newPlayer.addPoints(players[0].getPoints());\n WarPlayer winner = players[mostNumOfCards(players)];\n\n if (winner.getPoints() == players[0].getPoints())\n return \"YOU WON!!! With a score of \" + players[0].getPoints();\n return \"Player\" + mostNumOfCards(players) + \" won!!! With a score of \" + winner.getPoints();\n }", "public String getTeamStatus(){\n int i;\n StringBuilder s = new StringBuilder();\n\n s.append(employeeStatus());\n if(this.curHeadCount <= 0)\n s.append(\" and no direct reports yet\");\n else {\n s.append(\" and is managing:\");\n for(i=0;i<this.curHeadCount;i++){\n s.append(\"\\n\");\n s.append(this.employee[i].employeeStatus());\n }\n }\n\n return s.toString();\n }", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public static void getStatus( Player player ) {\n Tools.Prt( player, ChatColor.GREEN + \"=== Premises Messages ===\", programCode );\n Messages.PlayerMessage.keySet().forEach ( ( gn ) -> {\n String mainStr = ChatColor.YELLOW + Messages.PlayerMessage.get( gn );\n mainStr = mainStr.replace( \"%player%\", ChatColor.AQUA + \"%player%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%message%\", ChatColor.AQUA + \"%message%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%tool%\", ChatColor.AQUA + \"%tool%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%digs%\", ChatColor.AQUA + \"%digs%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%nowDurability%\", ChatColor.AQUA + \"%nowDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%targetDurability%\", ChatColor.AQUA + \"%targetDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%score%\", ChatColor.AQUA + \"%score%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%AreaCode%\", ChatColor.AQUA + \"%AreaCode%\" + ChatColor.YELLOW );\n Tools.Prt( player, ChatColor.WHITE + gn + \" : \" + mainStr, programCode );\n } );\n Tools.Prt( player, ChatColor.GREEN + \"=========================\", programCode );\n }", "private String getCardStatusString(int cardStatus) {\n if (cardStatus == BluetoothReader.CARD_STATUS_ABSENT) {\n return \"Absent.\";\n } else if (cardStatus == BluetoothReader.CARD_STATUS_PRESENT) {\n return \"Present.\";\n } else if (cardStatus == BluetoothReader.CARD_STATUS_POWERED) {\n return \"Powered.\";\n } else if (cardStatus == BluetoothReader.CARD_STATUS_POWER_SAVING_MODE) {\n return \"Power saving mode.\";\n }\n return \"The card status is unknown.\";\n }", "public void printTableStatus() {\n\t\tInteger playersLeft = 0;\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) playersLeft++;\n\t\t}\n//\t\tSystem.out.println(\"current bet: \" + currBet);\n//\t\tSystem.out.println(\"players left: \" + playersLeft);\n\t}", "public String playerString() {\n String outString = \"\";\n outString = (playerName + \",\" + String.valueOf(ID) + \",\" + club + \",\" + position + \",\" +\n String.valueOf(age) + \",\" + String.valueOf(projectedScore)\n + \",\" + String.valueOf(available) + \",\" + String.valueOf(onTeam) + \",\"+String.valueOf(draftPick)+\",\"+String.valueOf(predictedPick));\n\n return outString;\n }", "private String getPlayersInfo(List<LightPlayer> players, String name){\n StringBuilder stringBuilder = new StringBuilder();\n for (LightPlayer player : players){\n stringBuilder.append(player.getName());\n if (player.getName().equals(name)) {\n stringBuilder.append(\" (you)\");\n }\n\n stringBuilder\n .append(\"\\n\")\n .append(player.getColor().name())\n .append(\" \")\n .append(\"[\")\n .append(player.getColor().name().toCharArray()[0])\n .append(\"]\")\n .append(\"\\n\");\n\n if (player.getCard() != null) {\n stringBuilder.append(player.getCard().getName().name());\n }\n\n stringBuilder.append(\"\\n\\n\\n\");\n }\n\n return stringBuilder.toString();\n }", "public String getStatusString() {\n return status.toString();\n }", "String getName() {\n return getStringStat(playerName);\n }", "public String toString()\n\t{\n\t\treturn Integer.toString(playerList.size());\n\t}", "public String getStatus() {\n\t\t\n\t\tif(status.equals(\"receptor\")) {\n\t\t\treturn status.substring(0,1).toUpperCase().concat(status.substring(1));\n\t\t}\n\t\treturn status;\n\t}", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}", "public String getStatus() {\n return status.toString();\n }", "public static String getStatus(Connection conn)\n {\n String status = \"Current Status\\n---------------\\nRooms: \";\n if(RoomDB.exist(conn) == -1)\n {\n status += \"No Database\\n\";\n }\n else if(RoomDB.exist(conn) == 0)\n {\n status += \"Empty\\n\";\n }\n else\n {\n status += \"Full\\n\";\n }\n status += \"Reservations: \";\n if(ResDB.exist(conn) == -1)\n {\n status += \"No Database\\n\";\n }\n else if(ResDB.exist(conn) == 0)\n {\n status += \"Empty\\n\";\n }\n else\n {\n status += \"Full\\n\";\n }\n \n return status;\n }", "public String getStatus(){\r\n\t\treturn status;\r\n\t}", "public String toString() {\n\t\tcreatePlayers(playerInfo);\n\t\tString result = \"\";\n\t\t//splits each player in the create players method\n\t\tfor (NFL_Player player : playerInfo) {\n\t\t\tresult += player.toString() + \"\\r------------------------------------------------------\\r\";\n\n\t\t}\n\t\treturn result;\n\t}", "public String toString() {\n String player = new String(penalty + \",\" + secsTillUnpenalise);\n return player;\n }", "public String getStatus()\n \t{\n \t\treturn m_strStatus;\n \t}", "private String getShipsStatus() {\n //the basic strings which will hold the info\n String playerStatusBarBase = \"PLAYER STATUS: H: S: M: E%: \";\n String enemyStatusBarBase = \" ENEMY STATUS: H: S: M: E%: \";\n\n //converts the strings above to character arrays\n char[] playerStatusBarBaseToChar = playerStatusBarBase.toCharArray();\n char[] enemyStatusBarBaseToChar = enemyStatusBarBase.toCharArray();\n\n //makes a string from the players health, then converts to character array\n String playerHealth;\n if(this.playerShipHealth < 10) {\n playerHealth = \"0\" + this.playerShipHealth;\n }\n else {\n playerHealth = \"\" + this.playerShipHealth;\n }\n char[] playerHealthToChar = playerHealth.toCharArray();\n\n //makes a string from the enemy's health, then converts to character array\n String enemyHealth;\n if(this.enemyShipHealth < 10) {\n enemyHealth = \"0\" + this.enemyShipHealth;\n }\n else {\n enemyHealth = \"\" + this.enemyShipHealth;\n }\n char[] enemyHealthToChar = enemyHealth.toCharArray();\n\n //makes a string from the players shield, then converts to character array\n String playerShield = \"\" + this.playerShield;\n char[] playerShieldToChar = playerShield.toCharArray();\n\n //makes a string from the enemy's shield, then converts to character array\n String enemyShield = \"\" + this.enemyShield;\n char[] enemyShieldToChar = enemyShield.toCharArray();\n\n //makes a string from the players missile count, then converts to character array\n String playerMissile;\n if(this.playerMissile < 10) {\n playerMissile = \"0\" + this.playerMissile;\n }\n else {\n playerMissile = \"\" + this.playerMissile;\n }\n char[] playerMissileToChar = playerMissile.toCharArray();\n\n //makes a string from the enemy's missile count, then converts to character array\n String enemyMissile;\n if(this.enemyMissile < 10) {\n enemyMissile = \"0\" + this.enemyMissile;\n }\n else {\n enemyMissile = \"\" + this.enemyMissile;\n }\n char[] enemyMissileToChar = enemyMissile.toCharArray();\n\n //makes a string from the players evasion percent\n String playerEvasion;\n if(this.playerEvasionPercent * 100 < 10) {\n playerEvasion = \"00\" + (this.playerEvasionPercent * 100);\n }\n else if(this.playerEvasionPercent * 100 < 100) {\n playerEvasion = \"0\" + (this.playerEvasionPercent * 100);\n }\n else {\n playerEvasion = \"\" + this.playerEvasionPercent;\n }\n char[] playerEvasionToChar = playerEvasion.toCharArray();\n\n //makes a string from the enemy's evasion percent\n String enemyEvasion;\n if(this.enemyEvasionPercent * 100 < 10) {\n enemyEvasion = \"00\" + (this.enemyEvasionPercent * 100);\n }\n else if(this.enemyEvasionPercent * 100 < 100) {\n enemyEvasion = \"0\" + (this.enemyEvasionPercent *100);\n }\n else {\n enemyEvasion = \"\" + this.enemyEvasionPercent;\n }\n char[] enemyEvasionToChar = enemyEvasion.toCharArray();\n\n //sets parts of base array to the players values\n playerStatusBarBaseToChar[17] = playerHealthToChar[0];\n playerStatusBarBaseToChar[18] = playerHealthToChar[1];\n playerStatusBarBaseToChar[22] = playerShieldToChar[0];\n playerStatusBarBaseToChar[26] = playerMissileToChar[0];\n playerStatusBarBaseToChar[27] = playerMissileToChar[1];\n playerStatusBarBaseToChar[32] = playerEvasionToChar[0];\n playerStatusBarBaseToChar[33] = playerEvasionToChar[1];\n playerStatusBarBaseToChar[34] = playerEvasionToChar[2];\n\n //sets parts of base array to the enemy's values\n enemyStatusBarBaseToChar[17] = enemyHealthToChar[0];\n enemyStatusBarBaseToChar[18] = enemyHealthToChar[1];\n enemyStatusBarBaseToChar[22] = enemyShieldToChar[0];\n enemyStatusBarBaseToChar[26] = enemyMissileToChar[0];\n enemyStatusBarBaseToChar[27] = enemyMissileToChar[1];\n enemyStatusBarBaseToChar[32] = enemyEvasionToChar[0];\n enemyStatusBarBaseToChar[33] = enemyEvasionToChar[1];\n enemyStatusBarBaseToChar[34] = enemyEvasionToChar[2];\n\n //converts the character arrays above into strings\n String playerStatusBarFinal = new String(playerStatusBarBaseToChar);\n String enemyStatusBarFinal = new String(enemyStatusBarBaseToChar);\n\n //returns the new string with both ships values\n return playerStatusBarFinal + enemyStatusBarFinal;\n }", "public String status() {\n return statusEnum().toString();\n }", "public String getStatusName() {\n return status.getText();\n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public String getStatus(){\n\t\t\n\t\treturn this.status;\n\t}", "public static String describeStatus(Move move){\n String name = String.format(\"%s (%d)\", names.get(move.getUID()), move.getUID());\n Stage stage = move.getStage();\n String message = \"\";\n switch(stage){\n case CLAIM_TERRITORY:\n message = String.format(\"%s is claiming a territory.\", name);\n break;\n case REINFORCE_TERRITORY:\n message = String.format(\"%s is reinforcing a territory.\", name);\n break;\n case TRADE_IN_CARDS:\n message = String.format(\"%s is trading in cards.\", name);\n break;\n case PLACE_ARMIES:\n message = String.format(\"%s is placing armies.\", name);\n break;\n case DECIDE_ATTACK:\n message = String.format(\"%s is deciding whether or not to attack.\", name);\n break;\n case START_ATTACK:\n message = String.format(\"%s is choosing where to attack.\", name);\n break;\n case CHOOSE_ATTACK_DICE:\n message = String.format(\"%s is deciding how many dice to attack with.\", name);\n break;\n case CHOOSE_DEFEND_DICE:\n message = String.format(\"%s is deciding how many dice to defend with.\", name);\n break;\n case ROLL_HASH:\n message = String.format(\"%s is sending their roll hash.\", name);\n break;\n case ROLL_NUMBER:\n message = String.format(\"%s is sending their roll number.\", name);\n break;\n case OCCUPY_TERRITORY:\n message = String.format(\"%s is deciding how many armies to move into the captured territory.\", name);\n break;\n case DECIDE_FORTIFY:\n message = String.format(\"%s is deciding whether or not to fortify.\", name);\n break;\n case START_FORTIFY:\n message = String.format(\"%s is choosing where to fortify.\", name);\n break;\n case FORTIFY_TERRITORY:\n message = String.format(\"%s is deciding how many armies to fortify with.\", name);\n break;\n default:\n break;\n }\n return message;\n }", "public java.lang.CharSequence getStatus() {\n return status;\n }", "public java.lang.CharSequence getStatus() {\n return status;\n }", "public String detailedToString() {\r\n\t\tString tempStr = \"Player One:\\n\"+\r\n\t\t\t\t\t\t \"Current Card: \" + card1 + \"\\n\" +\r\n\t\t\t\t\t\t \"Unplayed Pile: \" + player1.unplayedCount() + \"\\n\" +\r\n\t\t\t\t\t\t \"Winnings Pile: \" + player1.winningsCount() + \"\\n\\n\" +\r\n\t\t\t\t\t\t \"War Pile: \" + warPile.size() + \"\\n\\n\" +\r\n\t\t\t\t\t\t \"Player Two:\\n\"+\r\n\t\t\t\t\t\t \"Current Card: \" + card2 + \"\\n\" +\r\n\t\t\t\t\t\t \"Unplayed Pile: \" + player2.unplayedCount() + \"\\n\" +\r\n\t\t\t\t\t\t \"Winnings Pile: \" + player2.winningsCount() + \"\\n\\n\" +\r\n\t\t\t\t\t\t \"Moves: \" + moves;\r\n\t\treturn tempStr;\r\n\t}", "public void getStatus()\r\n {\r\n //if this person has no weapon or armor, these values are kept\r\n String weaponName = \"bare hands\";\r\n String armorName = \"none\";\r\n int weaponAtk = 0;\r\n int armorDef = 0;\r\n \r\n if (weapon!=null)\r\n {\r\n weaponName = weapon.getName();\r\n weaponAtk = weapon.getRating();\r\n }\r\n if (armor!=null)\r\n {\r\n armorName = armor.getName();\r\n armorDef = armor.getRating();\r\n }\r\n \r\n String itemList = \"\";\r\n for (Thing t : items)\r\n itemList += t.getName() + \", \";\r\n \r\n System.out.println(\"Health: \" + health + \"/\" + maxHealth + \"\\n\" +\r\n \"ATK: \" + attack + \"\\n\" +\r\n \"DEF: \" + defense + \"\\n\" +\r\n \"Weapon: \" + weaponName + \" (\" + weaponAtk + \" ATK\" + \")\" + \"\\n\" +\r\n \"Armor: \" + armorName + \" (\" + armorDef + \" DEF\" + \")\");\r\n }", "public String getStatus()\n {\n\n return status;\n }", "public String getStatsOfGames(){\n\n String res = \"\";\n\n if (games.size() <= 0){\n return \"No game registered in tournament\";\n }\n\n for(int num=0; num<games.size(); num++)\n {\n SoccerGames game = games.get(num);\n res += \"Game Id: \" + game.getGameId() + \" \"+ game.getHostTeam().getName() + \": \" + game.goalsScored +\n \" VS \" + game.getOpponentTeam().getName() + \": \" + game.concededGoal;\n\n }\n return res;\n }", "public String getStatus() {\r\n\t\treturn status;\r\n\t}", "public String getStatus() {\r\n\t\treturn status;\r\n\t}", "public String getStatus() {\r\n\t\treturn status;\r\n\t}", "public String getStatus() {\r\n\t\treturn status;\r\n\t}", "public String getStatus() {\r\n\t\treturn status;\r\n\t}", "public void printPlayerStat(Player player);", "@Override\n public String toString() {\n return \"Player{\" +\n \"id= \" + id +\n \", nickName= '\" + nickName +\n \"', color=\" + color +\n '}';\n }", "@Override\r\n\tpublic Map<String, Integer> getMemberCardStatistic() {\n\t\tMap<String, Integer> result = new HashMap<String, Integer>();\r\n\t\tresult.put(\"有效\", memberCardDao.getCountByState(MemberCardServiceImpl.MEMBER_CARD_STATE_ALIVE));\r\n\t\tresult.put(\"停止\", memberCardDao.getCountByState(MemberCardServiceImpl.MEMBER_CARD_STATE_DEAD));\r\n\t\tresult.put(\"暂停\", memberCardDao.getCountByState(MemberCardServiceImpl.MEMBER_CARD_STATE_SUSPEND));\r\n\t\tresult.put(\"取消\", memberCardDao.getCountByState(MemberCardServiceImpl.MEMBER_CARD_STATE_DISACTIVE));\r\n\t\treturn result;\r\n\t}", "@SuppressWarnings(\"unused\")\n public String getStatusString() {\n\n switch (this.status) {\n case SCREEN_OFF:\n return \"screen off\";\n\n case SCREEN_ON:\n return \"screen on\";\n\n default:\n return \"unknown\";\n }\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatusString() {\n String str = \"\";\n switch (actualStep) {\n case wait: { str = \"WAIT\"; break; }\n case press: { str = \"PRESS\"; break; }\n case hold: { str = \"HOLD\"; break; }\n case release: { str = \"RELEASE\"; break; }\n }\n return str;\n }", "public String getStatus () {\r\n return status;\r\n }", "public String getStatus() {\n\t\treturn status;\n\t}", "public String getStatus() {\n\t\treturn status;\n\t}", "public String getStatus() {\n\t\treturn status;\n\t}", "public String getStatus() {\n\t\treturn status;\n\t}", "public java.lang.String getStatus() {\n return status;\n }", "public java.lang.String getStatus() {\n return status;\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }" ]
[ "0.6882873", "0.68353677", "0.6726423", "0.66162586", "0.6566254", "0.644157", "0.63953614", "0.63901156", "0.63800246", "0.6222866", "0.6167365", "0.6131135", "0.61190754", "0.60999197", "0.60813713", "0.60787874", "0.60787874", "0.60787874", "0.60787874", "0.60638267", "0.6032503", "0.60145956", "0.60098946", "0.60077804", "0.5980637", "0.59500843", "0.5941011", "0.5925307", "0.5921111", "0.5887439", "0.5887439", "0.5887439", "0.5887439", "0.5887439", "0.5878242", "0.5871945", "0.58664787", "0.5852074", "0.58447254", "0.5837056", "0.5818042", "0.5790979", "0.57846725", "0.5760714", "0.57585645", "0.5752419", "0.575166", "0.57494193", "0.5745126", "0.5741084", "0.57410324", "0.57346314", "0.57336247", "0.57195807", "0.57195807", "0.57195807", "0.57195807", "0.57195807", "0.5719415", "0.5719044", "0.5710261", "0.570456", "0.57034576", "0.57034576", "0.57034576", "0.57034576", "0.57034576", "0.56996304", "0.56915677", "0.5684791", "0.5684791", "0.5684791", "0.5684791", "0.56832975", "0.56832975", "0.5681268", "0.5681268", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739", "0.567739" ]
0.87983686
0
Get the number of players in the list.
public int getNumPlayers(){ return this.players.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int numPlayers() {\n return playerList.size();\n }", "public int getNumOfPlayers() {\n\t\treturn playerList.size();\n\t}", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public int countPlayers(){\n return players.size();\n }", "public int playerCount() {\n\t\treturn playerList.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 nrOfPlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null) {\n playerCount++;\n }\n }\n\n return playerCount;\n }", "public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "public int getNumberOfPlayers() {\n return listaJogadores.size() - listaJogadoresFalidos.size();\n }", "public int numPlayers(){\n return this.members.size();\n }", "int getNumberOfPlayers(){\n return players.size();\n }", "public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}", "public int getNumPlayers() {\n return numPlayers;\n }", "public int getNumPlayers(){\n return m_numPlayers;\n }", "int getNumOfPlayers() {\n return this.numOfPlayers;\n }", "public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }", "public int getPlayerCount() {\n\t\treturn playerCount;\n\t}", "public int size ()\n\t{\n\t\treturn playerList.size();\n\t}", "public int getPlayerIdsCount() {\n return playerIds_.size();\n }", "public int getPlayerIdsCount() {\n return playerIds_.size();\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}", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "private int getOnlinePlayers()\n {\n return (int) Bukkit.getOnlinePlayers().stream().filter( p -> p != null && p.isOnline() ).count();\n }", "public int loadedPlayers(){\n return playerMap.size();\n }", "public int getPlayerCount() {\n return 0;\n }", "public int getNumberOfSelectedPlayers() {\n\t\treturn tmpTeam.size();\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 }", "int getParticipantsCount();", "int getParticipantsCount();", "public int getCurentPlayerNumber() {\n return players.size();\n }", "@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}", "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 }", "@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }", "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 getParticipantsCount()\n {\n return participants.size();\n }", "public int getNumOfPlayerPieces() {\n return playerPiecePositions.length;\n }", "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}", "public int countPlayers(Long gameId){\n List<User_Game> user_games = userGameRepository.retrieveGamePlayers(gameId);\n return user_games.size();\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 }", "int getFriendListCount();", "int getFriendListCount();", "@Override\n\tpublic int selectCount() {\n\n\t\tint res = session.selectOne(\"play.play_count\");\n\n\t\treturn res;\n\t}", "@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 getNoOfPlayers()\r\n\t{\r\n\t\tString noOfPlayers = JOptionPane.showInputDialog(null, \"Please enter the number of players from 1-6\", \"Number of Players\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t//Check to see if the entry was invalid\r\n\t\twhile(!isNumber(noOfPlayers) || Integer.parseInt(noOfPlayers) < 1 || Integer.parseInt(noOfPlayers) > 6)\r\n\t\t{\r\n\t\t\tif(!isNumber(noOfPlayers))\r\n\t\t\t\tnoOfPlayers = JOptionPane.showInputDialog(null, \"You must enter a NUMBER. Please re-enter the number of players from 1-6\", \"NUMBER of Players\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\telse\r\n\t\t\t\tnoOfPlayers = JOptionPane.showInputDialog(null, \"Please re-enter the number of players from 1-6\", \"Players must be between 1 and 6\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\treturn Integer.parseInt(noOfPlayers);\r\n\t}", "public int getNumPlayed()\n\t{\n\t\treturn numPlayed;\n\t}", "public int getCount() {\n\n if (team.size() <= 0)\n return 1;\n return team.size();\n }", "int getListCount();", "List<PlayedQuestion> getPlayedQuestionsCount();", "int getPeerCount();", "public int getFriendListCount() {\n return instance.getFriendListCount();\n }", "public int count () {\n return member_id_list.length;\r\n }", "@Override\n\tpublic int numerOfItems() {\n\t\treturn usersDAO.numerOfItems();\n\t}", "public int getParticipantsCount() {\n return participants_.size();\n }", "public int getParticipantsCount() {\n return participants_.size();\n }", "public int getNumberOfSongs()\n {\n return songs.size();\n }", "public int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "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}", "@Override\n public int getItemCount() {\n return players.size();\n }", "public int clientsCount(){\n return clientsList.size();\n }", "public int getParticipantsCount() {\n return participants_.size();\n }", "public int getParticipantsCount() {\n return participants_.size();\n }", "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 }", "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 }", "public int size() {\n return list.size();\n }", "public int numberUsers() \n\t{\n\t\treturn this.userList.size();\n\t}", "public Tuple<Integer, Integer> getPlayersPlayedCardsCount() {\n\t int player1Count = players[0].totalPlayedCards();\n\t int player2Count = players[1].totalPlayedCards();\n\n\t\treturn new Tuple<>(player1Count, player2Count);\n\t}", "public static int getDeadPlayersAmount(List<Player> players) {\n long count = players.stream()\n .filter(player -> !player.isAlive())\n .count();\n\n int result = (int) count;\n\n return result;\n\n }", "public int getMaximumPlayers() {\n return getOption(ArenaOption.MAXIMUM_PLAYERS);\n }", "private Integer[] getNumberOfCards() {\n Integer[] numberOfCards = new Integer[players.length];\n\n for (int i = 0; i < players.length; i++) {\n numberOfCards[i] = players[i].getHand().length;\n }\n\n return numberOfCards;\n }", "public int getMaximumPlayers() {\n return maximumPlayers;\n }", "public int size()\n {\n return list.size();\n }", "int getUsersCount();", "int getUsersCount();", "int getUsersCount();", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public int size() {\n\t\treturn list.size();\n\t}", "public int getSize() {\n return pokerList.size();\n }", "public int size() {\n return list.size();\n }", "public int size(){\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn list.size();\n\t}", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "public int getMinPlayers() {\n return minPlayers;\n }", "int getPickupsCount();", "@Override\r\n\tpublic int memberCount() {\n\t\treturn sqlSession.selectOne(NAMESPACE + \".member_count_user\");\r\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 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 }", "public int getListCount() {\n return list_.size();\n }", "public int getMinimumPlayers() {\n return getOption(ArenaOption.MINIMUM_PLAYERS);\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}", "int getFriendCount();", "int getFriendCount();", "public int size() {\n\t return list.size();\n }", "public int getCount() {\n return list.size();\n }", "public int getMaxPlayers() {\n return maxPlayers;\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 static int getNumberOfPlayers() {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Enter the number of kids: \");\n return scanner.nextInt();\n }", "public int size() {\r\n return team.size();\r\n }" ]
[ "0.86141336", "0.85799825", "0.8456984", "0.8339148", "0.83381724", "0.8203137", "0.8199928", "0.8113771", "0.8108145", "0.8065781", "0.8064929", "0.8009931", "0.80028087", "0.7949091", "0.7907273", "0.78597844", "0.77356696", "0.7666627", "0.7631512", "0.75637573", "0.7512672", "0.74680567", "0.7443523", "0.7320349", "0.7266511", "0.7224923", "0.7183307", "0.7165774", "0.71258533", "0.71258533", "0.71055204", "0.7042799", "0.70388484", "0.69858766", "0.694305", "0.68855256", "0.6884692", "0.6860405", "0.68561494", "0.68522435", "0.6806899", "0.6806899", "0.67789465", "0.6757133", "0.67485946", "0.6738534", "0.67249775", "0.66975677", "0.6663912", "0.666177", "0.6651717", "0.6633433", "0.6607558", "0.65983933", "0.65983933", "0.65973026", "0.65936744", "0.65924597", "0.6584078", "0.6560677", "0.65460443", "0.65460443", "0.6535454", "0.6530181", "0.6529868", "0.6529487", "0.6525287", "0.65143704", "0.6495732", "0.64879847", "0.6484826", "0.6479616", "0.64685774", "0.64685774", "0.64685774", "0.64587784", "0.64587784", "0.64464897", "0.64330304", "0.6426791", "0.64263755", "0.641854", "0.641854", "0.63984305", "0.63975734", "0.6397438", "0.63956136", "0.6394557", "0.63922155", "0.6391735", "0.6387549", "0.63854504", "0.6376367", "0.6376367", "0.63761", "0.6369761", "0.63656956", "0.63629514", "0.6344424", "0.63399595" ]
0.8327622
5
Signal to stop allowing new players.
public void lockAdd(){ this.canAdd = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void stop()\r\n {\r\n player.stop();\r\n }", "private void stop(){ player.stop();}", "private void stopPlayer() {\n if (player != null) {\n player.release();\n Toast.makeText(this, \"player released\", Toast.LENGTH_SHORT);\n player = null;\n }\n }", "@Override\n\tpublic void onStopRun(PlatformPlayer player) {\n\t\t\n\t}", "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "void stopGame() {\n leader.disconnect();\n opponent.disconnect();\n }", "@Override\n\tpublic void stop() {\n\t\tif (player != null) {\n\t\t\tplayer.close();\n\n\t\t\tpauseLocation = 0;\n\t\t\tsetSongTotalLenght(0);\n\t\t}\n\t}", "public void desactivatePlayer() {\n\t\tthis.setEnabled(false);\n\t}", "@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 }", "public void stopPlaying()\n {\n player.stop();\n }", "public void stop()\n\t{\n\t\ttry\n\t\t{\n\t\t\tstopPlayer();\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tSystem.err.println(ex);\n\t\t}\n\t}", "public static void playerStop() {\n\t\tif(playing){\n\t\t\tPlayer.stop();\n\t\t\tmicroseconds = 0;\n\t\t\tplaying = false;\n\t\t\tif (sim!=null) sim.stop();\n\t\t}\n\t}", "private void detener() {\n player.stop();\n player.release();\n player = null;\n }", "public void stopRadio(Player p) {\n }", "@EventHandler(priority = EventPriority.MONITOR)\n public void PlayerQuit(PlayerQuitEvent e){\n plugin.playerIslands.remove(e.getPlayer().getName());\n }", "public synchronized void reject() {\n toKeepPlaying = false;\n if (externalPlayer.length() != 0) {\n if (playerProcess != null) \n playerProcess.destroy();\n }\n else {\n if (player != null)\n player.close();\n }\n if (speech != null && speaking) \n speech.abort();\n }", "public void stopped()\n {\n super.stopped();\n muteControl.stop();\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}", "public void onStop() {\n connectivityMonitor.unregister();\n requestTracker.pauseRequests();\n }", "public void stopListening();", "@Override\n public void onPeerDeclined(Room room, List<String> strings) {\n if (!mPlaying && shouldCancelGame(room)) {\n if (timer!= null)\n timer.cancel();\n if (mRoomId != null)\n Games.RealTimeMultiplayer.leave(getApiClient(), this, mRoomId);\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }\n }", "@Override\n public void onStop() {\n Object object = this.mw;\n synchronized (object) {\n if (this.tV != null) {\n this.tV.cancel(true);\n }\n return;\n }\n }", "public void pausePlayer(){\n this.stopRadio();\n }", "public void stop() {\n mCurrentPlayer.reset();\n mIsInitialized = false;\n }", "public void shutdown() {\n\t\tfor(Player player : new ArrayList<>(entries.keySet())) {\n\t\t\tonQuit(new PlayerQuitEvent(player, (Component) null, PlayerQuitEvent.QuitReason.DISCONNECTED));\n\t\t}\n\t}", "protected void stopPlayer() throws JavaLayerException\n\t{\n\t\tif (player!=null)\n\t\t{\n\t\t\tplayer.close();\n\t\t\tplayer = null;\n\t\t\tplayerThread = null;\n\t\t}\n\t}", "@Callable\n public static void stopGame() {\n Blockchain.require(Blockchain.getCaller().equals(owner));\n Blockchain.require(isGameOnGoing);\n\n requireNoValue();\n\n isGameOnGoing = false;\n BettingEvents.gameStopped();\n }", "private void stopVideoPlayer() {\r\n\t\tmediaSrc.stopStream();\r\n\t\tmediaSrc.setObserver(null);\r\n\t\tplayer.setVisible(false);\r\n\t}", "@Override\n public boolean onUnbind(Intent intent) {\n stopPlayer();\n return false;\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 stopRinging();", "@Override\n\tpublic void onStopStandDown(PlatformPlayer player) {\n\t\t\n\t}", "void unsubscribe(Player player);", "@EventHandler\r\n\tpublic void Playerleave(PlayerQuitEvent e) {\r\n\t\tPlayer p = e.getPlayer();\r\n\t\tString pname = p.getName();\r\n\t\tp.getInventory().clear();\r\n\t\t Bukkit.broadcastMessage(\"\" + ChatColor.RED + ChatColor.WHITE + \"BMT | \" + pname + ChatColor.RESET + \"Heeft de server verlaten!\" + \"\");\r\n\t}", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "protected void kill() {\n disconnect = true;\n }", "private void quit() {\n\t\t\tArrayList<ClientThread> delList = new ArrayList<ClientThread>();\n\t\t\tdelList.add(this);\n\t\t\tplayers.removeAll(delList);\n\t\t\twaitingPlayers.removeAll(delList);\n\t\t\tview.changeInAndWait(players.size(),waitingPlayers.size());\t\t\n\t\t\tif(dealer == this) {\n\t\t\t\tdealer = null;\n\t\t\t\tview.writeLog(\"Dealer: \" + name + \" has quited. NO DEALER NOW.\");\n\t\t\t}else view.writeLog(\"Player: \" + name + \" has quited.\");\n\t\t\tstatusCheck();\n\t\t}", "@Override\n public void onStop() {\n super.onStop();\n mListener.onMatchMadeDialogSeen();\n }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if(player != null){\n\n player.stop();\n }\n }", "@EventHandler\n\tpublic void onPlayerLeaveServer(PlayerQuitEvent e){\n\t\tgame.removePlayerFromGame(e.getPlayer());\n\t}", "public void setAllowStop(boolean allowed);", "protected void stopWork() {\n mAllowedToBind = false;\n\n }", "void skipNextPlayer() {\n endTurn();\n }", "@Override\r\n public void close() {\r\n if (Boolean.FALSE.equals(active))\r\n return;\r\n active = false;\r\n notify(new Notification(username, new Gson().toJson(new Command(\"quitPlayer\", \"quitPlayer\", null, null))));\r\n closeConnection();\r\n pinger.stop();\r\n }", "@Override\n public void stop() {}", "@Override\n\tpublic void onStopLookUp(PlatformPlayer player) {\n\t\t\n\t}", "public void stop() {\n\t\tif (player == null)\n\t\t\treturn;\n\t\t\n\t\tif (listener != null)\n\t\t\tlistener.setLooping(false);\n\t\t\n\t\t// This will invoke playbackFinished, which will decrement currentlyPlaying\n\t\t// and set player to null.\n\t\tplayer.stop();\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate synchronized void excludePlayer() throws RemoteException\n\t{\n\t\tPlayerInterface pi;\n\t\tData privateData;\n\t\tData data = this.toExecute.data;\n\t\tPlayerInterface playerToExclude = this.toExecute.player;\n\n\t\tplayerToExclude.excludePlayer();\n\t}", "public void giveUp() {\n if (!finished)\n player.kill();\n }", "private void stopPlayback() {\n // stop player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_STOP);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"Stopping player service.\");\n }", "@Override\n public void suspendPlayer(String username) {\n if (match != null && username != null) {\n match.suspendPlayer(username);\n }\n }", "public void stopListening() \n {\n keepListening = false;\n }", "public void stopSending ();", "public void stop() {\n enable = false;\n }", "@Override\r\n\tpublic void stopped(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}", "public void stop(View v) {\n stopPlayer();\n }", "@EventHandler\n public void onLog(PlayerQuitEvent e) {\n lastAttack.remove(e.getPlayer());\n }", "void notifyPlayerDisconnected(String username);", "public void stop() {\r\n _keepGoing = false;\r\n }", "public void kill() throws RuntimeException {\n if (isDead == true)\n throw new RuntimeException(\"This player is already dead!\");\n this.isDead = true;\n }", "public void stop() {\n\t\tplaybin.stop();\n\t}", "@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }", "@Override\n public void unsuspendPlayer(String username) {\n if (match != null && username != null) {\n match.unsuspendPlayer(username);\n }\n }", "public void declineInvite(String player) {\r\n connection.declineInvite(player);\r\n }", "public void stop() {\n m_enabled = false;\n }", "@EventHandler\n public void onPlayerJoin(PlayerJoinEvent e) {\n plugin.getPlayer(e.getPlayer()).forceStopAFK();\n }", "public void onStop() {\n\t }", "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tif(!gameOverBool){\n\t\t\ttry{\n\t\t\t\tsoundHandler.getSoundPool().autoPause();\n\t\t\t\tsoundHandler.getSoundPool().release();\n\t\t\t\tgarbagegame.stopGame();\n\t\t\t\tLog.d(\"On Stop\", \"Called cancel timers\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tLog.d(\"On Stop\", \"exception caught\");\n\t\t\t}\n\t\t}else{\n\t\t\toverDialog.dismiss();\n\t\t}\n\t\tfinish();\n\t\t\n\t\t\n\t}", "public void stop() {}", "private void pause() { player.pause();}", "public void stopListener(){\r\n\t\tcontinueExecuting = false;\r\n\t\tglobalConsoleListener.interrupt();\r\n\t}", "public void playerWon()\r\n {\r\n \r\n }", "public void disconnect(){\n\t\tif(player!=null){\n\t\t\tplayer.getConnection().close();\n\t\t\t\n\t\t\t// we get no disconnect signal if we close the connection ourself\n\t\t\tnotifyHandlers(MessageFlag.DISCONNECTED);\n\t\t}\n\t}", "@Override\n public void onPeerLeft(Room room, List<String> strings) {\n if (!mPlaying && shouldCancelGame(room)) {\n if (timer!= null)\n timer.cancel();\n if (mRoomId != null)\n Games.RealTimeMultiplayer.leave(getApiClient(), this, mRoomId);\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n if (!dialogShown)\n finish();\n }\n }", "public void onStop() {\n }", "public void notifyCancel() {\n Player senderPlayer = this.getToTeleport().getPlayerReference(Player.class),\n targetPlayer = this.getTarget().getPlayerReference(Player.class);\n\n if (senderPlayer == null || targetPlayer == null) {\n return;\n }\n\n MainData.getIns().getMessageManager().getMessage(\"TPA_CANCELLED\").sendTo(senderPlayer);\n MainData.getIns().getMessageManager().getMessage(\"TPA_SELF_CANCELLED\").sendTo(targetPlayer);\n\n }", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "@Override\n public void stop() {\n\n for (FermatEventListener fermatEventListener : listenersAdded) {\n eventManager.removeListener(fermatEventListener);\n }\n\n listenersAdded.clear();\n }", "public void disable() {\n // Iterate through all players\n for (Map.Entry<UUID, PlayerAFKModel> entry : players.entrySet())\n {\n Player player = Bukkit.getPlayer(entry.getValue().getPlayer().getUniqueId());\n\n // Check if player fetch was successful\n if (player != null) {\n // Check if player is AFK\n if( entry.getValue().isAFK() )\n {\n // Is AFK. Update AFK timer before removal\n entry.getValue().updateAFKTimer();\n entry.getValue().markAsNotAFK();\n }\n } else {\n ConsoleUtil.logError(SuitePluginManager.Statistics.Name.full,\n \"Failed to disable AFK Manager. Report to developer!\");\n }\n }\n players.clear();\n }", "public void stop() {\n\t\t\n\t\tif(stop){\n\t\t\tGameError error=new GameError(\"The game already has been stopped\");\n\t\t\t\t\n\t\t\t\tnotifyObservers(new GameEvent<S, A>(EventType.Stop,null,currentState,\n\t\t\t\t\terror,\"The game already has been stopped\"));\n\t\t\t\n\t\t\tthrow error;\n\t\t}else{\n\t\t\tstop=true;\n\t\t\tnotifyObservers(new GameEvent<S, A>(EventType.Stop,null,currentState,null,\"The game has been stopped\"));\n\t\t}\n\t\t\n\t}", "public void stop() { \r\n\t if (remoteControlClient != null) {\r\n\t remoteControlClient\r\n\t .setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);\r\n\t } \r\n\t }", "void stopHelloSender();", "void stopPumpingEvents();", "public void stop()\n {\n mediaPlayer.stop();\n }", "public void stop() {\n mMediaPlayer.stop();\n setPlayerState(State.STOPPED);\n notifyPlaying();\n }", "@Override\n\tpublic void playerStopped(int i) {\n mPlaying = false;\n\n\t\tif (mStateManager.getState() == PlayerState.PLAYING) {\n\t\t\tinternalStop();\n\t\t}\n\t\tmStateManager.setState(PlayerState.STOPPED);\n\n\t\tif (mRestartPlay) {\n\t\t\tinternalPlay();\n\n\t\t\tmRestartPlay = false;\n\t\t}\n\t}", "public void stopPlayThread() {\n ms.stop();\n }", "private void endFreeze(Player player) {\r\n\t\tFrozenPlayerInfo info = frozenPlayers.remove(player.getUniqueId());\r\n\r\n\t\t// Again, two packets are sent, though we do not modify them this time.\r\n\t\tplayer.setAllowFlight(info.allowFlight);\r\n\t\tplayer.setFlying(info.isFlying);\r\n\t}", "public void playerLost()\r\n {\r\n \r\n }", "public void onStop();", "@Override public void stop() {\n }", "void notifyStop();", "public void stopMatch() {\n GovernThread game = GovernThread.getInstance();\n if (game != null) {\n game.emergencyStopMatch();\n }\n beginMatchButton.setEnabled(false);\n resetButton.setEnabled(true);\n switcherButton.setEnabled(true);\n stopMatchButton.setEnabled(false);\n }", "@EventHandler\n\tpublic void onPlayerQuit(PlayerQuitEvent event) {\n\t\tstopCaching(event.getPlayer());\n\t}", "public void stopListening() {\n\t\tkeepListening = false;\n\t}", "public void endTurn(){\n game.setNextActivePlayer();\n myTurn = false;\n\n stb.updateData(\"playerManager\", game.getPlayerManager());\n stb.updateData(\"aktivePlayer\", game.getPlayerManager().getAktivePlayer());\n stb.updateData(\"roomList\", game.getRoomManager().getRoomList());\n\n getIntent().putExtra(\"GAME\",game);\n getIntent().putExtra(\"myTurn\", false);\n finish();\n if(!game.getPlayerManager().getPlayerList().get(whoAmI).isDead())\n startActivity(getIntent());\n else\n fcm.unbindListeners();\n }", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "static void playerLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}", "@Override\n public void playStop() {\n }" ]
[ "0.67402667", "0.6676704", "0.64716476", "0.6407673", "0.63147146", "0.6261325", "0.62279296", "0.6224891", "0.61903703", "0.61869097", "0.6163601", "0.61468667", "0.6144082", "0.61337394", "0.6127538", "0.61185795", "0.6108939", "0.61006206", "0.6019409", "0.60084426", "0.6001579", "0.599128", "0.59890765", "0.5979689", "0.5979685", "0.5978858", "0.5965179", "0.5946579", "0.59378755", "0.5921329", "0.5914426", "0.5914359", "0.59130543", "0.5904687", "0.5900063", "0.5890476", "0.58844954", "0.58699983", "0.58686715", "0.58653367", "0.58628786", "0.5862064", "0.58547574", "0.58520585", "0.58481663", "0.5844544", "0.5831775", "0.58309406", "0.58263713", "0.5814535", "0.5810904", "0.5809085", "0.5808594", "0.58083975", "0.5801246", "0.5799634", "0.57971054", "0.5790545", "0.5788325", "0.57815015", "0.5764153", "0.57640046", "0.57607424", "0.5760692", "0.5759727", "0.575917", "0.5757787", "0.57575923", "0.57537687", "0.57527477", "0.5750802", "0.5749715", "0.57483435", "0.57480884", "0.5745779", "0.5744693", "0.5744585", "0.57418245", "0.57402873", "0.573552", "0.5734435", "0.5733815", "0.5730177", "0.5729621", "0.57251424", "0.5718123", "0.571577", "0.57121366", "0.5703292", "0.56975114", "0.56960535", "0.56942177", "0.5689749", "0.5687734", "0.5684404", "0.5684242", "0.5668003", "0.56617594", "0.56617594", "0.56610656", "0.56568474" ]
0.0
-1
Signal to allow new players.
public void unlockAdd(){ this.canAdd = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LogToPlayerSender listenForNewPlayers() {\n plugin.getServer().getPluginManager().registerEvents(this, plugin);\n return this;\n }", "void playerAdded();", "@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 }", "void notifyPlayerChanged(PlayerNumber newPlayer);", "public void notifyRespawn()\n {\n playerObserver.onRespawn();\n }", "void notifyPlayerJoined(String username);", "@Override\n public void landedOn(Player player) {}", "public void playerWon()\r\n {\r\n \r\n }", "public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }", "@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)\n public void onPlayerLogin(PlayerLoginEvent event) {\n String playerName = event.getPlayer().getName();\n \n if(plugin.bannedPlayers.contains(playerName)){\n \t event.setKickMessage(\"You are banned from this server!\");\n \t event.setResult(Result.KICK_BANNED);\n \t \n }\n \n \n }", "public synchronized void startRegistration() {\n state = State.REGISTRATION;\n players = new HashSet<>();\n }", "public void newPlayer(Client source) {\r\n\t\tthis.players.add(source);\r\n\r\n\t\t// Send a message to all clients that a new player has joined\r\n\t\tthis.queueMessage(new Message(Message.ALL_CLIENTS,\r\n\t\t\t\tsource.getPlayerNo(), \"@ \" + source.getPlayerNo() + \" \"\r\n\t\t\t\t\t\t+ source.getName()));\r\n\t}", "public void registerNewPlayer(int playerObjId)\n\t{\n\t\t// create a new array\n\t\tInteger[] array = new Integer[PROTECTEDACTIONSIZE];\n\t\tfor (int i = 0; i < array.length; i++)\n\t\t\tarray[i] = 0;\n\n\t\t// register the player with an empty array\n\t\t_floodClient.put(playerObjId, array);\n\t}", "public void notifyCreation() {\n Player targetPlayer = this.getTarget().getPlayerReference(Player.class),\n senderPlayer = this.getToTeleport().getPlayerReference(Player.class);\n\n if (targetPlayer == null || senderPlayer == null) {\n return;\n }\n\n MainData.getIns().getMessageManager().getMessage(\"TPA_SENT\").sendTo(senderPlayer);\n\n if (this.type == TeleportType.TPA) {\n MainData.getIns().getMessageManager().getMessage(\"TPA_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n } else if (this.type == TeleportType.TPHERE) {\n MainData.getIns().getMessageManager().getMessage(\"TPHERE_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n }\n\n }", "protected void newPlayersClicked(ActionEvent e) {\n getPlayerNames();\n blackPlayer = 0;\n playerScores[0] = 0;\n playerScores[1] = 0;\n refreshScore();\n updateTurnInfo();\n startNewGame();\n }", "public void notifyPlayerVictory(Player p);", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "boolean notifyWhenReady(int playerNr);", "public void onEnable()\n {\n Server server = this.getServer();\n \n this.afkLastSeen = new HashMap<String, GregorianCalendar>();\n this.afkPlayers = new HashMap<String, Boolean>();\n this.afkPlayersAuto = new HashMap<String, Boolean>();\n \n // register for events\n server.getPluginManager().registerEvents(this, this);\n \n // register the idle timer.\n server.getScheduler().scheduleSyncRepeatingTask(\n this,\n new MineplayersIdleTimer(this),\n 600,\n 600);\n }", "public void notifyTurn()\n {\n playerObserver.onTurnStart();\n }", "public void registerPlayer(BlackjackPlayer player) {\r\n getPlayers().add(player);\r\n }", "public void onPlayerLoggedIn() {\n\t\tshowPlayerButtons();\n\t}", "@Override\n\tpublic void playerJoined(String playerID) {\n\t}", "public void notifyPlayer(String playername){\n \tfor(PlayerHandler player : players){\n \t\tif(player.getPlayerName().equalsIgnoreCase(playername)){\n \t\t\tplayer.notify(1);\n \t\t}\n \t}\n }", "void notifyPlayerHasAnotherTurn();", "public synchronized void addPlayer(PlayerHandler player) {\n\n if (activePlayers < numMaxPlayers) {\n\n players[activePlayers] = player;\n System.out.println(player.getName() + \" added to game as player \" + (activePlayers + 1));\n activePlayers++;\n return;\n }\n\n System.out.println(\"This room (\" + this.toString() + \") is full\");\n }", "public void newPlayer() {\r\n\t\tthis.nbMonster ++;\r\n\t\tthis.nbPlayer ++;\r\n\t}", "void notifyNewGame();", "public void addPlayer(Player player){\n players.add(player);\n }", "void notifyPlayerReconnected(String username);", "public void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }", "public void addVps(Player player) {\n }", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "@Override\n\tpublic void playerJoining(String playerID) {\n\t}", "@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }", "public boolean registerPlayer(Player p);", "public void registerPlayer(@NonNull final UUID playerID) {\n if(getDatabaseUtil().canSeeNews(playerID)) {\n getNewsRecipient().add(playerID);\n } else {\n getNewsRecipient().remove(playerID);\n }\n }", "public void startNewTurn(){\n currentPlayer = players.peek();\n players.add(players.remove());\n view.changeCurrentPlayer(currentPlayer.getName(), currentPlayer.getPlayerDiePath(), numDays);\n currentPlayer.setHasPlayed(false);\n }", "void addPlayer(Player newPlayer);", "public void onEnable() {\n\t\tmain = this;\n\t\tthis.config = new YMLFile(\"plugins\", \"BBSkyBPvpArena\", \"config\");\n\t\tthis.etatDuJeu = 0;\n\t\tthis.pari = new Pari();\n\t\tthis.play = new Play();\n\t\tgetServer().getPluginManager().registerEvents(new pluginListeners(), this);\n\t\tgetCommand(\"arene\").setExecutor(new CommandListener());\n\t\tSystem.out.println(\"plugin SkyBlock Pvp Arena ON!\");\n\t}", "public abstract void activatedBy(Player player);", "private void createPlayer() {\r\n try {\r\n mRadioPlayer = new RadioPlayer(getApplication(), mDeezerConnect,\r\n new WifiAndMobileNetworkStateChecker());\r\n mRadioPlayer.addPlayerListener(this);\r\n setAttachedPlayer(mRadioPlayer);\r\n } catch (DeezerError e) {\r\n handleError(e);\r\n } catch (TooManyPlayersExceptions e) {\r\n handleError(e);\r\n }\r\n }", "@Override\n\tprotected void onNewIntent(Intent intent) {\n\t\tsuper.onNewIntent(intent);\n\t\tToast.makeText(MainActivity.this, \"player\", Toast.LENGTH_SHORT).show();\n\t}", "void registrationCompleted(List<String> players);", "public void welcomePlayer(Player p);", "@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}", "public abstract void sendConfirmationMessage(Player player);", "public void notifyAdmins(){\n \tfor(PlayerHandler player : players){\n \t\tif(player.isAdmin()){\n \t\t\tplayer.notify(1);\n \t\t}\n \t}\n }", "public NewConnectedPlayerNotification(String username) {\n this.username = username;\n }", "@EventHandler\n public void onServerConnected(ServerConnectedEvent event) {\n if (event.getServer().getInfo().getName().equals(Config.queue)) {\n if (!playersQueue.contains(event.getPlayer())) {\n // Add Player to queue\n try {\n mutex.acquire();\n playersQueue.add(event.getPlayer());\n Main.log(\"onServerConnected\", \"§3§b\" + event.getPlayer().toString() + \"§3 was added to §b\" + Config.queue + \"§3. Queue count is \" + playersQueue.size() + \".\");\n } catch (InterruptedException e1) {\n e1.printStackTrace();\n } finally {\n mutex.release();\n }\n }\n }\n }", "public void addPlayer(Player player) {\n playerList.add(player);\n }", "public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }", "protected void processPlayerArrived(String name) {\n Player player = tournamentService.findPlayer(name);\n if (player == null) {\n alertManagers(\"Arriving player {0} is on my notify list, but I don''t have him in the tournament roster.\", name);\n return;\n }\n player.setState(PlayerState.WAITING);\n Game game = tournamentService.findPlayerGame(player);\n if (game == null) return;\n if (game.status.isFinished()) return;\n if (loggingIn) {\n \tcommand.sendCommand(\"observe {0}\", name);\n } else {\n tellManagers(\"{0} arrived. Reserving board {1}.\", name, game.boardNumber);\n }\n command.sendAdminCommand(\"spoof {0} tell JudgeBot nowin\", game.whitePlayer);\n command.sendAdminCommand(\"spoof {0} tell JudgeBot nowin\", game.blackPlayer);\n command.sendAdminCommand(\"set-other {0} kib 0\", game.blackPlayer);\n command.sendAdminCommand(\"set-other {0} kib 0\", game.whitePlayer);\n command.sendAdminCommand(\"reserve-game {0} {1}\", game.whitePlayer, game.boardNumber);\n command.sendAdminCommand(\"reserve-game {0} {1}\", game.blackPlayer, game.boardNumber);\n if (game.status.isAdjourned()) {\n command.sendAdminCommand(\"spoof {0} match {1}\", game.whitePlayer, game.blackPlayer);\n command.sendAdminCommand(\"spoof {0} match {1}\", game.blackPlayer, game.whitePlayer);\n }\n }", "public void handleEvent(PlayerEntered event) {\r\n if( isEnabled )\r\n m_botAction.sendPrivateMessage(event.getPlayerName(), \"Autopilot is engaged. PM !info to me to see how *YOU* can control me. (Type :\" + m_botAction.getBotName() + \":!info)\" );\r\n }", "private synchronized void startNewGame(List<ClientInfo> players) {\n\t\tClientServerHandler clientServerHandler = new ClientServerHandler(players);\n\t\tfor (ClientInfo player : players) {\n\t\t\tplayersInGame.add(player);\n\t\t}\n\t\texecutor.submit(clientServerHandler);\n\t}", "@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 }", "public void addPlayer(String p) {\n this.playersNames.add(p);\n }", "@Override\n public void opponentSurrender(int id) {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyOpponentSurrender(id);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending opponent surrender error\");\n }\n }", "public synchronized void attachTo(Player player){\n player.getDashboard().attach(this);\n players.put(player.getName(), player); //save this player to the list of known players\n }", "public void notifyPlayerDefeat(Player p);", "@FXML\n public void btnStartGame(Event e)\n {\n\n LobbyPlayer lobbyPlayer = PlayerSingleton.getPlayer().getLobbyPlayer();\n try {\n List<LobbyPlayer> lobbyPlayerList = LobbyServerConnection.getInstance().getPlayerList(lobbyPlayer);\n\n List<Player> pl = new ArrayList<>();\n\n for (LobbyPlayer lp :lobbyPlayerList) {\n Player p = new Player(lp.getUniqueId(), lp.getName());\n pl.add(p);\n }\n\n //game gets starter on server\n GameServerConnection.getInstance().startGame(pl);\n sleep();\n //tartGamevanuit lobby\n LobbyServerConnection.getInstance().startGame(lobbyPlayer);\n\n } catch (RemoteException e1) {\n log.warning(e1.toString());\n log.warning(\"couldn't create a game\");\n }\n }", "void newPlayer(String name, String institution){\n Player newPlayer = new Player(name, institution,0);\n boolean x = players.add(newPlayer);\n }", "@EventHandler(priority = EventPriority.HIGHEST) // set to highest because this is most important\n\tpublic void playerBanned(PlayerLoginEvent event){\n\t\tUUID uuid = event.getPlayer().getUniqueId();\n\t\tString reason = bm.isBanned(uuid);\n\t\tif (reason.equals(\"\")) return;\n\t\tPlayer p = event.getPlayer();\n\t\tevent.setKickMessage(reason);\n\t\tevent.setResult(Result.KICK_BANNED);\n\t}", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "@Override\r\n public void addPlayerHandler(Player player) {\r\n // add new player to current TreeSet\r\n playerByIdTreeSet.add(player);\r\n\r\n if(successor!=null){\r\n // there are more handlers - trigger them to add this player as well\r\n successor.addPlayerHandler(player);\r\n }\r\n }", "@Override\n\tpublic void passedBy() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(250);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 250 dollars by landing on Bonus Square\");\n\n\t}", "public void onEnable(){\n instance = this;\n kitHandler = new KitHandler();\n arcadeHandler = ArcadeHandler.getInstance();\n state = GameState.LOBBY;\n\n PluginManager pm = Bukkit.getPluginManager();\n pm.registerEvents(new PlayerListener(), this);\n }", "void subscribe(Player player);", "private void addPlayerSheild() {\n this.playerShield += 1;\n }", "public void onConnected() {\n userName = conn.getUsername();\n tellManagers(\"I have arrived.\");\n tellManagers(\"Running {0} version {1} built on {2}\", BOT_RELEASE_NAME, BOT_RELEASE_NUMBER, BOT_RELEASE_DATE);\n command.sendCommand(\"set noautologout 1\");\n command.sendCommand(\"set style 13\");\n command.sendCommand(\"-notify *\");\n Collection<Player> players = tournamentService.findScheduledPlayers();\n for (Player p : players) {\n command.sendCommand(\"+notify {0}\", p);\n }\n conn.addDatagramListener(conn, Datagram.DG_NOTIFY_ARRIVED);\n conn.addDatagramListener(conn, Datagram.DG_NOTIFY_LEFT);\n\n Runnable task = new SafeRunnable() {\n\n @Override\n public void safeRun() {\n onConnectSpamDone();\n }\n };\n //In 2 seconds, call onConnectSpamDone().\n scheduler.schedule(task, 4, TimeUnit.SECONDS);\n System.out.println();\n }", "public void onAction(Player player) {\n }", "public void onAddParticipant() {\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance();\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.addParticipant(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_ADD, null);\n }", "public void addPlayer(String name) {\n\t\tcreateGameLobbyController.addPlayerToList(name);\n\t}", "public void addPlayer(Player inPlayer) {\n\t\tgetPlayersInRoom().add(inPlayer);\n\t}", "void addPlayer(IPlayer player);", "@Override\n\t\t\t\t\t public void visit(Player player) {\n\t\t\t\t\t\t\tPacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_HF_ShugoCaravanAppear);\n\t\t\t\t\t }", "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}", "@Override\n\tpublic void onAddToLocalList(Player player) {\n\t\tsuper.onAddToLocalList(player);\n\n\t\tif (phase == AbyssalSirePhase.SLEEPING || phase == AbyssalSirePhase.AWAKE) {\n\t\t\tgetEventHandler().addEvent(this, new CycleEvent<Entity>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void execute(CycleEventContainer<Entity> container) {\n\t\t\t\t\tcontainer.stop();\n\n\t\t\t\t\tif (phase == AbyssalSirePhase.SLEEPING) {\n\t\t\t\t\t\tsetIdleAnimation(4527);\n\t\t\t\t\t} else if (phase == AbyssalSirePhase.AWAKE) {\n\t\t\t\t\t\tsetIdleAnimation(4529);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void stop() {\n\n\t\t\t\t}\n\t\t\t}, 2);\n\t\t}\n\t}", "private SecurityListener(){\n Bukkit.getPluginManager().registerEvents(this, SteveSus.getInstance());\n }", "public void register(final Player player) {\n\t\t// do final checks e.g. is player online? is world full?\n\t\tint returnCode = 2;\n\t\tif(!players.add(player)) {\n\t\t\treturnCode = 7;\n\t\t\tlogger.info(\"Could not register player : \" + player + \" [world full]\");\n\t\t}\n\t\tfinal int fReturnCode = returnCode;\n\t\tPacketBuilder bldr = new PacketBuilder();\n\t\tbldr.put((byte) returnCode);\n\t\tbldr.put((byte) player.getRights().toInteger());\n\t\tbldr.put((byte) 0);\n\t\tplayer.getSession().write(bldr.toPacket()).addListener(new IoFutureListener<IoFuture>() {\n\t\t\t@Override\n\t\t\tpublic void operationComplete(IoFuture future) {\n\t\t\t\tif(fReturnCode != 2) {\n\t\t\t\t\tplayer.getSession().close(false);\n\t\t\t\t} else {\n\t\t\t\t\tif(Constants.CONNNECT_TO_LOGIN_SERVER) {\n\t\t\t\t\t\tconnector.sendPrivateMessagingStatus(player);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint mySetting = player.getSettings().getPrivateChatSetting()[1];\n\t\t\t\t\t\tfor(Player p : players) {\n\t\t\t\t\t\t\tint setting = p.getSettings().getPrivateChatSetting()[1];\n\t\t\t\t\t\t\tif(mySetting == 2 && p.getFriends().contains(player.getNameAsLong())\n\t\t\t\t\t\t\t\t\t|| mySetting == 1 && p.getFriends().contains(player.getNameAsLong())\n\t\t\t\t\t\t\t\t\t&& !player.getFriends().contains(p.getNameAsLong()))\n\t\t\t\t\t\t\t\tp.getActionSender().sendPrivateMessageStatus(player.getNameAsLong(), -9);\n\t\t\t\t\t\t\telse if(p.getFriends().contains(player.getNameAsLong()))\n\t\t\t\t\t\t\t\tp.getActionSender().sendPrivateMessageStatus(player.getNameAsLong(), getWorldId());\n\n\t\t\t\t\t\t\tif(setting == 2 && player.getFriends().contains(p.getNameAsLong())\n\t\t\t\t\t\t\t\t\t|| setting == 1 && player.getFriends().contains(p.getNameAsLong())\n\t\t\t\t\t\t\t\t\t&& !p.getFriends().contains(player.getNameAsLong()))\n\t\t\t\t\t\t\t\tplayer.getActionSender().sendPrivateMessageStatus(p.getNameAsLong(), -9);\n\t\t\t\t\t\t\telse if(player.getFriends().contains(p.getNameAsLong()))\n\t\t\t\t\t\t\t\tplayer.getActionSender().sendPrivateMessageStatus(p.getNameAsLong(), getWorldId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tplayer.getActionSender().sendLogin();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif(returnCode == 2) {\n\t\t\tlogger.info(\"Registered player : \" + player + \" [online=\" + players.size() + \"]\");\n\t\t}\n\t}", "private static void addNewlyArrivedUsersAsPlayers(Match match, boolean hasTheGameStarted) {\n LinkedList<Player> playersInGame = match.getGame().listOfAllPlayersAndDealer_LastPosition();\n LinkedList<User> allUsers = match.getUsers();\n List<User> newUsers = getUsersWhoAreNotRegisteredAsPlayers(playersInGame, allUsers);\n\n for (User newUser : newUsers) {\n Player newPlayer = new Player(newUser);\n match.getGame().preparePlayerForNextRound(newPlayer, hasTheGameStarted);\n match.getGame().addPlayer(newPlayer);\n }\n }", "@Callable\n public static void register(Address player) {\n Blockchain.require(Blockchain.getCaller().equals(owner));\n Blockchain.require(!isPlayerRegistered(player));\n requireNoValue();\n\n playerScores.put(player, 0);\n\n BettingEvents.registered(player);\n }", "@EventHandler\r\n\t\tpublic void onLogin(PlayerJoinEvent e){\n\t\t\t\r\n\t\t\ttry {\r\n File file = new File(\"plugins\"+File.separator+\"TitansAndKings\"+File.separator+\"users\"+File.separator+e.getPlayer().getName()+\".yml\");\r\n if(!(file.exists())){\r\n file.createNewFile();\r\n } \r\n } catch (IOException event) {\r\n event.printStackTrace();\r\n }\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t}", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "public void addPlayer(Player player) {\r\n players.add(player);\r\n ((DefaultListModel<Player>) playerListGui.getModel()).addElement(player);\r\n }", "public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}", "public void playerLost()\r\n {\r\n \r\n }", "public void addPlayer(VirtualView client) throws GameEndedException {\n if (!running.get() || !setup.get()) throw new GameEndedException(\"game ended\");\n if (playerControllers.size() >= game.getPlayerNum()) {\n logError(\"too many players\");\n return;\n }\n Player player = new Player(client.getId(), colors.get(playerControllers.size()));\n PlayerController playerController = new PlayerController(player, client, this);\n game.addPlayer(player);\n playerControllers.add(playerController);\n client.setPlayerController(playerController);\n try {\n broadcastGameInfo(\"playerJoined\");\n broadcastMessage(client.getId() + \" joined! (\" + game.getPlayers().size() + \"/\" + game.getPlayerNum() + \") \");\n } catch (IOExceptionFromController e) {\n handleDisconnection(e.getController());\n }\n }", "public void addPlayer(String nickname, TBGPProtocolCallback callback) {\n\t\tbroadcast(nickname + \" joined the room\", TBGPCommand.SYSMSG);\n\t\tplayers.put(callback, nickname);\n\t}", "void registerPlayer() throws IOException;", "void onRespawned(Need need, NeedLevel level, PlayerEntity player, PlayerEntity oldPlayer);", "private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }", "int registerPlayer(String name, ITankGameGUI application, boolean singlePlayerMode) throws Exception;", "@Override\r\n public void handleMessage (Message inputMessage) {\n OnUpdatePlayerSubscription.OnUpdatePlayer updatePlayer = response.data().onUpdatePlayer();\r\n\r\n Log.i(TAG, \"updated user is \" + updatePlayer.toString() + \" session id is \" + sessionId);\r\n //checking if the updated player is in this session\r\n if(updatePlayer.session().id().equals(sessionId)){\r\n boolean contains = false;\r\n\r\n //checking if the updated player is in the current player list\r\n for(Player player : players){\r\n\r\n // if we have a match update players lat/long\r\n if(updatePlayer.id().equals(player.getId())){\r\n List<LatLng> bananasList = new LinkedList<>();\r\n bananasList.add(new LatLng(response.data().onUpdatePlayer().lat(),\r\n response.data().onUpdatePlayer().lon()));\r\n player.setLocations(bananasList); // sets location for the player\r\n player.setIt(updatePlayer.isIt());\r\n contains = true;\r\n }\r\n }\r\n\r\n //if the player is in the session, but not in the player list, then make a new player and add them to the players list and add a marker\r\n if(contains == false){\r\n Marker marker = mMap.addMarker(new MarkerOptions()\r\n .position(new LatLng(updatePlayer.lat(), updatePlayer.lon()))\r\n .title(updatePlayer.username()));\r\n Circle circle = mMap.addCircle(new CircleOptions()\r\n .center(new LatLng(updatePlayer.lat(), updatePlayer.lon()))\r\n .radius(tagDistance)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(3));\r\n\r\n marker.setIcon(playerpin);\r\n circle.setStrokeColor(notItColor);\r\n\r\n Player newPlayer = new Player();\r\n newPlayer.setId(updatePlayer.id());\r\n newPlayer.setIt(false);\r\n newPlayer.setMarker(marker);\r\n newPlayer.setCircle(circle);\r\n newPlayer.setUsername(updatePlayer.username());\r\n List<LatLng> potatoes = new LinkedList<>();\r\n potatoes.add(new LatLng(updatePlayer.lat(), updatePlayer.lon()));\r\n newPlayer.setLocations(potatoes);\r\n\r\n //adding player to the list of players in the game\r\n players.add(newPlayer);\r\n }\r\n }\r\n// for(Player player : players) {\r\n// if(response.data().onUpdatePlayer().id().equals(player.getId())) {\r\n// // if true (we have a match) update players lat/long\r\n// List<LatLng> bananasList = new LinkedList<>();\r\n// bananasList.add(new LatLng(response.data().onUpdatePlayer().lat(),\r\n// response.data().onUpdatePlayer().lon()));\r\n// player.setLocations(bananasList); // sets location for the player\r\n// //Might have been causing the starting point to move\r\n//// player.getCircle().setCenter(player.getLastLocation());\r\n//// player.getMarker().setPosition(player.getLastLocation());\r\n// }\r\n// }\r\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public void OnPlayer(Joueur joueur);", "public void addPlayerToRandomRoom(Player player) {\n\n randomRoomPlayers.add(player);\n synchronized (this) {\n notify();\n }\n }", "@Override\n\tpublic void onPlayerTurnListener() {\n\n\t}", "void onInsertHeldContainer(EntityPlayerMP player);", "public void join(Player player) {\n if (this.stored.contains(player.getName()) ^ !this.optInEnable) {\n if (Trivia.wrapper.permission(player, PermissionTypes.PLAY) && this.running) {\n if (!this.active.contains(player)) {\n this.active.add(player);\n player.sendMessage(\"Qukkiz is now \" + ChatColor.GREEN + \"enabled\" + ChatColor.WHITE + \".\");\n }\n }\n }\n }" ]
[ "0.70369935", "0.662744", "0.65186536", "0.6472137", "0.6453359", "0.63944715", "0.63795847", "0.6349271", "0.6329147", "0.6243071", "0.6203206", "0.61971337", "0.61722374", "0.6171787", "0.6170893", "0.6150992", "0.6140672", "0.60931474", "0.6089065", "0.60676455", "0.6063716", "0.60571206", "0.60343045", "0.60339105", "0.60182387", "0.6016954", "0.60130864", "0.6002163", "0.5992634", "0.5947041", "0.59410256", "0.59227306", "0.59040785", "0.5898106", "0.5897578", "0.5896434", "0.5888964", "0.5875604", "0.58753526", "0.5855369", "0.58494896", "0.58420247", "0.5836915", "0.58336884", "0.58294386", "0.5826325", "0.5823403", "0.58113694", "0.58106977", "0.58101505", "0.57981014", "0.5798039", "0.5796567", "0.5780028", "0.5773179", "0.5771686", "0.57690793", "0.5745125", "0.57429665", "0.5741293", "0.57394457", "0.5737386", "0.5736851", "0.5721042", "0.57202256", "0.5714199", "0.5707918", "0.569805", "0.56972075", "0.56911224", "0.56853324", "0.5684679", "0.56842697", "0.566199", "0.56617206", "0.56548584", "0.56485164", "0.5648141", "0.56366855", "0.56350994", "0.56332713", "0.56189024", "0.56108254", "0.56055385", "0.55891484", "0.55865026", "0.55826783", "0.558259", "0.5580744", "0.5579863", "0.5579244", "0.5576698", "0.5575547", "0.5574194", "0.5572725", "0.55690277", "0.55665827", "0.5565231", "0.55650735", "0.55618453", "0.55609983" ]
0.0
-1
Get the direction of the rotation of the players.
public String getDirection(){ if(this.toRight) return "RIGHT"; else return "LEFT"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic float getRotation() {\n\t\treturn player.getRotation();\n\t}", "float getDir() {\n return degrees(_rotVector.heading());\n }", "public double getRotation();", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public double getRotation() {\n return Degrees.atan2(y, x);\n }", "default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }", "public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }", "public final Vector3f getDirection() {\r\n return direction;\r\n }", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "public float getRotation() {\n return pm.pen.getLevelValue(PLevel.Type.ROTATION);\n }", "public double getRotation() {\n return getDouble(\"ts\");\n }", "DMatrix3C getRotation();", "public static Direction getDirection(byte rotation) {\n return ROTATIONS.get(rotation);\n }", "public double getRotation()\n\t{\n\t\tdouble determinant = this.basisDeterminant();\n\t\tTransform2D m = orthonormalized();\n\t\tif (determinant < 0) \n\t\t{\n\t\t\tm.scaleBasis(new Vector2(1, -1)); // convention to separate rotation and reflection for 2D is to absorb a flip along y into scaling.\n\t\t}\n\t\treturn Math.atan2(m.matrix[0].y, m.matrix[0].x);\n\t}", "public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }", "public Vector3f getDirection() {\r\n\t\treturn new Vector3f(mDirection);\r\n\t}", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "public int getTurnDir() {\r\n\t\tif(this.turnDir == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.turnDir.ordinal();\r\n\t}", "public float getRotation() {\n return this.rotation;\n }", "public float getDirection();", "int getRotationDegrees() {\n return rotationDegrees;\n }", "public double getAngle() {\n\t\treturn armMotor.getEncPosition();\n\t}", "public float getOrientation() {\n return this.orientation + this.baseRotation;\n }", "public MoveDirection getDirection() {\n\t\treturn direction;\n\t}", "public float getDirection()\r\n {\r\n return direction;\r\n }", "public mat4 getRotation() {\n return worldMatrix.getRotation(pr, yr, pr);\n }", "public double getRotDiff() {\n\t\treturn rotDiff;\n\t}", "public int getRotation() {\r\n\t\treturn rotation;\r\n\t}", "public final Vector2D getOrientation() {\n return orientation;\n }", "public double getRotationAngleInRadians() {\n return Math.toRadians(rotationAngle);\n }", "public Vector3d getDirection() { return mDirection; }", "public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}", "public int getRotations();", "public int getRotation() {\n\treturn rotation;\n\t//return rotation;\n}", "public Movement getDir() {\n\t\treturn dir;\n\t}", "int getSensorRotationDegrees();", "public Enums.Direction getDirection() {\n return direction;\n }", "public float getRotation()\n {\n return rotation;\n }", "public Direction direction()\n {\n return myDir;\n }", "public float getRotation() {\n\t\treturn rotation;\n\t}", "public double getDirectionMove();", "@Override\n\tpublic float getOrientation() {\n\t\treturn body.getAngle();\n\t}", "public Direction getDirection()\n {\n return dir;\n }", "void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }", "public int inDegrees()\n {\n return dirInDegrees;\n }", "public int getDirection()\r\n\t{\r\n\t\treturn direction;\r\n\t}", "private float findRotation()\r\n\t{\r\n\t\t//conditionals for all quadrants and axis\r\n\t\tif(tarX > 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 - Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 + Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 90 - Math.abs(rotation);\r\n\t\t\trotation = 270 + rotation;\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY == 0)\r\n\t\t\trotation = 0;\r\n\t\telse if(tarX == 0 && tarY > 0)\r\n\t\t\trotation = 90;\r\n\t\telse if(tarX < 0 && tarY == 0)\r\n\t\t\trotation = 180;\r\n\t\telse if(tarX == 0 && tarY < 0)\r\n\t\t\trotation = 270;\r\n\t\t\r\n\t\treturn (rotation - 90);\r\n\t}", "public Quaternion getPhysicsRotation(){\n return getPhysicsRotation(null);\n }", "public int getDirection() {\n return direction_;\n }", "public int getDirection() {\n return direction;\n }", "public double radians() {\n return Math.toRadians(this.degrees);\n }", "public double getdegRotationToTarget() {\n NetworkTableEntry tx = m_table.getEntry(\"tx\");\n double x = tx.getDouble(0.0);\n return x;\n }", "public int getDirection() {\n return direction;\n }", "public int getDirection() {\n return direction;\n }", "public double getTurnAngle() {\n return getTurnAngle(turnEncoder.getCount());\n }", "public int getDirection() {\r\n\t\treturn direction;\r\n\t}", "public String getDirection() {\n return direction;\n }", "@Override\r\n public Orientation getOrientation() {\r\n return this.route.getOrientation();\r\n }", "public int getDirection() {\n return direction_;\n }", "int getDirection();", "public String getDirection() {\r\n return direction;\r\n }", "@SlideDirection\n public int getDirection() {\n return mImpl.getDirection().getNumber();\n }", "@SlideDirection\n public int getDirection() {\n return mImpl.getDirection().getNumber();\n }", "public Direction getDirection() {\r\n\t\treturn direction;\r\n\t}", "public Direction getDirection() {\n\t\treturn direction;\n\t}", "public double getRadians() {\r\n return degreeNum * (Math.PI / 180.0);\r\n }", "public int getDeviceRotation();", "public Direction rotate90() {\n return values()[r90index];\n }", "protected final Direction getDirection() {\n\t\treturn tile.getDirection();\n\t}", "public float getRotationAngle() {\n return this.mRotationAngle;\n }", "public float getOrientacion() { return orientacion; }", "public Direction getDirection()\n\t{\n\t\treturn this.direction;\n\t}", "public double getRotationAngle() {\n\t\treturn _rotationAngle;\n\t}", "public void rotRight()\n\t{\n\t\t//only rotate 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)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "String getDirection();", "public final Orientation getOrientation() {\n\n return this.getWrappedControl().getOrientation();\n }", "public float getTargetRotation ()\n {\n return _targetRotation;\n }", "int getStartRotationDegree();", "public Transaction.DirectionType getDirection() {\n\t\treturn direction;\n\t}", "public int getDirection();", "public abstract double getOrientation();", "public DoorDirection getDoorDirection() {\n\t\treturn this.doorDirection; \n\t}", "public String getDirection() {\n\t\treturn this.direction;\n\t}", "public final Vector3d getRight()\n {\n return myDir.cross(myUp).getNormalized();\n }", "public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }", "DMatrix3C getOffsetRotation();", "public double getAngle() {\n\t\treturn this.position[2];\n\t}", "public Orientation getOrientation() {\n\t\treturn mOrientation;\n\t}", "public Direction getDirection() {\n return direction;\n }", "public Direction getDirection() {\n return direction;\n }", "public Direction getDirection() {\n return direction;\n }", "public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }", "public int getRotation() {\n\t\treturn config & 0x3;\n\t}", "@Override\n\tpublic Rotation3 GetRotation() {\n\t\treturn new Rotation3(0f);\n\t}", "public int getCameraSensorRotation();", "public double getRot() {\n return this.rot;\n }", "public IOrientation getOrientation();", "public String getDirection() {\n return this.direction;\n }", "public static byte getDirection(Direction rotation) {\n return (byte) ROTATIONS.indexOf(rotation);\n }", "public Direction getDirection() {\n return currentDirection;\n }" ]
[ "0.73938096", "0.7118182", "0.7050942", "0.7003758", "0.6904342", "0.6862393", "0.6708629", "0.66727406", "0.66672075", "0.6527108", "0.6525012", "0.6480309", "0.64655465", "0.6459238", "0.64549613", "0.64366215", "0.642884", "0.64076364", "0.63957244", "0.6364293", "0.6343698", "0.6337594", "0.6336165", "0.62908024", "0.6287615", "0.6285331", "0.62838244", "0.6271375", "0.62579024", "0.62456334", "0.62428224", "0.62229455", "0.622247", "0.622207", "0.6218535", "0.6201256", "0.619991", "0.61993337", "0.6194348", "0.61857927", "0.6165302", "0.61530674", "0.6137188", "0.61339396", "0.6112568", "0.6101994", "0.60779834", "0.6076565", "0.6075761", "0.6048397", "0.6045149", "0.6044389", "0.6042142", "0.6042142", "0.60326433", "0.6023887", "0.6022299", "0.6021653", "0.60210586", "0.6012248", "0.5996256", "0.5992352", "0.5992352", "0.59918356", "0.59843767", "0.5978386", "0.5977612", "0.59727937", "0.5972321", "0.5960367", "0.594885", "0.59477276", "0.59459424", "0.5939748", "0.59391654", "0.5931552", "0.5931071", "0.5930293", "0.59136397", "0.5911706", "0.59080654", "0.59075177", "0.5900684", "0.59002006", "0.5895899", "0.58911425", "0.58902997", "0.5886378", "0.5886198", "0.5886198", "0.5886198", "0.5885538", "0.58833736", "0.58830315", "0.58607805", "0.58582705", "0.5852849", "0.584687", "0.58464074", "0.58212006" ]
0.6451512
15
Change the direction of the rotation.
public void changeDirection(){ this.toRight ^= true; if(this.toRight) this.nextElem = (this.currElem + 1) % players.size(); else this.nextElem = (this.currElem - 1 + players.size()) % players.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}", "void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "public void setOrientation(Direction orientation);", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}", "public void rotate(Rotation rotation)\r\n\t{\r\n\t\tthis.currentDirection=this.currentDirection.rotate(rotation);\r\n\t}", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "public void setRotation(int degree) {\n\trotation = degree;\n}", "@Override\n public void rotate(Command command) {\n switch (command){\n case UP:\n setOrientation(Orientation.UP);\n break;\n\n case DOWN:\n setOrientation(Orientation.DOWN);\n break;\n\n case LEFT:\n setOrientation(Orientation.LEFT);\n break;\n\n case RIGHT:\n setOrientation(Orientation.RIGHT);\n break;\n\n default:\n }\n }", "private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}", "@Override\n\tfinal public void rotate(double angle, Axis axis)\n\t{\n\t\t//center.setDirection(angle);\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "public void rotation(double degrees) {\r\n \tdegrees = checkDegrees(degrees);\r\n \tsetFacingDirection(degrees);\r\n \trotation = (degrees * flipValue) * Math.PI / 180;\r\n }", "public void changeDirection() {\n\t\t// Define the direction we want to change from as our current direction.\n\t\tfinal float oldDirection = this.requiredSwipeDirection;\n\t\t// While our swipe direction is the direction we want to change from,\n\t\twhile (this.requiredSwipeDirection == oldDirection)\n\t\t\t// Set our SwipeTile's direction to a random direction.\n\t\t\tsetDirection(SwipeTile.randomDirection());\n\t}", "void turn(float degrees) {\n _rotVector.rotate(radians(degrees));\n }", "@Override\n public void setOrientation(int degree, boolean animation) {\n String t = getText().toString();\n if(t != null && !t.equals(\"\")){\n mContent = t;\n }\n\n mEnableAnimation = animation;\n // make sure in the range of [0, 359]\n degree = degree >= 0 ? degree % 360 : degree % 360 + 360;\n if (degree == mTargetDegree)\n return;\n\n mTargetDegree = degree;\n if (mEnableAnimation) {\n mStartDegree = mCurrentDegree;\n mAnimationStartTime = AnimationUtils.currentAnimationTimeMillis();\n\n int diff = mTargetDegree - mCurrentDegree;\n diff = diff >= 0 ? diff : 360 + diff; // make it in range [0, 359]\n\n // Make it in range [-179, 180]. That's the shorted distance between the\n // two angles\n diff = diff > 180 ? diff - 360 : diff;\n\n mClockwise = diff >= 0;\n mAnimationEndTime = mAnimationStartTime\n + Math.abs(diff) * 1000 / ANIMATION_SPEED;\n } else {\n mCurrentDegree = mTargetDegree;\n }\n\n invalidate();\n }", "public void increaseRotation(float dx, float dy, float dz);", "public void setDirection(float directionDegree);", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "public void setTurtleOrientation(double newAngle){\n\t\tSystem.out.println(\"in set turtle orientation\");\n\t\tmyTurtle.setOrientation(newAngle);\n\t\tupdateTurtleOnView();\n\t}", "public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}", "public void rotate(float angle);", "private void setRotation()\n\t{\n\t\tGL11.glPushMatrix();\n\t\tGL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);\n\t}", "void changeDirection();", "public void setRotation(float rotation){\n\t\tmBearing = rotation;\n\t}", "public void rotateTurtle(double deg){\n\t\tSystem.out.println(\"in rotate\");\n\n\t\tmyTurtle.turn(deg);\n\t\tthis.updateTurtleOnView();\n\t}", "public void setRotation(int rotation) {\r\n\t\tthis.rotation = rotation;\r\n\t}", "public void rotateToAngle(double angle) {\n controlState = ControlState.POSITION;\n outputPosition = -angle * TurretConstants.TICKS_PER_DEGREE;\n }", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "@VisibleForTesting\n public void setRotation(int newRotation) {\n this.mRotation = newRotation;\n this.mDisplayRotation.setRotation(newRotation);\n }", "public abstract void setDirection(int dir);", "public void updateAngle(){\n\t\tif (turnUp && (angle < 180) ){\n\t\t\tangle+=1;\n\t\t}\n\t\tif (turnDown && (angle > 0)){\n\t\t\tangle-=1;\n\t\t}\n\t}", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "void setRotation (DMatrix3C R);", "public void turn(int angle)\n {\n setRotation(getRotation() + angle);\n }", "public void turn(int angle)\n {\n setRotation(getRotation() + angle);\n }", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "void rotateTurtle(int turtleIndex, double degrees);", "public void setRotation(float angle) {\n\t\tthis.rotate(this.rotation - angle);\n\t\trotation -= angle;\n\t}", "public void setRotation(float newRotation)\n {\n setRotation(newRotation, Anchor.CENTER.of(this));\n }", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "public void setDirection(double direction) {\n\t\tgyroPid.setSetpoint(direction);\n\t}", "public void setDirectionMove(double direction);", "public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }", "public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}", "@Override\n\tpublic void setOrientation(Vector3 orient) {\n\n\t}", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void turn(int degree) {\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.rotate((int) Math.round(TURN_RATIO * degree), true);\n leftMotor.rotate((int) Math.round(-TURN_RATIO * degree), true);\n }", "public void setDirection(int dir)\r\n\t{\r\n\t\tdirection = dir;\r\n\t}", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public final void setRotation(float newRotation) {\n\t\ttile.setRotation(newRotation);\n\t\tarrow.setRotation(newRotation);\n\t}", "void setRotationDegrees(int rotationDegrees) {\n int temp = rotationDegrees % 360;\n if (temp < 0) {\n temp = 360 + temp;\n }\n this.rotationDegrees = temp;\n }", "void rotate();", "public void setRotationModifer(int degrees) {\n\t\tthis.rotation = degrees;\n\t}", "@Override\n\tpublic void rotate() {\n\t\tSystem.out.println(\"Triangle is Rotateing in \"+ Rotatable.DIRECTION + \"Direction\");\n\t}", "public void setDirection(float direction)\r\n {\r\n this.direction = direction;\r\n }", "private void turn(String rotate) {\n if(Objects.nonNull(this.position)) {\n int currentIntDirection = this.directionConversionMap.get(this.position.getDirection());\n int newIntDirection = this.rotateRobotMap.get(rotate).apply(currentIntDirection,directionConversionMap);\n Optional<Direction> direction = findDirection(newIntDirection);\n this.position = new Position(this.position.getX(), this.position.getY(), direction.get());\n }\n }", "public void setRotation(float angle) {\n \t\tthis.angle = angle;\n \t\tupdateTransform();\n \t\tfireEvent(new RotationEvent(angle));\n \t}", "public void rotateBy(float angleDelta)\n {\n this.rotation += angleDelta;\n \n updateTransform();\n notifyParentOfPositionChange();\n conditionallyRepaint();\n }", "public void setRotation(double rotation)\r\n\t{\r\n\t\t// AutoCAD's angle of rotation is opposite to SVG so\r\n\t\t// we have to convert it.\r\n\t\t// AutoCAD's angles are in radians and turn in the opposite\r\n\t\t// direction to SVG's.\r\n\r\n\t\tRotation = svgUtility.trimDouble(-rotation % 360.0);\r\n\t}", "public void turn(int turnDirection) {\n\t\tdouble angleRaw = 0.0;\n\t\tif(turnDirection == TURN_LEFT) {\n\t\t\tangleRaw = this.angle - PI / 2.0;\n\t\t}\n\t\telse if(turnDirection == TURN_RIGHT) {\n\t\t\tangleRaw = this.angle + PI / 2.0;\n\t\t}\n\t\tthis.setAngle(angleRaw);\n\t}", "public void setRotation(double angle)\n\t{\n\t\tdouble cos = Math.cos(angle);\n\t\tdouble sin = Math.sin(angle);\n\t\tmatrix[0].x=cos;\n\t\tmatrix[0].y=sin;\n\t\tmatrix[1].x=-sin;\n\t\tmatrix[1].y=cos;\n\t}", "public static void turnByDegree(double degree) {\n LEFT_MOTOR.rotate(convertAngle(WHEEL_RAD, TRACK, degree), true);\n RIGHT_MOTOR.rotate(-convertAngle(WHEEL_RAD, TRACK, degree), false);\n }", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "public void setComponentOrientation(final ComponentOrientation direction) {\n componentOrientation = direction == ComponentOrientation.RIGHT_TO_LEFT;\n setDocumentDirection();\n super.setComponentOrientation(direction);\n }", "public void setRotation(float f) {\n this.mRotation = f;\n invalidateSelf();\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "@Override\n\tpublic void rotateRight(int degrees) {\n\t\t\n\t}", "public void setAngle(double angleRad) {\n synchronized (this.angleLock) {\n this.movementComposer.setOrientationAngle(angleRad);\n }\n }", "public final void setOrientation(Orientation value) {\n\n this.getWrappedControl().setOrientation(value);\n }", "private void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)\n {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public final void setOrientation(Orientation value) {\n orientationProperty().set(value);\n }", "public void setDeviceRotation(int rotation);", "protected void changeDirection(Direction newDir)\n {\n // Change direction.\n myDir = newDir;\n }", "public void setRotate() {\r\n\t\tint npoints = xpoints.length;\r\n\t\tdouble[] tempxpoints = new double[xpoints.length];\r\n\t\tdouble[] tempypoints = new double[xpoints.length];\r\n\t\tdouble radians = Math.toRadians(angle%360);\r\n\t\tdouble y = pivotY;\r\n\t\tdouble x = pivotX;\r\n\t\tfor(int i = 0; i<xpoints.length; i++) {\r\n\t\t\ttempxpoints[i] = (Math.cos(radians)*(xpoints[i]-x)-Math.sin(radians)*(ypoints[i]-y)+x);\r\n\t\t\ttempypoints[i] = (Math.sin(radians)*(xpoints[i]-x)+Math.cos(radians)*(ypoints[i]-y)+y);\r\n\t\t}\r\n\t\txpoints = tempxpoints;\r\n\t\typoints = tempypoints;\r\n\t\tangle = 0;\r\n\t}", "public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }", "@Override\n public void setDirection(Direction direction) {\n\n }", "public void setDirection(Vector direction){\n\t\t_direction = direction;\n\t}", "public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }", "@Override\n public void setOrientation(float x, float y, float z) {\n String degreeString = getString(R.string.motion_orientation_degree);\n /*orientationX.setText(String.format(degreeString, x));\n orientationY.setText(String.format(degreeString, y));\n orientationZ.setText(String.format(degreeString, z));\n*/\n if (gdxAdapter != null) {\n gdxAdapter.setOrientation(x, y, z);\n }\n }", "public void Rotation(int i) {\n mRender.Rotation(i);\n }", "public double turn (double degrees) {\n setHeading(getHeading() + degrees);\n return Math.abs(degrees);\n }", "public void setRotation(int newRotation) {\n\n int progressVal = newRotation + Math.round(thisNumLEDs / 2);\n\n // If the new rotation would put the rotation value out of range, then ignore it\n\n if (progressVal < 0 | thisNumLEDs < progressVal) {\n return;\n }\n\n // Update the rotation to the new value\n currentRotation = newRotation;\n\n // Update all required widgets\n sliceRotateView.setText(Integer.toString(currentRotation));\n sliceRotateSlider.setProgress(progressVal);\n\n\n // Redraw the pattern\n updatePattern();\n }", "public void rotate(int rotation) {\n rotateCO(rotation);\n rotateCP(rotation);\n rotateEO(rotation);\n rotateEP(rotation);\n }", "public void turnTo(double theta){//takes theta in degrees\r\n\t\t\t//set the motor speeds to the rotate speed\r\n\t\t\tleftMotor.setSpeed(ROTATE_SPEED);\r\n\t\t\trightMotor.setSpeed(ROTATE_SPEED);\r\n\r\n\t\t\t//makes the left wheel rotate forward theta\r\n\t\t\t//and the right wheel rotate backwards theta\r\n\t\t\tleftMotor.rotate(convertAngle(wheelRadius, wheelBase, theta), true);\r\n\t\t\trightMotor.rotate(-convertAngle(wheelRadius, wheelBase, theta), false);\r\n\t\t\t\r\n\t\t}", "public void zRotate() {\n\t\t\n\t}", "public void setDirection(Direction direction) {\n this.direction = direction;\n update();\n }", "public void setDirection(Vector3f direction) {\r\n\t\tmDirection.set(direction);\r\n\t}", "public void setNewOrientation(int value) {\n this.newOrientation = value;\n }", "public void changeDirOnGear(IRobot robot) {\n String objectName = getObjectNameOnPos(tiledMap, robot.getPos());\n if (\"Counter_Clockwise\".equals(objectName)) {\n robot.rotateCounterClockwise();\n } else if (\"Clockwise\".equals(objectName)) {\n robot.rotateClockwise();\n }\n }", "public abstract void rotate();", "protected Vector3d rotateDir(double xChange, double yChange)\n {\n return myPosition.getDir().rotate(myPosition.getUp(), xChange).rotate(myPosition.getRight(), yChange);\n }", "void setRotations(Vec2 rotations);", "@Override\n\tpublic void setOrientation(float orientation) {\n\t\t\n\t}", "public void setRenderRotation(float rad) {\n if(mNativeAddress != 0)\n nativeSetRenderRotation(mNativeAddress, rad);\n }", "public void RotateActionPerformed(java.awt.event.ActionEvent evt) { \r\n degree = degree + 90;\r\n drawingPanel.setDegree(degree); \r\n }", "public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }", "private void resetRotationAxisToOrigin()\n\t{\n\t\tdouble newSpeed = this.currentMomentMass * getRotation() /\n\t\t\t\tthis.defaultMomentMass;\n\t\t\n\t\t// Changes back to normal rotation\n\t\tthis.currentRotationAxis = new Point2D.Double(getOriginX(), getOriginY());\n\t\tsetRotation(newSpeed);\n\t}" ]
[ "0.7271487", "0.7264928", "0.720397", "0.7196004", "0.70648915", "0.7060907", "0.6972969", "0.69238293", "0.6825363", "0.6816887", "0.6802218", "0.6788822", "0.67575395", "0.6749061", "0.6747064", "0.67199874", "0.67107654", "0.67009807", "0.6665397", "0.6642735", "0.6621297", "0.6611036", "0.6601691", "0.6576938", "0.65714717", "0.6565017", "0.6555055", "0.6532794", "0.6527029", "0.6498419", "0.6488149", "0.64769846", "0.6456545", "0.645006", "0.6411596", "0.64078057", "0.6406922", "0.6406922", "0.6402158", "0.6401987", "0.63946694", "0.63591087", "0.6358393", "0.6355163", "0.63541335", "0.6352092", "0.6349671", "0.6344752", "0.634205", "0.63310736", "0.63309383", "0.63302594", "0.6315204", "0.6313704", "0.6307675", "0.6295132", "0.6285928", "0.6283389", "0.6282179", "0.6267042", "0.62488896", "0.62436455", "0.62386364", "0.62226874", "0.62189037", "0.62111866", "0.62058043", "0.6198816", "0.6195214", "0.6186606", "0.6184659", "0.61834574", "0.61804897", "0.6179514", "0.6179488", "0.6172621", "0.6164676", "0.61532605", "0.61442876", "0.61375254", "0.613477", "0.61297005", "0.61185235", "0.6118456", "0.611448", "0.61114603", "0.61113775", "0.6109823", "0.6107752", "0.61002433", "0.60965705", "0.6086312", "0.6084156", "0.60794693", "0.60770845", "0.6075545", "0.6066548", "0.60645163", "0.60613286", "0.605827" ]
0.6074332
96
Rotate only the next player.
public void rotateNextPlayer(){ if(this.toRight) this.nextElem = (this.nextElem + 1) % players.size(); else this.nextElem = (this.nextElem - 1 + players.size()) % players.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "public void startRotate()\n {\n rotateAroundYAxis(miniEarth).play();\n }", "@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}", "public abstract void rotate();", "public void rotRight()\n\t{\n\t\t//only rotate 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).moveRight();\n\t\t\t\tSystem.out.println(\"Heading +20\");\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}", "public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }", "void rotate();", "public void onLeftPressed(){\n player.setRotation(player.getRotation()-3);\n\n }", "public void nextTurn(){\n\t\tplayers[currentPlayer].setNotCurrentPlayer();\n\t\t\n\t\t//increment current player to advance to next player\n\t\tcurrentPlayer = (currentPlayer + 1) % players.length;\n\t\t\n\t\t//update the new current player\n\t\tupdateCurrentPlayerView();\n\t}", "void rotate() {\n startAnimation(allSubCubes(), Axis.Y, Direction.CLOCKWISE);\n rotateCubeSwap();\n }", "public void next_player() {\n\t\tthis.nb_turn++;\n\t\tthis.player_turn++;\n\t\tthis.same_dice_in_a_row = 0;\n\t\tif (player_turn == this.players.size()) {\n\t\t\tthis.player_turn = 0;\n\t\t}\n\n\t\tif (get_player_from_turn().get_surrend()) {\n\t\t\tthis.nb_turn--;\n\t\t\tif (get_player_in_game() > 0) {\n\t\t\t\tthis.next_player();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void rotar() {\n\r\n\t}", "public void target()\n {\n if(noRotation == false)\n {\n if(timer % 3 == 0)\n {\n int currentRotation = getRotation();\n turnTowards(xMouse, yMouse);\n int newRotation = getRotation();\n if (Math.abs(currentRotation-newRotation) > 180)\n {\n if (currentRotation < 180) currentRotation += 360;\n else newRotation += 360;\n }\n if(currentRotation != newRotation)\n { \n setRotation(currentRotation+direction()*8);\n }\n }\n }\n }", "@Override\n\tpublic void rotate() {\n\t}", "public void xRotate() {\n\t\t\n\t}", "public void rotLeft()\n\t{\n\t\t//only rotate 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).moveLeft();\n\t\t\t\tSystem.out.println(\"Heading -20\");\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}", "Point3D pointRotate(Point3D next, double theta){\r\n\t\tif(rotateFig==1){\r\n\t\t\tnext=utils.rotateAroundX(next, theta);\r\n\t\t}\r\n\t\tif(rotateFig==2){\r\n\t\t\tnext=utils.rotateAroundY(next, theta);\r\n\t\t}\r\n\t\tif(rotateFig==3){\r\n\t\t\tnext=utils.rotateAroundZ(next, theta);\r\n\t\t}\r\n\t\tif(rotateFig==4){\r\n\t\t\tnext=utils.rotateAroundArbitraryAxis(next, arbitraryx0, arbitraryy0, arbitraryz0, arbitraryxdir, arbitraryydir, arbitraryzdir, theta);\r\n\t\t}\r\n\t\treturn next;\r\n\t}", "void rotate () {\n final int rows = currentPiece.height;\n final int columns = currentPiece.width;\n int[][] rotated = new int[columns][rows];\n\n for (int i = 0; i < rows; i++)\n for (int j = 0; j < columns; j++)\n rotated[j][i] = currentPiece.blocks[i][columns - 1 - j];\n\n Piece rotatedPiece = new Piece(currentPiece.color, rotated);\n int kicks[][] = {\n {0, 0},\n {0, 1},\n {0, -1},\n //{0, -2},\n //{0, 2},\n {1, 0},\n //{-1, 0},\n {1, 1},\n //{-1, 1},\n {1, -1},\n //{-1, -1},\n };\n for (int kick[] : kicks) {\n if (canMove(currentRow + kick[0], currentColumn + kick[1], rotatedPiece)) {\n //System.out.println(\"Kicking \" + kick[0] + \", \" + kick[1]);\n currentPiece = rotatedPiece;\n currentRow += kick[0];\n currentColumn += kick[1];\n updateView();\n break;\n }\n }\n }", "public void rotateServos() {\n if (gamepad1.x) { //change to y and x\n left.setPosition(.69); //.63 with other arms\n right.setPosition(.24); //.3 with other arms\n }\n \n if (gamepad1.y) {\n left.setPosition(0);\n right.setPosition(1);\n }\n }", "private Player nextPlayer() {\n Player next = players.get(nextPlayerIdx++);\n nextPlayerIdx %= players.size(); \n \n return next;\n }", "public void nextTurn() {\r\n activePlayer = nextPlayer;\r\n advanceNextPlayer();\r\n }", "public abstract void rotateLeft();", "@Override\n \t\t\t\tpublic void doRotateX() {\n \n \t\t\t\t}", "void rotateInv() {\n startAnimation(allSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n rotateCubeSwap();\n rotateCubeSwap();\n rotateCubeSwap();\n }", "public void rotRight()\n\t{\n\t\t//only rotate 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)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void rotate() {\n\t\tclearPiece();\n\t\trotateFirstBlock();\n\t\trotateSecondBlock();\n\t\trotateFourthBlock();\n\t\tsetPiece();\n\t\trepaint();\n\t}", "@Override\n\tpublic float getRotation() {\n\t\treturn player.getRotation();\n\t}", "public void RotateStarpathToNextPos(){\n starpathPosition++;\n\n //if next pos is 6, reset back to 0\n if(starpathPosition == 6){\n StarpathToIntake();\n }\n //if next pos is 3, go to the shooter\n else if(starpathPosition == 3) StarPathToShooter();\n //else, add with the interval\n else if(starpathPosition < 3) StarpathAddIntervalIntake();\n else if(starpathPosition > 3) StarpathAddIntervalShooter();\n }", "public void rotate(){\n\t\t\n\t\tfor(Vertex v : vertices){\n\n\t\t\tMatrix m = ViewSettings.getRotationMatrix4().multiply(v);\n\n\t\t\tv.setX(m.getValue(0, 0));\n\t\t\tv.setY(m.getValue(1, 0));\n\t\t\tv.setZ(m.getValue(2, 0));\n\t\t\tv.setW(m.getValue(3, 0));\n\t\t}\n\t}", "private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}", "public void rotate(boolean clockwise) \n\t{\n\t\tcircular_shift(connections, clockwise);\n\t\torientation = next(orientation, clockwise);\n\t}", "public void zRotate() {\n\t\t\n\t}", "public void rotLeft()\n\t{\n\t\t//only rotate 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)).moveLeft();\n\t\t\tSystem.out.println(\"Heading +10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }", "public PieceOrientation next() {\n PieceOrientation[] PieceOrientations = this.values();\n int current = value;\n int nextIndex = (current + 1) % PieceOrientations.length;\n return PieceOrientations[nextIndex];\n }", "public abstract void rotar();", "private void turnClockwise() {\n\t\torientation = TurnAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(orientation);\n\t}", "public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }", "public boolean hasRotate() { return hasRotate; }", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void forceSyncRotation() {\n this.rotateCtr = 14;\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "public void rotate() {\n // amoeba rotate\n // Here i will use my rotation_x and rotation_y\n }", "@Override\n \t\t\t\tpublic void doRotateY() {\n \n \t\t\t\t}", "@Override\n public int getNextPlayer() {\n //TODO Implement this method\n if(isPlayerOne){\n return 0;\n }else {\n return 1;\n }\n }", "public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}", "public int nextPlayer() {\n\t\tplayer = (player + 1) % playerCount;\n\t\treturn player;\n\t}", "public void rotLauncher()\n\t{\n\t\t//only rotate if a PlayerShip, and therefore a MissileLauncher is spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLauncher();\n\t\t\tSystem.out.println(\"Launcher rotated 10 degrees\");\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship is not currently spawned\");\n\t}", "public void rotate() {\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\ttmp_grid[i][j] = squares[i][j];\n\t\t\t// copy back rotated 90 degrees\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tsquares[j][i] = tmp_grid[i][3-j];\n \n //log rotation\n LogEvent(\"rotate\");\n\t\t}", "public abstract void rotateRight();", "public void nextPlayer() {\n\t\tif (currentPlayer.equals(vServerThread.get(0))){\n\t\t\tcurrentPlayer=vServerThread.get(1);\n\t\t} else if (currentPlayer.equals(vServerThread.get(1))){\n\t\t\tcurrentPlayer=vServerThread.get(0);\n\t\t}\n\t}", "public void rotateStep(GearedObject other){}", "public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }", "public Player nextPlayer() {\r\n if (this.ordering==null || this.ordering.isEmpty()) {\r\n nextTurn();\r\n }\r\n Player p = this.ordering.poll();\r\n p.setEnergy(p.getBaseEnergy());\r\n p.disableShield();\r\n playerToPlay = p;\r\n p.setAsTurn(true);\r\n return p;\r\n }", "private void computeRotate() {\n time = Math.min(\n duration,\n time + MaterialWeatherView.WeatherAnimationImplementor.REFRESH_INTERVAL);\n rotationNow = (rotationEnd - rotationStart) * (1 - Math.pow(1 - 1.0 * time / duration, 2 * FACTOR))\n + rotationStart;\n if (time == duration) {\n // finish.\n rotating = false;\n }\n }", "LocalMaterialData rotate();", "public void nextTurn(){\n players.add(currentPlayer);//Added to the back\n currentPlayer = players.pop();//Pull out the first player in line to go next\n }", "public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\tint cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "public boolean canRotate ()\n {\n return ((ActiveAdvancer)_advancer).canRotate();\n }", "@Override\n \t\t\t\tpublic void doRotateZ() {\n \n \t\t\t\t}", "public void noRotation()\n {\n double distance = Math.hypot(this.getX()-xMouse, this.getY()-yMouse);\n if(counter == 40 && noRotation == false && distance<300)\n {\n int rot = getRotation();\n turnTowards(xMouse, yMouse);\n int newRot = getRotation();\n if(Math.abs(rot-newRot)%360<40)\n {\n noRotation = true;\n }\n else\n {\n setRotation(rot);\n }\n }\n }", "public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\t//int cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void turn(String rotate) {\n if(Objects.nonNull(this.position)) {\n int currentIntDirection = this.directionConversionMap.get(this.position.getDirection());\n int newIntDirection = this.rotateRobotMap.get(rotate).apply(currentIntDirection,directionConversionMap);\n Optional<Direction> direction = findDirection(newIntDirection);\n this.position = new Position(this.position.getX(), this.position.getY(), direction.get());\n }\n }", "public Player nextPlayer() {\n\t\temptyPlayer = currentPlayer;\n\t\tcurrentPlayer = nextPlayer;\n\t\tnextPlayer = emptyPlayer;\n\t\treturn (currentPlayer);\n\t}", "public void rotLauncherRight()\n\t{\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).moveLauncherRight();\n\t\t\t\tSystem.out.println(\"launcher heading -20\");\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 rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "public void rotate(Rotation rotation)\r\n\t{\r\n\t\tthis.currentDirection=this.currentDirection.rotate(rotation);\r\n\t}", "private void spin() {\n\t\t\tArrayList<Integer> sequence = getDna().getSequence();\n\t\t\tint randomDirection = sequence.get(new Random().nextInt(sequence.size()));\n\t\t\tsetDirection((this.direction + randomDirection) % 8);\t\n\t\t}", "public void rotate(float angle);", "public static void nextTurn(){\n\t\tPlayerButton [][] ary = GameBoard.getPBAry();\n\t\t\n\t\tfor( int x=0; x< ary.length; x++ ){\n\t\t\tfor( int y=0; y<ary[x].length; y++ ){\n\t\t\t\tary[x][y].setMovable( false );\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurr++;\n\t\tif(curr >= players.size())\n\t\t\tcurr=0;\n\n\t\tif(players.get(curr).hasBeenKicked()){\n\t\t\tnextTurn();\n\t\t}\n\t}", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "protected void next() {\n\t\t// Next node\n\t\tnode = path.remove(0);\n\t\ttransition(NavigatorState.ROTATE_TO);\n\t}", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public double getRotation();", "@Override\n public int getNextPlayer()\n {\n // Checks if the current player's ID is 0, as in player 1\n if (currentPlayer == 0)\n {\n //If the current player's ID is 0, change it to be 1, as in player 2\n currentPlayer = 1;\n }\n else\n {\n /*\n * The the current player's ID isn't 0, as in it's player 2, set the\n * ID to be 0, player 1\n */\n currentPlayer = 0;\n }\n\n // Return the current player's value after it's been changed\n return currentPlayer;\n }", "@SuppressWarnings(\"incomplete-switch\")\n\tprivate void rotatingBehavior() {\n\t\tif (remainingSteps > 0) {\n\t\t\tremainingSteps--;\n\t\t} else {\n\t\t\tswitch (facing) {\n\t\t\t\tcase LEFT:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UP:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t}\n\t}", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "void rotatePiece() {\n boolean temp = this.left;\n boolean temp2 = this.up;\n boolean temp3 = this.right;\n boolean temp4 = this.down;\n this.left = temp4;\n this.up = temp;\n this.right = temp2;\n this.down = temp3;\n }", "private void GameUpdate() \r\n { \r\n // CheckInput();\r\n \r\n mEnemy.preRotate(2.0f, 0, 1, 0);\r\n mEnemy.animate(mEnemyTimer += 50);\r\n }", "void rotateTurtle(int turtleIndex, double degrees);", "public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }", "void turn(float degrees) {\n _rotVector.rotate(radians(degrees));\n }", "public void turn(int angle)\n {\n setRotation(getRotation() + angle);\n }", "public void turn(int angle)\n {\n setRotation(getRotation() + angle);\n }", "public int[][] rotate(){\r\n\t\tpos = (pos == (limit - 1))? 1:pos + 1;\r\n\t\treturn coords(pos);\r\n\t}", "public void rotateRight(int numberOfTurns);", "public double nextAngle()\n {\n return nextAngle();\n }", "public boolean rotateClockwise(Circle main, Circle... neighbours) {\n\t\tif (canRotate(main)) {\n\t\t\tCircle circleB = main;\n\t\t\tCircle circleA = neighbours[0];\n\t\t\tCircle circleC = neighbours[1];\n\t\t\t\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "private int getNextPlayer() {\n int nextPlayerID = ((currentTurn + turnOrder) % numPlayers);\n nextPlayerID = (((nextPlayerID + numPlayers) % numPlayers)); // handles negative numbers\n return nextPlayerID;\n }", "public void playerNextMove(int row, int col){\r\n setSign(row,col,playerSign);\r\n }", "public void rotateCCW(){\n rotState = (rotState + 3) % 4;\n for (int i = 0; i < tiles.length; ++i){\n tiles[i] = new Point(tiles[i].y , -tiles[i].x);\n }\n }", "int getMinRotation();", "public void pauseRotationLocked() {\n this.mDeferredRotationPauseCount++;\n }", "public Quaternion getCurrentRotation() {\n long currentTimeMillis = System.currentTimeMillis();\n\n if (currentTimeMillis > finishTimeMillis) {\n return finishRotation;\n } else {\n float percent = ((float)(currentTimeMillis-startTimeMillis)) / ((float)(finishTimeMillis-startTimeMillis));\n Quaternion interpolatedRotation = new Quaternion();\n \n // Not sure if slerp is right, but you never know !\n interpolatedRotation.slerp(startRotation, finishRotation, percent);\n return interpolatedRotation;\n }\n }", "@Override\r\n public void rotateClockwise() {\r\n super.rotateClockwise(); //To change body of generated methods, choose Tools | Templates.\r\n // TODO: Fix me\r\n undo.push('c');\r\n redo = new LinkedListStack();\r\n }", "public void rotate() { // rotate the first element to the back of the list\n // TODO\n if ( tail != null){\n tail = tail.getNext();\n }\n\n }" ]
[ "0.6464505", "0.6463837", "0.6445111", "0.642041", "0.6355862", "0.6346115", "0.6338979", "0.63384455", "0.63319176", "0.62910515", "0.6290677", "0.617448", "0.6172643", "0.6171977", "0.61556995", "0.6145222", "0.6098877", "0.6076459", "0.60638237", "0.60275406", "0.6023026", "0.6015", "0.5990728", "0.59890497", "0.5956515", "0.59425014", "0.59400004", "0.59348637", "0.5930576", "0.59248376", "0.5924493", "0.5924218", "0.59152216", "0.59133554", "0.5908845", "0.5823591", "0.5806362", "0.5795706", "0.57872915", "0.57815695", "0.5754125", "0.5746487", "0.57460827", "0.57439435", "0.57415104", "0.57397056", "0.5731501", "0.572296", "0.57012874", "0.5697346", "0.56738305", "0.5661209", "0.5654787", "0.56460285", "0.56425637", "0.5632245", "0.5625718", "0.561708", "0.5595407", "0.5590524", "0.5589828", "0.5568436", "0.5565765", "0.5565451", "0.5562826", "0.55433536", "0.55424714", "0.5538427", "0.5537414", "0.5534551", "0.551867", "0.5511692", "0.55021787", "0.5496127", "0.5492168", "0.5487383", "0.54805726", "0.5478188", "0.5467724", "0.5462825", "0.54570794", "0.5446396", "0.5445553", "0.5439917", "0.54321903", "0.54277825", "0.54277825", "0.5426188", "0.54234093", "0.54226583", "0.54200673", "0.5410995", "0.5403402", "0.5403253", "0.5397404", "0.5379287", "0.53791326", "0.537744", "0.53669584", "0.5362583" ]
0.8414127
0
Get the current player.
public Player getCurrent(){ Player p; try{ p = this.players.get(this.currElem); } catch(IndexOutOfBoundsException e){ System.out.println("There isn't any players."); p = null; } return p; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public User getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public int getCurrentPlayer() {\n return player;\n }", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "public final Player getPlayer() {\n return player;\n }", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "public Player currentPlayer() {\n\t\treturn (currentPlayer);\n\t}", "protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "public Player getPlayer() {\n\t\t\treturn player;\n\t\t}", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getPlayer() {\n\t\treturn this.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 Player getPlayer() {\n\t\treturn player;\n\t}", "public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "public static EntityPlayer getPlayer() {\n\t\treturn ModLoader.getMinecraftInstance().thePlayer;\n\t}", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }", "public String getPlayer() {\r\n return player;\r\n }", "Player currentPlayer();", "public AbstractGameObject getPlayer() {\n return this.player;\n }", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public Player getPlayer() {\n return player;\n }", "public Player getActivePlayer() {\n return activePlayer;\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public Player getActivePlayer() {\r\n return activePlayer;\r\n }", "public Player getClientPlayer() {\n\t\treturn players.get(0);\n\t}", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public Player getPlayer() {\r\n return player;\r\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 }", "public Player getPlayer() {\n\t\treturn p;\n\t}", "public Player getPlayer() {\n return player;\n }", "public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}", "Player getPlayer();", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Sprite getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n return me;\n }", "public Player getPlayer() {\n return (roomPlayer);\n }", "public PlayerShared getPlayer(String token) throws RemoteException {\n return mainScreenProvider.getPlayer(token);\n }", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "public Player getPlayer();", "public Player getPlayer();", "public PlayerEntity getPlayer() {\n return player;\n }", "public PlayerEntity getPlayer() {\n return player;\n }", "public static Player getCurrPlayer(){\n\t\treturn players.get(curr);\n\t}", "public int getActivePlayer() {\n return activePlayer;\n }", "public Player getActivePlayer() {\n if (getActiveColor() == Piece.COLOR.RED)\n return getRedPlayer();\n else\n return getWhitePlayer();\n }", "public ViewerManager2 getPlayer() {\n return this.player;\n }", "public Player getPlayer() {\n return humanPlayer;\n }", "public Strider getPlayer() {\n return player;\n }", "protected Player getPlayer() { return player; }", "@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPlayerProto getPlayer() {\n return player_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : player_;\n }", "public Player getPlayer() {\n return p;\n }", "public char getPlayer() {\n return player;\n }", "public POGOProtos.Rpc.CombatProto.CombatPlayerProto getPlayer() {\n if (playerBuilder_ == null) {\n return player_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : player_;\n } else {\n return playerBuilder_.getMessage();\n }\n }", "public String getPlayer() {\n return p;\n }", "@Override\n\tpublic Player getBukkitPlayer() {\n\t\treturn this.bukkitPlayer;\n\t}", "public int activePlayer() {\n return this.activePlayer;\n }", "public int getPlayer()\n {\n return this.player;\n }", "String getPlayer();", "@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }", "@Override\npublic Player<T> getCurrentPlayer() {\n\treturn currentPlayer;\n}", "public Player getPlayer() { return player; }", "public final static PlayerHandler getPlayerHandler() {\r\n\t\treturn playerHandler;\r\n\t}", "public Player getCurrentPlayer(Match match) {\r\n LOGGER.debug(\"--> getCurrentPlayer: match=\" + match);\r\n Player currentPlayer;\r\n\r\n if (match.getCurrentPlayer() == 1) {\r\n currentPlayer = match.getPlayer1();\r\n } else if (match.getCurrentPlayer() == 2) {\r\n currentPlayer = match.getPlayer2();\r\n } else if (match.getCurrentPlayer() == 0) {\r\n currentPlayer = match.getPlayer1();\r\n } else {\r\n throw new GeneralException(\"match has no defined currentPlayer!\");\r\n }\r\n\r\n LOGGER.debug(\"<-- getCurrentPlayer\");\r\n return currentPlayer;\r\n }", "Player getSelectedPlayer();", "@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}", "public String getPlayerName() {\n return this.playerName;\n }", "public PlayerData getPlayerData() {\n return player;\n }", "public PlayerView getPlayerView() {\n return playerView;\n }", "public static synchronized Player getInstance(){\n if(Player.player == null){\n Player.player = new Player();\n }\n return Player.player;\n }", "public Room getCurrentRoom() {\n return playerRoom;\n }", "public Player getPlayer(String username){\n return this.players.get(username);\n }", "public PlayerModel getOwnerPlayer() {\r\n\t\treturn ownerPlayer;\r\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public Piece getCurrPlayer() {\n return this.currPlayer;\n }", "@Override\n\tpublic Player getPlayer() {\n\t\treturn null;\n\t}", "public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "protected ClientList getCurrentPlayers() {\r\n\t\treturn this.players;\r\n\t}" ]
[ "0.87128574", "0.87128574", "0.8612241", "0.8484393", "0.84519434", "0.8431457", "0.839031", "0.8385846", "0.8365647", "0.83213437", "0.82913834", "0.8279891", "0.8279891", "0.82727456", "0.823958", "0.81004894", "0.80569327", "0.80235314", "0.8021336", "0.8007991", "0.80032873", "0.7992403", "0.7944845", "0.7944845", "0.7944845", "0.7944845", "0.7944845", "0.7944845", "0.7944845", "0.7922016", "0.786795", "0.7862814", "0.7830524", "0.7811901", "0.780021", "0.7770306", "0.77138335", "0.76926523", "0.7690506", "0.7688585", "0.7676476", "0.76566947", "0.7616918", "0.75985533", "0.7574327", "0.7574327", "0.7574327", "0.7574327", "0.7574327", "0.75625956", "0.75535285", "0.75311726", "0.75273395", "0.7502515", "0.74548", "0.74539137", "0.7441534", "0.74212605", "0.7420603", "0.7413595", "0.7413595", "0.7377611", "0.7377611", "0.7358042", "0.73369867", "0.7312892", "0.72742623", "0.72348225", "0.7201142", "0.71983534", "0.71960753", "0.7171951", "0.7162434", "0.71451485", "0.7129738", "0.71295065", "0.71285784", "0.70798516", "0.70713073", "0.7022481", "0.7015601", "0.7012293", "0.6990425", "0.69838613", "0.6973738", "0.6917826", "0.68985534", "0.68976945", "0.6892222", "0.6891843", "0.68469", "0.6845577", "0.6825884", "0.6810896", "0.6810896", "0.67909735", "0.67870986", "0.6786241", "0.6774833", "0.6774262" ]
0.6998593
82
Get the next player.
public Player getNext(){ return this.players.get(this.nextElem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Player nextPlayer() {\n Player next = players.get(nextPlayerIdx++);\n nextPlayerIdx %= players.size(); \n \n return next;\n }", "public Player nextPlayer() {\n\t\temptyPlayer = currentPlayer;\n\t\tcurrentPlayer = nextPlayer;\n\t\tnextPlayer = emptyPlayer;\n\t\treturn (currentPlayer);\n\t}", "public int nextPlayer() {\n\t\tplayer = (player + 1) % playerCount;\n\t\treturn player;\n\t}", "public PlayerController getNextPlayer()\n {\n // This will return a player who is going to make a move\n int turn = this.turn;\n int NUMBER_OF_PLAYERS = GameConfiguration.NUMBER_OF_PLAYERS;\n if(turn%NUMBER_OF_PLAYERS == 0) \n {\n turn = 0;\n }\n else\n {\n turn = turn%NUMBER_OF_PLAYERS;\n }\n PlayerController player = findPlayerById(turn);\n return player;\n }", "@Override\n public int getNextPlayer()\n {\n // Checks if the current player's ID is 0, as in player 1\n if (currentPlayer == 0)\n {\n //If the current player's ID is 0, change it to be 1, as in player 2\n currentPlayer = 1;\n }\n else\n {\n /*\n * The the current player's ID isn't 0, as in it's player 2, set the\n * ID to be 0, player 1\n */\n currentPlayer = 0;\n }\n\n // Return the current player's value after it's been changed\n return currentPlayer;\n }", "@Override\n public int getNextPlayer() {\n //TODO Implement this method\n if(isPlayerOne){\n return 0;\n }else {\n return 1;\n }\n }", "public Player nextPlayer() {\r\n if (this.ordering==null || this.ordering.isEmpty()) {\r\n nextTurn();\r\n }\r\n Player p = this.ordering.poll();\r\n p.setEnergy(p.getBaseEnergy());\r\n p.disableShield();\r\n playerToPlay = p;\r\n p.setAsTurn(true);\r\n return p;\r\n }", "private int getNextPlayer() {\n int nextPlayerID = ((currentTurn + turnOrder) % numPlayers);\n nextPlayerID = (((nextPlayerID + numPlayers) % numPlayers)); // handles negative numbers\n return nextPlayerID;\n }", "public void nextPlayer() {\n\t\tif (currentPlayer.equals(vServerThread.get(0))){\n\t\t\tcurrentPlayer=vServerThread.get(1);\n\t\t} else if (currentPlayer.equals(vServerThread.get(1))){\n\t\t\tcurrentPlayer=vServerThread.get(0);\n\t\t}\n\t}", "public void nextPlayer() {\r\n if (currentPlayer == totalPlayer) {\r\n currentPlayer = 1;\r\n } else {\r\n currentPlayer++;\r\n }\r\n }", "protected Side getNextToPlay(){\n return nextToPlay;\n }", "public PlayerId next() {\n return (this.ordinal() == (ALL.size() - 1)) ? ALL.get(0) : ALL.get(this.ordinal() + 1);\n }", "public PlayerPosition getNext() {\n\n\t\tswitch (this) {\n\t\t\tcase BOTTOM:\n\t\t\t\treturn LEFT;\n\t\t\tcase LEFT:\n\t\t\t\treturn TOP;\n\t\t\tcase TOP:\n\t\t\t\treturn RIGHT;\n\t\t\tcase RIGHT:\n\t\t\t\treturn BOTTOM;\n\t\t\tdefault:\n\t\t\t\t// must not happen\n\t\t\t\treturn null;\n\t\t}\n\t}", "public void nextPlayerInTurn() {\n currentPlayerTurn= playersTurns.poll();\n if (currentPlayerTurn != null) {\n eventListener.addEventObject(new PlayerEvent(currentPlayerTurn.getPlayerName(),EventNamesConstants.PlayerTurnArrived));\n currentPlayerName = currentPlayerTurn.getPlayerName();\n }\n else {\n currentPlayerName = \"None\";\n }\n }", "public Player nextMove() {\n\t\treturn null;\n\t\t\n\t}", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public static void ChooseNextPlayer () {\n do {\r\n\r\n // MOVE TO THE NEXT PLAYER\r\n next_player++;\r\n\r\n // IF WE MOVED TOO FAR, WRAP AROUND TO ZERO\r\n if (next_player >= player_count)\r\n next_player = 0;\r\n\r\n } while (player[next_player].lost);\r\n\r\n }", "public Card getNextPlayerCard()\n\t{\n\t\tDeck<Card> playerCards = board.getPlayerCardDeck();\n\t\tif (playerCards.isEmpty())\n\t\t{\n\t\t\tsystemDataInput.printMessage(\"There is no player card to play the game.\");\n\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCard topCard = playerCards.pickTopCard();\n\t\t\tif (playerCards.size() == 1)\n\t\t\t{\n\t\t\t\tsystemDataInput.printMessage(\"The last player card \" + topCard.getName() + \" has been picked up. This is the end of the game.\");\n\t\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\t}\n\t\t\t\n\t\t\treturn topCard;\n\t\t}\n\t}", "public PlayerChoicePick getNextPlayerChoicePick();", "public int getCurrentPlayer() {\n return player;\n }", "public void determineNextPlayer() {\r\n\t\t// Calculate next player\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Current player number before getting next: \"+currentPlayer.getNumber());\r\n//\t\tif (currentPlayer.getNumber() == 0) {\r\n//\t\t\tif (p2 == null) {currentPlayer = p1;} else {currentPlayer = p2;}\r\n//\t\t} else if (currentPlayer.getNumber() == 1) {\r\n//\t\t\tif (p3 == null) {currentPlayer = p1;} else {currentPlayer = p3;}\r\n//\t\t} else if (currentPlayer.getNumber() == 2) {\r\n//\t\t\tif (p4 == null) {currentPlayer = p1;} else {currentPlayer = p4;}\r\n//\t\t} else {\r\n//\t\t\tcurrentPlayer = p1;\r\n//\t\t}\r\n\t\tcurrentPlayer = currentPlayer.getNextPlayer(); // Method already deals with quit\r\n\t\t\r\n\t\t// Player is alive and not free\r\n\t\tif (!currentPlayer.isFree() && !currentPlayer.isDead()) { \r\n\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Next player is not dead and not free: \"+currentPlayer.getNumber());\r\n\t\t\tturnIsEnding = false;\r\n\t\t\tnewTurn();\r\n\t\t// Player is dead\r\n\t\t} else if (currentPlayer.isDead()) {\r\n\t\t\tif (!checkIfGameIsOver()) {\r\n\t\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Player is dead, game is not over so skipping\");\r\n\t\t\t\tendTurn(); // DEATH CONDITION 1.5 & 2 & 2.5\r\n\t\t\t}\r\n\t\t// Player is free\r\n\t\t} else {\r\n\t\t\t// Check if game is over\r\n\t\t\tif (!checkIfGameIsOver()) {\r\n\t\t\t\t// End Game Dragon\r\n\t\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Player is free, game is not over\");\r\n\t\t\t\t// Check if this is the first escaped player\r\n\t\t\t\tif (currentPlayer.getPlayerID().contentEquals(firstEscapee.getPlayerID())) {\r\n\t\t\t\t\t// Advance the room and draw next sprite\r\n\t\t\t\t\tcurrentPlayer.setCurrentRoom(currentPlayer.getCurrentRoom()+1);\r\n\t\t\t\t\tint room = currentPlayer.getCurrentRoom();\r\n\t\t\t\t\tcurrentPlayer.getPiece().setX(GlobalVars.playerCoordsPerRoom[room][0]+GlobalVars.playersOffset[currentPlayer.getNumber()][0]);\r\n\t\t\t\t\tcurrentPlayer.getPiece().setY(GlobalVars.playerCoordsPerRoom[room][1]+GlobalVars.playersOffset[currentPlayer.getNumber()][1]);\r\n\t\t\t\t\t// If last room, kill the rest of the players\r\n\t\t\t\t\tif (room == 43) {\r\n\t\t\t\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] First escapee has reached last room. Killing all other players\");\r\n\t\t\t\t\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\t\t\t\t\tif (!players.get(i).isDead() && !players.get(i).isFree()) {\r\n\t\t\t\t\t\t\t\tdeath(players.get(i)); // DEATH CONDITION 3.5\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// Not run through death because turnIsEnding = true\r\n\t\t\t\t\t\tif (!status.contentEquals(\"over\")) {\r\n\t\t\t\t\t\t\tgameOver();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Not last stage so keep going\r\n\t\t\t\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Advanced room in end sequence\");\r\n\t\t\t\t\t\tgameChannel.sendMessage(\":skull: Only **\"+(43-room)+\"** turn(s) left!\").queueAfter(2000,TimeUnit.MILLISECONDS);\r\n\t\t\t\t\t\t// Increased cube dragon attack\r\n\t\t\t\t\t\tdragonAttack(cubesPerLevel[attackLevel]+room-39);\r\n\t\t\t\t\t\t// Even if the last player died, should pass and then end game\r\n\t\t\t\t\t\tendTurn();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Not first escapee but also free\r\n\t\t\t\t\tendTurn();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public void next() {\n addTracksToQueue();\n player.skipToNext();\n }", "Player currentPlayer();", "Player getPlayer();", "private void playNextPlayer() {\n \n PlayerId nextPlayer = state.nextPlayer();\n players.get(nextPlayer).setHelp(state, handsOfCards.get(nextPlayer), nextPlayer);\n Card c = players.get(nextPlayer).cardToPlay(state, handsOfCards.get(nextPlayer));\n state = state.withNewCardPlayed(c);\n \n handsOfCards.put(nextPlayer, handsOfCards.get(nextPlayer).remove(c));\n players.get(nextPlayer).updateHand(handsOfCards.get(nextPlayer));\n \n for (Map.Entry<PlayerId, Player> pId: players.entrySet()) {\n pId.getValue().updateTrick(state.trick());\n }\n players.get(nextPlayer).resetHelp();\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public void next_player() {\n\t\tthis.nb_turn++;\n\t\tthis.player_turn++;\n\t\tthis.same_dice_in_a_row = 0;\n\t\tif (player_turn == this.players.size()) {\n\t\t\tthis.player_turn = 0;\n\t\t}\n\n\t\tif (get_player_from_turn().get_surrend()) {\n\t\t\tthis.nb_turn--;\n\t\t\tif (get_player_in_game() > 0) {\n\t\t\t\tthis.next_player();\n\t\t\t}\n\t\t}\n\t}", "public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}", "public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "public static Player getCurrPlayer(){\n\t\treturn players.get(curr);\n\t}", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "private PlayState getNext(){\n return values()[(this.ordinal() + 1) % PlayState.values().length];\n }", "protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}", "public Player getFirstPlayer() {\n return firstPlayer;\n }", "public int getPlayer()\n {\n return this.player;\n }", "public String getPlayer() {\r\n return player;\r\n }", "private int nextSong() {\n if (playListAdapter != null) {\n playListAdapter.clickPreviousNext(2);\n }\n serviceBound = false;\n player.stopMedia();\n int size = audioList.size();\n if (currentSong < size) {\n currentSong++;\n } else {\n currentSong = 0;\n }\n return currentSong;\n }", "public int getNextActivePlayer() {\n //first check all players after current player\n for (int i = this.activePlayer + 1; i < nrOfPlayers(); i++) {\n if (players.get(i).getState()) {\n return i;\n }\n }\n\n //then check all players from the beginning\n for (int i = 0; i < nrOfPlayers(); i++) {\n if (players.get(i).getState()) {\n return i;\n }\n }\n\n return -1; //should never be returned\n }", "public final Player getPlayer() {\n return player;\n }", "public Player getSecondPlayer() {\n return secondPlayer;\n }", "public synchronized Player getPlayerIfNotFull() {\n if (player1 == null) {\n player1 = new Player(order, 'X');\n order++;\n nrOfPlayers++;\n return player1;\n } else if (player2 == null) {\n player2 = new Player(order, 'O');\n order = 0;\n nrOfPlayers++;\n started = true;\n return player2;\n }\n return null;\n }", "public Player getOtherPlayer() {\n if (getCurrentPlayer().getNumber() == 1) {\n return joueur2;\n } else {\n return joueur1;\n }\n }", "public Player getPlayer();", "public Player getPlayer();", "public Player currentPlayer() {\n\t\treturn (currentPlayer);\n\t}", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public GameObject getNext();", "public void PlayerToPlayNext(UNOCard aCard) {\n\t\tif (gameDirection == \"right\") { // If Game is moving in one direction\n\t\t\tcurrentPlayerToPlayIndex++;\n\t\t\tif (currentPlayerToPlayIndex >= players.size()) {\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - players.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (gameDirection == \"left\") { // If Game is moving in other direction\n\t\t\tcurrentPlayerToPlayIndex--;\n\t\t\tif (currentPlayerToPlayIndex <= 0) {\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + players.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentPlayerToPlay = players.get(currentPlayerToPlayIndex); // Next Player to play a card\n\t}", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "public void nextTurn(){\n\t\tplayers[currentPlayer].setNotCurrentPlayer();\n\t\t\n\t\t//increment current player to advance to next player\n\t\tcurrentPlayer = (currentPlayer + 1) % players.length;\n\t\t\n\t\t//update the new current player\n\t\tupdateCurrentPlayerView();\n\t}", "public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }", "public Player getPlayer(int index) {\r\n return players[index];\r\n }", "String getPlayer();", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public GameNode getNext() {\n return this.next;\n }", "Player getPlayer(int playerNumber){\n return players.get(playerNumber);\n }", "public GameObject getNext() {\n\t\t\tpointerIndex++;\n\t\t\treturn(gameObjects.elementAt(pointerIndex));\n\t\t}", "Player getSelectedPlayer();", "public void nextTurn(){\n players.add(currentPlayer);//Added to the back\n currentPlayer = players.pop();//Pull out the first player in line to go next\n }", "public Player getPlayer() {\n\t\treturn this.player;\n\t}", "public Player getClientPlayer() {\n\t\treturn players.get(0);\n\t}", "public void setNextActivePlayer() {\n this.activePlayer = getNextActivePlayer();\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.PLAYING);\n listener.playerStateChanged(event);\n }\n }", "public Player getPlayer() {\n return player;\n }", "public void nextTurn() {\r\n activePlayer = nextPlayer;\r\n advanceNextPlayer();\r\n }", "private String getFirstPlayer() {\n\t\treturn firstPlayer;\n\t}", "public Player getPlayer() {\r\n return player;\r\n }", "public void onPlayerNext() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tsetCurrentTrack();\n\t\t\t}\n\t\t});\n\t}", "public Player getPlayer(String name){ \n\t\tif (players.containsKey(name)) return players.get(name);\n\t\tPlayer player = getModPlayer(name);\n\t\tif (player != null) {\n\t\t\tplayers.put(name, player);\n\t\t\treturn player;\n\t\t}\n\t\treturn player;\n\t}", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "public Player getPlayer() {\n\t\t\treturn player;\n\t\t}", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public Player getPlayer()\r\n {\r\n return player;\r\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 int nextPlayer() {\n// int count = 0;\n// for (int i = 0; i < playersArray.length; i++)\n// if (playersArray[i]<0)\n// count++;\n//\n// if (\n do {\n player = (player + 1) % numberPlayers;\n } while (playersArray[player] < 0);\n return player;\n }", "public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}", "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 }", "public User getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "public ResponseEntity<?> getNextSong() {\n\t\t// make sure there is a SystemEntity in the db\n\t\tinitializeSystemIfNull();\n\t\t// get the system config\n\t\tPlaylistMetadataEntity se = systemRepo.findAll().get(0);\n\n\t\tTrackEntity te = null;\n\t\t// if there is another song to be played after the current one\n\t\tif (trackRepo.existsByPosition(se.getPositionInPlaylist() + 1)) {\n\t\t\t// then get the song, and save the systementity\n\t\t\tte = trackRepo.findByPosition(se.getPositionInPlaylist() + 1);\n\t\t\tse.setPositionInPlaylist(se.getPositionInPlaylist() + 1);\n\t\t\tse.setSecondsPlayed(0);\n\t\t\tsystemRepo.save(se);\n\t\t}\n\t\t// if no song was found, there is no next song, bad request\n\t\tif (te == null) {\n\t\t\treturn new ResponseEntity<>(ms.getMessage(\"endPlaylist\", null, LocaleContextHolder.getLocale()),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\t\t// send the time when the song was left off (0)\n\t\tGetSongDTO getSong = new GetSongDTO();\n\t\tgetSong.setSecondsPlayed(se.getSecondsPlayed());\n\t\tgetSong.setTrack(te);\n\t\treturn new ResponseEntity<>(getSong, HttpStatus.OK);\n\t}", "public PlayerNumber whoseTurn() {\n\t\tif (isGameOver()) {\n\t\t\treturn Game.GAME_OVER;\n\t\t}\n\t\treturn nextPlayer;\n\t}", "public Player getPlayer(String username){\n return this.players.get(username);\n }" ]
[ "0.8323868", "0.805763", "0.79955786", "0.79193264", "0.78220004", "0.77245957", "0.75913906", "0.74933416", "0.73304266", "0.72692275", "0.7214895", "0.70429444", "0.7040877", "0.6985156", "0.6908806", "0.68809336", "0.68809336", "0.6874829", "0.68184996", "0.6791025", "0.67685735", "0.6727466", "0.67205256", "0.6715964", "0.66776794", "0.6664374", "0.6664346", "0.6644456", "0.66317743", "0.66317743", "0.662284", "0.6618298", "0.65746397", "0.6563609", "0.654336", "0.65426123", "0.6538073", "0.6532796", "0.65266883", "0.65037", "0.6485896", "0.64825934", "0.646856", "0.64602315", "0.64515775", "0.6447874", "0.64469004", "0.6444559", "0.64443207", "0.6435223", "0.6424525", "0.6424525", "0.64188105", "0.6416518", "0.6406891", "0.63980055", "0.6386914", "0.6375532", "0.636639", "0.6366233", "0.6332924", "0.63289255", "0.63285893", "0.63206595", "0.63116103", "0.63092786", "0.63046396", "0.6303056", "0.630104", "0.62831557", "0.62645674", "0.62632424", "0.62620634", "0.62501246", "0.6246549", "0.62456816", "0.6236188", "0.6229232", "0.6224894", "0.62205553", "0.62149554", "0.6210223", "0.6200208", "0.6200208", "0.6200208", "0.6200208", "0.6200208", "0.6200208", "0.6200208", "0.6188848", "0.6166285", "0.6161177", "0.6161177", "0.6161177", "0.6161177", "0.6161177", "0.61460125", "0.61283857", "0.6126262", "0.61232215" ]
0.8140471
1
Look for a player that have no more cards in the hand.
public Player lookForWinner(){ for(int i = 0; i < this.players.size(); i++){ if(this.players.get(i).numCards() == 0) return this.players.get(i); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCardsRemaining(int player) {\n return players[player].getHand().size();\n }", "public void giveOutCards() {\n boolean shared = false;\n while (!shared) {\n for (Player player : this.players) {\n if (this.cards.size() == 0) {\n shared = true;\n } else {\n Card card = this.cards.get(0);\n this.cards.remove(0);\n if (!envelope.has(card)) {\n player.addCard(card);\n }\n }\n }\n }\n }", "public boolean hasMoreCards() {\n if (cardHold == 0)\n return false;\n else\n return true;\n }", "public int remaining() {\r\n\t\treturn cards.size();\r\n\t}", "public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }", "private WarPlayer tryGetPlayerWithLessThanThreeCards() {\n for (WarPlayer player : players) {\n if (player.getHand().size() < 3)\n return player;\n }\n return null;\n\n }", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public int remainingCards() {\n return this.cards.length - this.topCardIndex ;\n }", "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 }", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public boolean cardsLeft() {\n\t\tif (cards.size() - completedCards > 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "private void updateLastCardDiscarded(){\r\n\t\tint x = 0;\r\n\t\twhile(this != game.getPlayer(x++)){} // find the nextPlayer\r\n\t\tx = x % game.getNumberOfPlayers();\r\n\t\tnextPlayer = game.getPlayer(x);\r\n\t\t\r\n\t\tif(latestRound != game.getRoundNumber()){ // if it's a new Round, reset\r\n\t\t\tpickedUpCards = new ArrayList<Card>();\r\n\t\t\tlastCardDiscarded = null;\r\n\t\t\tlatestRound = game.getRoundNumber();\r\n\t\t\t\r\n\t\t\tfor(int y = 0; y < game.getNumberOfPlayers(); y++){ // ?????\r\n\t\t\t\tif(game.getPlayer(y) != this && \r\n\t\t\t\t\t\t(getScore() >= game.getPlayer(y).getScore() || getPhase() > game.getPlayer(y).getPhase())){//????\r\n\t\t\t\t\tsetName(oldName);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetName(oldName + \"is#WINNING\"); // ?????\r\n\t\t}else if(lastCardDiscarded != null && Configuration.getTypeRequired(nextPlayer.getPhase(), 0) == Configuration.SET_PHASE){\r\n\t\t\tif(nextPlayer.drewFromDiscard())\r\n\t\t\t\tpickedUpCards.add(lastCardDiscarded); // add the card to picked up card if it was picked up \r\n\t\t}\r\n\t}", "Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }", "public boolean outOfCards() {\n return (this.gameDeck.isEmpty() && this.wonDeck.isEmpty());\n }", "public boolean isGameOver() {\r\n for (String player : this.playerIds) {\r\n\r\n //If player has an empty card\r\n if(hasEmptyHand(player)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "boolean haveGame(char suit){\n int suitNum = 0; // number of cards that follow suit\n for (int i=0; i<6; i++)\n if (hand.get(i).suit == suit)\n suitNum++;\n return (suitNum > 3);\n }", "public boolean isOver() {\n\t\t\n\t\tif(!dealer.hasCards()){\n\t\t\tisOver= true;\n\t\t\treturn isOver;\n\t\t}\n\t\t\n\t\tfor (Player p : players) {\n\t\t\tif (!p.hasCards()) {\n\t\t\t\tisOver = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isOver;\n\t}", "private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\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}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "private static boolean handOutCards(Player player){\r\n\t\t/* \r\n\t\t * Seleccionamos una de las cartas restantes\r\n\t\t * en la baraja de forma aleatoria y se la \r\n\t\t * pasamos a la mano del jugador\r\n\t\t */\r\n\t\tint index;\r\n\r\n\t\t// Comprobamos las cartas restantes en la baraja\r\n\t\tif(deckOfCards.size() <= 0 || deckOfCards == null){\r\n\t\t\tSystem.err.println(\"No hay cartas para repartir.\");\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t// Seleccionamos una de las cartas de la baraja\r\n\t\t\tindex = (int) (Math.random()*deckOfCards.size());\r\n\t\t\tplayer.addCard(deckOfCards.get(index)); // Agregamos la carta a la mano del jugador\r\n\t\t\t// Eliminamos la carta de la baraja y lo mostramos en la consola\r\n\t\t\tSystem.out.println(player.getName() + \" recibió una carta con valor de \" + deckOfCards.remove(index).getValue() + \" puntos\"); \r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean endOfGame() {\n\t\tfor(CardGamePlayer player : playerList) {\n\t\t\tif(gameStarted && player.getNumOfCards() == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void checkHighCard(Player player) {\n\t\tplayer.setHandRank(HandRank.HIGH_CARD);\n\n\t\tfor (int i = 0, j = 6; i < hand.length; i++, j--)\n\t\t\thand[i] = player.getSevenCardsTempHand().get(j);\n\n\t\tplayer.setFiveCardsHand(hand);\n\t}", "private void eliminatePlayers() {\n \n Iterator<Player> iter = players.iterator();\n\n while (iter.hasNext()) {\n Player player = iter.next();\n\n if (player.getList().isEmpty()) {\n iter.remove();\n if (player.getIsHuman()) {\n setGameState(GameState.HUMAN_OUT);\n }\n // need to remember that due to successive draws, the active player could run\n // out of cards\n // select a new random player if player gets eliminated\n if (!players.contains(activePlayer)) {\n selectRandomPlayer();\n }\n }\n }\n }", "public synchronized void emptyField(){\n List<Player> pList = Arrays.asList(players);\r\n \r\n Iterator<Player> pIter = pList.iterator();\r\n while(pIter.hasNext()){\r\n //for(Player player: players){\r\n Player player = pIter.next();\r\n \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"NUMBER OF CARDS: \" + player.getCardsInHand().size());\r\n \r\n Iterator<Card> cardIter = player.getCardsInHand().iterator();\r\n \r\n while(cardIter.hasNext()){\r\n try{\r\n collectCard(cardIter.next());\r\n }catch(Exception ex){\r\n }\r\n \r\n }\r\n }\r\n }", "static int getComputerCard(Card playerCard) {\n //The computer will iterate through different possible cards it might choose to play.\n //This represents a chosen card at any given time.\n Card possibleCard = null;\n //The position in the computer's hand where the possibleCard is stored.\n int cardPosition = 0;\n //True if the computer has a card of higher value than the player's.\n boolean hasHigherCard = false;\n //Iterate through the computer's hand, trying to find a card higher than the player's\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) {\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) {\n //The computer has a higher card.\n if (possibleCard != null) {\n //If this card is lower than the possible card, but can still beat the player, then replace possible card.\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n //If the computer has not yet chosen a possible card, choose this one.\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n hasHigherCard = true;\n cardPosition = i;\n }\n }\n }\n if (!hasHigherCard) {\n //If the computer does not have a card that can beat the player, then feed the lowest card\n //that the computer has to the player.\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++)\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) {\n if (possibleCard != null) {\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n possibleCard = highCardGame.getHand(0).inspectCard(i);\n cardPosition = i;\n }\n }\n }\n return cardPosition;\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_differentWinners() {\r\n player2 = new Player(\"\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n boolean differentLegalCardFound = false;\r\n Card firstDiscard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n for(int i = 0; i < 25; i++) {\r\n Card loopCard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n if(!loopCard.equals(firstDiscard)) {\r\n differentLegalCardFound = true;\r\n }\r\n }\r\n assertTrue(differentLegalCardFound);\r\n }", "public boolean isWin_DragonKingOfArms(){\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() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "public Card play7(){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which card ? (it should be 7 )\");\n cardIndex = scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex<=0 || cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(\"7\")))){\n System.out.println(\"! it is not a seven card !\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n\n\n }", "private void transferCards(Player player) {\r\n\t\twhile(warPile.size() > 0) {\r\n\t\t\tplayer.addToWinningsPile(warPile.remove(0));\r\n\t\t}\r\n\t}", "public void kickOut(){\n Iterator<Player> iter = players.iterator();\n while (iter.hasNext()){\n Player player = iter.next();\n if(player.isBankrupt(minBet)){\n iter.remove();\n System.out.println(player + \" runs out of cash!\");\n }\n }\n }", "public synchronized Player getPlayerIfNotFull() {\n if (player1 == null) {\n player1 = new Player(order, 'X');\n order++;\n nrOfPlayers++;\n return player1;\n } else if (player2 == null) {\n player2 = new Player(order, 'O');\n order = 0;\n nrOfPlayers++;\n started = true;\n return player2;\n }\n return null;\n }", "public CardStack getAvailableCards()\n {\n return null;\n }", "@Override\r\n public boolean checkPlayerPlayingDeck(int plDeckPosition, int player){\r\n // is current deck empty\r\n boolean flag = true;\r\n\r\n if(!this.players.get(player).isDeckEmpty(plDeckPosition)){\r\n flag = false;\r\n }\r\n return flag;\r\n }", "public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }", "@Test\r\n public void testPlayer_getCautiousStrategyCardCard_higherFirst_wd4() {\n player2 = new Player(\"Player Two\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n\r\n // get rid of the wild so the wd4 is the most attractive option\r\n player2.getHand().discard(wild);\r\n assertTrue(player2.getCautiousStrategyCard(yellowThree, yellowThree.getColor()).equals(wildDrawFour));\r\n }", "@Override\r\n public boolean checkOnePlayerDecksEmpty(int plDeckPosition){\r\n // Is there one player with two empty decks\r\n boolean flag = false;\r\n \r\n //Loop through all decks at deck position for each player\r\n for(Player player : this.players){\r\n if(player.isDeckEmpty(plDeckPosition) && \r\n player.isDeckEmpty(plDeckPosition+1)){\r\n flag = true;\r\n }\r\n }\r\n return flag;\r\n }", "public int cardsLeft() {\n return deck.size();\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_null() {\n player2 = new Player(\"\", true);\r\n Hand hand = new Hand();\r\n player2.setHand(hand.getAllCards());\r\n assertEquals(player2.getDumbStrategyCard(yellowOne, yellowOne.getColor()), null);\r\n }", "public void dealPlayer() {\n //Deal two cards to the player\n playerStack.add(cards[talonStack]);\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n talonStack++;\n\n playerStack.add(cards[talonStack]);\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n talonStack++;\n }", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "boolean haveHigh(char suit){\n for (int i=0; i<6; i++)\n if ((hand.get(i).suit == suit) && (hand.get(i).rank > (6 + pitchTable.getNumPlayers())))\n return true;\n return false;\n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "public ArrayList<Player> checkToEliminate() {\n ArrayList<Player> eliminated = new ArrayList<Player>();\n\n // Check which players are to be eliminated\n for (Player player : playersInGame) {\n if (player.peekCard() == null) {\n eliminated.add(player);\n }\n }\n\n // Eliminate players from model\n for (Player eliminatedPlayer : eliminated) {\n playersInGame.remove(eliminatedPlayer);\n }\n\n return eliminated;\n }", "private void onePlayerLeft() throws InterruptedException { \n for(Map.Entry<Integer, PlayerData> player : dat.getPlayerAndIndex().entrySet()) {\n if(player.getValue().isInHand()) {\n sendCommandToAll(\"game:winner:\"+player.getKey()+\":\"+dat.getPot());\n player.getValue().chipCount += dat.getPot();\n break;\n }\n } \n \n Thread.sleep(2000);\n sendCommandToAll(\"game:end\");\n }", "public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public synchronized void collectCard(Card card){\n try{\r\n List<Player> pList = Arrays.asList(players);\r\n \r\n Iterator<Player> pIter = pList.iterator();\r\n while(pIter.hasNext()){\r\n //for(Player player: players){\r\n Player player = pIter.next();\r\n \r\n \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"Collect\");\r\n \r\n if(player.removeCard(card)){\r\n player.getRemoved().clear();\r\n \r\n getCardsPlayed().add(card);\r\n getCardsInPlay().remove(card);\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Collect ex: \" + ex);\r\n }\r\n \r\n }", "public boolean isEmpty() {\n\t\treturn cards.size() <= 4;\n\t}", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "private void checkFinish() {\n for (Player temp: players) {\n if (temp.getNumberOfCards() == 0) {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.println(\"Game finished.\\n\");\n System.out.println(Color.PURPLE.getPrintColor() + temp.getName() + \" is winner.\\n\" + Color.RESET.getPrintColor());\n setGameStatus();\n }\n }\n if (!gameStatus) {\n System.out.println(Color.RESET.getPrintColor() + \"Results:\\n\");\n for (Player temp: players) {\n if (temp.getNumberOfCards() != 0) {\n System.out.println(Color.CYAN.getPrintColor() + temp.toString());\n System.out.print(temp.handToString() + Color.RESET.getPrintColor());\n }\n }\n }\n }", "public boolean removePlayerCard(GreenPlayerCard card) {\r\n\t\treturn playerCards.remove(card);\r\n\t}", "boolean takeCard(int playerIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1)\n return false;\n\n // Are there enough Cards?\n if (deck.getNumCards() <= 0)\n return false;\n\n return hand[playerIndex].takeCard(deck.dealCard());\n }", "public boolean hasRemaining() {\r\n\t\treturn cursor < limit - 1;\r\n\t}", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "boolean haveLow(char suit){\n for (int i=0; i<6; i++)\n if ((hand.get(i).suit == suit) && (hand.get(i).rank < (10 - pitchTable.getNumPlayers())))\n return true;\n return false;\n }", "private void peek() {\n\t\tfor (int card = 0; card < CARDS_SUM; card++) {\n\t\t\t// cheat by finding card face without turning card over\n\t\t\tPlayingCard thisCard = ((PlayingCard) getActivity().findViewById(solo.getImage(card).getId()));\n\t\t\tif (!thisCard.isLocked() && ! thisCard.getVisible()) {\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testHasAtLeastTwoPlayableCards() {\n Player player2 = new Player(\"Three Playable Cards Test\", true);\r\n Hand threePlayableCardsHand = strategyHand;\r\n player2.setHand(threePlayableCardsHand.getAllCards());\r\n\r\n // Make it harder to find playable cards:\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD, cvm));\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD_DRAW_FOUR, cvm));\r\n\r\n Card currentPlayedCard_1 = new Card(Card.YELLOW, Card.ONE, cvm);\r\n assertTrue(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_1, Card.BLUE));\r\n\r\n Card currentPlayedCard_2 = new Card(Card.BLUE, Card.SEVEN, cvm);\r\n assertFalse(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_2, Card.BLUE));\r\n }", "private int playerTurn() {\n List<Card> drawnCards = new LinkedList<>();\n boolean exit = false;\n\n // Ask the player to draw more cards\n do {\n // Draw cards\n Card drawn = drawCard();\n drawnCards.add(drawn);\n Ui.cls();\n Ui.println(\"You 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(\"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(\"Value: \" + highestPossibleValue(drawnCards));\n Ui.println();\n\n // Check for too much points\n if (highestPossibleValue(drawnCards) > 21) {\n Ui.println(\"Unfortunately you got more than 21 points, resulting in a total of 0 points!\");\n Ui.pause();\n break;\n } else {\n Ui.println(\"Would you like to draw another card?\");\n Ui.println(\"1) Take another card\");\n Ui.println(\"2) Stop taking cards\");\n }\n\n // Input\n boolean quitInput = false;\n while (!quitInput) {\n int menuChoice = Ui.getValidInt();\n\n switch (menuChoice) {\n case 1:\n quitInput = true;\n break;\n case 2:\n exit = true;\n quitInput = true;\n break;\n default:\n break;\n }\n }\n\n } while (!exit);\n\n if (highestPossibleValue(drawnCards) > 21) {\n return 0;\n } else {\n return highestPossibleValue(drawnCards);\n }\n }", "public void dealInitialPlayerHands() {\n\t\tint temp = 0;\n\t\tSystem.out.println(\"This is the deck size before dealing: \" + this.tileDeck.deckSize());\n\t\tSystem.out.println(\"_______________________________________________\");\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tfor (int i = 0; i < 14; i ++) {\n\t\t\t\tp.hand.add(this.tileDeck.dealTile());\n\t\t\t}\n\t\t\tp.sort();\n\t\t\tSystem.out.println(\"Player \" + temp + \"'s hand: \" + p.getHandTiles());\n\t\t\tSystem.out.println(\"_______________________________________________\");\n\t\t}\n\t\t//System.out.println(this.tileDeck.deckSize());\n\t}", "public Card dealCard(Player player) {\n\t\tCard card = null;\n\t\tif (dealtCards.get() < DECK_SIZE) { // Check if deck still has cards available. \n\t\t\tcard = cards.get(dealtCards.getAndIncrement());\n\t\t\tif (card != null) { // If card has been found.\n\t\t\t\tplayer.addCard(card);\n\t\t\t\tAtomicInteger cardsBySuit = dealtCardsBySuit.get(card.getSuit());\n\t\t\t\tcardsBySuit.getAndIncrement(); // Update cards by suit counters.\n\t\t\t}\n\t\t}\n\t\treturn card;\n\t}", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "protected boolean hasFaceDownCard(int playerNo, int cardIndex) {\n return carddowncount[playerNo] >= (3 - cardIndex);\n }", "public boolean vanished(Player player) {\n return vanished.contains(player);\n }", "public boolean lookAtWinCard(){\n boolean winCard = false;\n for(Card cards: playerHand){\n if(cards.getCardName().equals(\"Magnetite\")){\n winCard = true;\n }\n }\n return winCard;\n }", "public void removeCard(Player player, AbstractCard card) { //throws exception\n\n for (Hand hand : hands)\n if (hand.getHandOwner().equals(player))\n hand.removeCard(card);\n\n }", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "public Card enemyPlayCard(){ //Is it really worth the effort to give the enemy a full deck/temp hand? Having 2-4 basic abilities that vary should be enough.\n if(!(enemyHand.isEmpty())){\n return enemyHand.get(0);\n } else {\n return null;\n }\n }", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\tif (i + 1 < hand.size()) {\n\t\t\t\t\tif (hand.get(i + 1).getCardValue().getValue()\n\t\t\t\t\t\t\t- hand.get(i).getCardValue().getValue() > 1)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }", "public synchronized List<Card> getCardsInPlay(){\n cardsInPlay.clear();\r\n \r\n for(Player player: players){\r\n if(player == null){\r\n continue;\r\n }\r\n if(player.getCardsInHand().isEmpty()){\r\n continue;\r\n }\r\n for(Card card: player.getCardsInHand()){\r\n cardsInPlay.add(card);\r\n }\r\n }\r\n return cardsInPlay;\r\n }", "public boolean playerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(playerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public void dealCards() {\n for(int i=0; i < 5; i++) { \n for(PokerPlayer player : players) {\n player.takeCard(deck.draw());\n }\n }\n }", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public UnoCard searchForMatch(UnoCard prev) {\r\n \r\n //case where previous card was a \r\n // special card(wild, or WD4)\r\n if(UnoSpecialCardsV2.unoSpecialCard(prev)) {\r\n //Tests to determine 1) which special card previous was; and\r\n if(UnoSpecialCardsV2.unoCardWild(prev)) {\r\n int unoCardTgtColor = UnoV2.getWildColor();\r\n // 2) does player have a card to match it. \r\n for (int i = hand.handSize()-1; i >=0; i--) {\r\n UnoCard unocard = hand.getCard(i);\r\n if (unocard.getColor() == unoCardTgtColor \r\n || (unocard.getRank() > 24)) { \r\n return hand.popCard(i);\r\n }\r\n }\r\n return null;\r\n \r\n }\r\n // Same comments as above\r\n if(UnoSpecialCardsV2.unoCardWildDrawFour(prev)) {\r\n int unoCardTgtColor = UnoV2.getWildColor();\r\n System.out.println(\"unoCardTgtColor into WD4 SearchForMatch \" \r\n + UnoCard.getColors()[unoCardTgtColor]);\r\n \r\n for (int i = hand.handSize()-1; i >=0;i--) {\r\n UnoCard unocard = hand.getCard(i);\r\n if ((unocard.getColor() == unoCardTgtColor) \r\n || unocard.getRank() > 24) {\r\n return hand.popCard(i); //had problem bug just because I forgot the 'i' in popCard...\r\n }\r\n }\r\n return null;\r\n } \r\n } //end special card prev, search for match\r\n \r\n for (int i = 0; i < hand.handSize(); i++) {\r\n UnoCard unocard = hand.getCard(i);\r\n \r\n/** Runs thru hand looks for regular wild cards, plays \r\n * them first*/\r\n if (unocard.getRank() > 24 && unocard.getRank() < 29) { \r\n return hand.popCard(i); \r\n/** Look for skip,reverse, D2, plays them next */\r\n } else if((unocard.getRank() > 18 && unocard.getRank() < 25) \r\n && UnoCard.unoCardsMatch(unocard, prev)) {\r\n return hand.popCard(i);\r\n }\r\n }\r\n/** After 'filters'\r\n * above, only cases are unocard < 19(normal cards 0 \r\n * to 9} or unocard wild Draw4. \r\n * Sort cards that are not special cards \r\n * or regular wild cards to play highest first \r\n */ \r\n UnoHand.insertionSortUnoHand(hand); \r\n \r\n // search from end of hand as hand sorted ascending\r\n for (int i = hand.handSize() - 1; i >= 0; i--) { \r\n UnoCard unocard = hand.getCard(i);\r\n if (unocard.getRank() <= 19 \r\n && UnoCard.unoCardsMatch(unocard, prev)) {\r\n return hand.popCard(i);\r\n // all else fails, play DrawFour\r\n }else if (unocard.getColor() > 3) { \r\n return hand.popCard(i);\r\n } \r\n }\r\n return null;\r\n }", "public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }", "boolean hasPlayerBag();", "private boolean checkformultiFaceUp(Card card) {\n if (!canAddToPile(card.getValue())) {\n return false;\n }\n\n // checking how many card of the same value as card played are in players hand\n int amountinhand = 0;\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null)\n if (hand.getFaceUp(n).getValue() == card.getValue()) amountinhand++;\n }\n if (amountinhand <= 1) return false;\n MultiCardD dialog = new MultiCardD(sh, amountinhand);\n int numbertoplay = dialog.getChoice();\n if (numbertoplay <= 1) return false;\n String command = \"turn:faceup:multi:\" + numbertoplay + \":\" + card.getNumber() + \":\";\n pile.add(card);\n numbertoplay--;\n int toberemovedcount = 0;\n int toberemoved[] = new int[3];\n for (int n = 0; n < 3; n++) toberemoved[n] = -1;\n for (int n = 0; n < 3; n++)\n if (hand.getFaceUp(n) != null) {\n if (numbertoplay <= 0) break;\n if (card.getValue() == hand.getFaceUp(n).getValue()\n && card.getNumber() != hand.getFaceUp(n).getNumber()) {\n command = command.concat(hand.getFaceUp(n).getNumber() + \":\");\n pile.add(hand.getFaceUp(n));\n // storing which card are to be removed\n toberemoved[toberemovedcount] = hand.getFaceUp(n).getNumber();\n toberemovedcount++;\n numbertoplay--;\n }\n }\n // removing card from hand\n for (int n = 0; n < 3; n++) {\n if (toberemoved[n] == -1) break;\n for (int i = 0; i < 3; i++)\n if (hand.getFaceUp(i) != null)\n if (hand.getFaceUp(i).getNumber() == toberemoved[n]) {\n hand.removeFaceUp(i);\n break;\n }\n }\n // sending command\n sendCommand(command);\n // checking for 4 of a kind\n if (pile.isFourOfAKind() || pile.topValue() == 10) {\n burnPile();\n sh.addMsg(\"You burn the pile is your turn again\");\n } else {\n sh.setmyTurn(false);\n nextTurn();\n }\n return true;\n }", "static int getHighCardWithinHand(String[] hand) {\n\tint highCard = 1;\n\tfor (int i = 0; i < hand.length; i++) {\n\t if (getNumberOfCard(hand[i]) > highCard) {\n\t\thighCard = getNumberOfCard(hand[i]);\n\t }\n\t}\n\treturn highCard;\n }", "public int checkChasingPlayer()\n {\n if(stunCountdown > 0)\n {\n chasingPlayer = false;\n return stunCountdown;\n }\n if(Game.getInstance().getPlayer().getCurrentRoom().isControlRoom())\n {\n chasingPlayer = false;\n return(-1);\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n for(Exit neighbor : neighbors)\n {\n if(getCurrentRoom().getExit(neighbor).equals(Game.getInstance().getPlayer().getCurrentRoom()) && neighbor.isOperating())\n {\n chasingPlayer = true;\n return(5 + (int) Math.floor(Math.random() * 6));\n }\n }\n chasingPlayer = false;\n return(-1);\n }\n }", "public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}", "public boolean cardsIsEmpty() {\r\n\t\treturn cards.isEmpty();\r\n\t}", "public int cardsRemaining() {\n return deck.cardsRemaining();\n }", "public Optional<Card> dealOneCard() {\n if (cards.size() > 0) {\n return Optional.of(cards.remove(0));\n } else {\n return Optional.empty();\n }\n }", "public void dealerTurn() {\r\n boolean dealerContinue = false;\r\n do {\r\n for (int i = 0; i < this.getPlayers().size(); i++) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(i);\r\n if (this.getHand().addCards() < player.getHand().addCards() && this.getHand().addCards() < 21 && player.getHand().addCards() <= 21) {\r\n dealerContinue = true;\r\n break;\r\n } else if (this.getHand().addCards() >= player.getHand().addCards() || this.getHand().addCards() == 21) {\r\n dealerContinue = false;\r\n }\r\n }\r\n if (dealerContinue == true) {\r\n addDealerCard();\r\n System.out.println(\"Dealer has: \" + this.getHand().toString());\r\n System.out.println(\"Card Score: \" + this.getHand().addCards());\r\n System.out.println(\"\");\r\n }\r\n } while(dealerContinue == true && this.getHand().addCards() < 21);\r\n }", "public int checkNoOfRapelPlayerHolds () { return noOfRapels; }", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public int privousPlayer() {\n do {\n if (player != 0) {\n player --;\n } else {\n player = playersArray[playersArray.length - 1];\n }\n } while (playersArray[player] < 0);\n return player;\n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "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 }", "public boolean cardPlayedBefore() {\n boolean played = false;\n if (playedCards.size()>0) {\n played = true;\n }\n return played;\n }", "private void checkPlayerScoreboard(Player player) {\n\t\tScoreboard known = knownScoreboards.get(player);\n\t\t\n\t\tif (player.hasPermission(\"pandora.movement.nopush\")) {\n\t\t\tif (known == null || known != player.getScoreboard()) {\n\t\t\t\tknown = player.getScoreboard();\n\t\t\t\tknownScoreboards.put(player, known);\n\t\t\t\tsendFakeTeam(player);\n\t\t\t}\n\t\t} else {\n\t\t\tif (known != null) {\n\t\t\t\tdeleteFakeTeam(player);\n\t\t\t\tknownScoreboards.put(player, null);\n\t\t\t}\n\t\t}\n\t}", "public Card getNextPlayerCard()\n\t{\n\t\tDeck<Card> playerCards = board.getPlayerCardDeck();\n\t\tif (playerCards.isEmpty())\n\t\t{\n\t\t\tsystemDataInput.printMessage(\"There is no player card to play the game.\");\n\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCard topCard = playerCards.pickTopCard();\n\t\t\tif (playerCards.size() == 1)\n\t\t\t{\n\t\t\t\tsystemDataInput.printMessage(\"The last player card \" + topCard.getName() + \" has been picked up. This is the end of the game.\");\n\t\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\t}\n\t\t\t\n\t\t\treturn topCard;\n\t\t}\n\t}", "public Cards getLastCard() {\n return playedCards.get(playedCards.size()-1);\n }", "public boolean zombiesNearbyExceedCap(Player player) {\n int zombies = 0;\n double dist = plugin.CONFIG.SPAWNING_RADIUS_MAX / 2;\n for (Entity ent : player.getNearbyEntities(dist, dist, dist)) {\n if (ent.getType().equals(EntityType.ZOMBIE)) zombies++;\n }\n return zombies >= plugin.CONFIG.SPAWNING_NEARBY_CAP;\n }" ]
[ "0.6721768", "0.6614659", "0.6590071", "0.65426123", "0.6477071", "0.6407566", "0.6403369", "0.6348852", "0.6309802", "0.6299674", "0.6245224", "0.6243368", "0.61879265", "0.61428875", "0.6127369", "0.6115902", "0.60952926", "0.60932404", "0.6020461", "0.6012704", "0.6010926", "0.60057133", "0.59786683", "0.59562135", "0.5854458", "0.5851058", "0.58472013", "0.58405817", "0.58376", "0.58253264", "0.5820376", "0.5796567", "0.5792305", "0.5790446", "0.5786532", "0.5785026", "0.57612544", "0.5737305", "0.57371557", "0.57289135", "0.5708841", "0.5702562", "0.57009405", "0.56920135", "0.56810004", "0.56724036", "0.566708", "0.56561595", "0.5651873", "0.56479335", "0.56454366", "0.5636365", "0.56327367", "0.5626634", "0.5609212", "0.5605474", "0.56048375", "0.5582864", "0.5577188", "0.5576245", "0.557237", "0.5569837", "0.5568091", "0.55677974", "0.55627364", "0.55618376", "0.5561292", "0.5553201", "0.5553088", "0.5549895", "0.55478215", "0.5545141", "0.55441874", "0.55401874", "0.5535991", "0.5533077", "0.55312204", "0.55294657", "0.5528749", "0.5525527", "0.5512576", "0.55118096", "0.55100363", "0.55088925", "0.5508066", "0.5504615", "0.5504181", "0.54996383", "0.5499605", "0.54937273", "0.54904705", "0.54896164", "0.5487776", "0.548645", "0.54754066", "0.54667723", "0.54646045", "0.5463213", "0.5461728", "0.5461602" ]
0.66986775
1
/ Insert your data first, then create your index.
@Override public void onCreate(SQLiteDatabase db) { Log.w(TAG, ">>> Start db creation"); db.execSQL(SQL_CREATE_PERMISSION); db.execSQL(SQL_CREATE_INVOKE); AssetManager assetManager = App.getContext().getAssets(); try { populateDbWithPermissions(db, assetManager); db.execSQL(SQL_CREATE_PERMISSION_INDEX); populateDbWithInvokes(db, assetManager); db.execSQL(SQL_CREATE_INVOKE_INDEX); //db.close(); illegal state? } catch (IOException e) { e.printStackTrace(); } Log.w(TAG, "<<< End db creation"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addIndex(){\n\t\tdbCol=mdb.getCollection(\"genericCollection\");\n\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\tdbCol.ensureIndex(new BasicDBObject(\"RandomGeo\", \"2d\"));\n\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\tSystem.out.println(\"Mongo Index Timer \"+Long.toString(stop));\n\t}", "public void createIndex() throws IOException {\n\t\tindexWriter.commit();\n\t\ttaxoWriter.commit();\n\n\t\t// categories\n\t\tfor (Article.Facets f : Article.Facets.values()) {\n\t\t\ttaxoWriter.addCategory(new CategoryPath(f.toString()));\n\t\t}\n\t\ttaxoWriter.commit();\n\n\t\tfinal Iterable<Article> articles = articleRepository.findAll();\n\t\tint c = 0;\n\t\tfor (Article article : articles) {\n\t\t\taddArticle(indexWriter, taxoWriter, article);\n\t\t\tc++;\n\t\t}\n\t\t// commit\n\t\ttaxoWriter.commit();\n\t\tindexWriter.commit();\n\n\t\ttaxoWriter.close();\n\t\tindexWriter.close();\n\n\t\ttaxoDirectory.close();\n\t\tindexDirectory.close();\n\t\tLOGGER.debug(\"{} articles indexed\", c);\n\t}", "public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}", "InstAssignIndex createInstAssignIndex();", "public void start() throws Exception {\n\n createIndex();\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public void createIndex(Configuration configuration){\n }", "@Override\n public void postInserts() \n {\n for(IndexObject i: myIndex.values())\n {\n i.tfidf(documentData);\n }\n }", "indexSet createindexSet();", "private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }", "public void createIndex(String dataDirPath, String txType) throws IOException {\n\t\ttry {\n\t\t\tString inLoc = \"/mnt/3TB/in.csv\";\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(inLoc), \"UTF-8\"));\n\n\t\t\tString line;\n\t\t\tboolean first = true;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] items = line.split(\",\");\n\t\t\t\tif (items.length > 3) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tDocument doc = makeTx(items[0], items[1], Long.parseLong(items[2]), txType);\n\t\t\t\twriter.addDocument(doc);\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void indexCreate()\n {\n try{\n Directory dir = FSDirectory.open(Paths.get(\"indice/\"));\n Analyzer analyzer = new StandardAnalyzer();\n IndexWriterConfig iwc = new IndexWriterConfig(analyzer);\n iwc.setOpenMode(OpenMode.CREATE);\n IndexWriter writer = new IndexWriter(dir,iwc);\n MongoConnection mongo = MongoConnection.getMongo();\n mongo.OpenMongoClient();\n DBCursor cursor = mongo.getTweets();\n Document doc = null;\n\n while (cursor.hasNext()) {\n DBObject cur = cursor.next();\n if (cur.get(\"retweet\").toString().equals(\"false\")) {\n doc = new Document();\n doc.add(new StringField(\"id\", cur.get(\"_id\").toString(), Field.Store.YES));\n doc.add(new TextField(\"text\", cur.get(\"text\").toString(), Field.Store.YES));\n doc.add(new StringField(\"analysis\", cur.get(\"analysis\").toString(), Field.Store.YES));\n //doc.add(new StringField(\"finalCountry\",cur.get(\"finalCountry\").toString(),Field.Store.YES));\n doc.add(new StringField(\"userScreenName\", cur.get(\"userScreenName\").toString(), Field.Store.YES));\n doc.add(new StringField(\"userFollowersCount\", cur.get(\"userFollowersCount\").toString(), Field.Store.YES));\n doc.add(new StringField(\"favoriteCount\", cur.get(\"favoriteCount\").toString(), Field.Store.YES));\n\n if (writer.getConfig().getOpenMode() == OpenMode.CREATE) {\n System.out.println(\"Indexando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.addDocument(doc);\n System.out.println(doc);\n } else {\n System.out.println(\"Actualizando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.updateDocument(new Term(\"text\" + cur.get(\"text\")), doc);\n System.out.println(doc);\n }\n }\n }\n cursor.close();\n writer.close();\n }\n catch(IOException ioe){\n System.out.println(\" Error en \"+ ioe.getClass() + \"\\n mensaje: \" + ioe.getMessage());\n }\n }", "private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }", "private void createProductIndex() {\n\t\tLinkedList<String> ids = new LinkedList<>(productIds.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<>(productIds.values());\n\t\tint k = 8;\n\t\tKFront kf = new KFront();\n\t\tkf.createKFront(k, ids);\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tkf.getTable().get(i).addAll(vals.get(i));\n\t\t}\n\n\t\tProductIndex pIndex = new ProductIndex(k);\n\t\tpIndex.insertData(kf.getTable(), kf.getConcatString());\n\t\tsaveToDir(PRODUCT_INDEX_FILE, pIndex);\n\t}", "public void createIndex(final DBObject keys) {\n createIndex(keys, new BasicDBObject());\n }", "public void createIndex(Index index) {\n Span span = this.tracer.buildSpan(\"Client.CreateIndex\").start();\n try {\n String path = String.format(\"/index/%s\", index.getName());\n String body = index.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating index\");\n } finally {\n span.finish();\n }\n }", "String createIndex() {\n\t\tboolean res = indexExists();\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode;\n\t\tif (!res) {\n\t\t\tresCode = doHttpOperation(esIndexUrl, HTTP_PUT, null);\n\t\t}\n\t\treturn lastResponse;\n\t}", "public void enableIndexAutoCreation() {\n client.setIndexAutoCreationEnabled(true);\n }", "private void createTokenIndex(){\n\t\tLinkedList<String> tokens = new LinkedList<>(tokenDict.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<>(tokenDict.values());\n\t\tint k = 8;\n\n\t\tKFront kf = new KFront(true);\n\t\tkf.createKFront(k, tokens);\n\n\t\tTokensIndex tIdx = new TokensIndex(k, this.dir);\n\t\ttIdx.insertData(kf.getTable(), vals, kf.getConcatString());\n\n\t\tsaveToDir(TOKEN_INDEX_FILE, tIdx);\n\t}", "private void indexItem(IndexDocument indexDoc) {\n if(bDebug) System.out.println(\"\\n*** document to index - \" + indexDoc);\n Indexer indexer=null;\n try {\n indexer=new Indexer(PetstoreConstants.PETSTORE_INDEX_DIRECTORY, false);\n PetstoreUtil.getLogger().log(Level.FINE, \"Adding document to index: \" + indexDoc.toString());\n indexer.addDocument(indexDoc);\n } catch (Exception e) {\n PetstoreUtil.getLogger().log(Level.WARNING, \"index.exception\", e);\n e.printStackTrace();\n } finally {\n try {\n // must close file or will not be able to reindex\n if(indexer != null) {\n indexer.close();\n }\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }", "public void createIndex(final String name) {\n createIndex(new BasicDBObject(name, 1));\n }", "@Override\n public void setupIndex() {\n List lst = DBClient.getList(\"SELECT a FROM AppMenu a WHERE a.moduleName='MyBranchMemberExt'\");\n if (lst!=null && !lst.isEmpty()) {\n return;\n }\n AppMenu.createAppMenuObj(\"MyBranchMemberExt\", \"Main\", \"Branch Member\", 110).save();\n AppMenu.createAppMenuObj(\"MyCenterMemberExt\", \"Main\", \"Center Member\", 120).save();\n AppMenu.createAppMenuObj(\"SearchAllMembersOnlyExt\", \"Main\", \"Search Member\", 130).save();\n AppMenu.createAppMenuObj(\"ReferenceForm\", \"Reference\", \"Reference\", 200).save();\n runUniqueIndex(8, \"firstName\", \"lastName\");\n }", "@Test\r\n\tpublic void indexOneLater() throws Exception {\n\t\tSolrInputDocument sd = new SolrInputDocument();\r\n\t\tsd.addField(\"id\", \"addone\");\r\n\t\tsd.addField(\"channelid\", \"9999\");\r\n\t\tsd.addField(\"topictree\", \"tptree\");\r\n\t\tsd.addField(\"topicid\", \"tpid\");\r\n\t\tsd.addField(\"dkeys\", \"测试\");\r\n\t\tsd.addField(\"title\", \"junit 标题\");\r\n\t\tsd.addField(\"ptime\", new Date());\r\n\t\tsd.addField(\"url\", \"/junit/test/com\");\r\n//\t\t\tSystem.out.println(doc);\r\n//\t\tbuffer.add(sd);\r\n\t\tdocIndexer.addDocumentAndCommitLater(sd, 1);\r\n\t}", "public void createIndex() {\n String indexName = INDEX_BASE + \"-\" +\n LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMddHHmmss\"));\n\n Settings settings = Settings.builder()\n .put(\"number_of_shards\", 1)\n .put(\"number_of_replicas\", 0)\n .build();\n CreateIndexRequest request = new CreateIndexRequest(indexName, settings);\n\n String mapping = \"{\\n\" +\n \" \\\"article\\\": {\\n\" +\n \" \\\"properties\\\": {\\n\" +\n \" \\\"title\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"author\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"issue\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"link\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"description\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"postDate\\\": {\\n\" +\n \" \\\"type\\\": \\\"date\\\",\\n\" +\n \" \\\"format\\\": \\\"yyyy-MM-dd\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\";\n\n request.mapping(\"article\", mapping, XContentType.JSON);\n request.alias(new Alias(INDEX_BASE));\n\n try {\n CreateIndexResponse createIndexResponse = this.client.admin().indices().create(request).get();\n if (!createIndexResponse.isAcknowledged()) {\n throw new ElasticExecutionException(\"Create java_magazine index was not acknowledged\");\n }\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error while creating an index\", e);\n throw new ElasticExecutionException(\"Error when trying to create an index\");\n }\n }", "public void init() {\n File file=new File(\"D:\\\\lucene\\\\index\");\n if(file.isDirectory())\n { //否则如果它是一个目录\n File files[] = file.listFiles(); //声明目录下所有的文件 files[];\n for(int i=0;i<files.length;i++)\n { //遍历目录下所有的文件\n files[i].delete(); //把每个文件 用这个方法进行迭代\n }\n }\n String indexPath = \"D:\\\\lucene\\\\index\";\n //String docsPath = \"D:\\\\lucene\\\\data\";\n boolean create = true;\n try\n {\n Session session=factory.openSession();\n String hql = \"from Book\";\n org.hibernate.Query query = session.createQuery(hql);\n List<Book> list=query.list();\n Directory indexDir = FSDirectory.open(Paths.get(\"D:\\\\lucene\\\\index\"));\n Analyzer luceneAnalyzer = new StandardAnalyzer(); //新建一个分词器实例 \n IndexWriterConfig config = new IndexWriterConfig(luceneAnalyzer); \n IndexWriter indexWriter = new IndexWriter(indexDir,config);\n for(int i=0;i<list.size();i++)\n {\n Document document = new Document();\n Field field1 = new StringField(\"id\",list.get(i).getBookid().toString(),Field.Store.YES); \n Field field2 = new StringField(\"bookname\",list.get(i).getBookname(),Field.Store.YES); \n Field field3 = new StringField(\"author\",list.get(i).getAuthor(),Field.Store.YES); \n Field field4 = new StringField(\"category\",list.get(i).getCategory(),Field.Store.YES); \n Field field5 = new StringField(\"price\", Double.toString(list.get(i).getPrice()),Field.Store.YES); \n document.add(field1); \n document.add(field2); \n document.add(field3); \n document.add(field4);\n document.add(field5);\n indexWriter.addDocument(document);\n }\n indexWriter.close();\n }\n catch(IOException e)\n {\n System.out.println(\"error\");\n return;\n }\n }", "public void ensureIndex(Index index) {\n try {\n createIndex(index);\n } catch (HttpConflict ex) {\n // pass\n }\n }", "boolean createIndex(String indexName);", "public void beforeIndexCreated(Index index) {\n\n }", "@SuppressWarnings(\"unused\")\n public void buildIndex() throws IOException {\n indexWriter = getIndexWriter(indexDir);\n ArrayList <JSONObject> jsonArrayList = parseJSONFiles(JSONdir);\n indexTweets(jsonArrayList, indexWriter);\n indexWriter.close();\n }", "private void createInvertedIndex() {\n\t\tArrayList<Index> invertedIndex=new ArrayList<>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\part-r-00001\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\"\\t\");\n\t\t\t\tparts[1]=parts[1].replace(\"{\", \"\").replace(\"}\", \"\");\n\t\t\t\tString counts[]=parts[1].split(\",\");\n\t\t\t\tHashMap<String,Integer> fileList=new HashMap<String,Integer>();\n\t\t\t\tfor (String count : counts) {\n\t\t\t\t\tString file[]=count.split(\"=\");\n\t\t\t\t\tfileList.put(file[0].trim().replace(\".txt\", \"\"), Integer.parseInt(file[1].trim()));\n\t\t\t\t}\n\t\t\t\tIndex index=new Index();\n\t\t\t\tindex.setWord(parts[0]);\n\t\t\t\tindex.setFileList(fileList);\n\t\t\t\tinvertedIndex.add(index);\n\t\t\t}\n\t\t\tin.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertIndex(invertedIndex);\n\t}", "public void index(List<Entity> entities) {\n\t\t\n\t}", "private void createIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // check required params / attributes\n \n // REQUIRED: The name of the collection for which to create the index\n String collection = helper.getMandatoryString(msg.body(), MSG_PROPERTY_COLLECTION, msg);\n if (collection == null) return;\n\n // REQUIRED: A JSON representation of the index (see ArangoDB docs for details)\n JsonObject document = helper.getMandatoryObject(msg.body(), MSG_PROPERTY_DOCUMENT, msg);\n if (document == null) return;\n\n if (!ensureAttribute(document, DOC_ATTRIBUTE_TYPE, msg)) return;\n if (!document.getString(DOC_ATTRIBUTE_TYPE).equals(TYPE_CAP)) {\n if (!ensureAttribute(document, DOC_ATTRIBUTE_FIELDS, msg)) return;\n }\n\n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName);\n apiPath.append(API_PATH);\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n\n httpPost(persistor, apiPath.toString(), headers, document, timeout, msg);\n }", "public DatasetIndex(Dataset data){\n\t\tthis();\n\t\tfor(Iterator<Example> i=data.iterator();i.hasNext();){\n\t\t\taddExample(i.next());\n\t\t}\n\t}", "public createIndex_result(createIndex_result other) {\n }", "LuceneMemoryIndex createLuceneMemoryIndex();", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void createIndex(final String index, int numShards, int numReplicas) throws IOException {\n LOGGER.warn(\"CREATE ES INDEX {} with {} shards and {} replicas\", index, numShards, numReplicas);\n final Settings indexSettings = Settings.builder().put(\"number_of_shards\", numShards)\n .put(\"number_of_replicas\", numReplicas).build();\n CreateIndexRequest indexRequest = new CreateIndexRequest(index, indexSettings);\n getClient().admin().indices().create(indexRequest).actionGet();\n\n final String mapping = IOUtils.toString(\n this.getClass().getResourceAsStream(\"/elasticsearch/mapping/map_person_5x_snake.json\"));\n getClient().admin().indices().preparePutMapping(index)\n .setType(getConfig().getElasticsearchDocType()).setSource(mapping, XContentType.JSON).get();\n }", "public void testAddingNewIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null,\n true, null));\n PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs);\n setPrimaryKey(tableSchema1);\n PSJdbcForeignKey fk = createForeignKey(tableSchema1);\n\n List<String> indexCols = new ArrayList<String>();\n indexCols.add(\"col3\");\n PSJdbcIndex index1 = new PSJdbcIndex(\"IX_col1\", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE);\n tableSchema1.setIndex(index1);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema1.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next();\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema1.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema1.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the number of foreign key columns and eqal to that of\n // index columns.\n assertTrue(fk.getForeignKeyColumnNames().size() == newIndex.getIndexColumnNames().size());\n\n // Makes sure if the new index that got created has the same set of\n // columns as foreign key.\n assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames()));\n\n // Makes sure if the index name of newly created index has a unique name.\n assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName()));\n\n }", "void testSetup() {\n\t\t// Delete any existing index\n\t\tdeleteIndex();\n\n\t\t// Create the index\n\t\tcreateIndex();\n\n\t\t// Apply mappings for type and subtypes\n\t\tBufferedReader br;\n\t\tString line;\n\t\tStringBuffer sb;\n\t\ttry {\n\t\t\t// Mappings for index + type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), false, HTTP_POST);\n\n\t\t\t// Mappings for index + sub-type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_subtype_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), true, HTTP_POST);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Index a doc\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"./data/sample_docs.json\"));\n\t\t\tif ((line = br.readLine()) != null) {\n\t\t\t\tinsertDocument(line);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\trefreshIndex();\n\t}", "@Ignore \n @Test\n public void testPutMappingToIndex() {\n System.out.println(\"putMappingToIndex\");\n \n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n String indexName = \"datastore_100_1_data_event_yearmonth_000000_1\";\n String indexType = \"AAA666_type\";\n \n try\n { \n ESUtil.createIndexWithoutType(client, indexName);\n \n DataobjectType dataobjectType = Util.getDataobjectTypeByIndexTypeName(platformEm, indexType);\n\n XContentBuilder typeMapping = ESUtil.createTypeMapping(platformEm, dataobjectType, true);\n \n ESUtil.putMappingToIndex(client, indexName, indexType, typeMapping);\n }\n catch(Exception e)\n {\n System.out.print(\" failed! e=\"+e);\n }\n }", "@Test\n public void testIndexMaintenanceOnPutAll() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n region.put(\"1\", new Portfolio(1));\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"posvals.secId\",\n SEPARATOR + \"portfolio1 pf, pf.positions.values posvals \");\n Map data = new HashMap();\n for (int i = 1; i < 11; ++i) {\n data.put(\"\" + i, new Portfolio(i + 2));\n }\n\n region.putAll(data);\n }", "private void createIndex(Geography<T> geog, Class<T> clazz)\n\t{\n\t\tGeometry geom;\n\t\tEnvelope bounds;\n\t\tfor (T t : geog.getAllObjects( ))\n\t\t{\n\t\t\tgeom = (Geometry) geog.getGeometry(t);\n\t\t\tbounds = geom.getEnvelopeInternal( );\n\t\t\tthis.si.insert(bounds, geom);\n\t\t\tthis.featureLookup.put(geom, t);\n\t\t}\n\t}", "static void generateIndex(Table table, Key key, PrintWriter outData)\r\n {\r\n String comma = \"( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(\"DROP INDEX \"+keyname+\";\");\r\n outData.println(\"\");\r\n outData.println(\"CREATE INDEX \"+keyname+\" ON \"+table.database.userid+ \"\" +table.name);\r\n for (int i=0; i<key.fields.size(); i++, comma = \", \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.print(\")\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n outData.println();\r\n String option = (String) key.options.elementAt(i);\r\n outData.print(option);\r\n }\r\n outData.println(\";\");\r\n outData.println();\r\n }", "private void updateIndex() throws IOException {\n // maintain the document store (corpus) - if there is one\n if (currentMemoryIndex.containsPart(\"corpus\")) {\n // get all corpora + shove into document store\n ArrayList<DocumentReader> readers = new ArrayList<>();\n readers.add((DocumentReader) currentMemoryIndex.getIndexPart(\"corpus\"));\n for (String path : geometricParts.getAllShards().getBinPaths()) {\n String corpus = path + File.separator + \"corpus\";\n readers.add(new CorpusReader(corpus));\n }\n }\n // finally write new checkpointing data (checkpoints the disk indexes)\n Parameters checkpoint = createCheckpoint();\n this.checkpointer.saveCheckpoint(checkpoint);\n }", "public abstract void updateIndex();", "public void insert(Object data, int index){\r\n enqueue(data);\r\n }", "void addIndexForRepository(long repositoryId);", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "void prepare() throws IndexTransactionException;", "public void createIndex(final DBObject keys, final DBObject options) {\n try {\n executor.execute(createIndexOperation(keys, options), getReadConcern());\n } catch (MongoWriteConcernException e) {\n throw createWriteConcernException(e);\n }\n }", "@Override\n public void beforeRerunningIndexCreationQuery() {\n Thread th = new Thread(() -> {\n // Assert that the size of region is now 0\n assertTrue(region.size() == 0);\n region.put(\"\" + 8, new Portfolio(8));\n });\n th.start();\n ThreadUtils.join(th, 30 * 1000);\n assertTrue(region.size() == 1);\n }", "private void ensureHashingIndexExists() {\n DB metadataDB = client.getDB(\"cacheManagerMetadata\");\n if (!metadataDB.collectionExists(\"hashingIndex\")) {\n DBCollection hashingIndex = metadataDB.getCollection(\"hashingIndex\");\n hashingIndex.createIndex(new BasicDBObject(\"hashValue\", 1),\n new BasicDBObject(\"unique\", 1));\n }\n }", "private void addIndex(Partition partition, String... attrs) throws Exception {\n for (String attribute : attrs) {\n factory.addIndex(partition, attribute, 100);\n }\n }", "public JestResult createNewDocument(GTData data) throws IOException {\n Gson gson = new Gson();\n String json = gson.toJson(data);\n Index request = new Index.Builder(json)\n .index(INDEX_NAME)\n .type(data.getClass().toString())\n .id(data.getObjectID())\n .build();\n\n JestResult result = client.execute(request);\n return result;\n }", "@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n Index entity = TestUtils.getTestIndex();\n IndexResponse result = instance.create(entity);\n assertNotNull(result);\n assertEquals(entity.getDatabaseName(), result.getIndex().getDatabaseName());\n assertEquals(entity.getName(), result.getIndex().getName());\n assertEquals(entity.getTableName(), result.getIndex().getTableName());\n assertEquals(entity.getFields(), result.getIndex().getFields());\n }", "public void insert (Object object) throws IOException {\n assert indexWriter != null : \"IndexWriter is uninitialized. Initialize it before inserting.\";\n insert(AppUtils.getMapFromObject(object));\n }", "@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITERID ON CONFFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITEEID ON PENDFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITERID ON PENDFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_RID ON MANIPULATION (RID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_CREATORID ON MANIPULATION (CREATORID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCES_WALLUSERID ON RESOURCES (WALLUSERID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCE_CREATORID ON RESOURCES (CREATORID)\");\n \n System.out.println(\"Indexes Built\");\n }\n catch (Exception ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in building indexes!\");\n }\n }", "void createIndex(){\n int index=0;\n for(int i=0;i<ancogs.size();i++)\n if(!cogToIndex.containsKey(ancogs.get(i).getValue2()))\n cogToIndex.put(ancogs.get(i).getValue2(), index++);\n}", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "public boolean createIndex() {\n RestClient client = esrResource.getClient();\n\n try {\n Response r = client.performRequest(\"HEAD\", \"/\" + index);\n\n if (r.getStatusLine().getStatusCode() != 200) {\n client.performRequest(\"PUT\", \"/\" + index);\n\n return true;\n }\n } catch (IOException ioe) {\n getMonitor().error(\"Unable to create index\", ioe);\n }\n\n return false;\n }", "private void createReviewIndex() {\n\t\t// Revise the review dictionary to the correct structure & change productIDs to product index\n\t\tLinkedList<List<Integer>> dictValues = new LinkedList<>();\n\t\tfor (int review : reviewIds.keySet()) {\n\t\t\tArrayList<String> vals = reviewIds.get(review);\n\t\t\tArrayList<Integer> new_vals = new ArrayList<>(List.of(0, 0, 0, 0, 0));\n\t\t\tnew_vals.set(ReviewIndex.PRODUCTID_INDEX, productIds.headMap(vals.get(0)).size());\n\t\t\tString[] helpf = vals.get(2).split(\"/\");\n\t\t\tnew_vals.set(ReviewIndex.HELPFNUM_INDEX, Integer.parseInt(helpf[0]));\n\t\t\tnew_vals.set(ReviewIndex.HELPFDNOM_INDEX, Integer.parseInt(helpf[1]));\n\t\t\tnew_vals.set(ReviewIndex.REVIEWLENGTH_INDEX, Integer.parseInt(vals.get(3)));\n\t\t\tnew_vals.set(ReviewIndex.SCORE_INDEX, (int) Float.parseFloat(vals.get(1)));\n\t\t\tdictValues.add(new_vals);\n\t\t}\n\t\tReviewIndex rIndex = new ReviewIndex();\n\t\trIndex.insertData(dictValues);\n\n\t\tsaveToDir(REVIEW_INDEX_FILE, rIndex);\n\t}", "@Test\n public void testIndexMaintenanceOnCacheLoadedData() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n AttributesMutator am = region.getAttributesMutator();\n am.setCacheLoader(new CacheLoader() {\n\n @Override\n public Object load(LoaderHelper helper) throws CacheLoaderException {\n String key = (String) helper.getKey();\n Portfolio p = new Portfolio(Integer.parseInt(key));\n return p;\n }\n\n @Override\n public void close() {\n // nothing\n }\n });\n\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n List keys = new ArrayList();\n keys.add(\"1\");\n keys.add(\"2\");\n keys.add(\"3\");\n keys.add(\"4\");\n\n region.getAll(keys);\n }", "public static void main(String[] args) throws CorruptIndexException, LockObtainFailedException, IOException, ParseException{\n\t\tboolean lucene_im_mem = false;\n\t\t//1. Build the Index with varying \"database size\"\n\t\tString dirName =\"/data/home/duy113/SupSearchExp/AIDSNew/\";\n//\t\tString dirName = \"/Users/dayuyuan/Documents/workspace/Experiment/\";\n\t\tString dbFileName = dirName + \"DBFile\";\n\t\tString trainQueryName= dirName + \"TrainQuery\";\n//\t\tString testQuery15 = dirName + \"TestQuery15\";\n\t\tString testQuery25 = dirName + \"TestQuery25\";\n//\t\tString testQuery35 = dirName + \"TestQuery35\";\n\t\tGraphDatabase query = new GraphDatabase_OnDisk(testQuery25, MyFactory.getSmilesParser());\n\t\tdouble[] minSupts = new double[4];\n\t\tminSupts[0] = 0.05; minSupts[1] = 0.03; minSupts[2] =0.02; minSupts[3] = 0.01;\n \t\tint lwIndexCount[] = new int[1];\n\t\tlwIndexCount[0] = 479;\t\n//\t\tSystem.out.println(\"Build CIndexFlat Left-over: \");\n//\t\tfor(int j = 3; j< 4; j++){\n//\t\t\tdouble minSupt = minSupts[j];\n//\t\t\tfor(int i = 4; i<=10; i = i+2){\n//\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n//\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n//\t\t\t\tif(i == 2){\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n//\t\t\t\t\tCIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n//\t\t\t\t}\n//\t\t\t\telse{\n//\t\t\t\t\tString featureBaseName = dirName + \"G_2\" + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat with Features \" + featureBaseName);\n//\t\t\t\t\tCIndexExp.buildIndex(featureBaseName, trainingDB, baseName, minSupt);\n//\t\t\t\t}\n//\t\t\t\tSystem.gc();\n//\t\t\t}\n//\t\t}\n\t\tSystem.out.println(\"Run Query Processing: \");\n\t\tfor(int j = 0; j< 4; j++){\n\t\t\tdouble minSupt = minSupts[j];\n\t\t\tfor(int i = 2; i<=10; i = i+2){\n\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n\t\t\t\tif(j!=0 || i!=2){\n\t\t\t\t\tSystem.out.println(baseName + \"LWindex\");\n\t\t\t\t\t//LWIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, trainQuery.getParser(),baseName, minSupt, lwIndexCount);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndex\");\n\t\t\t\t\t//PrefixIndexExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndexHi\");\n\t\t\t\t\t//PrefixIndexExp.buildHiIndex(trainingDB, trainingDB, 2, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"GPTree\");\n\t\t\t\t\t//GPTreeExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n\t\t\t\t\t//CIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t}\n\t\t\t\tif(j==0&&i==2){\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\t\tCIndexExp.buildIndexTopDown(trainingDB, trainQuery, trainingDB,MyFactory.getUnCanDFS(), baseName, minSupt, 2*trainQuery.getTotalNum()/lwIndexCount[0] ); // 8000 test queries\n\t\t\t\t\t//System.gc();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\tSystem.gc();\n\t\t\t}\n\t\t}\n\t\tAIDSLargeExp.main(args);\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public createIndex_args(createIndex_args other) {\n }", "public TranscriptionIndexer() throws SQLException, CorruptIndexException, IOException\r\n {\r\n\r\n\r\n IndexWriter writer = null;\r\n Analyzer analyser;\r\n Directory directory;\r\n /**@TODO parameterized location*/\r\n String dest = \"/usr/indexTranscriptions\";\r\n\r\n directory = FSDirectory.getDirectory(dest, true);\r\n analyser = new StandardAnalyzer();\r\n writer = new IndexWriter(directory, analyser, true);\r\n PreparedStatement stmt=null;\r\n Connection j = null;\r\n try {\r\n j=DatabaseWrapper.getConnection();\r\n String query=\"select * from transcription where text!='' and creator>0 order by folio, line\";\r\n stmt=j.prepareStatement(query);\r\n ResultSet rs=stmt.executeQuery();\r\n while(rs.next())\r\n {\r\n int folio=rs.getInt(\"folio\");\r\n int line=rs.getInt(\"line\");\r\n int UID=rs.getInt(\"creator\");\r\n int id=rs.getInt(\"id\");\r\n Transcription t=new Transcription(id);\r\n Document doc = new Document();\r\n Field field;\r\n field = new Field(\"text\", t.getText(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"comment\", t.getComment(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"creator\", \"\" + t.UID, Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"security\", \"\" + \"private\", Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"line\", \"\" + t.getLine(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"page\", \"\" + t.getFolio(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"id\", \"\" + t.getLineID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"manuscript\", \"\" + new Manuscript(t.getFolio()).getID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"projectID\", \"\" + t.getProjectID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n writer.addDocument(doc);\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n if(writer!=null)\r\n {\r\n writer.commit();\r\n \twriter.close();\r\n return;\r\n }\r\n ex.printStackTrace();\r\n }\r\n finally{\r\n DatabaseWrapper.closeDBConnection(j);\r\n DatabaseWrapper.closePreparedStatement(stmt);\r\n }\r\n\r\n writer.commit();\r\n \twriter.close();\r\n}", "public void createIndexOnProcessName() throws ServiceFailureException;", "public void createIndex(String dataDirPath){\n\t\tFile[] files = new File(dataDirPath).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif(!file.isDirectory()\n\t\t\t\t\t&& !file.isHidden()\n\t\t\t\t\t&& file.exists()\n\t\t\t\t\t){\n\t\t\t\t//add to Map\n\t\t\t\t// m.put(file.getAbsolutePath(), new RankModel(file,0,getOutLinks(file.getAbsolutePath())));\n\t\t\t\tallFiles.add(file.getAbsolutePath());\n\t\t\t}else{\n\t\t\t\tcreateIndex(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\t// return writer.numDocs();\n\t}", "public static void add(Transcription t) throws IOException, SQLException\r\n {\r\n IndexWriter writer = null;\r\n Analyzer analyser;\r\n Directory directory;\r\n /**@TODO parameterize this location*/\r\n String dest = \"/usr/indexTranscriptions\";\r\n\r\n directory = FSDirectory.getDirectory(dest, true);\r\n analyser = new StandardAnalyzer();\r\n writer = new IndexWriter(directory, analyser, true);\r\n Document doc=new Document();\r\n Field field;\r\n field = new Field(\"text\", t.getText(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"comment\", t.getComment(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"creator\", \"\" + t.UID, Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"security\", \"\" + \"private\", Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"line\", \"\" + t.getLine(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"page\", \"\" + t.getFolio(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"id\", \"\" + t.getLineID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"manuscript\", \"\" + new Manuscript(t.getFolio()).getID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"projectID\", \"\" + t.getProjectID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n writer.addDocument(doc);\r\n writer.commit();\r\n \twriter.close();\r\n\r\n }", "@PostConstruct\n public void ensureIndexes() {\n storageStrategy.ensureIndexes(mongoTemplate.domainEventCollection(), mongoTemplate.snapshotEventCollection());\n }", "@Test\n public void testCreateIndexMapping() throws Exception {\n String json = EsJsonUtils.generateItemMapping();\n System.out.println(json);\n elasticSearchDao.createIndexMapping(TENANT_ID+Constants.INDEX_SPLIT+ Constants.ITEM,json);\n }", "public void indexCase(Case c) {\n db.beginTransaction();\n try {\n for (CaseIndex ci : c.getIndices()) {\n ContentValues cv = new ContentValues();\n cv.put(COL_CASE_RECORD_ID, c.getID());\n cv.put(COL_INDEX_NAME, ci.getName());\n cv.put(COL_INDEX_TYPE, ci.getTargetType());\n cv.put(COL_INDEX_TARGET, ci.getTarget());\n cv.put(COL_INDEX_RELATIONSHIP, ci.getRelationship());\n db.insert(TABLE_NAME, null, cv);\n }\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n }\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "public H_index() {\n\t\tsuper();\n\t}", "void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;", "public void createIndex() throws IOException {\n\t\tLOGGER.info(\"creating photo index...\");\n\t\tCreateIndexRequest request = new CreateIndexRequest(\"files\");\n\t\tInputStream in = getClass().getClassLoader().getResourceAsStream(\"photo.json\");\n\t\tString mapping = new String(in.readAllBytes());\n\t\tin.close();\n\t\trequest.mapping(\"photo\", mapping, XContentType.JSON);\n\t\tCreateIndexResponse response = client.indices().create(request);\n\t\tLOGGER.info(\"photo index created: \" + response.toString());\n\t}", "private void ElasticIndexValidation(TransportClient client) {\n if (!client.admin().indices().prepareExists(ES_TAG_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_TAG_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_TAG_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/tag_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_TAG_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_TAG_INDEX, e);\n }\n }\n // Create/migrate the logbook index\n if (!client.admin().indices().prepareExists(ES_LOGBOOK_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_LOGBOOK_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_LOGBOOK_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/logbook_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_LOGBOOK_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_LOGBOOK_INDEX, e);\n }\n }\n\n // Create/migrate the property index\n if (!client.admin().indices().prepareExists(ES_PROPERTY_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_PROPERTY_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_PROPERTY_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/property_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_PROPERTY_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_PROPERTY_INDEX, e);\n }\n }\n\n // Create/migrate the sequence index\n if (!client.admin().indices().prepareExists(ES_SEQ_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_SEQ_INDEX).setSettings(Settings.builder() \n .put(\"index.number_of_shards\", 1)\n .put(\"auto_expand_replicas\", \"0-all\")).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_SEQ_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/seq_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_SEQ_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }\n\n // create/migrate log template\n PutIndexTemplateRequestBuilder templateRequest = client.admin().indices().preparePutTemplate(ES_LOG_INDEX);\n templateRequest.setPatterns(Arrays.asList(ES_LOG_INDEX));\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/log_template_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n templateRequest.addMapping(ES_LOG_TYPE, XContentFactory.jsonBuilder().map(jsonMap)).get();\n// templateRequest.setSource(jsonMap);\n// templateRequest.addMapping(ES_LOG_TYPE, jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }", "public void forceUpdateSearchIndexes() throws InterruptedException {\n\t getFullTextEntityManager().createIndexer().startAndWait();\n\t}", "public void onIndexUpdate();", "@Override\n public void indexPersistable() {\n searchIndexService.indexAllResourcesInCollectionSubTreeAsync(getPersistable());\n }", "public void run() {\n String query = \"INSERT INTO CustomData (Server, Plugin, ColumnID, DataPoint, Updated) VALUES\";\n int currentSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // Iterate through each column\n for (Map.Entry<Column, Integer> entry : customData.entrySet()) {\n Column column = entry.getKey();\n int value = entry.getValue();\n\n // append the query\n query += \" (\" + server.getId() + \", \" + plugin.getId() + \", \" + column.getId() + \", \" + value + \", \" + currentSeconds + \"),\";\n }\n\n // Remove the last comma\n query = query.substring(0, query.length() - 1);\n\n // add the duplicate key entry\n query += \" ON DUPLICATE KEY UPDATE DataPoint = VALUES(DataPoint) , Updated = VALUES(Updated)\";\n\n // queue the query\n new RawQuery(mcstats, query).save();\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "int insert(Terms record);", "public void init(GraphDatabaseService store) {\n\n\t\tlog.info(\"creating Neo indices\");\n\n\t\ttry (Transaction tx = store.beginTx()) {\n\n\t\t\tstore.schema().indexFor(IDENTITY).on(name_prop).create();\n\t\t\tstore.schema().indexFor(CODELIST).on(id_prop).create();\n\t\t\tstore.schema().indexFor(ATTRDEF).on(id_prop).create();\n\t\t\tstore.schema().indexFor(LINKDEF).on(id_prop).create();\n\t\t\tstore.schema().indexFor(USER).on(name_prop).create();\n\t\t\tstore.schema().indexFor(LIFECYCLE).on(id_prop).create();\n\t\t\tstore.schema().indexFor(LOGBOOK).on(id_prop).create();\n\n\t\t\ttx.success();\n\t\t}\n\n\t}", "private void createFileTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index FILE_ID_INDEX_FILE on FILE(FILE_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISION_ID_INDEX_FILE on FILE(START_REVISION_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index END_REVISION_ID_INDEX_FILE on FILE(END_REVISION_ID)\");\n \t}", "private static void createIndex() {\n XML_Shell workFile = new XML_Shell();\n String messageFromServer = ClientService.getLastMessageFromServer();\n\n try {\n XML_Manager.stringToDom(messageFromServer, workFile);\n } catch (SAXException | ParserConfigurationException | IOException | TransformerException e) {\n e.printStackTrace();\n }\n\n }", "public void addDocument(Document d) throws IndexerException {\n\t\t\n\t//if (!isvaliddir) {System.out.println(\"INVALID PATH/execution !\");return;}\n\t\n\t\n\t//Tokenizing\n\t//one thgread\n\tDocID did=new DocID(d.getField(FieldNames.FILEID),\n\t\t\td.getField(FieldNames.CATEGORY),\n\t\t\td.getField(FieldNames.AUTHOR));\n\t\n\tTokenStream stream=tokenize(FieldNames.CATEGORY,d);\n\tAnalyzer analyz=analyze(FieldNames.CATEGORY, stream);\n\tCategoryIndex.getInst().doIndexing(did.getdID(), stream);\n\t/*\t}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);\n\t}\n\ttry{*/TokenStream stream1=tokenize(FieldNames.AUTHOR,d);\n\tAnalyzer analyz1=analyze(FieldNames.AUTHOR, stream1);\n\tAuthorIndex.getInst().doIndexing(did.getdID(), stream1);\n\t/*}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\ttry{*/TokenStream stream2=tokenize(FieldNames.PLACE,d);\n\tAnalyzer analyz2=analyze(FieldNames.PLACE, stream2);\n\tPlaceIndex.getInst().doIndexing(did.getdID(), stream2);\n/*}catch(Exception e)\n\t{\n\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t);}\n\ttry{*/tkizer = new Tokenizer();\n\tTokenStream stream3=tokenize(FieldNames.CONTENT,d);\n\tfactory = AnalyzerFactory.getInstance();\n\tAnalyzer analyz3=analyze(FieldNames.CONTENT, stream3);\n\tnew Indxr(IndexType.TERM).doIndexing(did, stream3);\n\t/*}\tcatch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\t*/\n\tdocs.add(did==null?\" \":did.toString());\n\t \n\t\na_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.AUTHOR);\nc_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.CATEGORY);\np_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.PLACE);\nt_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.TERM);\n\t\t}", "public void start() throws Exception {\n if (!getClient().admin().indices().exists(Requests.indicesExistsRequest(INDEX_NAME)).actionGet().isExists()) {\n getClient().admin().indices().prepareCreate(INDEX_NAME).execute().actionGet().isAcknowledged();\n }\n\n //Create mapping for the key. Leave it not_analyzed so it doesn't tokenize the \"-\" delimiters\n PutMappingResponse response = getClient().admin().indices()\n .preparePutMapping(INDEX_NAME)\n .setType(TYPE_NAME)\n .setSource(buildMapping())\n .execute().actionGet();\n if (!response.isAcknowledged()) {\n throw new Exception(\"Could not define mapping.\");\n }\n }", "void commit() throws IndexTransactionException;", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }", "public boolean createIndex_random(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tint part;\n\t\t\n\t\tint type_s, type_o, type1_s, type1_o;\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\t\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tQuad item;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse\n\t\t\t\tres = key;\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\titem = list.get(i);\n\t\t\t\ttype_s = item.type_s;\n\t\t\t\ttype_o = item.type_o;\n\t\t\t\t\n\t\t\t\to_bytes = item.o_bytes;\n\t\t\t\ts_bytes = item.s_bytes;\n\t\t\t\tpart = i;\n\t\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\t\t\t//\trs = search(sql.toString());\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t// unpdate records\t\t\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t\t// directly insert the record\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn false;\n\t\t\t\t}finally{\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public String createDSIndex(String dsID, String dschemaID, String attriName);", "public Object preparePut(Object object)\r\n {\n FullUniqueIndex perThreadAddedIndex = new FullUniqueIndex(this.hashStrategy);\r\n perThreadAddedIndex.setUnderlyingObjectGetter(transactionalUnderlyingObjectGetter);\r\n perThreadAddedIndex.putUsingUnderlying(object, ((MithraTransactionalObject) object).zGetNonTxData());\r\n synchronized (this.preparedIndices)\r\n {\r\n this.preparedIndices.add(perThreadAddedIndex);\r\n }\r\n return perThreadAddedIndex;\r\n }", "@Override\n public void prepare() throws QueryException {\n md = new MemData(data);\n\n final Iterator<Item> d = docs.iterator();\n final Iterator<byte[]> n = names.iterator();\n final Iterator<byte[]> p = paths.iterator();\n\n while(d.hasNext()) {\n md.insert(md.meta.size, -1, docData(d.next(), n.next(), p.next()));\n }\n }", "int insert(CfgSearchRecommend record);", "public void addIndex(String collectionName, DBObject index){\n DBCollection collection =this.getDBCollection(collectionName);\n collection.createIndex(index);\n }", "public synchronized void createIndexIfNeeded(final String index) throws NeutronCheckedException {\n try {\n if (!doesIndexExist(index)) {\n LOGGER.warn(\"ES INDEX {} DOES NOT EXIST!!\", index);\n createIndex(index, NUMBER_OF_SHARDS, NUMBER_OF_REPLICAS);\n\n // Give Elasticsearch a moment to catch its breath.\n Thread.sleep(2000); // NOSONAR\n }\n } catch (InterruptedException | IOException e) {\n throw JobLogs.checked(LOGGER, e, \"CREATE INDEX FAILED! {}\", e.getMessage());\n }\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public synchronized void inserirDocumento(List<Document> dosc) throws Exception {\r\n\t\tIndexWriter indexWriter = getWriterPadrao(false);\r\n\t\tfor (Document document : dosc) {\r\n\t\t\tindexWriter.addDocument(document);\r\n\t\t\t\r\n\t\t}\r\n\t\tindexWriter.close();\r\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }" ]
[ "0.6680948", "0.6600687", "0.65943205", "0.6399496", "0.6356087", "0.6331194", "0.630589", "0.62900275", "0.62767565", "0.62604547", "0.6237", "0.6198802", "0.619454", "0.61490357", "0.6139183", "0.608043", "0.60373765", "0.60341674", "0.60255176", "0.60193545", "0.60042185", "0.59895784", "0.59248626", "0.58957565", "0.5887836", "0.5886625", "0.5878067", "0.5873934", "0.58686805", "0.5863985", "0.5841463", "0.5839869", "0.5837113", "0.5836328", "0.58336043", "0.58267766", "0.5825336", "0.5823686", "0.5823591", "0.5820455", "0.5816092", "0.58118314", "0.5805042", "0.5785455", "0.5777889", "0.5768604", "0.5766536", "0.5766434", "0.57663363", "0.57633305", "0.5763083", "0.5761028", "0.570792", "0.5699068", "0.569733", "0.56904745", "0.5688352", "0.56776726", "0.5673162", "0.56657773", "0.5665362", "0.5653556", "0.5633427", "0.56253207", "0.5614894", "0.5613555", "0.5608833", "0.5607285", "0.560718", "0.5595666", "0.55954283", "0.559484", "0.5594159", "0.5587449", "0.55771774", "0.55688936", "0.55682075", "0.55660015", "0.5559465", "0.5546066", "0.5545095", "0.5541523", "0.55339986", "0.5532489", "0.5531057", "0.5529444", "0.5527994", "0.552518", "0.5523395", "0.5514426", "0.55114144", "0.55095583", "0.5496099", "0.54929906", "0.5481269", "0.54809237", "0.54774135", "0.5476062", "0.5469413", "0.5468041", "0.54669565" ]
0.0
-1
Created by Administrator on 2017/7/13.
@Transactional public interface NoticeDao { //插入通知消息 public List<NoticeModel> findNoticeByUserId(String userId); public List<NoticeModel> findNoticeByUserIdNo(String userId); public List<NoticeModel> findNoticeByUserId(String userId, Integer pageNo, Integer pageSize); public void insert(NoticeModel noticeModel); public void updateState(String noticeId,String state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\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\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dormir() {\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}", "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void create () {\n\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "private TMCourse() {\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 protected void initialize() \n {\n \n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public Pitonyak_09_02() {\r\n }", "public void create() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void create() {\n\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "private UsineJoueur() {}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private static void oneUserExample()\t{\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "protected Doodler() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void init() {\n\n\t}", "public void mo12930a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private Singletion3() {}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\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}", "protected void onFirstUse() {}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n public void init() {\n\n }" ]
[ "0.6280893", "0.6138909", "0.58841705", "0.58840454", "0.5844398", "0.5830612", "0.5765251", "0.5747122", "0.5738348", "0.5728063", "0.57242966", "0.57242966", "0.57089293", "0.5700324", "0.568796", "0.5679885", "0.5679885", "0.5679513", "0.56715107", "0.5668574", "0.5655552", "0.5648211", "0.5635083", "0.56119454", "0.56069475", "0.5600183", "0.5588321", "0.5576334", "0.55749345", "0.55660796", "0.556418", "0.5550933", "0.55500525", "0.55310255", "0.55310255", "0.55310255", "0.55310255", "0.55310255", "0.55310255", "0.55310255", "0.5517219", "0.55165404", "0.55153644", "0.5502255", "0.5499858", "0.5499562", "0.5491701", "0.54899067", "0.5469", "0.54639524", "0.5456148", "0.5456148", "0.5456148", "0.5456148", "0.5456148", "0.5456148", "0.54421735", "0.5438247", "0.54231256", "0.54208696", "0.5419925", "0.5413168", "0.54117745", "0.54086095", "0.5407085", "0.54063004", "0.5385985", "0.5380901", "0.5380401", "0.5377872", "0.5375954", "0.5375936", "0.53716815", "0.53707963", "0.5366213", "0.5364896", "0.53636676", "0.53515834", "0.535017", "0.535017", "0.5348968", "0.5348839", "0.5348054", "0.5348008", "0.534258", "0.5342106", "0.53415316", "0.53202426", "0.5318217", "0.53146815", "0.531252", "0.531252", "0.531252", "0.531252", "0.531252", "0.5308663", "0.5305717", "0.53027713", "0.529566", "0.5295133", "0.5294886" ]
0.0
-1
ModelAndView mv = new ModelAndView("task/Task"); JSONArray jarr = getWeekStatistic();
@RequestMapping(value="savetask") public ModelAndView savetask(HttpServletResponse response, Integer taskid, String taskname,String tasktype,String taskcontent,String taskcomment){ Integer ref = saveTask(taskid,taskname,taskname,taskcontent,taskcomment); ref = ref+1; System.out.println(taskname); //mv.addObject("taskid",taskid); //mv.addObject("list",jarr); return index(response,null,null,null,null,null,null,null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ModelAndView getTaskProgressDetails(HttpServletRequest request, HttpServletResponse response) {\n JSONObject jobj = new JSONObject();\n boolean issuccess = false;\n String msg = \"\";\n try {\n \n /*Get Task Progress Related Parameters*/\n Map<String, Object> requestParams = getTaskProgressCommonParameters(request);\n \n /*Get Task Progress Details*/\n \n jobj=accTaskProgressManagementServiceDAOObj.getTaskProgressDetails(requestParams);\n issuccess = true;\n } catch (Exception ex) {\n msg = \"\" + ex.getMessage();\n Logger.getLogger(AccTaskProgressManagementControllerCMN.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n jobj.put(\"success\", issuccess);\n jobj.put(\"msg\", msg);\n } catch (JSONException ex) {\n Logger.getLogger(AccTaskProgressManagementControllerCMN.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return new ModelAndView(\"jsonView_ex\", Constants.model, jobj.toString());\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession(true);\n String name = session.getAttribute(\"username\").toString();\n Double[] data = new Double[12];\n TransDetail transdetail = new TransDetail();\n YearMonth yearMonth;\n LocalDate firstOfMonth;\n LocalDate lastOfMonth;\n Calendar c = GregorianCalendar.getInstance();\n \n for (int i = 0; i < 12; i++) {\n data[i] = 0.0;\n yearMonth = YearMonth.of(c.get(Calendar.YEAR), i+1); \n firstOfMonth = yearMonth.atDay(1);\n lastOfMonth = yearMonth.atEndOfMonth();\n List transdetailList = transSessionBean.searchWeeklyWithDate(name, firstOfMonth.toString(), lastOfMonth.toString()); \n Iterator iteratorMonthList = transdetailList.iterator();\n while (iteratorMonthList.hasNext()) {\n TransDetail loopMonthTransDetail = (TransDetail) iteratorMonthList.next(); \n data[i] = data[i] + Double.parseDouble(loopMonthTransDetail.getTotal());\n \n }\n System.out.print(\"month: \" + i + \" \" + data[i]);\n }\n \n System.out.print(\"tostring : \" + Arrays.toString(data));\n response.getWriter().write(Arrays.toString(data));\n \n }", "@RequestMapping(value = \"/listComittee.do\")\n\tpublic String outputJsonList(HttpServletRequest request, HttpServletResponse response,Model model) throws IOException {\n\t\tSystem.out.println(\"get\");\n\t\tString sPageNo = request.getParameter(\"pageNo\");\n\t\tString sPageSize = request.getParameter(\"pageSize\");\n\t\tString sTotalcnt = \"0\";\n\t\tString sTitle = request.getParameter(\"sTitle\");\n\t\tif(sTitle == null ) {\n\t\t\tsTitle = \"\";\n\t\t};\n\t\tSystem.out.println(sTitle);\n\t\t\n\t\tMap <String,String> hm1 = new HashMap();\n\t\thm1.put (\"sPageNo\",sPageNo);\t\t\n\t\thm1.put (\"sPageSize\",sPageSize);\t\t\n\t\thm1.put (\"sTotalcnt\",sTotalcnt);\t\n\t\thm1.put (\"sTitle\",sTitle);\n\n\t\tString Tot= comitteeListService.selectTotal(hm1);\n\t\t\n\t\tList<HashMap<String, String>> aList= comitteeListService.listComittee(hm1);\n\t \n\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t map.put(\"result\",aList);\n\t \n\t model.addAllAttributes(map);\n\t model.addAttribute(\"totCnt\",Tot);\n\n\t // Keypoint ! setViewName占쏙옙 占쏙옙載� String 占식띰옙占쏙옙姑占� JsonView bean 占쏙옙占쏙옙占쏙옙占쏙옙占� id占쏙옙 占쏙옙占싣억옙 占싼댐옙.\t \n\t return \"jsonView\";\n\t}", "public ModelAndView findWeekDayCount(HttpServletRequest request, HttpServletResponse response) {\n\t\tHashMap<String, Object> model = new HashMap<String, Object>();\n\t\tresponse.setContentType(\"application/json; charset=UTF-8\");\n\t\tString startDate = request.getParameter(\"startDate\");\n\t\tString endDate = request.getParameter(\"endDate\");\n\t\ttry {\n\t\t\tout = response.getWriter();\n\n\t\t\tString weekdayCount = baseServiceFacade.findWeekDayCount(startDate, endDate);\n\t\t\tmodel.put(\"weekdayCount\", weekdayCount);\n\t\t\tmodel.put(\"errorMsg\", \"success\");\n\t\t\tmodel.put(\"errorCode\", 0);\n\n\t\t\tJSONObject jsonObject = JSONObject.fromObject(model);\n\t\t\tout.println(jsonObject);\n\t\t\tSystem.out.println(jsonObject);\n\n\t\t} catch (IOException ioe) {\n\t\t\tlogger.fatal(ioe.getMessage());\n\t\t\tString viewname = \"redirect:welcome.html\";\n\t\t\tmodel.clear();\n\t\t\tmodel.put(\"errorMsg\", ioe.getMessage());\n\t\t\tmodelAndView = new ModelAndView(viewname, model);\n\t\t} catch (DataAccessException dae) {\n\t\t\tlogger.fatal(dae.getMessage());\n\t\t\tmodel.clear();\n\t\t\tmodel.put(\"errorCode\", -1);\n\t\t\tmodel.put(\"errorMsg\", dae.getMessage());\n\t\t\tJSONObject jsonObject = JSONObject.fromObject(model);\n\t\t\tout.println(jsonObject);\n\t\t} finally {\n\t\t\tout.close();\n\t\t}\n\t\treturn modelAndView;\n\t}", "@RequestMapping(value = \"/sc\", method = RequestMethod.GET)\n public ModelAndView listsc() {\n List<Group> groups = userBean.getAllGroups();\n List<WeekDay> weekDays = userBean.getAllWeekDay();\n ModelAndView view = new ModelAndView(\"sc\");\n // view.addObject(\"list\",list);\n view.addObject(\"group\", groups);\n view.addObject(\"week\", weekDays);\n return view;\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //response.setContentType(\"text/html;charset=UTF-8\");\n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"UTF-8\");\n Date today = new java.util.Date();\n if (today.getDay() == 0 || today.getDay() == 7){\n //its the weekend everything is closed\n }\n Date currentTime = new Time(today.getTime()); \n Session session = HibernateUtil.getSessionFactory().openSession();\n Query q = session.createQuery(\"from Truck t where t.openingTime <=:time and t.closingTime >:time\");\n q.setParameter(\"time\", currentTime);\n List<Truck> results = q.list();\n //List<Truck> results = Truck.getAllTrucks();\n JsonArray jsonArray = new JsonArray();\n for (Truck t: results) {\n JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(\"name\", t.getTruckName());\n jsonObject.addProperty(\"lat\", t.getLatitude());\n jsonObject.addProperty(\"lng\", t.getLongitude());\n jsonObject.addProperty(\"id\", t.getId()); \n jsonArray.add(jsonObject);\n }\n try (PrintWriter out = response.getWriter()) {\n out.print(jsonArray); \n }\n }", "@ResponseBody\r\n/* 26: */ @RequestMapping(value={\"/Select_userinfo_days_time\"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})\r\n/* 27: */ public Map<String, Object> select_userinfo_days_time(HttpServletRequest req, HttpServletResponse resp)\r\n/* 28: */ {\r\n/* 29: 40 */ Map<String, Object> map = new HashMap();\r\n/* 30: */ try\r\n/* 31: */ {\r\n/* 32: 43 */ req.setCharacterEncoding(\"utf-8\");\r\n/* 33: 44 */ resp.setCharacterEncoding(\"utf-8\");\r\n/* 34: 45 */ String username = req.getParameter(\"username\");\r\n/* 35: 46 */ SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n/* 36: 47 */ String qiandaotime = df.format(new Date());\r\n/* 37: 48 */ Map<String, Object> usermap = new HashMap();\r\n/* 38: 49 */ usermap.put(\"Qiandaotime\", qiandaotime);\r\n/* 39: 50 */ usermap.put(\"Username\", username);\r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: 54 */ List<Map<String, Object>> currentDateList = this.userService.selectCurrentDateList(usermap);\r\n/* 44: */ \r\n/* 45: */ \r\n/* 46: 57 */ List<Map<String, Object>> totalDateList = this.userService.selectUserScoreOrDayByName(usermap);\r\n/* 47: 58 */ List<Map<String, Object>> signTimeLiST = this.userService.selectUserQiandaotimeByName(usermap);\r\n/* 48: 59 */ Object signTime = ((Map)signTimeLiST.get(0)).get(\"qiandaotime\");\r\n/* 49: 60 */ int days = 0;\r\n/* 50: 61 */ if ((signTime != null) && (!signTime.toString().equals(\"\")))\r\n/* 51: */ {\r\n/* 52: 63 */ List<Map<String, Object>> SignLiST = this.userService.decideContinuous(usermap);\r\n/* 53: 64 */ days = Integer.parseInt(((Map)SignLiST.get(0)).get(\"num\").toString());\r\n/* 54: */ }\r\n/* 55: 67 */ if ((days > 1) || (signTime == null) || (signTime.equals(\"\")))\r\n/* 56: */ {\r\n/* 57: 68 */ days = 0;\r\n/* 58: 69 */ Map<String, Object> dayMap = new HashMap();\r\n/* 59: 70 */ dayMap.put(\"Days\", days + \"\");\r\n/* 60: 71 */ dayMap.put(\"Username\", username);\r\n/* 61: 72 */ int i = this.userService.updateUserinfoDays(dayMap);\r\n/* 62: */ }\r\n/* 63: */ else\r\n/* 64: */ {\r\n/* 65: 74 */ int sumdays = Integer.parseInt(((Map)totalDateList.get(0)).get(\"days\")\r\n/* 66: 75 */ .toString());\r\n/* 67: 76 */ if ((sumdays % 7 == 0) && (sumdays != 0)) {\r\n/* 68: 77 */ days = 7;\r\n/* 69: */ } else {\r\n/* 70: 79 */ days = sumdays % 7;\r\n/* 71: */ }\r\n/* 72: */ }\r\n/* 73: 82 */ if ((null != currentDateList) && (0 < currentDateList.size()))\r\n/* 74: */ {\r\n/* 75: 83 */ map.put(\"data\", \"1\");\r\n/* 76: 84 */ map.put(\"days\", days + \"\");\r\n/* 77: 85 */ map.put(\"score\", ((Map)currentDateList.get(0)).get(\"score\").toString());\r\n/* 78: */ }\r\n/* 79: 88 */ else if ((null != totalDateList) && (0 < totalDateList.size()))\r\n/* 80: */ {\r\n/* 81: 89 */ map.put(\"data\", \"0\");\r\n/* 82: 90 */ map.put(\"days\", days + \"\");\r\n/* 83: 91 */ map.put(\"score\", ((Map)totalDateList.get(0)).get(\"score\").toString());\r\n/* 84: */ }\r\n/* 85: 94 */ return map;\r\n/* 86: */ }\r\n/* 87: */ catch (Exception ex)\r\n/* 88: */ {\r\n/* 89: 97 */ ex.printStackTrace();\r\n/* 90: 98 */ map.put(\"error\", ex.getMessage());\r\n/* 91: */ }\r\n/* 92: 99 */ return map;\r\n/* 93: */ }", "@RequestMapping(method = RequestMethod.GET, value = \"/pruebaConsulta.do\")\n public @ResponseBody\n void pruebaConsulta(Model model)\n {\n String idEstado = \"15\";\n// //Fabricacion de objeto\n MunicipiosJSON municipiosJSON = new MunicipiosJSON();\n try\n {\n //Track tiempo\n Calendar ahora1 = Calendar.getInstance();\n long tiempo1 = ahora1.getTimeInMillis();\n municipiosJSON = daoCodigosPostales.municipiosEstado(\"15\");\n\n //Operacion realizada con exito\n municipiosJSON.setStatusJSON(true);\n Calendar ahora2 = Calendar.getInstance();\n long tiempo2 = ahora2.getTimeInMillis();\n long total = tiempo2 - tiempo1;\n System.out.println(\"Operacion con exito en \" + total + \"ms\");\n\n } catch(Exception e)\n {\n e.printStackTrace();\n //Error en consulta\n municipiosJSON.setStatusJSON(false);\n\n }\n\n }", "public JSONObject ownGetView()\n {\n JSONObject jsonObject = new JSONObject();\n try\n {\n jsonObject.put(\"task\", currentTask.getTask());\n jsonObject.put(\"location\", currentTask.getLocation());\n jsonObject.put(\"starttime\", currentTask.getStartTime());\n currentTask.setStopStime(currentTask.getCurrentTime());\n jsonObject.put(\"stoptime\", currentTask.getStopStime());\n currentTask.recalculateTime();\n jsonObject.put(\"time\",currentTask.getTime());\n jsonObject.put(\"timeinseconds\",currentTask.getTimeInSeconds());\n jsonObject.put(\"gps\", currentTask.getGps());\n jsonObject.put(\"notes\", currentTask.getNotes());\n jsonObject.put(\"inmotion\", currentTask.isInMotion());\n jsonObject.put(\"edited\", currentTask.isEdited());\n }\n\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n return jsonObject;\n }", "@RequestMapping(\"getVmsHtml\")\n public String getVmsHtml(ModelMap map, HttpServletRequest request, HttpServletResponse response) {\n _LOG.info(\"get data for Training page\");\n _LOG.info(\"getVmsHtml()............................\");\n HttpSession session = request.getSession();\n User user = (User) session.getAttribute(\"user\");\n user = infoService.getInfoByType(user);\n session.setAttribute(\"user\", user);\n String username = user.getUserName();\n String type = user.getType();\n Boolean isFirstTime = user.getIsFirstTime();\n String instructorName = \"\";\n if (type.equals(\"attendees\")) {\n instructorName = attendeesService.getInstructorName(username);\n } else {\n instructorName = username;\n }\n ApplicationContainer applicationContainer = ApplicationContainer.getInstance();\n String contextDataKey = user.getEventId() + Event.contextDataFlag;\n _LOG.info(\"User Event Id -----------> \"+user.getEventId()+\" Event ContextDataFlag -----------> \"+Event.contextDataFlag);\n _LOG.info(\"contex Data Key is --------> \"+contextDataKey);\n _LOG.info(\"User Name is -------> \"+user.getUserName());\n \n List<VAppModel> vAppModelList = (List<VAppModel>) applicationContainer.getObject(contextDataKey);\n // List<VAppModel> vAppModelList = (List<VAppModel>)\n // applicationContainer.getObject(instructorName);\n String participantUrl = (String) applicationContainer.getObject(user.getEventId());\n if (participantUrl != null && !participantUrl.equals(\"\")) {\n user.setParticipantUrl(participantUrl);\n }\n _LOG.info(\"VAppModelList in controller ................\"+vAppModelList);\n \n \n VAppModel vapp = (VAppModel) session.getAttribute(\"vapp\");\n // here we will pass studentName and vappName // we will retrieve 3 records\n \n vapp = trainingmgmService.getVappToView(vapp, vAppModelList, user);\n\n _LOG.info(\"isFirstTime -----------------> \"+isFirstTime);\n if (isFirstTime != null && isFirstTime == true) { \t\n if (vAppModelList != null && type.equals(\"attendees\")) {\n \t_LOG.info(\"calling setStatusToMemory().....................\");\n setStatusToMerroy(vapp, vAppModelList);\n applicationContainer.setObject(contextDataKey, vAppModelList);\n }\n user.setIsFirstTime(false);\n }\n session.setAttribute(Constants.SESSION_ORGNAME, vapp.getOrgName());\n session.setAttribute(\"instructorName\", instructorName);\n VAppModel merroyApp = (VAppModel) session.getAttribute(\"vappTask\");\n\n vapp = setVapp(merroyApp, vapp);\n \n // chinna start\n \n \n _LOG.info(\"Iterating VAppModel ....................start....\");\n _LOG.info(\"vapp Name -----------> \"+vapp.getName());\n _LOG.info(\"vapp student name -----------> \"+vapp.getStudentName());\n \n \tList<VmModel> vmModelList = vapp.getVmModelList();\n \t_LOG.info(\"The VmModelList size is --------> \"+vmModelList.size());\n \tIterator vmModelListIterator = vmModelList.iterator();\n \twhile(vmModelListIterator.hasNext()){\n \t\t_LOG.info(\"*************************************************\");\n \t\tVmModel model = (VmModel)vmModelListIterator.next();\n \t\t_LOG.info(\"VM Name is -------------> \"+model.getVmName());\n \t\t_LOG.info(\"RDP --------> \"+model.getRdpDisplay());\n \t\t_LOG.info(\"Console ---------> \"+model.getConsoleDisplay());\n \t}\n \n \t_LOG.info(\"Iterating VAppModel ....................end....\");\n \n String currentTomcatServerName = null;\n try {\n\t\t\t currentTomcatServerName = InetAddress.getLocalHost().getHostName();\n\t\t\t _LOG.info(\"Current Tomcast Server ----------> \"+currentTomcatServerName);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n // logic to check same server or not\n _LOG.info(\"vapp Name is --------> \"+vapp.getName());\n _LOG.info(\"Current User is --------> \"+vapp.getStudentName());\n _LOG.info(\"Current User from User oject ---------> \"+user.getUserName());\n List<Webstatsvm> webstatsvmDbList = webstatsvmService.selectInstructorSession(user.getUserName());\n \n _LOG.info(\"The webstatsvmDbList is ------------> \"+webstatsvmDbList);\n\t\tif (webstatsvmDbList != null && webstatsvmDbList.size() != 0) {\n\t\t\tif (webstatsvmDbList.get(0).getSessionServer().equals(currentTomcatServerName)) {\n\t\t\t\t_LOG.info(\"Both Instructor and Antendee login with the same session..............\");\n\t\t\t} else {\n\t\t\t\t_LOG.info(\"Both Instructor and Antendee login with the Different session..............\");\n\n\t\t\t\tif (webstatsvmDbList != null) {\n\t\t\t\t\tfor (byte i = 0; i < webstatsvmDbList.size(); i++) {\n\t\t\t\t\t\tfor (byte j = 0; j < vapp.getVmModelList().size(); j++) {\n\t\t\t\t\t\t\t//if (webstatsvmDbList.get(i).getUserName().equals(vapp.getStudentName())&& webstatsvmDbList.get(i).getVmname().equals(vapp.getVmModelList().get(j).getVmName())) {\n\t\t\t\t\t\t\tif (webstatsvmDbList.get(i).getUserName().equals(user.getUserName())&& webstatsvmDbList.get(i).getVmname().equals(vapp.getVmModelList().get(j).getVmName())) {\n\t\t\t\t\t\t\t\t_LOG.info(\"Student Name ----------> \"+ webstatsvmDbList.get(i).getUserName());\n\t\t\t\t\t\t\t\t_LOG.info(\"VM Name ---------> \"\t+ webstatsvmDbList.get(i).getVmname());\n\t\t\t\t\t\t\t\tvapp.getVmModelList().get(j).setConsoleDisplay(webstatsvmDbList.get(i).getShowConsole());\n\t\t\t\t\t\t\t\tvapp.getVmModelList().get(j).setRdpDisplay(webstatsvmDbList.get(i).getShowRdp());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}// End of first if condition\n\t\t\t\t}// End of for loop\n\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t_LOG.info(\"After setting values checking rdp and console data.............................\");\n\t\t\n\t\t _LOG.info(\"Iterating VAppModel .........2...........start....\");\n\t _LOG.info(\"vapp Name -----------> \"+vapp.getName());\n\t _LOG.info(\"vapp student name -----------> \"+vapp.getStudentName());\n\t \n\t \tList<VmModel> vmModelList2 = vapp.getVmModelList();\n\t \t_LOG.info(\"The VmModelList size is --------> \"+vmModelList2.size());\n\t \tIterator vmModelListIterator2 = vmModelList.iterator();\n\t \twhile(vmModelListIterator2.hasNext()){\n\t \t\t_LOG.info(\"*************************************************\");\n\t \t\tVmModel model = (VmModel)vmModelListIterator2.next();\n\t \t\t_LOG.info(\"VM Name is -------------> \"+model.getVmName());\n\t \t\t_LOG.info(\"RDP --------> \"+model.getRdpDisplay());\n\t \t\t_LOG.info(\"Console ---------> \"+model.getConsoleDisplay());\n\t \t}\n\t \n\t \t_LOG.info(\"Iterating VAppModel ..........2..........end....\");\n\t \n\t\t\n // chinna end\n session.setAttribute(\"vapp\", vapp);\n _LOG.info(\"return to Training page\");\n _LOG.info(\"returning vms.............................\");\n return \"vms\";\n }", "@RequestMapping(value=\"/\"+REST_PATH_REPORT_INVENTARIO, method = RequestMethod.GET)\n\tpublic String inventariosReport(@PathVariable(value=PARAMETER_KEY_PROYECTO_NAME) String name,ModelMap model) throws Exception {\n\t\t\n\t\t\n\t\t_logger.debug(\"Starting \"+REST_PATH_REPORT_INVENTARIO);\t\t\n\n\t\tMysqlDataController msqlController = new MysqlDataController();\n\t\t\n\t\tJSONArray inventarios = msqlController.getActivos(name);\n\n\t\t\n\t\tJSONArray inventariosFull = new JSONArray();\n\t\t\n\t\tfor(int i = 0; i < inventarios.length(); i++){\n\t\t\n\t\t\tString aid = (inventarios.getJSONObject(i)).getString(\"id\");\n\t\t\t\n\t\t\torg.json.JSONObject activo = msqlController.getActivo(aid);\n\t\t\t\n\t\t\tinventariosFull.put(activo);\n\t\t}\n\t\t\n\t\t\n\t\tmodel.addAttribute(PARAMETER_KEY_ACTIVOS, inventariosFull);\n\n\t\tmodel.addAttribute(PARAMETER_KEY_ID, name);\n\n\t\treturn \"reporte\";\n \n \n\t}", "@RequestMapping(value=\"/tasks\", method = RequestMethod.GET)\npublic @ResponseBody List<Task> tasks(){\n\treturn (List<Task>) taskrepository.findAll();\n}", "public String ajaj() {\n try {\n monthlyExpends = MonthlyExpenditureCache.getCache();\n monthlyExpendsJson = new JSONArray();\n for (MonthlyExpenditure monthlyExpend : monthlyExpends) {\n JSONObject monthlyExpendJson = new JSONObject();\n JSONArray cateExpendsJson = new JSONArray();\n JSONArray statExpendsJson = new JSONArray();\n monthlyExpendJson.put(\"total\", monthlyExpend.total());\n monthlyExpendJson.put(\n \"date\",\n CalendarUtils.toString(CalendarUtils.YM,\n monthlyExpend.getDate()));\n monthlyExpendJson.put(\"expenditures\", cateExpendsJson);\n monthlyExpendJson.put(\"statisticalExpenditures\",\n statExpendsJson);\n monthlyExpendsJson.add(monthlyExpendJson);\n // expenditures - category : list[expend]\n for (String cateName : monthlyExpend.getExpenditures().keySet()) {\n JSONArray expendsJson = new JSONArray();\n for (Expenditure expend : monthlyExpend.getExpenditures()\n .get(cateName)) {\n JSONObject expendJson = new JSONObject();\n expendJson.put(\"category\", expend.getCategory()\n .getName());\n expendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, expend.getDate()));\n expendJson.put(\"name\", expend.getName());\n expendJson.put(\"howMuch\", expend.getHowMuch());\n expendsJson.add(expendJson);\n }\n cateExpendsJson.add(expendsJson);\n }\n // statisticalExpenditures - category : statistical expend\n for (String cateName : monthlyExpend\n .getStatisticalExpenditures().keySet()) {\n Expenditure statExpend = monthlyExpend\n .getStatisticalExpenditures().get(cateName);\n JSONObject statExpendJson = new JSONObject();\n statExpendJson.put(\"category\", statExpend.getCategory()\n .getName());\n statExpendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, statExpend.getDate()));\n statExpendJson.put(\"howMuch\", statExpend.getHowMuch());\n statExpendJson.put(\"average\", statExpend.getAverage());\n statExpendsJson.add(statExpendJson);\n }\n }\n } catch (Exception e) {\n PrintUtils.error(this.getClass(), e);\n return ERROR;\n }\n return SUCCESS;\n }", "@RequestMapping(value = \"/allUsersActivity\", method = RequestMethod.POST)\r\n\tpublic ModelAndView loadAllUsersActivity() {\r\n\t\tList<UserActivityHistory> historyList=userservice.getUserAssesmentHistory();\r\n\t\tModelAndView modelAndView = null;\r\n\t\tmodelAndView = new ModelAndView(\"allUserActivityHistory\");\r\n\t\tmodelAndView.addObject(\"assessHistoryList\",historyList);\r\n\t\treturn modelAndView;\r\n\t}", "public void fetch_data_into_array(View view) throws ExecutionException, InterruptedException, UnsupportedEncodingException {\n\n DatabaseHelper dbHelper = new DatabaseHelper(DatabaseHelper.GET, DatabaseHelper.BLOOD_PRESSURE);\n dbHelper.setUserInfo();\n String data = dbHelper.send();\n\n\n try {\n JSONArray ja = new JSONArray(data);\n JSONObject jo = null;\n\n date = new String[ja.length()];\n time = new String[ja.length()];\n sys = new String[ja.length()];\n dia = new String[ja.length()];\n\n for (int i = 0; i<ja.length(); i++){\n jo = ja.getJSONObject(i);\n date[i] = jo.getString(\"Date\");\n time[i] = jo.getString(\"Time\");\n sys[i] = jo.getString(\"SYS\");\n dia[i] = jo.getString(\"DIA\");\n x_axis.add(date[i]);\n y_axis.add(sys[i]);\n y_axis2.add(dia[i]);\n }\n BloodPressureActivity.myadapter adptr = new BloodPressureActivity.myadapter(getApplicationContext(), date, time, sys, dia);\n lv2.setAdapter(adptr);\n } catch (Exception ex) {\n Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@GetMapping(\"/getWeeklyRecords\")\n public ResponseEntity< List<Record> > getWeeklyRecords(){\n return ResponseEntity.ok().body(this.recordService.getWeeklyRecords());\n }", "@RequestMapping(\"/misventas\")\r\n\tpublic ModelAndView historialventas(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tModelAndView mav = new ModelAndView(\"historial/mysales\");\r\n\t\t// OBTENER USUARIO LOGUEADO ACTUAL\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\t// comprobar mensajes\r\n\t\tlong sizeMsg = co.getUserContacts(user.getUserId());\r\n\t\tmav.addObject(\"listaSizeMsg\", sizeMsg);\r\n\t\t// fin comprobar mensajes\r\n\t\t// comprobar norate\r\n\t\tlong sizeRate = hi.getUserHistorialNoRate(user.getUserId());\r\n\t\tmav.addObject(\"listaSizeRate\", sizeRate);\r\n\t\t// fin comprobar norate\r\n\t\tint size = 0;\r\n\t\tCollection<Item> itemsvendidos = is.findByVendedorId(user.getUserId(), Item.BAJA);\r\n\t\tCollection<Historial> listaventas = hi.findByidVendedor(user.getUserId());\r\n\t\tCollection<User> listcompradores = us.findByidVendedorconHistorial(user.getUserId());\r\n\t\tif (listaventas != null) {\r\n\t\t\tsize = listaventas.size();\r\n\t\t\tmav.addObject(\"lista\", listaventas);\r\n\t\t}\r\n\t\tif (itemsvendidos != null) {\r\n\t\t\tmav.addObject(\"items\", itemsvendidos);\r\n\t\t}\r\n\t\tif (listcompradores != null) {\r\n\t\t\tmav.addObject(\"compradores\", listcompradores);\r\n\t\t}\r\n\t\tmav.addObject(\"listaSize\", size);\r\n\t\treturn mav;\r\n\t}", "@RequestMapping(\"/test\")\n public ModelAndView showShops() {\n\n ModelAndView model = new ModelAndView(\"page\");\n\n model.addObject(\"userClickSales\", true);\n model.addObject(\"salesList\", salesDAO.getShopSales(null,null, null,\" total_order_sales DESC \",100,0,true,false).getOrderSalesStatsList());\n ShopEndPoint sales2=salesDAO.getShopSales(null,null,null,\" total_order_sales DESC \",100, 0,true,false);\n List<OrderSalesStats> stats=sales2.getOrderSalesStatsList();\n /* for (OrderSalesStats shop: stats){\n System.out.println(shop.getShopID()+\"-->\"+shop.getTotalOrderSales());\n }*/\n System.out.println(\"==========================================================================================Get Method Called\");\n return model;\n }", "@RequestMapping(value = \"/getTodayReport\", method = RequestMethod.GET)\r\n public @ResponseBody String getDayWiseReport() {\r\n logger.info(\"in ReportGenerationController getDayWiseReport()\");\r\n\r\n String reportDetails = reportGenerationService.getTodayReport();\r\n\r\n return reportDetails;\r\n }", "public ModelAndView getMaterialConsumedDetails(HttpServletRequest request, HttpServletResponse response) {\n JSONObject jobj = new JSONObject();\n boolean issuccess = false;\n String msg = \"\";\n try {\n \n /*Get Task Progress Related Parameters*/\n Map<String, Object> requestParams = getTaskProgressCommonParameters(request);\n \n /*Get Task Progress Details*/\n \n jobj=accTaskProgressManagementServiceDAOObj.getMaterialConsumedDetails(requestParams);\n issuccess = true;\n } catch (Exception ex) {\n msg = \"\" + ex.getMessage();\n Logger.getLogger(AccTaskProgressManagementControllerCMN.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n jobj.put(\"success\", issuccess);\n jobj.put(\"msg\", msg);\n } catch (JSONException ex) {\n Logger.getLogger(AccTaskProgressManagementControllerCMN.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return new ModelAndView(\"jsonView_ex\", Constants.model, jobj.toString());\n }", "@GetMapping(\"/activity\")\n Stats all() {\n Stats stats = new Stats();\n log.info(\"getting daily activity by default\");\n List<Activity> allActivity = repository.findAll();\n log.info(\"allActivity: \" + allActivity);\n Collections.sort(allActivity);\n Map<String, Integer> stepsByCategory = new TreeMap<String, Integer>();\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.DAY_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = DAY + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n stats.setCategory(StatsCategory.DAILY);\n List<Details> details = new ArrayList<Stats.Details>();\n if(stepsByCategory != null) {\n for (Entry entry : stepsByCategory.entrySet()) {\n Details stat = stats.new Details();\n stat.key = entry.getKey().toString();\n stat.steps = entry.getValue().toString();\n details.add(stat);\n }\n stats.setDetails(details);\n }\n //stats.setStepsByCategory(stepsByCategory);\n return stats;\n }", "@PostMapping(\"/monthlySalaryReport\")\n public String getmonthlySalaryReport(ModelMap model, @RequestParam @DateTimeFormat(pattern = \"YYYY-MM-dd\") Date salaryDate) {\n try {\n\n List<MonthlySalaryReport> monthlySalaryList = monthlyReportService.getMonthlySalaryReport(salaryDate);\n\n if (monthlySalaryList.isEmpty()) {\n model.addAttribute(\"recordMessage\", \"No Records Found\");\n return \"html/monthlySalaryReport\";\n }\n model.addAttribute(\"monthlySalaryList\", monthlySalaryList);\n return \"html/fragment/monthlySalaryReportResult\";\n // return \"html/exceltest\";\n } catch (Exception e) {\n model.addAttribute(\"Problem occured due to technical problem\");\n LOG.error(\"Problem occured due to technical problem\", e);\n return \"html/monthlySalaryReport\";\n }\n }", "@RequestMapping(\"load-userExamDashboard\")\r\n\tpublic String userExamDashBoard(Model model, HttpSession session, LoginPojo lp, WelcomeUserPojo wup,HttpServletRequest req) {\r\n\t\tString dbval=dv.getDatabaseValue(session,req);\r\n\t\tif(dbval.equals(\"0\"))\r\n\t\treturn \"defaultDatabaseErrorPage\";\r\n\t\t\r\n\t\tString studentid = (String) session.getAttribute(sidval);\r\n\t\tList<LoginPojo> userdetails = userservice.getUserdetails(studentid);\r\n\t\tString examnewstatus = null;\r\n\t\tString stateid = null;\r\n\t\tString locationid = null;\r\n\t\tString branchid = null;\r\n\t\tString classid = null;\r\n\t\tString sectionid = null;\r\n\t\tfor (LoginPojo loginPojo : userdetails) {\r\n\t\t\tstateid = loginPojo.getState();\r\n\t\t\tlocationid = loginPojo.getLocationid();\r\n\t\t\tbranchid = loginPojo.getBarnch();\r\n\t\t\tclassid = loginPojo.getClassname();\r\n\t\t\tsectionid = loginPojo.getSection();\r\n\t\t}\r\n\r\n\t\tList<QuestionPojo> questionlist = new ArrayList<>();\r\n\t\tList<QuestionPojo> examdata = userservice.getExams(stateid, locationid, branchid, classid, sectionid);\r\n\r\n\t\tSystem.out.println(\"examdata : \"+examdata.size());\r\n\t\t\r\n\t\tString examname = null;\r\n\t\tList<ExamCompletionState> examstatus = null;\r\n\t\tfor (QuestionPojo ques : examdata) {\r\n\t\t\tQuestionPojo questionpo = new QuestionPojo();\r\n\t\t\tList<String> subjectnames = new ArrayList<>();\r\n\t\t\tList<String> subjectids = new ArrayList<>();\r\n\t\t\texamname = ques.getExamname();\r\n\t\t\tquestionpo.setExamname(examname);\r\n\t\t\tquestionpo.setSubject(ques.getSubject());\r\n\t\t\tquestionpo.setSlotdate(ques.getSlotdate());\r\n\t\t\tquestionpo.setStarttime(ques.getStarttime());\r\n\t\t\tquestionpo.setEnddate(ques.getEnddate());\r\n\t\t\tquestionpo.setEndtime(ques.getEndtime());\r\n\t\t\tquestionpo.setSubjectid(ques.getSubjectid());\r\n\t\t\tquestionpo.setExam_type(ques.getExam_type());\r\n\t\t\tquestionpo.setPatterntypeid(ques.getPatterntypeid());\r\n\t\t\tquestionpo.setTestduration(ques.getTestduration());\r\n\r\n\t\t\tList<QuestionPojo> subjects = userservice.getSubjectnamesInSubjectTable(examname);\r\n\t\t\t/** Set Subject name list */\r\n\t\t\tint listsize = 1;\r\n\t\t\tfor (QuestionPojo subj : subjects) {\r\n\t\t\t\tString subjnames = subj.getSubject_type();\r\n\t\t\t\tif (listsize == 1) {\r\n\t\t\t\t\tsubjectnames.add(subjnames);\r\n\t\t\t\t}\r\n\t\t\t\tif ((listsize != 1)) {\r\n\t\t\t\t\tsubjectnames.add(\",\" + subjnames);\r\n\t\t\t\t}\r\n\t\t\t\tlistsize++;\r\n\t\t\t}\r\n\t\t\tquestionpo.setSublist(subjectnames);\r\n\r\n\t\t\t/** Set Subject id list */\r\n\t\t\tint listidsize = 1;\r\n\t\t\tfor (QuestionPojo subj1 : subjects) {\r\n\t\t\t\tint subjids = subj1.getSubjectid();\r\n\t\t\t\tString subjidstring = String.valueOf(subjids);\r\n\t\t\t\tif (listidsize == 1) {\r\n\t\t\t\t\tsubjectids.add(subjidstring);\r\n\t\t\t\t}\r\n\t\t\t\tif ((listidsize != 1)) {\r\n\t\t\t\t\tsubjectids.add(\",\" + subjidstring);\r\n\t\t\t\t}\r\n\t\t\t\tlistidsize++;\r\n\t\t\t}\r\n\t\t\tquestionpo.setSubidlist(subjectids);\r\n\r\n\t\t\texamstatus = userservice.getExamCompletionStatusQuery(studentid, stateid, locationid, branchid, classid,\r\n\t\t\t\t\tsectionid, examname);\r\n\r\n\t\t\tif (examstatus.isEmpty()) {\r\n\t\t\t\texamnewstatus = \"false\";\r\n\t\t\t\tquestionpo.setExam_status(examnewstatus);\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tfor (ExamCompletionState examComplete : examstatus) {\r\n\r\n\t\t\t\t\tString exstatus = examComplete.getExamn_status();\r\n\t\t\t\t\tquestionpo.setExam_status(exstatus);\r\n\t\t\t\t\tif (exstatus.equals(\"start\")) {\r\n\t\t\t\t\t\texamnewstatus = \"start\";\r\n\t\t\t\t\t\tquestionpo.setExam_status(examnewstatus);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\texamnewstatus = \"Finish\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tquestionlist.add(questionpo);\r\n\t\t\tmodel.addAttribute(\"examstatus\", examnewstatus);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tmodel.addAttribute(\"examdata\", examdata);\r\n\t\tmodel.addAttribute(\"questionlist\", questionlist);\r\n\r\n\t\treturn \"userExamDashboard\";\r\n\r\n\t}", "@GetMapping(\"home\")\n public ModelAndView All(){\n List<DataEntity> allData = dataService.findAll();\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"list.html\");\n modelAndView.addObject(\"datas\",allData);\n return modelAndView;\n\n }", "JSONObject mo28758a(View view);", "@GetMapping(value = \"/agendarCita\")\r\n public String agendarCita (Model model){\n popularDoctores();\r\n\r\n //Añado los doctores al model\r\n model.addAttribute(\"doctores\", doctores);\r\n return \"agendarCita\";\r\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic String home(Locale locale, Model model) {\n\t\tList<Event> events;\r\n\t\ttry {\r\n\t\t\tevents = JsonTools.importAllEventsFromJson(null);\r\n\t\t\tmodel.addAttribute(\"events\", events);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tmodel.addAttribute(\"msg\",\"Erreur de connexion au Web Service de Lille Métropole (\"+ e.getMessage() + \")\");\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\treturn \"home\";\r\n\t}", "@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}", "@RequestMapping(value = \"stats\", method = RequestMethod.GET)\n\tpublic String statsGet(HttpSession session, ModelMap model){\n\t\t//Checks if user is logged in\n\t\tif(session.getAttribute(\"username\") == null){\n\t\t\tVIEW_INDEX = \"index\";\n\t\t\treturn \"redirect:/\"+VIEW_INDEX;\n\t\t}\n\n\t\tString username = (String)session.getAttribute(\"username\");\n\t\tString date = (String)session.getAttribute(\"date\");\n\n\n\t\tArrayList user = userService.findUser(username);\n\t\tString goal = (String)user.get(1);\n\t\tint id = workoutService.getIdByDate(username, date);\n\t\tArrayList<Stats> stats = statsService.getAveragePerDay(username,id,goal);\n\t\t\n\t\tmodel.addAttribute(\"stats\",stats);\n\n\t\t//If there are no stats to look at then the user is encouraged to workout more\n\t\tif(stats == null){\n\t\t\tmodel.addAttribute(\"display\",\"none\");\n\t\t\tmodel.addAttribute(\"progressHeader\",\"You have to workout more to be able to see your progress\");\n\t\t}\n\t\t//Picture is shown that shows progress as well as average weight for each day\n\t\telse{\n\t\t\tLineChartService lcs = new LineChartService();\n\t\t\tlcs.getLineChart(username, id, goal);\n\t\t\tmodel.addAttribute(\"progressHeader\",\"Average weight per day\");\n\t\t\tmodel.addAttribute(\"username\", username);\n\t\t\tmodel.addAttribute(\"display\",\"inline\");\n\n\t\t}\n\t\tVIEW_INDEX = \"stats\";\t\t\n\t\treturn VIEW_INDEX;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n String read(Model model){\n Date now = new Date();\n List<Program> programList = programTableService.readOneDayByNow(now.getTime());\n model.addAttribute(\"programList\", programList);\n return \"programs/list\";\n }", "@RequestMapping(value = \"/getAllEmployeesWorkingDetails\", method = RequestMethod.POST)\r\n public @ResponseBody String getAllEmployeesWorkingDetails() {\r\n logger.info(\"inside ReportGenerationController getAllEmployeesWorkingDetails()\");\r\n\r\n return reportGenerationService.getAllEmployeesWorkingDetails();\r\n }", "public void getGHUnitList(Model model) throws Exception {\n\t\tHashMap<String, Object> reqMap = (HashMap<String, Object>) model.asMap().get(\"pageMap\");\n\t\tHashMap<String, Object> resultMap = setGridListParamaters(reqMap);\n\t\tList<HashMap<String, Object>> list = workUnitDao.getGHUnitList(reqMap); \n\t\tresultMap.put(\"DATA_LIST\", list);\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!\"+list);\n\t\tmodel.addAttribute(\"DATA_LIST\", list);\n\t\tmodel.addAttribute(\"totalCnt\", list.size());\n\t\tmodel.addAttribute(\"gridData\", getGridDataJson(resultMap, false));\n\t}", "@RequestMapping(value = \"/times\", method = RequestMethod.GET)\r\n\t\t@ResponseBody\r\n\t\tpublic ResponseEntity<List<Time>> obterTime() {\r\n\t\t\t\r\n\t\t\tList<Time> Times; // Classe List -> define um array de objetos da classe Time\r\n\t\t\t\r\n\t\t\tTimes = timeRepository.findAll();\r\n\t\t\tif (Times.isEmpty())\r\n\t\t\t\treturn new ResponseEntity<List<Time>>(Times, HttpStatus.NO_CONTENT);\r\n\t\t\t\r\n\t\t\treturn new ResponseEntity<List<Time>>(Times, HttpStatus.OK);\r\n\t\t\t\r\n\t\t}", "public void GetListaTjWomenResponseBean() {\n }", "@RequestMapping(method = RequestMethod.GET , value=\"/initial_sensorinfo\")\n public String initialSensorinfo() throws Exception {\n\tList<EnvironmentStatus> abcd = new ArrayList<>();\n\tPageable initialPage;\n\t\n\tif(environmentStatusPageRepository.count() >= 90){\n\t initialPage = (Pageable) PageRequest.of(0, 90, Sort.Direction.DESC, \"time\");\n\t //abcd = environmentStatusPageRepository.findTop90();\n\t \n\t}\n\telse{\n\t initialPage = (Pageable) PageRequest.of(0, (int) environmentStatusPageRepository.count(), Sort.Direction.DESC, \"time\");\n\t //abcd = environmentStatusPageRepository.findTop3();\n\t}\n\t\n\tPage<EnvironmentStatus> initialSensorInfo = environmentStatusPageRepository.findAll(initialPage);\n\t\n\tGson gson = new Gson();\n\tString initialSensorInfoString;\n\tinitialSensorInfoString = gson.toJson(initialSensorInfo.getContent());\n\t\n return initialSensorInfoString;\n }", "@RequestMapping(value = { \"/hip/hipmasterdashboard1\" }, method = RequestMethod.POST)\n\t/**\n\t * \n\t * @param feed_id\n\t * @param plt_id\n\t * @param feed_len\n\t * @param map\n\t * @return ModelAndView hipmasterDashboard1\n\t * @throws Exception\n\t */\n\tpublic ModelAndView hipmasterDashboard1(@Valid @ModelAttribute(\"feed_id\") final String feed_id,\n\t\t\t@ModelAttribute(\"plt_id\") final String plt_id, @ModelAttribute(\"feed_len\") final String feed_len,\n\t\t\tfinal ModelMap map) throws Exception {\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\tDate edat = new Date();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.DATE, -60);\n\t\tDate todate1 = cal.getTime();\n\t\tString sdate = dateFormat.format(todate1);\n\t\tString edate = dateFormat.format(edat);\n\t\tString src_flag = \"0\";\n\t\tArrayList<FeedLoggerDTO> fs = this.hipService.getfeeddetails(feed_id);\n\t\tArrayList<String> tbls = new ArrayList<String>();\n\t\tmap.addAttribute(\"feed\", fs);\n\t\tfor (FeedLoggerDTO fs1 : fs) {\n\t\t\tif (fs1.getClassification().matches(\"Table\")) {\n\t\t\t\ttbls.add(fs1.getValue());\n\t\t\t}\n\t\t\tif (fs1.getClassification().matches(\"Source\") && fs1.getSubclassification().matches(\"Type\")\n\t\t\t\t\t&& fs1.getValue().matches(\"Unix\")) {\n\t\t\t\tsrc_flag = \"1\";\n\t\t\t}\n\t\t}\n\t\tmap.addAttribute(\"tbls\", tbls);\n\t\tmap.addAttribute(\"tbl_sz\", tbls.size());\n\t\tmap.addAttribute(\"src_flag\", src_flag);\n\t\tmap.addAttribute(\"plt_id\", plt_id);\n\t\tmap.addAttribute(\"feed_id\", feed_id);\n\t\tmap.addAttribute(\"feed_len\", feed_len);\n\t\tArrayList<String> arrBatchDate = new ArrayList<String>();\n\t\tArrayList<String> arrDuration = new ArrayList<String>();\n\t\tArrayList<HipDashboardDTO> arrHipDashboard = this.hipService.getTableChartLoggerStats(feed_id);\n\t\tArrayList<String> runidlist = this.hipService.getTableRunId(feed_id, sdate, edate);\n\t\tArrayList<HipDashboardDTO> arr = this.hipService.getTableMetadata(feed_id, sdate, edate);\n\n\t\tif (arrHipDashboard.isEmpty()) {\n\t\t\tmap.addAttribute(\"feed_id\", feed_id);\n\t\t\tmap.addAttribute(\"sdate\", sdate);\n\t\t\tmap.addAttribute(\"edate\", edate);\n\n\t\t} else {\n\n\t\t\tmap.addAttribute(\"arrHipDashboard\", arrHipDashboard);\n\t\t\tmap.addAttribute(\"arr\", arr);\n\t\t\tmap.addAttribute(\"runidlist\", runidlist);\n\t\t\tArrayList<Integer> arrDurationInt = new ArrayList<Integer>();\n\t\t\tfor (HipDashboardDTO hipVO : arrHipDashboard) {\n\t\t\t\tarrDurationInt.add(Integer.parseInt(hipVO.getDuration()));\n\t\t\t\tarrBatchDate.add(hipVO.getBatch_date().toString());\n\t\t\t\tarrDuration.add(hipVO.getDuration());\n\t\t\t}\n\t\t\tmap.addAttribute(\"feed_id\", feed_id);\n\t\t\tmap.addAttribute(\"x\", arrBatchDate);\n\t\t\tmap.addAttribute(\"y\", arrDuration);\n\t\t\tmap.addAttribute(\"max\", Collections.max(arrDurationInt));\n\t\t\tmap.addAttribute(\"min\", Collections.min(arrDurationInt));\n\t\t\tmap.addAttribute(\"average\", calculateAverage(arrDurationInt));\n\t\t\tmap.addAttribute(\"sdate\", sdate);\n\t\t\tmap.addAttribute(\"edate\", edate);\n\t\t}\n\t\treturn new ModelAndView(\"/hip/hipmasterdashboard1\");\n\t}", "@RequestMapping(value = \"/week/all\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getAllWeek() {\n\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getAllWeeks();\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\n\t\t\tSessionManager session = new SessionManager(getBaseContext());\n\t\t\tString user = session.GetUserIdFromSharedPreferences();\n\n\t\t\taJSONObject = new JSONObject();\n\n\t\t\tRestAPI api = new RestAPI();\n\n\t\t\ttry {\n\t\t\t\taJSONObject = api.ReportOfTheMonth(user);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@RequestMapping(value = \"/*\", method = RequestMethod.GET)\r\n public ModelAndView handleRequest() {\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n ModelAndView mav = new ModelAndView(\"home\");\r\n List<Project> projs = hibernateTemplate.find(\"from Project\");\r\n mav.addObject(\"projs\", projs);\r\n List<Event> events = dataAccessService.getEventsForUser(user, 10);\r\n Map<String, Integer> stats = dataAccessService.getStatistics();\r\n List<SubProject> followedProjects = dataAccessService.getFollowedSubProjectsForUser(user);\r\n Collections.sort(followedProjects, new Comparator<SubProject>() {\r\n\r\n @Override\r\n public int compare(SubProject o1, SubProject o2) {\r\n Integer into1 = o1.getParent().getId();\r\n Integer into2 = o2.getParent().getId();\r\n return into1.compareTo(into2);\r\n }\r\n });\r\n mav.addObject(\"followProjects\", followedProjects);\r\n mav.addObject(\"events\", events);\r\n mav.addObject(\"projects\", stats.get(\"projects\"));\r\n mav.addObject(\"users\", stats.get(\"users\"));\r\n mav.addObject(\"subprojects\", stats.get(\"subprojects\"));\r\n mav.addObject(\"methods\", stats.get(\"methods\"));\r\n mav.addObject(\"results\", stats.get(\"results\"));\r\n mav.addObject(\"comments\", stats.get(\"comments\"));\r\n mav.addObject(\"eventstat\", stats.get(\"events\"));\r\n mav.addObject(\"data\", stats.get(\"data\"));\r\n return mav;\r\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "@GetMapping(\"/getMonthlyRecords\")\n public ResponseEntity< List<Record> > getMonthlyRecords(){\n return ResponseEntity.ok().body(this.recordService.getMonthlyRecords());\n }", "@RequestMapping(value= {\"/dashboard\"}, method=RequestMethod.GET)\n\tpublic @ResponseBody String onLoadDashboardHandler(HttpServletRequest request,Map<String,Object> map) throws Exception {\n\t\tlogger.debug(\"/*Ajax getting onload dashboard */\");\n\t\t\n\t\t\n\t\tJSONArray jsonarr=new JSONArray();\n\t\t\n\t\ttry{\n\t\t\tList<Waterconsumption> waterConsumedList=consumerService.getWaterConsumed();\n\t\t\tif(waterConsumedList!=null && !waterConsumedList.isEmpty()){\n\t\t\t\tfor(Waterconsumption wc : waterConsumedList){\n\t\t\t\t\tJSONObject json=new JSONObject();\n\t\t\t\t\t\tjson.put(\"id\", wc.getId());\n\t\t\t\t\t\tjson.put(\"branch\",wc.getSite().getBranch().getLocation());\n\t\t\t\t\t\tjson.put(\"site\",wc.getSite().getSiteName());\n\t\t\t\t\t\tjson.put(\"area\", wc.getPlace().getArea().getAreaName());\n\t\t\t\t\t\tjson.put(\"place\", wc.getPlace().getPlaceName());\n\t\t\t\t\t\tjson.put(\"deviceId\", wc.getDevice().getHwSerialNo());\n\t\t\t\t\t\tjson.put(\"starttime\", wc.getStartTime());\n\t\t\t\t\t\tjson.put(\"endtime\", wc.getEndTime());\n\t\t\t\t\t\tjson.put(\"date\", wc.getDate());\n\t\t\t\t\t\tjson.put(\"waterUnits\", wc.getWaterconsumed());\n\t\t\t\t\t\tjson.put(\"lat\", wc.getPlace().getLatitude());\n\t\t\t\t\t\tjson.put(\"long\", wc.getPlace().getLongitude());\n\t\t\t\t\t\n\t\t\t\t\t jsonarr.put(json);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Error in Ajax/getPlace\",e);\n\t\t}\n\t\t\t\t\t\n\t\treturn jsonarr.toString();\n\t\n\t}", "@RequestMapping(\"/showallemployee\")\npublic String viewEmployee(HttpSession session)\n{\nArrayList<EmployeeRegmodel> alist = ergserv.getAllDetails();\nsession.setAttribute(\"aetall\", alist);\nSystem.out.println(alist.size());\nreturn \"showAllEmployee.jsp\";\n\n\n}", "@RequestMapping(value=\"/\"+REST_PATH_LIST_INVENTARIO, method = RequestMethod.GET)\n\tpublic String inventariosList(@PathVariable(value=PARAMETER_KEY_PROYECTO_NAME) String name ,\n\t\t\t\t\t\t\t \t\t\t\tModelMap model) throws Exception {\n\n\t\t_logger.debug(\"Starting \"+REST_PATH_LIST_INVENTARIO);\t\t\n\n\t\tMysqlDataController msqlController = new MysqlDataController();\n\t\t\n\t\tJSONArray inventarios = msqlController.getActivos(name);\n\t\t\n\t\tmodel.addAttribute(PARAMETER_KEY_ACTIVOS, inventarios);\n\t\t\n\t\tmodel.addAttribute(PARAMETER_KEY_PROYECTO_NAME, name);\n\t\t\n\t\treturn VIEW_INVENTARIO;\n \n\t}", "@RequestMapping(value = \"/getDailyReportsInfo\", method = RequestMethod.GET )\r\n\tpublic @ResponseBody Response getDailyReportsInfo(@RequestParam(value=\"projectName\") String project,\r\n\t\t\t@RequestParam(value=\"releaseName\") String release){\r\n\t\t\r\n\t\ttry{\r\n\t\t\r\n\t\tlog.info(\"project :\"+project);\r\n\t\tlog.info(\"Release :\"+release);\r\n\t\t\r\n\t\tlog.info(\"Inside getTrendingInfo method :\");\r\n\t\tSystem.out.println(\"Inside getTrendingInfo method\");\r\n\t\t//log.debug(dashboardService);\r\n\t\treturn dailyReportsService.getDailyReportsInfo(project,release);\r\n } \r\n\t\t\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ In Catch\");\r\n\t\t\tlog.error(\"Exception ocurred : \",e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected Void doInBackground(Integer... params) {\n try {\n\n Intent itnt = getIntent();\n String url = getResources().getString(R.string.jobServiceUrl) + \"statistics/getTehnologyTrend?\" + itnt.getStringExtra(\"searchParams\");\n\n// String url = \"http://192.168.1.1:8080/webService/statistics/getTehnologyTrend?tehnologyIds=1,3,6,4,7,10,13&startDate=2014-08-03&endDate=2015-03-03\";\n\n RestService rs = new RestService();\n\n monthlyTrendsList = new ArrayList<MonthlyTrend>();\n monthlyTrendsList = rs.getList(url, MonthlyTrend[].class);\n\n\n } catch (Exception e) {\n Log.e(\"JobListActivity\", e.getMessage(), e);\n }\n\n return null;\n }", "private void parseJson() {\n \t\t// TODO Auto-generated method stub\n\n \t\ttry {\n// \t\t\tWeatherDetail wD = new WeatherDetail();\n// \t\t\tJSONObject jObj_cityname=jObj.getJSONObject(\"city\");\n// \t\t\twD.setname(jObj_cityname.getString(\"name\"));\n// \t\t\twD.setcountry(jObj_cityname.getString(\"country\"));\n \t\t\tJSONArray jArry = jObj.getJSONArray(\"list\");\n \t\t\tfor (int i = 0; i < jArry.length(); i++) {\n \t\t\t\t// put in loop for all elements\n \t\t\t\tc3.add(Calendar.DATE, i+1);\n \t\t\t\td2=c3.get(Calendar.DAY_OF_WEEK);\n \t\t\t\tswitch(d2){\n \t\t\t\tcase 1:\n \t\t\t\t\tday=\"Sun\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 2:\n \t\t\t\t\tday=\"Mon\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 3:\n \t\t\t\t\tday=\"Tues\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 4:\n \t\t\t\t\tday=\"Wed\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 5:\n \t\t\t\t\tday=\"Thurs\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 6:\n \t\t\t\t\tday=\"Fri\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 7:\n \t\t\t\t\tday=\"Sat\";\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tForecastDetail fD = new ForecastDetail();\n \t\t\tJSONObject jObj_cityname=jObj.getJSONObject(\"city\");\n \t\t\tfD.setday(day);\n \t\t\tfD.setdate(df3.format(c3.getTime()));\n \t\t\tfD.setname(jObj_cityname.getString(\"name\"));\n \t\t\tfD.setcountry(jObj_cityname.getString(\"country\"));\n \t\t\t\tJSONObject json_MSG = jArry.getJSONObject(i);\n \t\t\t\tJSONObject temp_MSG = json_MSG.getJSONObject(\"temp\");\n \t\t\t\tfD.setmin(temp_MSG.getDouble(\"min\"));\n \t\t\t\tfD.setmax(temp_MSG.getDouble(\"max\"));\n \t\t\t\tfD.setmorn(temp_MSG.getDouble(\"morn\"));\n \t\t\t\tfD.seteve(temp_MSG.getDouble(\"eve\"));\n \t\t\t\tfD.setpressure(json_MSG.getDouble(\"pressure\"));\n \t\t\t\tfD.sethumidity(json_MSG.getDouble(\"humidity\"));\n \t\t\t\tJSONArray jArry2 = json_MSG.getJSONArray(\"weather\");\n \t\t\t\tJSONObject json_MSG2=jArry2.getJSONObject(0);\n \t\t\t\tfD.setmain(json_MSG2.getString(\"main\"));\n \t\t\t\tfD.setdescription(json_MSG2.getString(\"description\"));\n \t\t\t\tfD.seticon(json_MSG2.getString(\"icon\"));\n \t\t\t\tc3.add(Calendar.DATE, -(i+1));\n \t\t\t\tmessages.add(fD);\n \t\t\t\t//\n \t\t\t}\n \t\t} catch (JSONException e) {\n \t\t\t// TODO: handle exception\n \t\t} catch (Exception e) {\n \t\t\t// TODO: handle exception\n\n \t\t}\n\n \t}", "@JavascriptInterface\n public float[] getData() {\n float[]mis;\n int i,k;\n mis[0]=misC;\n for(k=0;k<12;k++){\n for (i=0;i<(k+1)*misC;i++){\n mis[k*i+1]=misure[i][k];\n }\n }\n\n return mis; // JS non ha gli array bidimensionali !!!!\n }", "@RequestMapping(\"/generateReport\")\n\tpublic String generateReportforLoc(){\n\t\tList<Object[]> data=service.getLocWiseCount();\n\t\tString path=context.getRealPath(\"/\");\n\t\tlocUtil.generatePieChart(path, data);\n\t\tlocUtil.generateBarChart(path, data);\n\t\treturn \"LocReport\";\n\t}", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "@RequestMapping(\"/lista-de-eventos\")\n\tpublic ModelAndView listarEventos() {\n\t\tModelAndView mv = new ModelAndView(\"eventos/lista-de-eventos\");\n\t\t\n\t\t// lista de eventos\n\t\tIterable<Evento> eventos = er.findAll();\n\t\t\n\t\t// passando pra view. O primeiro parametro\n\t\t// eh aquele definido na view, ${}\t\t\n\t\tmv.addObject(\"eventos\", eventos);\n\t\t\n\t\treturn mv;\t\n\t}", "public void getRegionalMapData(final String mRegion,final String mWeek){\n mSTKCRegionalMapData = new STKCRegionalMapData() {\n @Override\n protected void onPostExecute(String results) {\n //dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject obj = new JSONObject(results);\n if(obj.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n\n Log.e(\"Regional MapData\", \"\"+results);\n\n JSONArray res = obj.getJSONArray(\"results\");\n\n String[] drugs = new String[res.length()];\n\n for(int i= 0; i< res.length();i++){\n JSONArray array = res.getJSONArray(i);\n data.add(new AutoTabFragment.CustomDataEntry(array.getString(0), array.getString(3), (float) array.getDouble(1)));\n }\n map = AnyChart.map();\n //Choropleth series = map.choropleth(getData());\n map.geoData(\"anychart.maps.uganda\");\n map.interactivity().selectionMode(SelectionMode.NONE);\n map.padding(0, 0, 0, 0);\n\n Choropleth series = map.choropleth(data);\n LinearColor linearColor = LinearColor.instantiate();\n linearColor.colors(new String[]{ \"#ADFF2F\", \"#FFFF00\", \"#FF0000\", \"#bf0000\"});\n series.colorScale(linearColor);\n series.hovered()\n .fill(\"#f48fb1\")\n .stroke(\"#f99fb9\");\n series.selected()\n .fill(\"#c2185b\")\n .stroke(\"#c2185b\");\n /*series.labels().enabled(true);\n series.labels().fontSize(10);\n series.labels().fontColor(\"#212121\");\n series.labels().format(\"{%Value}\");*/\n series.tooltip()\n .useHtml(true)\n .format(\"function() {\\n\" +\n \" return '<span style=\\\"font-size: 13px\\\">' + this.value + ' %</span>';\\n\" +\n \" }\");\n\n\n\n anyChartView.addScript(\"file:///android_asset/uganda.js\");\n anyChartView.addScript(\"file:///android_asset/proj4.js\");\n anyChartView.setChart(map);\n\n\n Log.e(\"here GraphData 2\", \"\"+res.length());\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mSTKCRegionalMapData.execute(mRegion, mWeek);\n\n }", "@RequestMapping(value=\"/indexManager.go\", method={RequestMethod.GET})\r\n public String indexShow(HttpServletRequest req) {\r\n \r\n int n = service.guestcount();\r\n req.setAttribute(\"n\", n);\r\n \r\n int t = service.hostcount();\r\n req.setAttribute(\"t\", t);\r\n \r\n RowBounds rowBounds = new RowBounds(0, 3); \r\n \r\n List<HashMap<String, Object>> indexguestqnaList = service.Showindexguestqna(rowBounds); \r\n List<HashMap<String, Object>> indexhostqnaList = service.Showindexhostqna(rowBounds);\r\n List<HashMap<String, Object>> indexnoticeList = service.Showindexnotice(rowBounds);\r\n \r\n // 인덱스 페이지에 나타내기 위해서 년도를 받아오자\r\n GregorianCalendar today = new GregorianCalendar(); \r\n int year = today.get(today.YEAR);\r\n \r\n // 인덱스 페이지에 그래프 뽑아오기\r\n String Graphyear = req.getParameter(\"year\");\r\n // System.out.println(\"year : \" + Graphyear);\r\n \r\n // 인덱스 해당 년의 총 수입 뽑아오기\r\n HashMap<String, String> map = new HashMap<String, String>();\r\n map.put(\"Graphyear\", Graphyear);\r\n \r\n int totalincome = service.totalincome(map);\r\n \r\n // 오늘 접속자 수 구하기\r\n int jintianCount = service.jintianCount();\r\n \r\n // 지구본에 들어갈 Q&A 가져오기\r\n List<HashMap<String, Object>> LingqnaList = service.ShowqnaList(); \r\n \r\n // 알람 누르지 않은 갯수 구하기\r\n int LingCount = service.LingCount();\r\n \r\n req.setAttribute(\"indexguestqnaList\", indexguestqnaList); \r\n req.setAttribute(\"indexhostqnaList\", indexhostqnaList);\r\n req.setAttribute(\"indexnoticeList\", indexnoticeList);\r\n req.setAttribute(\"year\", year);\r\n req.setAttribute(\"Graphyear\", Graphyear);\r\n req.setAttribute(\"totalincome\", totalincome);\r\n req.setAttribute(\"jintianCount\", jintianCount);\r\n req.setAttribute(\"LingqnaList\", LingqnaList);\r\n req.setAttribute(\"LingCount\", LingCount);\r\n \r\n return \"Manager/index.tilesM\";\r\n }", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "@RequestMapping(\"/add\")\n public ModelAndView add(@RequestParam(\"t1\") int i, @RequestParam(\"t2\") int j , HttpServletRequest request, HttpServletResponse response){\n int k=i+j;\n// session.setAttribute(\"result\",k);\n ModelAndView mv = new ModelAndView();\n mv.addObject(\"result\",k);\n mv.setViewName(\"display\");\n\n return mv;\n }", "@RequestMapping(value = \"get_history_by_users\",headers=\"Accept=*/*\", method={RequestMethod.GET},produces=\"application/json\")\n\t@ResponseBody\n\t@org.codehaus.jackson.map.annotate.JsonView(HistoryPair.class)\n\tpublic HistoryPair[] getHistoryByUser(@RequestParam(\"entity\") String username){\n\t\t//:TODO your implementation\n\t\tHistoryPair hp = new HistoryPair(\"aa\", new Date());\n\t\tSystem.out.println(\"ByUser \"+hp);\n\t\treturn new HistoryPair[]{hp};\n\t}", "@GetMapping(\"/Scheduling\")\r\n\tpublic String getScheduling(Model model) {\r\n\t\tList<Scheduling> scheduling = schedulingService.getSchedules();\r\n\t\tmodel.addAttribute(\"scheduling\", scheduling);\r\n\t\treturn \"scheduling\";\r\n\t}", "public List<TempWTask> getTaskList(){return taskList;}", "@RequestMapping(\"/admin/dashboard\")\n\tpublic ModelAndView admin(@ModelAttribute(\"user\") User user, HttpServletRequest request,Principal principle,HttpSession session, Model model) {\n\t\t\n\t\t\n\t\t\n\t\tint reports[] = new int[10];\n int count = 0;\n int num = assetRepository.countAssetId(count);\n\n \n\n model.addAttribute(\"num\", num);\n\n \n\n String status = \"Sent To Reporting Manager\";\n \n \n\n List<Report> reportlist = reportService.getuniqueid(status);\n model.addAttribute(\"assetId\", reportlist);\n\n int count1 = 0;\n int num1 = assetRepository.countApproved(count1);\n model.addAttribute(\"num1\", num1);\n \n String status1 = \"Approved\";\n List<Report> pendingforhr = reportService.getuniqueidpending(status1);\n model.addAttribute(\"pendingforhr\", pendingforhr);\n \n \n\n Map<String, String> map = new LinkedHashMap<>();\n \t\t\n \t\t\n\t\t String userName = principle.getName();\n\t\t User currentUser =this.userRepository.getUserByEmail(userName);\n\t\t \n\t\t try {\n\t\t \n\t\t User existing =userService.findByEmail(user.getTypeofuser());\n\t\t \n\t\t if (existing.equals(\"HR\"))\n\t\t \n\t\t { HttpSession httpSession=request.getSession();\n\t\t httpSession.setAttribute(\"role\", \"HR\"); }\n\t\t \n\t\t else {\n\t\t \n\t\t HttpSession httpSession=request.getSession();\n\t\t httpSession.setAttribute(\"role\", \"USER\"); } } catch(Exception e) {\n\t\t \n\t\t } \n\t\t\tsession.setAttribute(\"empid\", userName);\n\t\t System.out.println(session.getAttribute(\"empid\"));\n\t\t session.setAttribute(\"role\", currentUser.getTypeofuser());\n\t\t session.setAttribute(\"name\", currentUser.getFullname());\n\t\treturn new ModelAndView(\"/admin/dashboard\");\n\t}", "public ModelAndView findHolidayList(HttpServletRequest request, HttpServletResponse response) {\n\t\tHashMap<String, Object> model = new HashMap<String, Object>();\n\t\tresponse.setContentType(\"application/json; charset=UTF-8\");\n\t\ttry {\n\t\t\tout = response.getWriter();\n\n\t\t\tArrayList<HolidayTO> holidayList = baseServiceFacade.findHolidayList();\n\t\t\tHolidayTO holito = new HolidayTO();\n\t\t\tmodel.put(\"holidayList\", holidayList);\n\t\t\tmodel.put(\"emptyHoilday\", holito);\n\t\t\tmodel.put(\"errorMsg\", \"success\");\n\t\t\tmodel.put(\"errorCode\", 0);\n\n\t\t\tJSONObject jsonObject = JSONObject.fromObject(model);\n\t\t\tout.println(jsonObject);\n\t\t\tSystem.out.println(jsonObject);\n\n\t\t} catch (IOException ioe) {\n\t\t\tlogger.fatal(ioe.getMessage());\n\t\t\tString viewname = \"redirect:welcome.html\";\n\t\t\tmodel.clear();\n\t\t\tmodel.put(\"errorMsg\", ioe.getMessage());\n\t\t\tmodelAndView = new ModelAndView(viewname, model);\n\t\t} catch (DataAccessException dae) {\n\t\t\tlogger.fatal(dae.getMessage());\n\t\t\tmodel.clear();\n\t\t\tmodel.put(\"errorCode\", -1);\n\t\t\tmodel.put(\"errorMsg\", dae.getMessage());\n\t\t\tJSONObject jsonObject = JSONObject.fromObject(model);\n\t\t\tout.println(jsonObject);\n\t\t} finally {\n\t\t\tout.close();\n\t\t}\n\t\treturn modelAndView;\n\t}", "@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 }", "@RequestMapping(\"/equipmentsCalibrationRpt\")\r\n\tpublic String equipmentsCalibrationRpt(Map<String, Object> model) {\n\r\n\t\treturn \"equipmentsCalibrationRpt\";\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n //String nombre = request.getParameter(\"nombre\");\r\n String nombre_articulo = request.getParameter(\"nombre_articulo\");\r\n System.out.println(nombre_articulo);\r\n //List<String> tallasPorArt = InventariosController.getTallasPorArticulo(nombre_articulo);\r\n// Gson gson = new Gson();\r\n// String json = gson.toJson(tallasPorArt);\r\n// PrintWriter out = response.getWriter();\r\n// out.println(json);\r\n // System.out.println(tallasPorArt.size());\r\n \r\n }", "@RequestMapping(value = \"/deploy/bladelogic/collect\", method = GET, produces = APPLICATION_JSON_VALUE)\n\tpublic List<Deployment> BladeLogicData() {\n\t\tList<Deployment> deploys = null;\n\t\tObjectMapper objectMapper = null;\n\t\tobjectMapper = new ObjectMapper();\n\t\tobjectMapper.configure(Feature.AUTO_CLOSE_SOURCE, true);\n\t\ttry {\n\t\t\tURL url = new URL(\"http://localhost:8083/collect\");\n\t\t\tDeployment[] temp = objectMapper.readValue(url, Deployment[].class);\n\t\t\tdeploys = Arrays.asList(temp);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getClass().getSimpleName());\n\t\t}\n\t\treturn deploys;\n\t}", "public static void ObtenerDatosHistorial_Nutricion(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/HistorialNutri\";//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 }", "@GetMapping(path = \"/lenker\", produces = \"application/json\")\n public String getAllHandlebars(Model model) {\n //der benötigte REST API Endpoint\n String url = \"https://www.maripavi.at/produkt/lenkertyp\";\n //Objekte aus der JSON response als String parsen\n String[] objects = restTemplate.getForObject(url, String[].class);\n\n Lenkertyp[] lenker = new Lenkertyp[objects.length];\n int i = 0;\n\n for(Object object : objects) {\n Lenkertyp temp = new Lenkertyp(object.toString());\n lenker[i] = temp;\n i++;\n }\n\n //Attribut durch Model verfügbar für View machen\n model.addAttribute(\"lenker\", Arrays.asList(lenker));\n //Angabe der Zieladresse im Templateordner für Thymeleaf\n return \"lenker\";\n }", "@RequestMapping(value=\"/allProducts\")\r\npublic ModelAndView getProductByCategory(ModelAndView model,@RequestParam(\"categoryid\") String categoryid) throws IOException\r\n{\r\n\tList<Product> allProducts=userService.getProductByCategory(categoryid);\r\n\t model.addObject(\"allProducts\",allProducts);\r\n model.setViewName(\"productsavailable\");\r\n return model;\r\n}", "private void getJSON(){\n class GetJSON extends AsyncTask<Void,Void,String> {\n\n ProgressDialog loading;\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n loading = ProgressDialog.show(getActivity(),\"Fetching Data\",\"Wait...\",false,false);\n }\n\n @Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n loading.dismiss();\n JSON_STRING = s;\n showDashBoard();\n }\n\n @Override\n protected String doInBackground(Void... params) {\n RequestHandler rh = new RequestHandler();\n String s = rh.sendGetRequestParam(Config.URL_GET_DASHBOARD,listingId);\n return s;\n }\n }\n GetJSON gj = new GetJSON();\n gj.execute();\n }", "@RequestMapping(value =\"/order_status\", method = RequestMethod.GET)\n public String orderStatus(ModelMap model){\n logger.info(\"*** OrderController - orderStatus ***\");\n String customerName = \"BookMan\";\n List<Order> orderHistoryList= orderService.findOrderHistory(customerName);\n model.put(\"orderHistory\",orderHistoryList);\n return \"order_history\";\n }", "@GetMapping(\"/horario/mostrarLista\")\n\tpublic List<Horario> mostrarHorarioLista() {\n List<Horario> IsHorario = null;\n try\n {\n IsHorario = horarioServicio.listarHorarios();\n }\n catch (Exception e)\n {\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"No se pudieron listar los veterinarios..\");\n }\n return IsHorario;\n\t}", "@RequestMapping( value = \"/chart\", method = RequestMethod.GET)\n public ModelAndView chart(@RequestParam (\"chosenDate\") String chosenDate) {\n rememberDate = chosenDate;\n ModelAndView mv = new ModelAndView(\"chart\");\n CanvasjsChartData chartDataObject = new CanvasjsChartData();\n List<List<Map<Object, Object>>> canvasjsDataList = chartDataObject.getCanvasjsDataList();\n mv.addObject(\"dataPointsList\", canvasjsDataList);\n mv.addObject(\"chosenDate\", chosenDate);\n return mv;\n }", "@Override\n protected Void doInBackground(Void... params) {\n modelvar = new ArrayList<ModelVar>();\n // Create an array to populate the spinner\n modelvarlist = new ArrayList<String>();\n // JSON file URL address\n jsonobject = JSONfunctions\n .getJSONfromURL(Config.URL_GET_MODEL_LIST);\n\n try {\n // Locate the NodeList name\n jsonarray = jsonobject.getJSONArray(\"model\");\n for (int i = 0; i < jsonarray.length(); i++) {\n jsonobject = jsonarray.getJSONObject(i);\n\n ModelVar modelvarOpt = new ModelVar();\n\n modelvarOpt.setId(jsonobject.optInt(\"id\"));\n modelvarOpt.setName(jsonobject.optString(\"name\"));\n\n modelvar.add(modelvarOpt);\n\n // Populate spinner with country names\n modelvarlist.add(jsonobject.optString(\"name\"));\n\n }\n } catch (Exception e) {\n Log.e(\"Error\", e.getMessage());\n e.printStackTrace();\n }\n return null;\n }", "@RequestMapping(\"/viewproducts\") \r\n public ModelAndView viewproducts(){ \r\n List<Product> list=productDao.getAllProducts();\r\n return new ModelAndView(\"viewproducts\",\"list\",list); \r\n }", "public void getTempData(){\r\n ts.GetTemplateRecords();\r\n }", "@Override\n\t\tprotected Void doInBackground(Void... params)\n\t\t{\n\n\t\t\tJSONObject jObject = json.getJSONFromURL(URL_API);\n\t\t\tlistTempatMakan = json.getTempatMakanAll(jObject);\n\t\t\treturn null;\n\t\t}", "@RequestMapping(value = \"/EventJour\")\n\t\tpublic List<Events> getEventsParDate() {\n\t\t\treturn eventDAO.getEventsParDate();\n\t\t}", "@RequestMapping(value = \"/getAllTripSheet\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic String getAllTripSheet(HttpServletRequest request) {\n \t\tList<TripSheetDetailsBean> tripSheets=tripSheetDetailsService.findAllTripSheets();\n \t\t\n// \t\tfor(TripSheetDetailsBean bean:tripSheets) {\n//\t\t\tList<EmpCabRequestDetails> cabDeatils = cabRequestService.findCabRequestByTripId(bean.getTripId());\n//\t\t\tfor(EmpCabRequestDetails details:cabDeatils) {\n//\t\t\t\tif(details.getIsEscort())\n//\t\t\t\t{\n//\t\t\t\t\tbean.setEscortName(details.getEscortName());\n//\t \t\t\t\tbean.setIsEscort(details.getIsEscort());\n//\t \t\t\t\tbreak;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t\t//bean.setEmpCabRequestDetails(cabDeatils);\n//\t\t\t\n//\t\t}\n \t\t\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\tobjectMapper.enable(SerializationFeature.INDENT_OUTPUT);\n\t\tString arrayToJson = null;\n\t\ttry {\n\t\t\tarrayToJson = objectMapper.writeValueAsString(tripSheets);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"List Of TripSheet \"+ arrayToJson);\n\t\tSystem.out.println(\"executed successfully\");\n\t\treturn arrayToJson;\n\t}", "@RequestMapping(value = \"/medication/{id}\")\n public String medicationDetection(@PathVariable(\"id\") Integer visitId,Model model) {\n // Getting List of All diagnosis in System \n List<Medication> signedMedications=medicationService.getSignedMedications();\n List<Medication> unSignedMedications=medicationService.getUnSignedMedications();\n //// Model Attributes \n model.addAttribute(\"signedMedications\", signedMedications);\n model.addAttribute(\"unSignedMedications\", unSignedMedications);\n model.addAttribute(\"visitId\",visitId);\n // return View\n return PACKAGE_ROOT+\"prescriptions\";\n }", "@RequestMapping(value = \"/vacantrooms\", method = RequestMethod.GET)\n public ArrayList<Room> vacantRooms(){\n ArrayList<Room> listroom = DatabaseRoom.getVacantRooms();\n return listroom;\n }", "@Override\n protected void onPostExecute(String result) {\n\n JSONArray ja = null;\n try {\n ja = new JSONArray(result);\n\n id_equi_1_par=(ja.getString(0));\n traer_notificaciones_partido();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(Notificacion_partido.this, \"Error\", Toast.LENGTH_LONG).show();\n\n }\n\n }", "@PostMapping(\"/testResults\")\n public ModelAndView showTestResults(@RequestParam(\"result\") String resultJson) {\n ModelAndView modelAndView = new ModelAndView(\"testResultsPage\");\n if (resultJson == null) {\n modelAndView.addObject(MESSAGE_KEY, \"Test results were null\");\n } else {\n try {\n ObjectMapper mapper = new ObjectMapper();\n TestResult results = mapper.readValue(resultJson, TestResult.class);\n modelAndView.addObject(\"testResults\", results);\n system = null;//NOPMD\n } catch (IOException e) {\n modelAndView.addObject(MESSAGE_KEY, \"Could not create Test Result object\");\n }\n }\n return modelAndView;\n }", "@RequestMapping(value=\"/list\", method=RequestMethod.GET)\r\n\tpublic HashMap<String, Object> getAll(){\r\n\t\t\r\n\t\tHashMap<String, Object> h = new HashMap<String, Object>();\r\n\t\tList<JuridictionGroupe> jGroupes = jGRep.findAll();\r\n\t\th.put(\"message\", \"success\");\r\n\t\th.put(\"list_juridiction_groupe\", jGroupes);\r\n\t\th.put(\"status\", 0);\r\n\t\treturn h;\r\n\t}", "public List<WTask> getTaskList(){return taskList;}", "@RequestMapping(\"/timer-period\")\n public String timerPeriod() {\n return \"Ok\";\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 }", "@RequestMapping(value=\"/main1\") \n public String main(Model model,Integer start){\n int count=allpageService.getCount();\n System.out.println(count);\n //List<page> pages1=allpageService.getOne((start-1)*8, 8);//start是页数\n model.addAttribute(\"count\",count);//总数\n //model.addAttribute(\"pages\",pages);\n // model.addAttribute(\"pages1\",pages1);//一页\n return \"main\"; \n }", "@Override\n public String getAllTaskTaskType(String typeId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByTaskType(typeId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@RequestMapping(value = \"/figureAssignment\", method = RequestMethod.GET)\n public ModelAndView getFigureAssignment(@RequestParam(\"ctype\") String ctype, HttpServletRequest req, HttpServletResponse resp) {\n\n List<CourseEntity> courses = userDao.findAllCourse();\n List<AssignmentEntity> assignments = new ArrayList<>();\n if (ctype == null) {\n// System.out.println(\"ctype now is : \" + ctype);\n ctype = courses.get(0).getCtype();\n assignments = userDao.findAllAssignment(ctype);\n } else {\n// System.out.println(\"ctype now is : \" + ctype);\n assignments = userDao.findAllAssignment(ctype);\n }\n List<AssignmentEntity> assignmentsPublished = new ArrayList<>();\n List<AssignmentEntity> assignmentsEnd = new ArrayList<>();\n List<AssignmentEntity> assignmentsFinished = new ArrayList<>();\n List<AssignmentEntity> assignmentsScoring = new ArrayList<>();\n List<AssignmentEntity> assignmentsScored = new ArrayList<>();\n for (int i = 0; i < assignments.size(); i++) {\n switch (assignments.get(i).getState()) {\n case \"Published\":\n assignmentsPublished.add(assignments.get(i));\n break;\n case \"End\":\n assignmentsEnd.add(assignments.get(i));\n break;\n case \"Finished\":\n assignmentsFinished.add(assignments.get(i));\n break;\n case \"Scoring\":\n assignmentsScoring.add(assignments.get(i));\n break;\n case \"Scored\":\n assignmentsScored.add(assignments.get(i));\n break;\n }\n }\n\n ModelAndView mv = new ModelAndView(\"/root/figureAssignment\");\n mv.addObject(\"sid\", \"root\");\n mv.addObject(\"courses\", courses);\n mv.addObject(\"ctype\", ctype);\n mv.addObject(\"assignments\", assignments);\n mv.addObject(\"assignmentsPublished\", assignmentsPublished);\n mv.addObject(\"assignmentsEnd\", assignmentsEnd);\n mv.addObject(\"assignmentsFinished\", assignmentsFinished);\n mv.addObject(\"assignmentsScoring\", assignmentsScoring);\n mv.addObject(\"assignmentsScored\", assignmentsScored);\n\n\n System.out.println(\"TEST*******************\");\n\n return mv;\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n Koneksi webreq = new Koneksi();\n// Making a request to url and getting response\n String jsonStr = webreq.makeWebServiceCall(url, Koneksi.GET);\n Log.d(\"Response: \", \"> \" + jsonStr);\n studentList = ParseJSON(jsonStr);\n return null;\n }", "private void getWeekActiveTimeData(String accessToken) {\r\n String[] taskParams = new String[3];\r\n\r\n taskParams[0] = accessToken;\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n // Fairly active and very active minutes are added to get active minutes total\r\n taskParams[1] = \"https://api.fitbit.com/1/user/-/activities/minutesFairlyActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n taskParams[2] = \"https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\";\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "@Override\n public void callBack(String response) {\n JSONObject object = null, objectData = null;\n JSONArray jsonArr = null, jsonArr1 = null;\n try {\n object = new JSONObject(response);\n objectData = object.getJSONObject(\"dataset\");\n jsonArr = objectData.getJSONArray(\"data\");\n for (int i = 0; i < jsonArr.length(); i++) {\n jsonArr1 = jsonArr.getJSONArray(i);\n MapChart mapChart = new MapChart();\n mapChart.setX(jsonArr1.getString(0));\n mapChart.setY(jsonArr1.get(1).toString());\n mapCharts.add(mapChart);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n generateTempoData();\n swipeRefreshLayout.setRefreshing(false);\n }", "@Override\n protected String[][] doInBackground(String... params) {\n if (params.length == 0) {\n return null;\n }\n\n String url = params[0];\n\n URL MovieRequestUrl = NetworkUtils.buildUrl(url);\n\n try {\n\n String jsonWeatherResponse = NetworkUtils\n .getResponseFromHttpUrl(MovieRequestUrl);\n\n\n String[][] simpleJsonWeatherData = OpenMovieJsonUtils\n .getSimpleMovieStringsFromJson(jsonWeatherResponse );\n\n return simpleJsonWeatherData;\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n\n }", "@GetMapping(\"/activity/{category}\")\n Stats getStats(@PathVariable(value = \"category\") StatsCategory category) {\n Stats stats = new Stats();\n log.info(\"getting all activity\");\n List<Activity> allActivity = repository.findAll();\n Collections.sort(allActivity);\n Map<String, Integer> stepsByCategory = new TreeMap<String, Integer>();\n switch (category) {\n case DAILY:\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.DAY_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = DAY + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n break;\n case WEEKLY:\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.WEEK_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = WEEK + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n break;\n case MONTHLY:\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.MONTH);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = MONTH + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n break;\n default:\n break;\n }\n List<Details> details = new ArrayList<Stats.Details>();\n if(stepsByCategory != null) {\n for (Entry entry : stepsByCategory.entrySet()) {\n Details stat = stats.new Details();\n stat.key = entry.getKey().toString();\n stat.steps = entry.getValue().toString();\n details.add(stat);\n }\n stats.setDetails(details);\n }\n //stats.setStepsByCategory(stepsByCategory);\n stats.setCategory(category);\n return stats;\n }", "public void getPaedCommodSTKA(final String mUid,final String mYear, final String mWeekNo){\n mCombComdtySTKC = new CombComdtySTKC() {\n @Override\n protected void onPostExecute(String results) {\n // dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject objAdults = new JSONObject(results);\n if(objAdults.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n Log.e(\"here CombData\", \"\"+results);\n JSONArray mRes = objAdults.getJSONArray(\"results\");\n\n String[] weeks = new String[mRes.length()];\n\n for(int i= 0; i< mRes.length();i++){\n JSONArray array = mRes.getJSONArray(i);\n ClientRisk.add(new BarEntry(i+1, array.getInt(2)));\n StockoutRates.add(new Entry(i+1,(float) array.getDouble(1)));\n ReportingRates.add(new Entry(i+1, (float) array.getDouble(3)));\n weeks[i] = array.getString(0);\n\n }\n Collections.sort(ClientRisk, new EntryXComparator());\n Collections.sort(StockoutRates, new EntryXComparator());\n Collections.sort(ReportingRates, new EntryXComparator());\n mChart.setDrawGridBackground(true);\n mChart.setDrawBarShadow(false);\n mChart.setClickable(false);\n mChart.setHighlightFullBarEnabled(false);\n // draw bars behind lines\n mChart.setDrawOrder(new CombinedChart.DrawOrder[]{\n CombinedChart.DrawOrder.BAR, CombinedChart.DrawOrder.LINE\n });\n\n mChart.setOnTouchListener(new View.OnTouchListener(){\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return false;\n }\n });\n //Set the Legends Orientation\n Legend l = mChart.getLegend();\n l.setWordWrapEnabled(true);\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.BOTTOM);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.CENTER);\n l.setOrientation(Legend.LegendOrientation.HORIZONTAL);\n\n //Set Right And Left Axis\n YAxis rightAxis = mChart.getAxisRight();\n rightAxis.setDrawGridLines(false);\n rightAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n //rightAxis.setAxisMaximum(80000f);\n\n YAxis leftAxis = mChart.getAxisLeft();\n leftAxis.setDrawGridLines(false);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n leftAxis.setAxisMaximum(80f);\n\n //Set X-Axis Lables\n XAxis xAxis = mChart.getXAxis();\n xAxis.setAxisMinimum(0f);\n xAxis.setGranularity(1f);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(weeks));\n xAxis.setLabelRotationAngle(45);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularityEnabled(true);\n xAxis.setLabelCount(12);\n\n\n\n CombinedData combdata = new CombinedData();\n combdata.setData(generateLineData());\n combdata.setData(generateLineData2());\n combdata.setData(generateBarData());\n xAxis.setAxisMaximum(combdata.getXMax() + 0.25f);\n mChart.setData(combdata);\n mChart.invalidate();\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mCombComdtySTKC.execute(mUid,mYear,mWeekNo);\n\n }", "@GetMapping(\"/{symbol}/{date}\")\n public ModelAndView daily(@PathVariable(\"symbol\") String symbol, @PathVariable(\"date\") String date) throws ParseException {\n\n Date sdf = new SimpleDateFormat(\"yyyy-MM-dd\").parse(date);\n\n String beginOfTheMonth = date.substring(0, 7) + \"-00\";\n String endOfTheMonth = date.substring(0,7) + \"-31\";\n Map<String, Object> model = new HashMap<>();\n\n try{\n String[] resp = quoteRepository.daily(symbol, sdf).split(\",\");\n Double closingResp = quoteRepository.closingDay(symbol, sdf);\n String[] monthResp = quoteRepository.monthly(symbol, beginOfTheMonth, endOfTheMonth).split(\",\");\n Double closingMonth = quoteRepository.closingMonth(symbol, beginOfTheMonth, endOfTheMonth);\n\n DayRecord dr = new DayRecord(Double.parseDouble(resp[0]), Double.parseDouble(resp[1]), Integer.parseInt(resp[2]), date, symbol);\n DayRecord mr = new DayRecord(Double.parseDouble(monthResp[0]), Double.parseDouble(monthResp[1]), Integer.parseInt(monthResp[2]), beginOfTheMonth, symbol);\n\n model.put(\"daily\", dr);\n model.put(\"closing\", closingResp);\n model.put(\"monthly\", mr);\n model.put(\"closingMonthly\", closingMonth);\n\n\n return new ModelAndView(\"main\", model);\n\n } catch (Exception e) {\n return new ModelAndView(\"error\", model);\n }\n }", "@RequestMapping(value = \"/tiempos/\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic List<TiempoSensado> getTiempos(){\n\t\treturn tiemposensadoRepository.findAll();\n\t}", "@ResponseBody\r\n\t@GetMapping(\"/getBO\")\r\n\t//public String BOCreation(){\r\n\tpublic List<BOCreation> getBOCreation(){\r\n\t\t \r\n\t\tBOCreationJDBCTemplate boJDBCTemplate = new BOCreationJDBCTemplate();\r\n\t\tboJDBCTemplate.setDataSource();\r\n\t\t List<BOCreation> bos = boJDBCTemplate.listBOs();\r\n\t\t System.out.println(\"bos returned\" +bos.size());\r\n\t \r\n\t \r\n\t return bos;\r\n\t}", "@RequestMapping(value = { \"/\" }, method = RequestMethod.GET)\n\t/**\n\t * \n\t * @param jsonObject\n\t * @param map\n\t * @param request\n\t * @return String hipDashboard\n\t */\n\tpublic String hipDashboard(@Valid @ModelAttribute(\"jsonObject\") final String jsonObject, final ModelMap map,\n\t\t\tfinal HttpServletRequest request) {\n\n\t\ttry {\n\t\t\tArrayList<String> pltList = this.hipService.getPlatform();\n\t\t\tmap.addAttribute(\"pltList\", pltList);\n\t\t}\n\n\t\tcatch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"/index\";\n\t}", "@RequestMapping(\"/sortDate\")\n\tpublic ModelAndView statusBydate(@RequestParam Long id,@RequestParam (name=\"start\") String start,\n\t\t\t@RequestParam (name=\"end\") String end)\n\t{\n\t\t ModelAndView mv= new ModelAndView(\"userDetail\");\n\t\t LocalDate start1=LocalDate.parse(start);\n\t\t LocalDate end1=LocalDate.parse(end);\n\n\t\t long daysBetween= ChronoUnit.DAYS.between(start1,end1);\n\t\t if(daysBetween<2)\n\t\t {\n\t\t\t mv= new ModelAndView(\"redirect:/userDetails\");\n\t\t\t mv.addObject(\"errorInApp\",true);\n\t\t\t mv.addObject(\"id\",id);\n\t\t\t return mv;\n\t\t }\n\n\n\t\t Optional <User> user = userService.findByid(id);\n\t\t Optional <UserExtra> userEx = userService.findExtraByid(id);\n\t\t List<Git> git=gitServ.findGitOfUserBetween(userEx.get(),start1,end1);\n\t\t List<Hackathon> hack=hackServ.findHackathonOfUserBetween(userEx.get(),start1,end1);\n\n\t\t if(git.size()!=0)\n\t\t {\n\t\t\t Iterator<Git> it=git.iterator();\n\t\t\t while (it.hasNext())\n\t\t\t{\n\t\t\t\tGit object = (Git)it.next();\n\t\t\t\tLong mar= object.getMark();\n\t\t\t\t mv.addObject(\"git\",mar);\n\t\t\t }\n\t\t}\n\t\tif(hack.size()!=0)\n\t\t{\n\t\t\tIterator<Hackathon> i=hack.iterator();\n\t\t\twhile (i.hasNext())\n\t\t\t{\n\t\t\t\tHackathon object = (Hackathon)i.next();\n\t\t\t\tLong mark = object.getMark();\n\t\t\t\tmv.addObject(\"hack\",mark);\n\t\t\t }\n\t\t\t//mark.add(hack.get(m));\n\t\t\t//mv.addObject(\"hack\",mark);\n\t\t}\n\t\t List<Leave> leave = leaveSer.findLeavesOfUserBetween(userEx.get(),start1,end1);\n\t\t List<Leave> auth=new ArrayList<Leave>();\n\t\t List<Leave> unauth=new ArrayList<Leave>();\n\t\t for(int i=0;i<leave.size();i++)\n\t\t {\n\t\t\t if(leave.get(i).getType().equals(\"Authorized\"))\n\t\t\t {\n\t\t\t\t auth.add(leave.get(i));\n\t\t\t }\n\t\t\t if(leave.get(i).getType().equals(\"NonAuthorized\"))\n\t\t\t {\n\t\t\t\t unauth.add(leave.get(i));\n\t\t\t }\n\t\t }\n\t\t mv.addObject(\"auth\",auth);\n\t\t mv.addObject(\"unauth\",unauth);\n\n\t\t List<LateArrival> lateAll=lateServ.findAllLate(id);\n\t\t List<LateArrival> late = new ArrayList<LateArrival>();\n\t\t for(int i=0;i<lateAll.size();i++)\n\t\t {\n\t\t\t Instant insta =lateAll.get(i).getReachedTime();\n\t\t\t LocalDate localdate = insta.atZone(ZoneId.systemDefault()).toLocalDate();\n\t\t\tif(isWithinRange(localdate,start1,end1)==true)\n\t\t\t{\n\t\t\t\tlate.add(lateAll.get(i));\n\t\t\t}\n\t\t }\n\n\t\t List<LocalDateTime> time=new ArrayList<LocalDateTime>();\n\t\t for(int i=0;i<late.size();i++)\n\t\t {\n\t\t\t Instant in=late.get(i).getReachedTime();\n\t\t\t LocalDateTime t= LocalDateTime.ofInstant(in,ZoneId.systemDefault());\n\t\t\t time.add(t);\n\t\t }\n\n\t\t UserExtraDTO dto=getUser(user.get(),userEx.get());\n\t\t mv.addObject(\"employee\",dto);\n\t\t long days= ChronoUnit.DAYS.between(start1,end1);\n\t\t long total=(days*7);\n\n\t\t List<LateArrival> a=new ArrayList<LateArrival>();\n\t\t List<LateArrival> un=new ArrayList<LateArrival>();\n\t\t for(int i=0;i<late.size();i++)\n\t\t {\n\t\t\t if(late.get(i).getType().equals(\"Authorized\"))\n\t\t\t {\n\t\t\t\t a.add(late.get(i));\n\t\t\t }\n\t\t\t if(late.get(i).getType().equals(\"NonAuthorized\"))\n\t\t\t {\n\t\t\t\t un.add(late.get(i));\n\t\t\t }\n\t\t }\n\t\t if(!userEx.get().getImageContentType().isEmpty())\n\t\t {\n\t\t\t String image=Base64.getEncoder().encodeToString(userEx.get().getImage());\n\t\t\t mv.addObject(\"image\",image);\n\t\t }\n\t\t int l=((auth.size())+(unauth.size()));\n\t\t long absence=l*7;\n\t\t long workedHour=(total-absence);\n\n\t\t List<ReportStatus> status=reportServ.findAllReport(id);\n\t\t List<ReportStatus> unreportdays=new ArrayList<ReportStatus>();\n\t\t for(int i=0;i<status.size();i++)\n\t\t {\n\t\t\t Instant insta =status.get(i).getReportingTime();\n\t\t\t LocalDate localdate = insta.atZone(ZoneId.systemDefault()).toLocalDate();\n\t\t\tif(isWithinRange(localdate,start1,end1)==true)\n\t\t\t{\n\t\t\t\tunreportdays.add(status.get(i));\n\t\t\t}\n\t\t }\n\n\t\tAppraisal appraisal=appraisalService.getOneAppraisal(id);\n\t\tmv.addObject(\"appraisal\",appraisal);\n\t\t mv.addObject(\"a\",a);\n\t\t mv.addObject(\"un\",un);\n\t\t mv.addObject(\"time\",time);\n\t\t mv.addObject(\"day\",days);\n\t\t mv.addObject(\"total\",total);\n\t\t mv.addObject(\"workedHour\",workedHour);\n\t\t mv.addObject(\"unreportdays\",unreportdays);\n\t\t Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\t boolean isAdmin=authentication.getAuthorities().stream().anyMatch(r -> r.getAuthority().equals(\"ROLE_ADMIN\"));\n\t\t boolean isUser=authentication.getAuthorities().stream().anyMatch(r -> r.getAuthority().equals(\"ROLE_USER\"));\n\t\t if(isAdmin)mv.addObject(\"isAdmin\",true);\n\t\t if(isUser)mv.addObject(\"isUser\",true);\n\t\t return mv ;\n }" ]
[ "0.60028636", "0.57868016", "0.5651633", "0.5636404", "0.55499756", "0.55280274", "0.54931736", "0.54669815", "0.54450965", "0.53857344", "0.5372914", "0.535391", "0.5348399", "0.53179955", "0.52522737", "0.52444065", "0.5215396", "0.52049255", "0.5203458", "0.51985645", "0.51935023", "0.51783144", "0.5137665", "0.5111293", "0.5104175", "0.50938505", "0.50711656", "0.5061396", "0.5061124", "0.5055471", "0.505487", "0.50532305", "0.5027499", "0.5017684", "0.50140566", "0.5000802", "0.49865505", "0.4976248", "0.49719656", "0.49702036", "0.49701208", "0.4966441", "0.49618444", "0.4945802", "0.4942978", "0.4939343", "0.49383998", "0.49183282", "0.49167678", "0.49133158", "0.49095657", "0.49068674", "0.49053127", "0.49007934", "0.48932853", "0.4881509", "0.4877967", "0.48743725", "0.487245", "0.4867719", "0.48567638", "0.4855008", "0.48468244", "0.4839113", "0.48383597", "0.48369843", "0.48327962", "0.48259556", "0.48254094", "0.4824243", "0.48237127", "0.48216972", "0.4818305", "0.48173836", "0.4812022", "0.4809212", "0.4803729", "0.4791873", "0.47915465", "0.47895318", "0.47814792", "0.4777829", "0.47673813", "0.47653872", "0.47644338", "0.4761821", "0.47562373", "0.47532022", "0.4744968", "0.4741094", "0.4740703", "0.47391754", "0.47353518", "0.47325134", "0.47255018", "0.47250512", "0.47145352", "0.47110277", "0.47083864", "0.47071338" ]
0.50309944
32
save the task info to DB
private Integer saveTask(Integer taskid,String taskname,String tasktype,String taskcontent, String taskcomment){ return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }", "public void saveTask() {\r\n if (validateTask(textFieldName, textFieldDescription, textFieldDueDate, comboPriority)) {\r\n if (myTask == null) {\r\n myTask = new Task(textFieldName.getText(), textFieldDescription.getText(),\r\n LocalDate.parse(textFieldDueDate.getText()),\r\n Priority.valueOf(Objects.requireNonNull(comboPriority.getSelectedItem()).toString()));\r\n } else {\r\n myTask.setName(textFieldName.getText());\r\n myTask.setDescription(textFieldDescription.getText());\r\n myTask.setDueDate(LocalDate.parse(textFieldDueDate.getText()));\r\n myTask.setPriority(Priority.valueOf(Objects.requireNonNull(\r\n comboPriority.getSelectedItem()).toString()));\r\n }\r\n myTodo.getTodo().put(myTask.getHashKey(), myTask);\r\n todoListGui();\r\n }\r\n }", "@Override\r\n\tpublic void save(ExecuteTask executeTask) {\n\t\tString sql = \"INSERT INTO executetask(et_member_id,et_task_id,et_comments) VALUES(?,?,?)\";\r\n\t\tupdate(sql,executeTask.getMemberId(),executeTask.getTaskId(),executeTask.getComments());\r\n\t}", "@Override\n public void saveTask(TaskEntity task) {\n this.save(task);\n }", "private void saveTasks() {\n try {\n Writer writer = new Writer(new File(TASKS_FILE));\n for (Task t1: todoList.getListOfTasks()) {\n writer.write(t1);\n }\n writer.close();\n System.out.println(\"Tasks saved to file \" + TASKS_FILE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to save tasks to \" + TASKS_FILE);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "public void saveTask (View view) {\n \t\n \tTask task = gatherTaskInfo();\n \t//calls to crowd sourcer only if a task is returned\n \tif(task != null) {\n \t\tnew saveTask().execute(task);\t\t\n \t} \t\n }", "public void saveData(ArrayList<Task> tasks) {\r\n try {\r\n writeToFile(tasks);\r\n } catch (IOException exception) {\r\n ui.printIoExceptionErrorMessage(exception);\r\n }\r\n }", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "@Override\r\n public void save(DiagramTask task)\r\n {\r\n try\r\n {\r\n TASK_DAO.addTask(task);\r\n addMessage(\"Success!\", \"Task added correctly.\");\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n\r\n }", "public void saveTasks() {\n try {\n BufferedWriter taskWriter = new BufferedWriter(new FileWriter(path));\n String tasks = \"\";\n for (Task task : TaskList.getTaskLists()) {\n tasks += task.toSaveString() + \"\\n\";\n }\n taskWriter.write(tasks);\n taskWriter.close();\n } catch (IOException e) {\n System.out.println(\"Sorry Boss, \" + e.getMessage());\n }\n }", "@Override\n\tpublic void insertTask(DetailedTask dt) throws SQLException, ClassNotFoundException\n\t{\n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t\t Statement stmt = null;\n\t\t \n\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t\t c.setAutoCommit(false);\n\t\t \n\t\t logger.info(\"Opened database successfully (insertTask)\");\n\n\t\t stmt = c.createStatement();\n\t\t String sql = \"INSERT INTO task (status, id, description, strasse, plz, ort, latitude, longitude,\"\n\t\t + \" typ, information, auftragsfrist, eingangsdatum, items, hilfsmittel, images) \"\n\t\t + \"VALUES ('\"+dt.getStatus()+\"', \"+dt.getId()+\", '\"+dt.getDescription()+\"', '\"\n\t\t +dt.getStrasse()+\"', \"+dt.getPlz()+\", '\"+dt.getOrt()+\"', \"+dt.getLatitude()+\", \"\n\t\t +dt.getLongitude()+\", '\"+dt.getType()+\"', '\"+dt.getInformation()+\"', \"+dt.getAuftragsfrist()\n\t\t +\", \"+dt.getEingangsdatum()+\", '\"+gson.toJson(dt.getItems())+\"', '\"\n\t\t +gson.toJson(dt.getHilfsmittel())+\"', '\"+dt.getImages()+\"' );\";\n\n\t\t stmt.executeUpdate(sql);\n\n\t\t stmt.close();\n\t\t c.commit();\n\t\t c.close();\n\t\t \n\t\t logger.info(\"Task inserted successfully\");\n\t }", "public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}", "public void save(TaskList tasks) throws DukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n\n for (Task task : tasks.getTaskList()) {\n String output = StorageSerializer.serialize(task);\n writer.write(output);\n }\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening file for saving\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "public void addTask(Task task){\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID, task.getId());\n values.put(KEY_LABEL, task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "public void saveTaskList(TaskList taskList) throws ChandlerException {\n try {\n FileWriter fileWriter = new FileWriter(filePath);\n for (int i = 0; i < taskList.getSize(); i++) {\n Task currTask = taskList.getIndex(i);\n fileWriter.write(currTask.getSavingString());\n }\n fileWriter.close();\n } catch (IOException e) {\n throw new ChandlerException(ui.saveDataError());\n }\n }", "@Override\n public void onClick(View v) {\n titleTask = txtTitle.getText().toString();\n descriptionTask = txtDescription.getText().toString();\n locationTask = txtLocation.getText().toString();\n\n\n //Also set the code to add the object to the server,\n //It should call getInfo() which will store all of the inputs into strings or ints\n\n\n //This checks to make sure the input is valid, if not will not allow the user to save to database\n if (dayPass == 0 || monthPass == 0 || yearPass == 0 || titleTask == null || descriptionTask == null || startMinute == 0 || startHour == 0)\n Toast.makeText(AddTask.this, \"Incorrect input, please try again\", Toast.LENGTH_SHORT).show();\n else {\n if(MainActivity.groupview)\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), MainActivity.group.getGroupID(), new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n else\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), \"\", new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n //MainActivity.dh.readBlock(MainActivity.user.getUserID(), \"\", \"04202019\");\n Toast.makeText(AddTask.this, \"Task saved to your calendar\", Toast.LENGTH_LONG).show();\n Intent intentHome = new Intent(AddTask.this,\n MainActivity.class);\n startActivity(intentHome);\n }\n\n }", "public String addTask(TasksModel obj)\n\t{\n\t\t\tString memo=\"\"; \n\t\t\tif(obj.getMemo()!=null)\n\t\t\t{\n\t\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setMemo(memo);\n\t\t\t\n\t\t\tString commnets=\"\"; \n\t\t\tif(obj.getComments()!=null)\n\t\t\t{\n\t\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setComments(commnets);\n\t\t\t\t\n\t\t\tString stepsToReproduce=\"\"; \n\t\t\tif(obj.getTaskStep()!=null)\n\t\t\t{\n\t\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setTaskStep(stepsToReproduce);\n\t\t\t\n\t\t query=new StringBuffer();\t\t \n\t\t query.append(\" Insert into tasks (taskID,createDate,expectedDateTofinsh,toBeReminderIn,createdUser,taskNo,tasktype,taskName,steps,linkid,customerrefKey,projectrefKey,servicerefKey,assignedUser,ccemployeeKey,priorityrefKey,estTime,memo,actualTime,status,usercomments,hourOrDays,customerType,reminderDate,createdAutomaticFeedback,customerNameFeedback,feedBackKey)\");\n\t\t query.append(\" values(\"+obj.getTaskid()+\",'\"+sdf.format(obj.getCreationDate())+\"','\"+sdf.format(obj.getExpectedDatetofinish())+\"',\"+obj.getRemindIn()+\",\" + obj.getCreatedUserID()+\",'\"+obj.getTaskNumber()+\"',\"+obj.getTaskTypeId()+\",'\"+obj.getTaskName()+\"',\");\n\t\t query.append(\"'\"+obj.getTaskStep()+\"',\"+obj.getPrviousTaskLinkId()+\",\"+obj.getCustomerRefKey()+\",\"+obj.getProjectKey()+\",\"+obj.getSreviceId()+\",\"+obj.getEmployeeid()+\",\"+obj.getCcEmployeeKey()+\",\"+obj.getPriorityRefKey()+\",\");\n\t\t query.append(\"\"+obj.getEstimatatedNumber()+\",'\"+obj.getMemo()+\"',\"+obj.getActualNumber()+\",\"+obj.getStatusKey()+\",'\"+obj.getComments()+\"','\"+obj.getHoursOrDays()+\"','\"+obj.getClientType()+\"','\"+sdf.format(obj.getReminderDate())+\"','\"+obj.getCreatedAutommaticTask()+\"','\"+obj.getCustomerNamefromFeedback()+\"',\"+obj.getFeedbackKey()+\")\");\n\t\t return query.toString();\n\t}", "int insertTask(TaskInfo taskInfo);", "public String addTaskDetails(TasksModel obj)\n\t{\n\t\t\tString memo=\"\"; \n\t\t\tif(obj.getMemo()!=null)\n\t\t\t{\n\t\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setMemo(memo);\n\t\t\t\n\t\t\tString commnets=\"\"; \n\t\t\tif(obj.getComments()!=null)\n\t\t\t{\n\t\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setComments(commnets);\n\t\t\t\t\n\t\t\tString stepsToReproduce=\"\"; \n\t\t\tif(obj.getTaskStep()!=null)\n\t\t\t{\n\t\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setTaskStep(stepsToReproduce);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance(); \n\t\t\tTimestamp timestamp = new Timestamp(cal.getTimeInMillis());\n\t\t\t\n\t\t query=new StringBuffer();\t\t \n\t\t query.append(\" Insert into TaskDetails (taskID,actualTime,status,usercomments,DateTime,UserId)\");\n\t\t query.append(\" values(\"+obj.getTaskid()+\",\"+obj.getActualNumber()+\",\"+obj.getStatusKey()+\",'\"+obj.getComments()+\"','\"+timestamp+\"',\"+obj.getCreatedUserID()+\")\");\n\t\t return query.toString();\n\t}", "public void save(List<Task> tasks) throws IOException {\n FileWriter writer = new FileWriter(path.toString());\n // Writing tasks into disk\n for (Task task : tasks) {\n String line = \"\";\n int done = task.hasDone() ? 1 : 0;\n String description = task.getDescription();\n String tag = task.getTag();\n // Saving tasks to disk in specific format\n switch (task.getType()) {\n case TODO:\n line = String.format(\"T---%d---%s---%s\", done, description, tag);\n break;\n case DEADLINE:\n case EVENT:\n int idx = description.indexOf('/');\n String activity = description.substring(0, idx - 1);\n String timing = description.substring(idx);\n line = formatTask(task, done, activity, timing, tag);\n break;\n default:\n break;\n }\n writer.write(line + \"\\n\");\n }\n writer.close();\n }", "@RequestMapping(value=\"savetask\")\r\n\tpublic ModelAndView savetask(HttpServletResponse response, Integer taskid,\r\n String taskname,String tasktype,String taskcontent,String taskcomment){\n\t\tInteger ref = saveTask(taskid,taskname,taskname,taskcontent,taskcomment);\r\n\t\tref = ref+1;\r\n\t\tSystem.out.println(taskname);\r\n \r\n\t\t//mv.addObject(\"taskid\",taskid);\r\n\t\t\r\n\t\t//mv.addObject(\"list\",jarr);\r\n\t\t\r\n\t\treturn index(response,null,null,null,null,null,null,null);\r\n\t}", "void saveTrip(Trip parTrip);", "@Override\n\tpublic void save(Object o) {\n\t\tem.getTransaction().begin();\n\t\tem.persist((Projecttask) o);\n\t\tem.getTransaction().commit();\n\n\t}", "private void saveNewTask(int taskId, int catId) {\n Task task = new Task();\n task.setCategoryId(catId);\n task.setTaskId(taskId);\n task.setTaskContent(mTaskContent.getText().toString());\n task.setDueDate(dueDate);\n if (setReminder)\n task.setReminder(1);\n else\n task.setReminder(0);\n task.setStatus(0);\n task.setTaskTitle(mTaskTile.getText().toString());\n task.save();\n if (setReminder)\n setAlarm(task);\n }", "public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }", "private static void saveEntity(TaskViewModel node, StorableFactory<Task> taskFactory) throws DatabaseException {\n Task dto = Infrastructure.getInstance().getTaskMapper().toDto(node);\n taskFactory.create(dto);\n // after creation in db id will be set\n node.setId(dto.getId());\n for (TaskViewModel child : node.getChildren()) {\n saveEntity(child, taskFactory);\n }\n }", "public void onSaveButtonClicked() {\n String description = mEditText.getText().toString();\n Date date = new Date();\n\n final DiaryEntry entry = new DiaryEntry(description, date);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n if (mEntryId == DEFAULT_ENTRY_ID) {\n // insert new task\n mDb.entryDao().insertEntry(entry);\n } else {\n //update task\n entry.setId(mEntryId);\n mDb.entryDao().updateEntry(entry);\n }\n finish();\n }\n });\n }", "public void save(TaskList taskings) {\n\n try {\n FileWriter fw = new FileWriter(\"./data/duke.txt\");\n for (Task task : taskings) {\n String listOfTasks = task.toString() + System.lineSeparator();\n fw.append(listOfTasks);\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Cannot save data to disk!\");\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void saveself(DataTaxTask entity) {\n\t\tcommonDao.saveOrUpdate(entity);\n\t\t\n\t}", "public static void ser(ArrayList<Task> taskList) {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"taskList.ser\"); // create a space for serializing the ArrayList object\n ObjectOutputStream out = new ObjectOutputStream(fileOut); // object for serializing the ArrayList object\n out.writeObject(taskList); // writing/serializing the ArrayList object (has all the user's task variables)\n out.close(); // closing the serializing object\n fileOut.close(); // closing the serialized file\n System.out.println(\"Tasks saved.\"); // printing that the save was successful\n } catch (IOException ioe) { \n System.err.println(\"Java IO Exception: \" + ioe);\n }\n }", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "@Transactional\n\tpublic void saveItemTask(MaintenanceRequestTask maintenanceRequestTask){\n\t\tmaintenanceRequestTaskDAO.save(maintenanceRequestTask);\n\t}", "int insert(Task record);", "@Test\n public void insertTaskAndGetTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When getting the tasks from the database\n List<Task> tasks = mDatabase.taskDao().getTasks();\n\n // There is only 1 task in the database\n assertThat(tasks.size(), is(1));\n // The loaded data contains the expected values\n assertTask(tasks.get(0), \"id\", \"title\", \"description\", true);\n }", "@Override\n\t\tprotected String doInBackground(Task... arg0) {\n\t\t\tString taskID = TfTaskRepository.addTask(arg0[0], \n\t\t\t getApplicationContext());\n\t\t\t\n\t\t\ttaskID = taskID + \"\\n\";\n\t\t\t\n\t\t\t//saving the ID local\n\t\t\tlt.saveTaskId(taskID, getApplicationContext());\n\t\t\t\n\t\t\treturn null;\n\t\t}", "public void save();", "public void save();", "public void save();", "public void save();", "long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n double time;\n\n ContentValues values = new ContentValues();\n values.put(KEY_INFO, task.getInfo()); // task info\n if (task.calendarExists()) {\n time = task.getCalendar().getTimeInMillis();\n } else {\n time = 0;\n }\n values.put(KEY_CALENDAR, time); // Task calendar\n values.put(KEY_LATITUDE, task.getLatitude());\n values.put(KEY_LONGITUDE, task.getLongitude());\n\n // Inserting Row\n long id;\n id = db.insert(TABLE_TASKS, null, values);\n Log.d(TAG, \"ID: \" + Long.toString(id));\n db.close(); // Closing database connection\n return id;\n }", "public long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName()); // task name\n // status of task- can be 0 for not done and 1 for done\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // Inserting Row\n long task_id= db.insert(TABLE_TASKS, null, values);\n // insert row\n\n return task_id;\n\n }", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "public void addTask(View v) {\n int taskId = Integer.parseInt(txtId.getText().toString());\n String tskName = txtTaskName.getText().toString();\n String taskDesc = txtTaskDescription.getText().toString();\n ContentValues values = new ContentValues();\n values.put(\"taskId\", taskId);\n values.put(\"taskName\", tskName);\n values.put(\"taskDescription\", taskDesc);\n try {\n taskManager.addTask(values);\n Toast.makeText(this, \"Data Inserted\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "int insert(_task record);", "public int addTask(Task task) {\n\t\treturn (Integer)getHibernateTemplate().save(task);\n\t}", "public void createTask(Task task) {\n ContentValues values = new ContentValues();\n values.put(SQLiteHelper.COLUMN_NAME, task.getName());\n database.insert(SQLiteHelper.TABLE_TASKS, null, values);\n }", "public void upload(){\n put(\"Title\",title);\n put(\"Location\",location);\n put(\"DateMonth\", dateMonth);\n put(\"DateDay\", dateDay);\n put(\"DateYear\",dateYear);\n put(\"StartHour\",startHour);\n put(\"StartMinute\", startMinute);\n put(\"EndHour\", endHour);\n put(\"EndMinute\", endMinute);\n put(\"NumGoing\",numGoing);\n put(\"Description\",description);\n put(\"Category\",category);\n put(\"Author\", author);\n put(\"Contact\", contact);\n put(\"Attending\", attending);\n saveInBackground();\n }", "private void processTask(Task task) throws SQLException, DaoException {\n if (!task.isChanged()) {\n processTaskList(task.getSubTaskList());\n return;\n }\n\n if (task.isForDeletion()) {\n deleteTask(task);\n return;\n } else if (task.getId() != -1) {\n updateTask(task);\n } else {\n insertTask(task);\n }\n\n processTaskList(task.getSubTaskList());\n\n }", "private Task persistTaskAndSolution(Task task, int[] solution) {\n\t\ttask = Solution.updateSolutionAndStatus(task, solution);\n\t\ttasksRepository.save(task);\n\t\treturn task;\n\t}", "private void save() {\n Saver.saveTeam(team);\n }", "public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }", "public void updateTaskDetailsInDB(UniverseDefinitionTaskParams taskParams) {\n getRunnableTask().setTaskDetails(RedactingService.filterSecretFields(Json.toJson(taskParams)));\n }", "protected abstract void doSave();", "public void saveToDB() {\n \twipeDB();\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tfor (int i = 0; i < wallpapers.size(); i++) {\n\t\t\tvalues.put(EventDataSQLHelper.NODE, nodeToString(wallpapers.get(i)));\n\t\t\ttry {\t\t\t\t\n\t\t\t\tdb.insertOrThrow(EventDataSQLHelper.TABLE, null, values);\n\t\t\t\tLog.d(\"AddToDB\", nodeToString(wallpapers.get(i)));\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLog.d(\"AddToDB\", \"\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\tdb.close();\n }", "public void save() {\t\n\t\n\t\n\t}", "public void saveFile(TaskList tasklist) {\n try {\n String cwd = System.getProperty(\"user.dir\");\n FileWriter fw = new FileWriter(cwd + filePath);\n for (Task task : tasklist.getTasks()) {\n String data = task.getData();\n fw.write(data + System.lineSeparator());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n }\n\n }", "void save();", "void save();", "void save();", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public static void writeFile(List<Task> database) {\r\n assert database != null: \"Storage.writeFile(): database cannot be null\";\r\n File dir = new File(\"./tmp/data\");\r\n try {\r\n FileWriter fw = new FileWriter(new File(dir, \"storage.txt\"));\r\n for (Task task : database) {\r\n assert task != null: \"Storage.writeFile(): task to be added cannot be null\";\r\n fw.write(task.serialize() + \"\\n\");\r\n }\r\n fw.close();\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}", "public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter recipe description.\");\n txtDesc.requestFocus();\n } else if (AppUtil.isEmpty(txtIng.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter ingredient/s.\");\n txtIng.requestFocus();\n } else if (AppUtil.isEmpty(txtSteps.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter preparation steps.\");\n txtSteps.requestFocus();\n } else {\n try {\n if (MainActivity.checkNetwork(mainActivity)) {\n SaveAsyncTask task = new SaveAsyncTask();\n task.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public static boolean insertTask(Task task){\n try{\n String query = \"INSERT INTO TASK VALUES (?,?,?,?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, task.getName()); // Add task's name to the statement\n statement.setString(2, task.getColor().toString()); // Add task's colour to the statement\n statement.setString(3, \"false\"); // Task completion variable will always be false when a new task is created/added.\n statement.setString(4, task.getDate().toString()); // Add task's date to the statement\n int result = statement.executeUpdate(); // send out the statement\n return (result > 0);\n } catch (SQLException e) { // If the task wasn't able to be added\n e.printStackTrace(); // Create alert for If the task was unable to be added\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to add new task.\");\n alert.showAndWait();\n }\n return false;\n }", "public void writeData(TaskList tasks) throws IOException {\n FileWriter fw = new FileWriter(file);\n String tmpTxt = \"\";\n\n if (tasks.getSize() > 0) {\n for (int i = 0; i < tasks.getSize() - 1; i++) {\n tmpTxt = tmpTxt + tasks.getDukeList().get(i).format() + \"\\n\";\n }\n tmpTxt = tmpTxt + tasks.getDukeList().get(tasks.getSize() - 1).format();\n }\n\n fw.write(tmpTxt);\n fw.close();\n }", "public void saveClicked(View actionView)\n {\n \t//If ID is empty it is a new Task\n \tif( taskId.getText().length() > 0 )\n \t{\n \t\tupdateTask();\n \t}\n \t//If ID exists it is updating an existing task\n \telse\n \t{\n \t\tnewTask();\n \t}\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tsuper.onCreate(savedInstanceState);\n \n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_new_task);\n \n nameText = (EditText) findViewById(R.id.NameBox);\n \tdatePicker = (DatePicker)findViewById(R.id.datepicker);\n \tlengthText = (EditText) findViewById(R.id.estimatedlength);\n \tprogressBar = (SeekBar) findViewById(R.id.currentprogress);\n \tpriorityBox = (CheckBox)findViewById(R.id.highpriority);\n \t\n \t// If a task was passed in, attempt to load it\n \tBundle passedData = getIntent().getExtras();\n if (passedData != null) {\n \tTask task = new Task();\n \ttask.extractBundle(passedData);\n \t\n \ttask.get(Task.Attributes.Name, nameText);\n \ttask.get(Task.Attributes.Duedate, datePicker);\n \ttask.get(Task.Attributes.Hours, lengthText);\n \ttask.get(Task.Attributes.Progress, progressBar);\n \ttask.get(Task.Attributes.Priority, priorityBox);\n \t\n \tid = passedData.getLong(\"DB_ID\");\n \teditmode = true;\n } \n \t\n Button save = (Button) findViewById(R.id.save);\n\t\tsave.setOnClickListener(new OnClickListener() { public void onClick(View v) { saveTask();} } );\n \n }", "public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);", "public void store() throws IOException, SQLException {\r\n \r\n /* Project section */\r\n final HashMap<Object, Object> projectdata = new HashMap<Object, Object>(8);\r\n \r\n if(project == null){\r\n \t// The title \r\n projectdata.put(ProjectAccessor.TITLE, title);\r\n // Create the project database object.\r\n final ProjectAccessor newProject = new ProjectAccessor(projectdata);\r\n newProject.persist(conn);\r\n projectid = (Long) newProject.getGeneratedKeys()[0];\r\n } else {\r\n \tprojectid = project.getProjectid();\r\n }\r\n }", "public static void writeFile(ArrayList<Task> taskArrayList) throws IOException, DukeException {\n String dataPath = new File(\"saved_data/tasks.txt\").getAbsolutePath();\n StringBuilder fullString = new StringBuilder();\n\n for(Task task : taskArrayList) {\n if (task instanceof ToDo) {\n ToDo todo = (ToDo) task;\n String todoString = todo.getTypeIcon() + \"|\" + todo.isDone + \"|\"\n + todo.description + System.lineSeparator();\n fullString.append(todoString);\n } else if (task instanceof Event) {\n Event event = (Event) task;\n String eventString = event.getTypeIcon() + \"|\" + event.isDone + \"|\"\n + event.description + \"|\" + event.at + System.lineSeparator();\n fullString.append(eventString);\n } else if (task instanceof Deadline) {\n Deadline deadline = (Deadline) task;\n String deadlineString = deadline.getTypeIcon() + \"|\" + deadline.isDone + \"|\"\n + deadline.description + \"|\" + deadline.by + System.lineSeparator();\n fullString.append(deadlineString);\n } else {\n throw new DukeException();\n }\n }\n\n FileWriter fw = new FileWriter(dataPath);\n fw.write(String.valueOf(fullString));\n fw.close();\n }", "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 }", "private void saveData() {\n }", "public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "public void saveToDoList() {\n try {\n jsonWriter.open();\n jsonWriter.write(toDoList);\n jsonWriter.close();\n\n System.out.println(\"Saved \" + toDoList.getName() + \" to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "private void DataCreator() {\n\t\t// Creation of employees\n\t\tEmployee emp1 = new Employee(\"Akos\", \"Toth\", true);\n\t\tEmployee emp2 = new Employee(\"Gabor\", \"Kovacs\", true);\n\t\tEmployee emp3 = new Employee(\"Adam\", \"Ciceri\", true);\n\n\t\tempRep.save(emp1);\n\t\tempRep.save(emp2);\n\t\tempRep.save(emp3);\n\t\tLOGGER.info(\"TEST DATA: Employees saved!\");\n\n\t\t// creation of tasks\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\n\t\ttry {\n\t\t\tTaskStates task1State = new TaskStates(\"CLOSED\");\n\t\t\tProjectTask task1 = new ProjectTask(\n\t\t\t\t\t\"Modelling of system\",\n\t\t\t\t\t\"Engineering Systems Analyst\",\n\t\t\t\t\t\"Engineering Systems Analyst Dorking Surrey Salary ****K Our client is located in Dorking, Surrey and are looking for Engineering Systems Analyst our client provides specialist software development Keywords Mathematical Modelling, Risk Analysis, System Modelling, Optimisation, MISER, PIONEEER Engineering Systems Analyst Dorking Surrey Salary ****K\",\n\t\t\t\t\ttask1State,\n\t\t\t\t\tsdf.parse(\"20-01-2015\"),\n\t\t\t\t\tsdf.parse(\"25-01-2015\"),\n\t\t\t\t\t0.9);\n\t\t\tTaskStates task2State = new TaskStates(\"OPEN\");\n\t\t\tProjectTask task2 = new ProjectTask(\n\t\t\t\t\t\"Material performance design\",\n\t\t\t\t\t\"Stress Engineer Glasgow\",\n\t\t\t\t\t\"Stress Engineer Glasgow Salary **** to **** We re currently looking for talented engineers to join our growing Glasgow team at a variety of levels. The roles are ideally suited to high calibre engineering graduates with any level of appropriate experience, so that we can give you the opportunity to use your technical skills to provide high quality input to our aerospace projects, spanning both aerostructures and aeroengines. In return, you can expect good career opportunities and the chance for advancement and personal and professional development, support while you gain Chartership and some opportunities to possibly travel or work in other offices, in or outside of the UK. The Requirements You will need to have a good engineering degree that includes structural analysis (such as aeronautical, mechanical, automotive, civil) with some experience in a professional engineering environment relevant to (but not limited to) the aerospace sector. You will need to demonstrate experience in at least one or more of the following areas: Structural/stress analysis Composite stress analysis (any industry) Linear and nonlinear finite element analysis Fatigue and damage tolerance Structural dynamics Thermal analysis Aerostructures experience You will also be expected to demonstrate the following qualities: A strong desire to progress quickly to a position of leadership Professional approach Strong communication skills, written and verbal Commercial awareness Team working, being comfortable working in international teams and self managing PLEASE NOTE SECURITY CLEARANCE IS REQUIRED FOR THIS ROLE Stress Engineer Glasgow Salary **** to ****\",\n\t\t\t\t\ttask2State,\n\t\t\t\t\tsdf.parse(\"20-06-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\t\t\tTaskStates task3State = new TaskStates(\"IN_PROGRESS\");\n\t\t\tProjectTask task3 = new ProjectTask(\n\t\t\t\t\t\"Implementation embedded system\",\n\t\t\t\t\t\"CNC Programmer\",\n\t\t\t\t\t\"Working within a small but busy sub contract ISO accredited sub contract machine shop. Must be able to programme straight from drawings programming and operating a Bridgeport VMC or a Haas VMC with Heidenhain controls. Machining 1 off,s to small batch work. Hours of work are Mon Thurs 8am 5.00pm and 3.00pm finish on a Friday\",\n\t\t\t\t\ttask3State,\n\t\t\t\t\tsdf.parse(\"20-03-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\n\t\t\ttaskStatesRep.save(task1State);\n\t\t\ttaskStatesRep.save(task2State);\n\t\t\ttaskStatesRep.save(task3State);\n\t\t\t\n\t\t\tprjTaskRep.save(task1);\n\t\t\tprjTaskRep.save(task2);\n\t\t\tprjTaskRep.save(task3);\n\t\t\tLOGGER.info(\"TEST DATA: Tasks and task statuses saved!\");\n\t\t\t\n\t\t\t// creation of project\n\t\t\tProject prj1 = new Project(\"Building modernization\", sdf.parse(\"01-01-2015\"), sdf.parse(\"01-09-2015\"), 0.9, 0.1, true);\n\t\t\tTaskSet tskSet1 = prj1.assignTaskToEmployee(emp1, task1);\n\t\t\tTaskSet tskSet2 = prj1.assignTaskToEmployee(emp2, task2);\n\t\t\tTaskSet tskSet3 = prj1.assignTaskToEmployee(emp3, task3);\n\t\n\t\t\ttaskSetRep.save(tskSet1);\n\t\t\ttaskSetRep.save(tskSet2);\n\t\t\ttaskSetRep.save(tskSet3);\n\t\t\tLOGGER.info(\"TEST DATA: Task sets are saved!\");\n\t\n\t\t\tprjRep.save(prj1);\n\t\t\tLOGGER.info(\"TEST DATA: Projects are saved!\");\n\t\t\t\n\t\t\t//creation of Performance statistics\n\t\t\tPerfStat emp1PerfStat = new PerfStat(prj1, emp1, 10, 5, 0, 100);\n\t\t\tPerfStat emp2PerfStat = new PerfStat(prj1, emp2, 5, 15, 6, 170);\n\t\t\tPerfStat emp3PerfStat = new PerfStat(prj1, emp3, 0, 6, 3, 20);\n\t\t\t\n\t\t\tperfStatRep.save(emp1PerfStat);\n\t\t\tperfStatRep.save(emp2PerfStat);\n\t\t\tperfStatRep.save(emp3PerfStat);\n\t\t\tLOGGER.info(\"TEST DATA: Project and employee assignments are saved!\");\n\n\t\t\t\n\t\t\tLOGGER.info(\"TEST DATA: Upload of TEST employee, task and project data is FINISHED!\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public UserPlanTask UserPlanTaskSave(UserPlanTask nt) {\r\n session = sf.openSession();\r\n Transaction t = null;\r\n try {\r\n t = session.beginTransaction();\r\n session.save(nt);\r\n t.commit();\r\n return nt;\r\n } catch (Throwable ex) {\r\n //Log the Exception\r\n t.rollback();\r\n System.err.println(\"Initial SessionFactory creation failed.\" + ex);\r\n throw new ExceptionInInitializerError(ex);\r\n } finally {\r\n session.close();\r\n sf.close();\r\n }\r\n }", "public void save() {\n }", "int insertDptTask(DptTaskInfo dptTaskInfo);", "public void writeToFile(TaskList tasks) {\n try {\n FileWriter fw = new FileWriter(filePath);\n for (Task t : tasks.getListOfTasks()) {\n fw.write(t.getRecordString() + \"\\n\");\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Error writing to data file.\");\n }\n }", "public abstract void persistTaskHandler() throws IOException;", "@Insert\n long insert(Task task);", "private void writeToFile(ArrayList<Task> tasks) throws IOException {\r\n FileWriter fileWriter = new FileWriter(filePath);\r\n for (Task task : tasks) {\r\n Parser fileFormatter = new ParseToFileFormat(task);\r\n String taskData = fileFormatter.getFileFormat();\r\n fileWriter.write(taskData);\r\n }\r\n fileWriter.close();\r\n }", "@Test\n public void insertTaskAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(TASK.getId());\n\n // The loaded data contains the expected values\n assertTask(loaded, \"id\", \"title\", \"description\", true);\n }", "private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "public void save(MeetingTable nt) {\n\t\tgetSession().save(nt);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "public void saveAction (){\n\t \tif(dayNum ==7){\n\t \t\tintPhaseCompletes = intPhaseCompletes +1;\n\t \t\tdb.execSQL(\"UPDATE Phases SET Completions= \"+ intPhaseCompletes + \" WHERE PhaseID = \" + \"'\" + phaseID + \"'\");\n\t \t}\n \tcontent = timerTextView.getText().toString();\n \tstrDate = functions.getDate();\n \tintCompletes = intCompletes +1;\n \tdb.execSQL(\"INSERT INTO results (ExerciseName,time,date) VALUES(\"+ \"'\" + dayName +\"'\" + \",\" \n \t\t\t+ \"'\" + content + \"'\" + \",\"+ \"'\" + strDate +\"'\"+ \")\");\n \tdb.execSQL(\"UPDATE Days SET LastDate= \"+ \"'\" + strDate + \"'\" + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.execSQL(\"UPDATE Days SET Completions= \"+ intCompletes + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.close();\n \tdialogShare();\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public void setTaskContent(Task taskObj, Boolean inbound, Map<String, Object> taskContent) {\n EntityManager eManager = null;\n ObjectOutputStream out = null; \n try {\n eManager = humanTaskEMF.createEntityManager();\n uTrnx.begin();\n \n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n out.writeObject(taskContent);\n out.close();\n byte[] byteResults = bos.toByteArray();\n \n // persist the serialized results map into Content table\n Content content = new Content();\n content.setContent(byteResults);\n eManager.persist(content); // will generate a unique id for this content by jpa\n \n ContentData contentData = new ContentData();\n contentData.setContent(byteResults);\n contentData.setAccessType(org.jbpm.task.AccessType.Inline);\n taskObj.getTaskData().setOutput(content.getId(), contentData);\n eManager.merge(taskObj);\n \n uTrnx.commit();\n log.info(\"setTaskContent() taskId = \"+taskObj.getId()+\" : inbound = \"+inbound+\" contentBytes size = \"+byteResults.length);\n } catch(Exception x) {\n throw new RuntimeException(x);\n } finally {\n if(eManager != null)\n eManager.close();\n try {\n if(out != null)\n out.close();\n }catch(Exception x){x.printStackTrace();}\n }\n }", "private void saveEvent(){\n String event_name = eventName.getText().toString();\r\n String coach = coach_string;\r\n String time = class_time_string;\r\n int nfcID= 4;\r\n\r\n Map<String, Object> data = new HashMap<>();\r\n\r\n data.put(\"event_name\", event_name);\r\n data.put(\"coach\", coach);\r\n data.put(\"class_time\", time);\r\n data.put(\"nfcID\", nfcID);\r\n\r\n Database.writeClassDb(data, time ,date);\r\n startActivity(new Intent(addCalenderEvent.this, CalendarActivity.class));\r\n finish();\r\n }", "public static void save()\n\t{\n writeMap();\n\t}", "public void save(List<Task> changed){\n\n try {\n FileWriter fw = new FileWriter(path);\n for (int i = 0; i < changed.size(); i++) {\n\n String temp = (i+1) + \".\" + changed.get(i).list() + System.lineSeparator();\n fw.write(temp);\n }\n fw.close();\n }catch(IOException e){\n e.printStackTrace();\n }\n }", "public void fetchTaskDetailsFromDB() {\n TaskInfo taskInfo = TaskInfo.getOrBadRequest(userTaskUUID);\n taskParams = Json.fromJson(taskInfo.getDetails(), UniverseDefinitionTaskParams.class);\n }", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public Long save(TaskDef taskEntity) {\n return TaskDefIntegrationService.persist(taskEntity);\n }" ]
[ "0.8149579", "0.76961726", "0.7504535", "0.7476573", "0.7357044", "0.7182301", "0.70263004", "0.69918275", "0.69566464", "0.69184804", "0.6831007", "0.671413", "0.67138547", "0.6562756", "0.655736", "0.6556667", "0.65242213", "0.65169966", "0.6503391", "0.64308584", "0.64192116", "0.63874996", "0.63711864", "0.634921", "0.63185483", "0.63120806", "0.6290215", "0.628274", "0.6261778", "0.6177038", "0.6168123", "0.6158275", "0.6152769", "0.6146014", "0.6145415", "0.61403376", "0.61116", "0.61116", "0.61116", "0.61116", "0.60898215", "0.60574746", "0.60517436", "0.60511595", "0.60455674", "0.6039131", "0.60336286", "0.603287", "0.6018199", "0.5994179", "0.59893507", "0.59882534", "0.5986824", "0.5984546", "0.5963505", "0.59525084", "0.59514725", "0.5946282", "0.5946282", "0.5946282", "0.5944156", "0.5940366", "0.59348273", "0.59256965", "0.59226143", "0.591285", "0.590973", "0.5873229", "0.5864776", "0.5859262", "0.5853131", "0.58380806", "0.58310074", "0.5827545", "0.58204347", "0.5817765", "0.58159053", "0.58156514", "0.5813915", "0.5812368", "0.5810207", "0.57910055", "0.577768", "0.5773083", "0.57726306", "0.57476187", "0.57449937", "0.5733548", "0.57272303", "0.5723022", "0.57209194", "0.57206196", "0.57092816", "0.5706735", "0.5700219", "0.5690154", "0.56880575", "0.56800324", "0.5674059", "0.56692696" ]
0.7179769
6
This solver is exhaustive, and should be used to solve sudokus. It will track multiple solutions and print them out.
@Override public boolean solve(Board board){ solve(board, 0); if(multiList.isEmpty()){ return true; } else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solveSingleSolution() {\n SPL M1 = this;\n\n int counter = 1;\n\n for(int i=0; i < this.NBrsEff; i++) {\n System.out.println(\"x\" + counter + \" = \" + M1.M[i][this.NKolEff-1]);\n this.Solusi += \"x\" + counter + \" = \" + M1.M[i][this.NKolEff-1];\n counter += 1;\n this.Solusi += \"\\n\";\n } \n }", "public void displaySolution() {\r\n Problem pb = new Problem(sources, destinations, costMatrix);\r\n pb.printProblem();\r\n Solution sol = new Solution(pb);\r\n sol.computeCost();\r\n }", "public void showDisplaySolution(Solution<Position> solution);", "@Override\n\tpublic void solve() {\n\t\tlong startTime = System.nanoTime();\n\n\t\twhile(!unvisitedPM.isEmpty()){\n\t\t\tProblemModel current = findCheapestNode();\n\t\n\t\t\tfor(ProblemModel pm : current.getSubNodes()){\n\t\t\n\t\t\t\tif(!visited.contains(pm) && !unvisitedPM.contains(pm)){\n\t\t\t\t\t\n\t\t\t\t\tunvisitedPM.add(pm);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(current.getSideStart().isEmpty()){\n\t\t\t\tSystem.out.print( \"\\n\"+ \"StartSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideStart()){\n\t\t\t\t\tSystem.out.print( \" \" +r) ;\n\t\t\t\t}\n\t\t\t\tSystem.out.print( \"\\n\" + \"EndSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideEnd()){\n\t\t\t\t\tSystem.out.print( \" \" + r);\n\t\t\t\t}\n\n\t\t\t\tprintPathTaken(current);\n\t\t\t\tSystem.out.print( \"\\n\" + \"------------done--------------\");\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tlong duration = ((endTime - startTime)/1000000);\n\t\t\t\tSystem.out.print( \"\\n\" + \"-AS1 Time taken: \" + duration + \"ms\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tvisited.add(current);\n\t\t\n\t\t}\n\t\t\n\n\t}", "public void findSolution() {\n\n\t\t// TODO\n\t}", "void solve() throws IOException {\n\t\tint n = ni();\n\t\tint[] v = new int[n];\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tv[i] = ni();\n\t\tsolve(v);\n\t\tout.println(result.size());\n\t\tfor (int a : result)\n\t\t\tout.print(a + \" \");\n\t}", "public void solution() {\n\t\t\n\t}", "public static void printSolutionTable() {\n\t\tIAWorklist.printSolutionTable();\n\n\t}", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "public static void main(String args[]) {\n\t List<int[][]> result = solveKT();\n\t for(int [][] sol: result){\n\t\t printSolution(sol);\n\t\t System.out.println();\n\t }\n }", "public static void solve(){\n try {\r\n Rete env = new Rete();\r\n env.clear();\r\n env.batch(\"sudoku.clp\");\r\n\t\t\tenv.batch(\"solve.clp\");\r\n env.batch(\"output-frills.clp\");\r\n env.batch(\"guess.clp\");\r\n env.batch(\"grid3x3-p1.clp\");\r\n\t env.eval(\"(open \\\"test.txt\\\" output \\\"w\\\")\");\r\n env.reset();\r\n env.eval(\"(assert (try guess))\");\r\n env.run();\r\n env.eval(\"(close output)\");\r\n } catch (JessException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n System.out.println(\"ok\");\r\n FileReader fr;\r\n try {\r\n int r = 0,c = 0;\r\n fr = new FileReader(\"test.txt\");\r\n Scanner sc = new Scanner(fr);\r\n \r\n while (sc.hasNextInt()){\r\n int next = sc.nextInt();\r\n int i = id[r][c];\r\n gui.setSudokuValue(i-1, next);\r\n c++;\r\n if (c >= 6){\r\n c = 0; r++;\r\n }\r\n }\r\n } catch (Exception e){\r\n }\r\n \r\n }", "void PrintWithSolution() {\n gameArea.disPlay();\n }", "void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }", "public void showDisplayHalfSolution(Solution<Position> solution);", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public void solve() {\n System.out.println(\"Solving...\");\n solving = true;\n Solver s = new Solver(b.getBoard());\n ArrayList<Integer> solution = s.solve();\n\n System.out.println(\"Printing solution...\");\n try{\n Thread.sleep(300);\n }catch (Exception e){}\n\n solution.trimToSize();\n\n solveMoves = solution;\n\n Board bRef = new Board(b.getBoard());\n\n System.out.println(\"Step 0\");\n System.out.println(bRef.toString());\n\n for (int i = 0; i < solution.size(); i++) {\n bRef.move(solution.get(i));\n System.out.println(\"Step \" + (i + 1));\n System.out.println(bRef.toString());\n }\n\n System.out.println(\"Solved by Computer in \" + solution.size()+ \" move(s).\\n\");\n System.out.println(\"Left-click screen to follow steps.\");\n System.out.println(\"Right-click the screen to play again.\");\n\n solveStep = 0; //Reset for user\n }", "public void solver(){\n\n tohSolver(noDisks,1,3,2);\n\n }", "@SuppressWarnings(\"Main Logic\")\n void solve() {\n n = ii();\n m = ii();\n a = iia(n);\n int from[] = new int[n - 1];\n int to[] = new int[n - 1];\n for (int i = 0; i < n - 1; i++) {\n from[i] = ii() - 1;\n to[i] = ii() - 1;\n }\n g = packU(n, from, to, n - 1);\n int[][] pars = parents3(g, 0);\n par = pars[0];\n int[] ord = pars[1];\n dep = pars[2];\n spar = logstepParents(par);\n subTree = new int[n];\n dfs(0, -1);\n pointer = 1;\n baseArray = new int[n + 1];\n chainNo = 0;\n chainInHead = new int[n];\n Arrays.fill(chainInHead, -1);\n posInBase = new int[n];\n chainInInd = new int[n];\n HLD(0, -1);\n makeTree();\n out.println(Arrays.toString(baseArray));\n out.println(Arrays.toString(a));\n for (int q = 0; q < m; q++) {\n int type = ii();\n if (type == 1) {\n int u = ii() - 1, v = ii() - 1;\n query(u, v);\n out.println(\"DONE\");\n } else {\n int u = ii(), v = ii();\n // update\n }\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tString folderURL = \"C:\\\\Users\\\\Administrator\\\\Google ÔÆ¶ËÓ²ÅÌ\\\\Slides\\\\CS686\\\\A2\\\\SodukoProblem\\\\problems\\\\\";\n\t\tList<String> nameList = Loader.getAllSdURLFromFolder(folderURL);\n\t\tList<Solution> record = new ArrayList<Solution>();\n\t\tfor (String name:nameList)\n\t\t{\n\t\t\t//System.out.println(name);\n\t\t\tBoard board = Loader.loadInitialBoard(name);\n\t\t\tSudokuSolver solver = SudokuSolver.getInstance();\n\t\t\tSolution solution = solver.solve(board);\n\t\t\trecord.add(solution);\n\t\t\tSystem.out.print(solution.initNum+\" \");\n\t\t\tSystem.out.print(solution.cntState+\" \");\n\t\t\t//System.out.println(solution.board);\n\t\t\tSystem.out.println(solution.isFinished?\"Finished\":\"Failed\");\n\t\t\tif (solution.cntState>0)\n\t\t\t{\n\t\t\t\tSystem.out.println(board);\n\t\t\t\tSystem.out.println(solution.board);\n\t\t\t}\n\t\t\t//if (!solution.isFinished) break;\n\t\t}\n\t\t//printStatistics(record);\n\t\t\n\t}", "static void printSolution(int sol[][]) {\n for (int x = 0; x < N; x++) {\n for (int y = 0; y < N; y++)\n System.out.print(sol[x][y] + \" \");\n System.out.println();\n }\n }", "public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}", "@Override\n public void recordSolution() {\n for (int i = 0; i < variables.length; i++) {\n values[i] = variables[i].getValue();\n }\n }", "private void solve() {\n\t\t//reads values from board\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tString value = field[i][k].getText();\n\t\t\t\tif(value.length() > 0){\n\t\t\t\t\tsudokuBoard.add(i, k, Integer.valueOf(value));\n\t\t\t\t} else {\n\t\t\t\t\tsudokuBoard.add(i, k, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(sudokuBoard.solve()){\n\t\t\t//presents the solution\n\t\t\tfor(int i = 0; i < 9; i++){\n\t\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\t\tfield[i][k].setText(String.valueOf(sudokuBoard.getValue(i, k)));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\talert.setTitle(null);\n\t\t\talert.setHeaderText(null);\n\t\t\talert.setContentText(\"The entered board has no solution\");\n\t\t\talert.showAndWait();\n\t\t}\n\t\t\n\t}", "private void print_solution() {\n System.out.print(\"\\n\");\n for (int i = 0; i < rowsCount; i++) {\n for (int j = 0; j < colsCount; j++) {\n System.out.print(cells[i][j].getValue());\n }\n System.out.print(\"\\n\");\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}", "public static void main(String[] args)\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tStringBuilder answers = new StringBuilder();\n\n\t\tanswers.append(\"PERFECTION OUTPUT\\n\");\n\t\ttry\n\t\t{\n\t\t\tint value;\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tvalue = in.nextInt();\n\t\t\t\tif (value == 0) break;\n\n\t\t\t\tanswers.append(solve(value));\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tanswers.append(\"END OF OUTPUT\");\n\n\t\tSystem.out.println(answers);\n\t}", "public void addSolution() {\n\t\tsolvable=true;\n\t\tbuffer.insert(this.toStringArray());\n\t}", "public void showSolveFrom(String message);", "public static void main(String[] args) {\n\t\tString OptionChosen = \"\";\n\n\t\tboolean didRankingHappen = false;\n\n\t\tArrayList<School> schoolArrayList = new ArrayList<School>(); // objects\n\n\t\tArrayList<Student> studentArrayList = new ArrayList<Student>();\n\t\tboolean Quit = false;\n\n\t\tint loadedStudents = 0;\n\t\tint loadedSchools = 0;\n\n\t\tSMPSolver GSS = new SMPSolver(studentArrayList, schoolArrayList, true);\n\t\tSMPSolver GSH = new SMPSolver(schoolArrayList, studentArrayList, false);\n\n\t\tdo {\n\t\t\tdisplayMenu();\n\n\t\t\tOptionChosen = getUserInput(\"Enter choice: \");\n\n\t\t\tif (checkUserInput(OptionChosen)) {\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"Q\")) {\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"Hasta luego!\");\n\t\t\t\t\tSystem.exit(0);\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"L\")) {\n\n\t\t\t\t\tdidRankingHappen = false;\n\n\t\t\t\t\tstudentArrayList.clear();\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tloadedSchools = loadSchools(schoolArrayList);\n\n\t\t\t\t\tloadedStudents = 0;\n\n\t\t\t\t\tloadedStudents = loadStudents(studentArrayList,\n\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t// Loop through and update the school's number of\n\t\t\t\t\t// participants data field real quick\n\t\t\t\t\tfor (int i = 0; i < schoolArrayList.size(); i++) {\n\t\t\t\t\t\tschoolArrayList.get(i).setNParticipants(loadedStudents);\n\t\t\t\t\t}\n\n\t\t\t\t\tdidRankingHappen = assignRankings(studentArrayList,\n\t\t\t\t\t\t\tschoolArrayList, loadedStudents, loadedSchools);\n\t\t\t\t\t// Update participants messes up my matches :(\n\t\t\t\t\tif (loadedSchools != 0 || loadedStudents != 0) {\n\t\t\t\t\t\tGSS.setMatchesExist(false);\n\t\t\t\t\t\tGSH.setMatchesExist(false);\n\t\t\t\t\t\t// updateParticipants( GSS, GSH, studentArrayList,\n\t\t\t\t\t\t// schoolArrayList);\n\t\t\t\t\t\tGSS.clearMatches();\n\t\t\t\t\t\tGSH.clearMatches();\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < studentArrayList.size(); i++) {\n\t\t\t\t\t\ttotalNumMatches += studentArrayList.get(i)\n\t\t\t\t\t\t\t\t.getMaxMatches();\n\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < schoolArrayList.size(); j++) {\n\t\t\t\t\t\ttotalNumMatches += schoolArrayList.get(j)\n\t\t\t\t\t\t\t\t.getMaxMatches();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"E\")) {\n\n\t\t\t\t\teditData(studentArrayList, schoolArrayList,\n\t\t\t\t\t\t\tnumStudentsAdded, loadedSchoolsNum,\n\t\t\t\t\t\t\tdidRankingHappen);\n\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t|| schoolArrayList.size() != 0) {\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"M\")) {\n\t\t\t\t\t// didMatchingHappen = false;\n\t\t\t\t\t// clearMatches(studentArray, schoolArray, numStudentsAdded,\n\t\t\t\t\t// loadedSchoolsNum);\n\t\t\t\t\t// didMatchingHappen = match(studentArray, schoolArray,\n\t\t\t\t\t// numStudentsAdded, loadedSchoolsNum, didRankingHappen);\n\n\t\t\t\t\t// Create new SMP solver object\n\n\t\t\t\t\t// boolean canMatchingProceed = GSS.matchingCanProceed();\n\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"STUDENT-OPTIMAL MATCHING\");\n\t\t\t\t\tboolean matchingCanProceed = GSS.matchingCanProceed();\n\t\t\t\t\tif (matchingCanProceed) {\n\t\t\t\t\t\tboolean didMatchingHappen1 = GSS.match();\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tGSS.print();\n\t\t\t\t\t}\n\t\t\t\t\tlong elapsedTime = System.currentTimeMillis() - start;\n\t\t\t\t\tif (matchingCanProceed) {\n\n\t\t\t\t\t\tSystem.out.println(totalNumMatches\n\t\t\t\t\t\t\t\t+ \" matches made in \" + elapsedTime + \"ms!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t}\n\n\t\t\t\t\tlong start1 = System.currentTimeMillis();\n\n\t\t\t\t\tSystem.out.println(\"SCHOOL-OPTIMAL MATCHING\");\n\n\t\t\t\t\tboolean matchingCanProceed2 = GSH.matchingCanProceed();\n\t\t\t\t\tif (matchingCanProceed2) {\n\t\t\t\t\t\tboolean didMatchingHappen1 = GSH.match();\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tGSH.print();\n\t\t\t\t\t}\n\t\t\t\t\tlong elapsedTime2 = System.currentTimeMillis() - start;\n\t\t\t\t\tif (matchingCanProceed) {\n\n\t\t\t\t\t\tSystem.out.println(totalNumMatches\n\t\t\t\t\t\t\t\t+ \" matches made in \" + elapsedTime + \"ms!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t}\n\n\t\t\t\t\t// didMatchingHappen = GSH.match();\n\t\t\t\t\t// boolean didMatchingHappen2 =\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"P\")) {\n\t\t\t\t\tif (schoolArrayList.size() != 0\n\t\t\t\t\t\t\t&& studentArrayList.size() != 0) {\n\t\t\t\t\t\tif (GSS.matchesExist()) {\n\t\t\t\t\t\t\tcopyAllMatches(GSS, studentArrayList,\n\t\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// copyAllMatches(GSH, schoolArrayList,\n\t\t\t\t\t\t// studentArrayList);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No students are loaded!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintStudents(studentArrayList, schoolArrayList,\n\t\t\t\t\t\t\t\tloadedStudents, didRankingHappen);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (schoolArrayList.size() == 0) {\n\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No schools are loaded!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintSchools(studentArrayList, schoolArrayList,\n\t\t\t\t\t\t\t\tloadedSchools, didRankingHappen);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"D\")) {\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t// solve.printMatches();\n\t\t\t\t\t// solve.printStats();\n\t\t\t\t\t// System.out.println(\"\");\n\n\t\t\t\t\tSystem.out.println(\"STUDENT-OPTIMAL SOLUTION\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tif (!GSS.matchesExist() || schoolArrayList.size() == 0\n\t\t\t\t\t\t\t|| studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No matches exist!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\t\tGSS.printMatches();\n\t\t\t\t\t\t\tGSS.print();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(\"SCHOOL-OPTIMAL SOLUTION\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tif (!GSH.matchesExist() || schoolArrayList.size() == 0\n\t\t\t\t\t\t\t|| studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No matches exist!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\t\tGSH.printMatches();\n\t\t\t\t\t\t\tGSH.print();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"x\")) {\n\t\t\t\t\t// do this if matches happened other wise say\n\t\t\t\t\t// \"no! and return\"\n\n\t\t\t\t\tif (GSS.matchesExist() && studentArrayList.size() != 0\n\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\tcopyAllMatches(GSS, studentArrayList, schoolArrayList);\n\t\t\t\t\t\tcopyAllMatches(GSH, schoolArrayList, studentArrayList);\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t\tString stabilityWinner = \"\";\n\t\t\t\t\t\tString avgSchoolWinner = \"\";\n\t\t\t\t\t\tString avgStudentWinner = \"\";\n\t\t\t\t\t\tString avgTotalWinner = \"\";\n\t\t\t\t\t\tString timeWinner = \"School-opt\";\n\t\t\t\t\t\tString winner = \"WINNER\";\n\t\t\t\t\t\tif (GSS.getAvgReceiverRegret() < GSH\n\t\t\t\t\t\t\t\t.getAvgSuitorRegret()) {\n\t\t\t\t\t\t\tavgSchoolWinner = \"Student-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tavgSchoolWinner = \"School-opt\";\n\t\t\t\t\t\tif (GSS.getAvgSuitorRegret() < GSH\n\t\t\t\t\t\t\t\t.getAvgReceiverRegret()) {\n\t\t\t\t\t\t\tavgStudentWinner = \"School-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tavgStudentWinner = \"Student-opt\";\n\t\t\t\t\t\tif (GSS.getAvgTotalRegret() < GSH.getAvgTotalRegret()) {\n\t\t\t\t\t\t\tavgTotalWinner = \"Student-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tavgTotalWinner = \"School-opt\";\n\t\t\t\t\t\tif (GSS.isStable() && GSH.isStable()) {\n\t\t\t\t\t\t\tstabilityWinner = \"TIE\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (GSS.isStable() && !GSH.isEveryoneMatched()) {\n\t\t\t\t\t\t\tstabilityWinner = \"School-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tstabilityWinner = \"Student-opt\";\n\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Solution Stable Avg school regret Avg student regret Avg total regret Comp time (ms)\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"----------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t\tGSS.printStatsRow(\"Student optimal\");\n\t\t\t\t\t\tGSH.printStatsRow(\"School-optimal\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"----------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t\tSystem.out.format(\"%-15s\", winner);\n\t\t\t\t\t\tSystem.out.format(\"%13s%21s%21s%21s%21s\\n\",\n\t\t\t\t\t\t\t\tstabilityWinner, avgSchoolWinner,\n\t\t\t\t\t\t\t\tavgStudentWinner, avgTotalWinner, timeWinner);\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"----------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else if (!GSH.matchesExist()\n\t\t\t\t\t\t\t|| schoolArrayList.size() == 0\n\t\t\t\t\t\t\t|| studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No matches exist!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"R\")) {\n\n\t\t\t\t\tGSS.reset();\n\t\t\t\t\tGSH.reset();\n\t\t\t\t\tschoolArrayList.clear();\n\t\t\t\t\tstudentArrayList.clear();\n\t\t\t\t\tloadedSchoolsNum = 0;\n\t\t\t\t\tloadedStudents = 0;\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"Database cleared!\");\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t// Remove everything from both array lists\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} while (!Quit);\n\n\t}", "public void solveSA() {\r\n initState();\r\n for (int ab = 0; ab < Config.NumberOfMetropolisResets; ab++) {\r\n LogTool.print(\"==================== INACTIVE: START CALC FOR OUTER ROUND \" + ab + \"=========================\",\"notification\");\r\n\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\");\r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n setCur_cost(costCURsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"CUR COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n /* [Newstate] with random dwelltimes */\r\n New_state = newstater(); \r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW STATE \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n// newstater();\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New State before Metropolis: A)\" + New_state[0] + \" B) \" + New_state[1] + \" C) \" + New_state[2],\"notification\");\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New Cost : \" + New_cost,\"notification\");\r\n }\r\n\r\n /**\r\n * MetropolisLoop\r\n * @param Config.NumberOfMetropolisRounds\r\n */\r\n\r\n for(int x=0;x<Config.NumberOfMetropolisRounds;x++) { \r\n LogTool.print(\"SolveSA Iteration \" + x + \" Curcost \" + Cur_cost + \" Newcost \" + New_cost,\"notification\");\r\n if ((Cur_cost - New_cost)>0) { // ? die Kosten\r\n \r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 START\",\"notification\");\r\n }\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA Cost delta \" + (Cur_cost - New_cost) + \" \",\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C1 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 STOP \",\"notification\");\r\n }\r\n } else if (Math.exp(-(New_cost - Cur_cost)/temperature)> RandGenerator.randDouble(0.01, 0.99)) {\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 START: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 before set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 STOP: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n } else {\r\n New_state = newstater();\r\n }\r\n temperature = temperature-1;\r\n if (temperature==0) {\r\n break;\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal());\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n//</editor-fold>\r\n if ((x==58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n if ((Cur_cost - New_cost)>0) {\r\n Cur_state = New_state;\r\n Cur_cost = New_cost; \r\n }\r\n }\r\n if ((x>58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n }\r\n }\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Auskommentierter GLowestState Object Class\">\r\n// if (ab==9) {\r\n// double diff=0;\r\n// }\r\n \r\n // Hier wird kontrolliert, ob das minimalergebnis des aktuellen\r\n // Metropolisloops kleiner ist als das bsiher kleinste\r\n \r\n// if (Cur_cost<Global_lowest_cost) {\r\n// this.setGlobal_lowest_cost(Cur_cost);\r\n// GlobalState GLowestState = new GlobalState(this.Cur_state);\r\n// String rGLSOvalue = GLowestState.getGlobal_Lowest_state_string();\r\n// LogTool.print(\"GLS DEDICATED OBJECT STATE OUTPUT -- \" + GLowestState.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(GLowestState.getDwelltimes());\r\n // LogTool.print(\"READ FROM OBJECT OUTPUT -- \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// LogTool.print(\"DEBUG: CurCost direct : \" + this.getCur_cost(),\"notification\"); \r\n// LogTool.print(\"Debug: Cur<global CurState get : \" + this.getCur_state_string(),\"notification\");\r\n// LogTool.print(\"Debug: Cur<global GLS get : \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(this.getCur_state(Cur_state));\r\n// LogTool.print(\"Debug: Cur<global GLS get after set : \" + this.getGlobal_Lowest_state_string(),\"notification\"); \r\n// }\r\n //</editor-fold>\r\n LogTool.print(\"SolveSA: Outer Iteration : \" + ab,\"notification\");\r\n LogTool.print(\"SolveSA: Last Calculated New State/Possible state inner loop (i.e. 99) : \" + this.getNew_state_string(),\"notification\");\r\n// LogTool.print(\"SolveSA: Best Solution : \" + this.getCur_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: GLS after all loops: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: LastNewCost, unchecked : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: CurCost : \" + this.getCur_cost() + \"i.e. lowest State of this round\",\"notification\"); \r\n }\r\n // return GLowestState;\r\n }", "private static void printSol(Integer runId,LinkedList<Integer> bestTspList, double bestCost) throws java.io.FileNotFoundException,UnsupportedEncodingException{\n\n\t\t// writing the sol\n\t\t// <inputFilename>_<method>_<cutoff>_<runID>*.sol\n\t\tString fileName = String.format(\"%s_%s_%.0f\",Project.name,Project.method,Project.cutoffTimeSeconds);\n\n\t\tif ( runId != -1 ){\n\t\t\tfileName = fileName +\"_\"+runId+\".sol\";\n\t\t} else {\n\t\t\tfileName = fileName +\".sol\";\n\t\t}\n\n\t\tPrintWriter repWriter = new PrintWriter(fileName, \"UTF-8\");\n\n\t\tSystem.out.print(\"RESULTS :\"); \n\t\tSystem.out.print(\"file=\"+fileNameWithAbsolutePath.getName()); \n\t\tSystem.out.print(\":method=\"+method); \n\t\tSystem.out.print(\":randomSeed=\"+randomSeed);\n\t\tSystem.out.print(\":cutOffTimeSeconds=\"+cutoffTimeSeconds);\n\t\tSystem.out.print(\":timedOut=\"+timedOut);\n\t\tSystem.out.print(\":BestCost=\"+bestCost);\n\t\tSystem.out.println(\":OptimalCost=\"+Project.optimalCost);\n\n\t\trepWriter.printf(\"%d\\n\",Math.round(bestCost));\n\n\t\tfor (int i=0;i<bestTspList.size();i++){\n\t\t repWriter.printf(\"%d,\",bestTspList.get(i));\n\t\t}\n\t\tif ( bestTspList.getFirst().intValue() != bestTspList.getLast().intValue() ){\n\t\t repWriter.printf(\"%d,\",bestTspList.getFirst());\n\t\t}\n\n\t\trepWriter.printf(\"\\n\");\n\n\t repWriter.close();\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(solution(0));\n\n\t}", "public static void main(String[] args) {\n\t\tlis= Arrays.asList(new Integer[] {4,2,0,3,2,5});\n\t\tsolve();\n\n\t}", "public void showClauses(SATSolver solver) {\n\t\tSystem.out.println(\"Clauses:\");\n\t\tfor (int[] clause : solver.clauses)\n\t\t\tSystem.out.println(Arrays.toString(clause));\n\t}", "void streamOut(LocationStack stack) {\n // -\n System.out.println(\"Solution found: \");\n LocationStack reverse = new LocationStack();\n LocationStackNode currTop = top;\n Location reversedTop;\n \n while (!stack.isEmpty()) {\n currTop = top;\n reverse.push(currTop.getLocation());\n stack.pop();\n }\n \n while (!reverse.isEmpty()) {\n reversedTop = reverse.getTop();\n reversedTop.streamOut();\n reverse.pop();\n }\n }", "public void displayData(Solution solution);", "public static void main(String[] args) {\n\t\t\n\t\tSudokuProblem sudokuProblem = new SudokuProblem();\n\t\tint[][] p = sudokuProblem.defaultSudokuProblemEasy();\n\t\tSudokuPlayer sudokuPlayer = new SudokuPlayer(p);\n\t\tint[][] pSolved = sudokuPlayer.ordinarySolve();\n\t\t\n\t\tsudokuProblem.displaySudokuProblem(pSolved);\n\t\t\n\t}", "static private void showSolution() {\n\t\tfor (int x = 1; x <= 6; ++x) {\n\t\t\tfor (int y = 1; y <= 6; ++y) {\n\t\t\t\tSystem.out.print(color[x - 1][y - 1]\n\t\t\t\t\t\t+ Messages.getString(\"dddcube.stringkey.0\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tSystem.out.print(Messages.getString(\"dddcube.stringkey.1\")); //$NON-NLS-1$\n\t\t\tfor (int y = 1; y <= 6; ++y) {\n\t\t\t\tSystem.out.print(offset[x - 1][y - 1]\n\t\t\t\t\t\t+ Messages.getString(\"dddcube.stringkey.0\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tSystem.out.print(Messages.getString(\"dddcube.stringkey.1\")); //$NON-NLS-1$\n\t\t\tbricks.showColorBricks(x);\n\n\t\t\tSystem.out.println(Messages.getString(\"dddcube.stringkey.2\")); //$NON-NLS-1$\n\t\t}\n\t}", "public static void main(String[] args) {\n SudokuBoard board = null;\n board = new SudokuBoard(9);\n /*try {\n board.read();\n } catch (InvalidNumberInCellException | OutOfRangeException e) {\n e.printStackTrace();\n }*/\n SudokuGenerator gen = null;\n gen = new SudokuGenerator(SudokuGenerator.Difficulty.EASY, 9);\n gen.generate(board);\n gen.removeCells(board, 25);\n board.print();\n SudokuSolver2 solver = new SudokuSolver2();\n int res = solver.uniqueSolution(board);\n if(res == 0 || res == 1) System.out.print(\"No \");\n System.out.print(\"té solució\");\n if(res != 0) System.out.println(\" única\");\n solver.solve(board).print();\n\n\n\n }", "@Override\n public void handleSolution(String solution,long time) {\n \n }", "public void solve() {\n // TODO\n // This function should use next. You should also create and use any\n // other helper fuctions you find helpful here.\n \t// get start position \t\n \tSquare s = sea.getStart();\n \texploreList.add(s);\n \twhile(this.exploreList.size() != 0) {\n \t\tSquare c = step();\n \t\tif(c.hasNemo()) {\n \t\t\tsetPath(c);\n \t\t\tfoundNemo = true;\n \t\t\tbreak;\n \t\t}\n \t}\n }", "public void Main(){\n\t\t\n\t\tfillSFG();\n\t\tboolean[] visited = new boolean[AdjMatrix.length];\n\t\tLinkedList<Integer> pathdump = new LinkedList<Integer>();\n\t\textractForwardPaths(startNode, endNode, startNode, visited, pathdump);\n\t\textractLoops();\n\t\tgetForwardGains();\n\t\tgetLoopGains();\n\t\tprintForwardPaths();\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintLoops();\n\t\t\n\t\t\n\t\tcalculateDeltas();\n\t\tcalculateTotalGain();\n\t\tprintDeltasAndTotalGain();\n\t\t\n\t\tfor (int i = 1; i < nonTouching.length; i++) {\n\t\t\tSystem.out.println(\"Level = \"+i);\n\t\t\tfor (int j = 0; j < nonTouching[i].size(); j++) {\n\t\t\t\tLinkedList<Integer> dump = new LinkedList<Integer>();\n\t\t\t\tdump = nonTouching[i].get(j);\n\t\t\t\tfor (int k = 0; k < dump.size(); k++) {\n\t\t\t\t\tSystem.out.print(dump.get(k)+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tSystem.out.println(\"************************************************\");\n\t\t}\n\t\t\n\t\tProgramWindow.getInstance().showResults(forwardPaths,forwardGains,loops,loopGains,deltas,TotalGain,nonTouching);\n\t}", "public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }", "@Override\n public void solve(Problem p) {\n Queue queue = new LinkedList();\n queue.add(p);\n closeList.add(p);\n\n while (!queue.isEmpty()) {\n\n Problem node = (Problem) queue.remove();\n if (node.isAnswer()) {\n printPath(node);\n return;\n }\n// System.out.println(node);\n node.generateNodes();\n nodesExpanded++;\n for (Iterator<Problem> it = node.nodes.iterator(); it.hasNext();) {\n nodesSeen++;\n Problem problem = it.next();\n if (closeList.contains(problem)) {\n continue;\n }\n problem.visited = true;\n problem.distanceTraveled = node.distanceTraveled + 1;\n// System.out.println(problem.distanceTraveled);\n// System.out.println(problem);\n queue.add(problem);\n closeList.add(problem);\n }\n maxNodes = Math.max(maxNodes, queue.size());\n }\n \n }", "public static void main(String args[]){\n\n QueenBoard zero = new QueenBoard(0);\n QueenBoard one = new QueenBoard(1);\n QueenBoard two = new QueenBoard(2);\n QueenBoard three = new QueenBoard(3);\n QueenBoard four = new QueenBoard(4);\n QueenBoard five = new QueenBoard(5);\n QueenBoard six = new QueenBoard(6);\n QueenBoard seven = new QueenBoard(7);\n QueenBoard eight = new QueenBoard(8);\n QueenBoard nine = new QueenBoard(9);\n\n\n //testing solve\n //also commented out as clear is private \n /*\n System.out.println(one.solve());\n one.clear();*/\n\n //tested countSolutions and the numbers crunched seem right\n //so by this olgic I can seemingly safely assume solve() works\n // as intended\n System.out.println(zero.countSolutions());\n System.out.println(one.countSolutions());\n System.out.println(two.countSolutions());\n System.out.println(three.countSolutions());\n System.out.println(four.countSolutions());\n System.out.println(five.countSolutions());\n System.out.println(six.countSolutions());\n System.out.println(seven.countSolutions());\n System.out.println(eight.countSolutions());\n System.out.println(nine.countSolutions());\n\n\n //check to make sure countSolutions keeps the board clear and it does\n System.out.println(nine);\n\n }", "public void multiSolver() {\n\t\tmsSize = 0;\n\t\tmsMin = Integer.MAX_VALUE;\n\t\tmsMax = Integer.MIN_VALUE;\n\t\tmsHeight = 0;\n\t\tmultiSolver(root, 0);\n\t\tSystem.out.println(\"Size = \" + msSize);\n\t\tSystem.out.println(\"Min = \" + msMin);\n\t\tSystem.out.println(\"Max = \" + msMax);\n\t\tSystem.out.println(\"Height = \" + msHeight);\n\t}", "public void generateSolutionList() {\n // Will probably solve it in a few years\n while (!isSolved()) {\n RubiksMove move = RubiksMove.random();\n solutionMoves.add(move);\n performMove(move);\n }\n }", "@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }", "public static void main(String[] args) {\n\t\tlong startTime = System.nanoTime();\r\n\r\n\t\tFile sudFile = new File(args[0]);\r\n\r\n\t\t// parse the file and get the sudoku in a matrix\r\n\t\tNode[][] puzzle = parseFile(sudFile);\r\n\r\n\t\t// solve the puzzle with recursive backtracking\r\n\t\t// solved = solveWithoutMRV(puzzle, 0, 0);\r\n\r\n\t\t// solve the puzzle with recursive backtracking AND MRV\r\n\t\tsolved = solveWithMRV(puzzle, 0, 0);\r\n\r\n\t\t// print completed puzzle\r\n\t\tif (solved == true) {\r\n\t\t\tprintArray(puzzle);\r\n\t\t}\r\n\r\n\t\t// capture and print the runtime length in milliseconds\r\n\t\tlong endTime = System.nanoTime();\r\n\t\tlong duration = (endTime - startTime) / 1000000;\r\n\t\tSystem.out.println(\"Program finished in: \" + duration + \" milliseconds.\\n\");\r\n\t}", "public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}", "public static void main(String[] args) \n {\n //Read how many campuses are needed to be solved for\n scan = new Scanner(System.in);\n int n = scan.nextInt();\n \n //Loop through every campus\n for (c = 1; c <= n; c++)\n {\n //Build all the tunnels in the most efficient way\n buildTunnels();\n \n //Check that tunnels connect all the hills and print their result\n printAnswer(connectedHills == h);\n }\n }", "private static void solve() throws IOException {\n\n OptimizationGame.solve();\n SumOfSumOfDigits.solve();\n CrossTheStreet.solve();\n }", "public static void loopProblemSolver(String[] userInput){\n\t\t//Repeat for all entries in the array.\n\t\tfor( int i = 0; i < userInput.length; i++){\n\t\t\tuserInput[i] = userInput[i];\n\t\t\t//Since the array goes \"WORD SUFFIX\", only every other entry is a word (even numbered entries).\n\t\t\tif(i % 2 == 0){\n\t\t\t\t//Display to the user all of the information. Functions are called which return the expected values.\n\t\t\t\t// i is the word, i+1 is the suffix of that word.\n\t\t\t\tSystem.out.println(\"----------------------\");\n\t\t\t\tSystem.out.println(\"Org. String: \" + userInput[i] + \" \" + userInput[i+1]);\n\t\t\t\tSystem.out.println(\"Plural Form: \" + createPluralWord(userInput[i]));\n\t\t\t\tSystem.out.println(\"With Suffix: \" + appendSuffix(userInput[i], userInput[i+1]));\n\t\t\t}\n\t\t}\n\t}", "private void testSolution(String input, String output) {\n runs++;\n\n // Load the problem & solution\n ProblemSpec problemSpec = Solution.loadProblem(input);\n Solution solution = new Solution(problemSpec);\n\n // Solve and time the solution\n long startTime = System.currentTimeMillis();\n List<State> states = solution.solve();\n long endTime = System.currentTimeMillis();\n durations.put(input, endTime - startTime);\n\n // Output the solution\n Solution.writeSolution(Formatter.format(states), output);\n\n problemSpec = Solution.loadProblem(input, output);\n if (solutionPasses(problemSpec)) {\n passes++;\n }\n\n successes++;\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\ttry{\r\n\t\t\tScanner sc= new Scanner(new File(inpPath));\t//new File(inpPath)\r\n\t\t\tPrintWriter out = new PrintWriter(new File(outPath));\r\n\t\t\tint cases = sc.nextInt();\r\n\t\t\tfor(int t=1;t<=cases;t++){\r\n\t\t\t\tsolve(t,sc,out);\r\n\t\t\t}\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t}catch(Exception ex){ex.printStackTrace();}\r\n\t\t\r\n\t}", "public void solutionType()\n\t{\n\t\tString ret = null;\n\t\tif(numSols == 0) {ret = \"The are no solutions.\";}\n\t\telse if(numSols == 1) {ret = \"There is one solution: (The nullspace is trivial: {0})\";}\n\t\telse if(numSols == 2) {ret = \"There are infinite solutions.\";}\n\t\tSystem.out.println(ret);\n\t}", "private void displaySolvers() {\n for (int i = 0; i < simulationEdit.solvers.size(); i++) {\n for (int j = i + 1; j < simulationEdit.solvers.size(); j++) {\n if (simulationEdit.solvers.get(i).getSolverName().equalsIgnoreCase(simulationEdit.solvers.get(j).getSolverName())) {\n simulationEdit.solvers.get(j).setSolverName(simulationEdit.solvers.get(j).getSolverName() + \"(\" + j + \")\");\n }\n }\n }\n\n DefaultListModel lst = new DefaultListModel();\n DefaultListModel old = (DefaultListModel) lstSolvers.getModel();\n boolean update = false;\n for (int i = 0; i < simulationEdit.solvers.size(); i++) {\n if (old.size() > i && !old.getElementAt(i).toString().equalsIgnoreCase(simulationEdit.solvers.get(i).getSolverName())) {\n update = true;\n }\n lst.addElement(simulationEdit.solvers.get(i).getSolverName());\n }\n if (update || lst.size() != old.size()) {\n lstSolvers.setModel(lst);\n lstSolvers.setSelectedIndex(selectedSolverIndex);\n }\n }", "public void solve() {\n /** To solve the traveling salesman problem:\n * Set up the graph, choose a starting node, then call the recursive backtracking method and pass it the starting node.\n */\n\n // We need to pass a starting node to recursive backtracking method\n Node startNode = null;\n\n // Grab a node, any node...\n for( Node n : graph.nodes() ) {\n startNode = n;\n break;\n }\n\n // Visit the first node\n startNode.visit();\n\n // Add first node to the route\n this.route[0] = startNode;\n\n // Pass the number of choices made\n int nchoices = 1;\n\n // Recursive backtracking\n explore(startNode, nchoices );\n\n\n }", "void run() throws IOException {\n solve(out);\n // out.flush();\n }", "public static void main(String[] args) {\n\t\tString s1 = \"geeks\", s2 = \"geeksfor\", s3 = \"geeksforgeeks\";\n\t\tSystem.out.println(solverecursive(s1, s2, s3));\n\t\tsolvedp(s1, s2, s3);\n\n\t}", "public void print() {\n\t\t\n\t\tfor(Solution sol : population) {\n\t\t\tSystem.out.println(sol.getPossibleSolution() + \" \" + sol.getPath());\n\t\t}\n\t}", "private void resolveSudokuByRules() {\n for (int i = 0; i < 9; i++) {\n updateBoardForSingleCandidate();\n }\n updateCandidateMapForPairByCol();\n updateCandidateMapForPairByRow();\n\n for (int i = 0; i < 5; i++) {\n updateBoardForSingleCandidate();\n }\n\n updateBoardForSinglePossibilityByBlock();\n updateBoardForSinglePossibilityByRow();\n updateBoardForSinglePossibilityByCol();\n refreshCandidateMap();\n\n for (int i = 0; i < 5; i++) {\n updateBoardForSingleCandidate();\n }\n\n printBoardAndCandidatesHtmlFile();\n }", "Solution(){\n\n n = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n a = new int[n+1];\n\n \n for (int i = 1; i <= n; i++) {\n a[i] = scanner.nextInt();\n }\n Graph graph=new Graph(a);\n for(int i=0;i<n-1;i++) {\n \tint node1=scanner.nextInt();\n \tint node2=scanner.nextInt();\n \tgraph.addEdge(node1, node2);\n \t//System.out.println(node1+\" \"+node2);\n }\n //graph.dump();\n int q=scanner.nextInt();\n while(q-- > 0) {\n \tint u=scanner.nextInt();\n \tint d=scanner.nextInt();\n \tint k=scanner.nextInt();\n \t//System.out.println(\"u:\"+u+\" d:\"+d+\" k:\"+k);\n \tSystem.out.println(graph.DFS(u, d, k));\n }\n scanner.close();\n\t\t\n\t}", "public void solvePuzzle(){\n\t\t// check to make sure pieces was set\n\t\tif(possiblePieces == null){\n\t\t\tSystem.out.println(\"PuzzleThree::solvePuzzle(): possiblePieces is not initialized!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// initialize population with random sequences\n\t\tinitializePopulation();\n\t\t\n\t\t// print header of results\n\t\tSystem.out.printf(\"%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\t%23s\\n\", \"Current Generation\"\n\t\t\t\t, \"Most Fit Fitness\"\n\t\t\t\t, \"Most Fit Score\"\n\t\t\t\t, \"Most Fit Generation\"\n\t\t\t\t, \"Median Fit Fitness\"\n\t\t\t\t, \"Median Fit Score\"\n\t\t\t\t, \"Median Fit Generation\"\n\t\t\t\t, \"Worst Fit Fitness\"\n\t\t\t\t, \"Worst Fit Score\"\n\t\t\t\t, \"Worst Fit Generation\");\n\t\t\n\t\t\t\t// keep culling and reproducing until time is up\n\t\twhile(!clock.overTargetTime()){\n\t\t\t// every few generations print out generation, most fit, median fit, worst fit\n\t\t\tif(generation % 5000 == 0){\n\t\t\t\tCollections.sort(population);\n\t\t\t\tBuilding mostFit = population.get(POPULATION_SIZE-1);\n\t\t\t\tBuilding medianFit = population.get((int)(POPULATION_SIZE / 2) - 1);\n\t\t\t\tBuilding worstFit = population.get(0);\n\t\t\t\tSystem.out.printf(\"%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\t%23d\\n\", generation, \n\t\t\t\t\t\t\t\t\tmostFit.getFitness(), mostFit.getScore(), mostFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tmedianFit.getFitness(), medianFit.getScore(), medianFit.getGeneration(),\n\t\t\t\t\t\t\t\t\tworstFit.getFitness(), worstFit.getScore(), worstFit.getGeneration());\n\t\t\t}\n\t\t\t\n\t\t\t// remove a portion of the population\n\t\t\tcullPopulation();\n\t\t\t\n\t\t\t// reproduce with the fittest more likely being parents\n\t\t\treproduce();\n\t\t\t\n\t\t\tgeneration++;\n\t\t}\n\n\t\t\n\t\t// print out information about most fit\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\tBuilding mostFit = population.get(0);\n\n\t\tSystem.out.printf(\"\\n\\nBest in population is\\n\");\n\t\tSystem.out.printf(\"Sequence: \\n\");\n\t\tfor(int i = 0; i < mostFit.getList().length; i++){\n\t\t\tSystem.out.printf(\"\\t%s\\n\", mostFit.getList()[i].toString());\n\n\t\t}\n\n\t\tSystem.out.printf(\"\\nFitness: %d\\n\", mostFit.getFitness());\n\t\tSystem.out.printf(\"Score: %d\\n\", mostFit.getScore());\n\t}", "public void testExercises() {\n\t\tSystem.out.println(\"Exercise 2:\");\n\t\tSATSolver solver = get2Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Exercise 5:\");\n\t\tsolver = get5Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t}", "public static void main(String[] args) {\n int[] grades = {73,67,38,33};\n// for(int grades_i=0; grades_i < n; grades_i++){\n// grades[grades_i] = in.nextInt();\n// }\n int[] result = solve(grades);\n for (int i = 0; i < result.length; i++) {\n System.out.print(result[i] + (i != result.length - 1 ? \"\\n\" : \"\"));\n }\n System.out.println(\"\");\n \n\n }", "public void SolveTowers() {\n\n\t\tif(startingDepth == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(this.toString());\n\t\tthis.BreakDown(startingTower, endingTower, startingDepth);\n\t\tthis.BuildUp(endingTower,startingTower,startingDepth);\n\t}", "@Test\n public void test21() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Minus minus0 = new Minus();\n double double0 = illinoisSolver0.solve(4037, (UnivariateRealFunction) minus0, (double) 4037, 0.0, (double) 4037);\n }", "public SolutionIterator(javax.constraints.Solver s) {\n\t\tsolver = (Solver) s;\n\t\tsolution = null;\n\t\tsolutionNumber = 0;\n\t}", "public interface SASolution extends Solution {\r\n\r\n /**\r\n * Generates a neighbor solution using this solution\r\n *\r\n * @return\r\n */\r\n public SASolution getNeighborSolution();\r\n\r\n /**\r\n * Prints this solution\r\n *\r\n * @return\r\n */\r\n public String getAsString();\r\n\r\n}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString input = scanner.nextLine();\n\t\t\tSystem.out.println(solve(input));\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void PuzzleSolve(int k, ArrayList<Integer> S, ArrayList<Integer> U) {\n // for every integer value in the array passed in U we will add it to the empty array and remove it from the\n // new array made called list.\n for (Integer s : U) {\n ArrayList<Integer> list = new ArrayList<>(U);\n S.add(s);\n list.remove(s);\n // If we have removed all numbers in the list and S is now full, check the evaluation.\n if (k == 1) {\n Equals(S);\n }\n // else we keep calling this method until U is empty.\n else {\n PuzzleSolve(k - 1, S, list);\n }\n // remove the value from s and then add it back to the list to test a new variation at the end.\n S.remove(s);\n list.add(s);\n }\n }", "public static void main(String[] args) {\n\t\tint nums[] = {0, 1, 0, 3, 12};\r\n\t\tsolution(nums);\r\n\t\tfor(int a:nums)\r\n\t\t\tSystem.out.println(a);\r\n\t}", "public static void main(String[] args) // solve a slider puzzle (given below)\n {\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] blocks = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n blocks[i][j] = in.readInt();\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n \n \t\n }\n}", "@Override\n\t public String solve() {\n\t if (count == 0) {\n\t answer1 = getVariable2()*getVariable3();\n\t setAnswer(answer1 + \"\");\n\t } else if (count == 1) {\n\t answer1 = getVariable1()/getVariable2();\n\t setAnswer(answer1 + \"\");\n\t }else if (count == 2) {\n\t answer1 = getVariable1()/getVariable3();\n\t setAnswer(answer1 + \"\");\n\t }\n\t return getAnswer();\n\t }", "private static Solution go(Formula formula, PardinusBounds bounds, ExtendedOptions options) {\n\t\tReporter rep = options.reporter();\n\t\t\n\t\t// if not decomposed, use the amalgamated if any\n\t\tif (!options.decomposed() && bounds.amalgamated!=null)\n\t\t\tbounds = bounds.amalgamated();\n\n\t\t// create a directory with the specified unique name\n\t\tString temp=System.getProperty(\"java.io.tmpdir\");\n\t\tFile dir = new File(temp+File.separatorChar+options.uniqueName());\n\t\tif (!dir.exists()) dir.mkdir();\n\t\t\n\t\tString file = dir.toString()+File.separatorChar+String.format(\"%05d\", bounds.integration);\n\t\tPrintWriter writer;\n\t\ttry {\n\t\t\tif (!Options.isDebug())\n\t\t\t\tnew File(file+\".elo\").deleteOnExit();\n\t\t\twriter = new PrintWriter(file+\".elo\");\n\t\t\tString electrod = ElectrodPrinter.print(formula, bounds, rep);\n\t\t\twriter.println(electrod);\n\t\t\twriter.close();\n\t\t\trep.debug(\"New Electrod problem at \"+dir+\".\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new AbortedException(\"Electrod problem generation failed.\", e);\n\t\t}\n\t\tProcessBuilder builder;\n\t\tList<String> args = new ArrayList<String>();\n\t\targs.add(((ExternalSolver) options.solver().instance()).executable);\n\t\targs.addAll(Arrays.asList(((ExternalSolver) options.solver().instance()).options));\n\t\targs.add(Options.isDebug()?\"-v\":\"--\");\n\t\targs.add(file+\".elo\");\n\t\t\t\t\n\t\tbuilder = new ProcessBuilder(args);\n\t\t\n\t\tbuilder.environment().put(\"PATH\", builder.environment().get(\"PATH\")+\":/usr/local/bin:.\");\n\t\tbuilder.redirectErrorStream(true);\n\t\tint ret = -1;\n\t\tfinal Process p;\n\t\ttry {\n\t\t\toptions.reporter().solvingCNF(-1, -1, -1);\n\n\t\t\tp = builder.start();\n\t\t\t// stores the pid so that it can be correctly terminated\n\t\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (!System.getProperty(\"os.name\").toLowerCase(Locale.US).startsWith(\"windows\"))\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tField f = p.getClass().getDeclaredField(\"pid\");\n\t\t\t\t\t\t\tf.setAccessible(true);\n\t\t\t\t\t\t\tRuntime.getRuntime().exec(\"kill -SIGTERM \" + f.get(p));\n\t\t\t\t\t\t} catch (NoSuchFieldException | SecurityException | IllegalArgumentException\n\t\t\t\t\t\t\t\t| IllegalAccessException | IOException 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}\n\t\t\t\t\telse\n\t\t\t\t\t\tp.destroy();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\ttry {\n\t\t\t\tBufferedReader output = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tp.getInputStream()));\n\n\t\t\t\tString oline = \"\";\n\t\t\t\twhile ((oline = output.readLine()) != null)\n\t\t\t\t\trep.debug(oline);\n\n\t\t\t\tret = p.waitFor();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tp.destroy();\n\t\t\t\tthrow new AbortedException(\"Electrod problem interrupted.\", e);\n\t\t\t}\n\t\t} catch (IOException e1) {\n\t\t\tthrow new AbortedException(\"Electrod problem failed.\", e1);\n\t\t}\n\t\t\n\t\tif (ret != 0) {\n\t\t\trep.warning(\"Electrod exit code: \"+ret);\n\t\t\tthrow new AbortedException(\"Electrod exit code: \"+ret);\n\t\t}\n\t\telse\n\t\t\trep.debug(\"Electrod ran successfully.\");\n\t\t\n\t\tFile xml = new File(file+\".xml\");\n\t\t\n\t\tif (!Options.isDebug())\n\t\t\txml.deleteOnExit();\n\n\t\tif (!xml.exists())\n\t\t\tthrow new AbortedException(\"XML solution file not found: \"+file+\".xml.\");\n\t\telse {\n\t\t\trep.debug(file);\n\n\t\t\tElectrodReader rd = new ElectrodReader(bounds);\n\t\t\tTemporalInstance res = rd.read(xml);\n\t\t\t\n\t\t\tStatistics st = new Statistics(rd.nbvars, 0,0, rd.ctime, rd.atime);\n\n\t\t\tSolution sol;\n\t\t\t// ElectrodReader#read returns null if unsat\n\t\t\tif (res == null)\n\t\t\t\tsol = Solution.unsatisfiable(st, null);\n\t\t\telse\n\t\t\t\tsol = Solution.satisfiable(st, res);\n\t\t\t\n\t\t\treturn sol;\n\t\t}\n\t}", "public static void solve() throws Exception {\n\t\tint[] arr = ArrayInput(scn.nextInt());\n\n\t\tint ans = LDS(arr);\n\t\tSystem.out.println(ans);\n\n\t\tSystem.out.println(LDS_Rec(arr));\n\t}", "public synchronized void startSolving()\n/* */ {\n/* 373 */ setKeepSolving(true);\n/* */ \n/* */ \n/* 376 */ if ((!this.solving) && (this.iterationsToGo > 0))\n/* */ {\n/* */ \n/* 379 */ setSolving(true);\n/* 380 */ setKeepSolving(true);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 387 */ fireTabuSearchStarted();\n/* */ \n/* */ \n/* */ \n/* 391 */ TabuSearch This = this;\n/* */ \n/* 393 */ Thread t = new Thread(new Runnable() {\n/* */ private final TabuSearch val$This;\n/* */ \n/* */ public void run() {\n/* 397 */ while ((MultiThreadedTabuSearch.this.keepSolving) && (MultiThreadedTabuSearch.this.iterationsToGo > 0))\n/* */ {\n/* */ \n/* 400 */ synchronized (this.val$This)\n/* */ {\n/* 402 */ MultiThreadedTabuSearch.this.iterationsToGo -= 1;\n/* */ try\n/* */ {\n/* 405 */ MultiThreadedTabuSearch.this.performOneIteration();\n/* */ }\n/* */ catch (NoMovesGeneratedException e)\n/* */ {\n/* 409 */ if (SingleThreadedTabuSearch.err != null)\n/* 410 */ SingleThreadedTabuSearch.err.println(e);\n/* 411 */ MultiThreadedTabuSearch.this.stopSolving();\n/* */ }\n/* */ catch (NoCurrentSolutionException e)\n/* */ {\n/* 415 */ if (SingleThreadedTabuSearch.err != null)\n/* 416 */ SingleThreadedTabuSearch.err.println(e);\n/* 417 */ MultiThreadedTabuSearch.this.stopSolving();\n/* */ }\n/* 419 */ MultiThreadedTabuSearch.this.incrementIterationsCompleted();\n/* 420 */ this.val$This.notifyAll();\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 425 */ synchronized (this.val$This)\n/* */ {\n/* */ \n/* */ \n/* 429 */ MultiThreadedTabuSearch.this.setSolving(false);\n/* 430 */ MultiThreadedTabuSearch.this.setKeepSolving(false);\n/* */ \n/* */ \n/* 433 */ if (MultiThreadedTabuSearch.this.helpers != null)\n/* 434 */ for (int i = 0; i < MultiThreadedTabuSearch.this.helpers.length; i++)\n/* 435 */ MultiThreadedTabuSearch.this.helpers[i].dispose();\n/* 436 */ MultiThreadedTabuSearch.this.helpers = null;\n/* */ \n/* */ \n/* 439 */ MultiThreadedTabuSearch.this.fireTabuSearchStopped();\n/* 440 */ this.val$This.notifyAll(); } } }, \"MultiThreadedTabuSearch-Master\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 448 */ t.setPriority(this.threadPriority);\n/* 449 */ t.start();\n/* */ }\n/* 451 */ notifyAll();\n/* */ }", "private static void addSolutionList(MAESTROptimizer manager, \r\n\t\t\t\t\t\t\t\tIterator<SolutionWrapper> solutions, ReportFile file, int table)\r\n\t{\r\n\t\twhile(solutions.hasNext())\r\n\t\t{\r\n\t\t\tSolutionWrapper solution = solutions.next();\r\n\t\t\t\r\n\t\t\t// Retrieve variable count\r\n\t\t\tArrayList<Integer> discValues = solution.getSolution().getDiscValues();\r\n\t\t\tArrayList<Double> contValues = solution.getSolution().getContValues();\r\n\t\t\t\r\n\t\t\tint total = 4;\r\n\t\t\tint discCount = discValues == null ? 0 : discValues.size();\r\n\t\t\tint contCount = contValues == null ? 0 : contValues.size();\r\n\t\t\t\r\n\t\t\ttotal += discCount;\r\n\t\t\ttotal += contCount;\r\n\t\t\t\r\n\t\t\tString[] line = new String[total];\r\n\t\t\tline[0] = solution.getId();\r\n\t\t\tline[1] = solution.getIcIndex() + \"\";\r\n\t\t\tline[2] = manager.getGeneratorShortId(solution.getGenIndex());\r\n\t\t\tline[3] = solution.getSolution().getReport();\r\n\t\t\tint index = 4;\r\n\t\t\t\r\n\t\t\t// Add discrete values\r\n\t\t\tif(discCount > 0)\r\n\t\t\t\tfor(int i = 0 ; i < discValues.size() ; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tint value = discValues.get(i);\r\n\t\t\t\t\tline[index] = String.valueOf(manager.getDiscValueID(i, value));\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t// Add continuous values\r\n\t\t\tif(contCount > 0)\r\n\t\t\t\tfor(int i = 0 ; i < contValues.size() ; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tline[index] = String.valueOf(contValues.get(i));\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t// Add solution line to table\r\n\t\t\tfile.addLineToTableBody(table, line);\r\n\t\t}\r\n\t}", "public void solveGame4() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public void afficheSolde() \r\n\t\t\t\t\t\t{ // d�but de la fonction\r\n\t\t\t\t\t\tSystem.out.println(\"Valeur du solde : \" + this.solde);\t\t\r\n\t\t\t\t\t\t}", "public boolean generateSolution() {\n //first clear all filled in fields by user (they could be wrong)\n clearGame();\n\n //use solver\n SudokuSolver solver = new BacktrackSolver();\n return solver.solveSudoku(this);\n }", "public static void main(String []args) throws IOException {\n\tFastScanner in = new FastScanner(System.in);\n\tPrintWriter out = \n\t\tnew PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false); \n\tsolve(in, out);\n\tin.close();\n\tout.close();\n }", "public static void main(String[] args) throws Exception {\n\t\tsolve1();\n//\t\tsolve2();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(Arrays.toString(solution(8, 1)));\r\n\t}", "public static void main(String[] args) throws Exception{\n // long time = System.currentTimeMillis();\n File file = new File(\"input.txt\");\n File data = new File(\"output.txt\");\n Scanner input = new Scanner(file);\n PrintWriter output = new PrintWriter(data);\n\n algo = input.next();\n bx = input.nextInt();\n by = input.nextInt();\n bz = input.nextInt();\n\n ops = new int[bx][by][bz][18];\n openState = new Node[bx][by][bz];\n closedState = new Node[bx][by][bz];\n\n sx = input.nextInt();\n sy = input.nextInt();\n sz = input.nextInt();\n\n gx = input.nextInt();\n gy = input.nextInt();\n gz = input.nextInt();\n\n int n = input.nextInt();\n input.nextLine(); // flush \\n buffer\n for (int i = 0; i < n; i++) {\n String s = input.nextLine();\n String[] paras = s.split(\"\\\\s+\");\n int tx = Integer.parseInt(paras[0]);\n int ty = Integer.parseInt(paras[1]);\n int tz = Integer.parseInt(paras[2]);\n for (int j = 3; j < paras.length; j++)\n ops[tx][ty][tz][j - 3] = Integer.parseInt(paras[j]);\n }\n List<int[]> ans = ucs();\n int sum = 0, cnt = ans.size();\n if (cnt == 0)\n output.println(\"FAIL\");\n else {\n for (int[] step : ans)\n sum += step[3];\n output.println(sum);\n output.println(cnt);\n for (int[] step : ans) {\n for (int i = 0; i < step.length; i++) {\n if (i == 0)\n output.print(step[i]);\n else\n output.print(\" \" + step[i]);\n }\n output.println();\n }\n }\n output.close();\n // System.out.println(\"finish time is \" + (System.currentTimeMillis() - time) / 1000D);\n }", "@Override\n public void saveSolutions() {save solutions in unfolded format in a separate files for each solution (At this time, we have just one solution)\n // The result will print in 3 rows and each row have 4 columns:\n //\n // row1 --> col2\n // row2 --> col1 clo2 col3 col4\n // row2 --> clo2\n //\n //Example (of red cube):\n //\n // oo o\n // ooo\n // ooooo\n // ooo\n // oo\n // o o oo oo oo o\n //oooo ooooo ooo oooo\n // oooo ooo ooooo oooo\n //oooo ooooo ooo oooo\n // o o o oo o\n // o oo\n // oooo\n // oooo\n // oooo\n // oo oo\n //\n String directory = \"output\";\n File dir = new File(directory);\n if (!dir.exists()) dir.mkdirs();\n AtomicInteger counter = new AtomicInteger(1);\n solutions.forEach((number, solutionPuzzle) -> {\n StringBuilder rowStringValue1 = generateRowStringValue(null, solutionPuzzle.getTopPuzzlePiece(), null, null);\n StringBuilder rowStringValue2 = generateRowStringValue(solutionPuzzle.getLeftPuzzlePiece(), solutionPuzzle.getFrontPuzzlePiece(), solutionPuzzle.getRightPuzzlePiece(), solutionPuzzle.getBackPuzzlePiece());\n StringBuilder rowStringValue3 = generateRowStringValue(null, solutionPuzzle.getBottomPuzzlePiece(), null, null);\n Path path = Paths.get(directory + \"/solution\" + counter.getAndIncrement() + \".txt\");\n try (BufferedWriter writer = Files.newBufferedWriter(path)) {\n writer.write(rowStringValue1.append(rowStringValue2).append(rowStringValue3).toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n }", "private static void testSudoku(String name, int[][] sudoku, int[][] solution) {\r\n System.out.println(\"solving \" + name + \"\\n\" + HexadecimalSudoku.toString(sudoku, true));\r\n if (HexadecimalSudoku.solveSudoku(sudoku)) {\r\n // Checks if sudoku is correct\r\n if (isFilled(sudoku) && HexadecimalSudoku.checkSudoku(sudoku, true)) {\r\n System.out.println(\"success!\\n\" + HexadecimalSudoku.toString(sudoku, true));\r\n // If example solution is given (for examples 1 & 2 in Cam's test) \r\n if (solution != null) {\r\n int[][] diff = sameSudoku(sudoku, solution);\r\n if (diff != null) {\r\n System.out.println(\"given solution:\\n\" + HexadecimalSudoku.toString(solution, true));\r\n System.out.println(\"difference between solutions:\\n\"\r\n + HexadecimalSudoku.toString(diff, true));\r\n }\r\n }\r\n } else { /* the supposed solution is not a complete or valid sudoku */\r\n if (!isFilled(sudoku)) {\r\n System.out.println(\"sudoku was not completely filled:\\n\"\r\n + HexadecimalSudoku.toString(sudoku, false));\r\n }\r\n if (!HexadecimalSudoku.checkSudoku(sudoku, false)) {\r\n System.out.println(\"sudoku is not a valid solution:\\n\"\r\n + HexadecimalSudoku.toString(sudoku, false));\r\n }\r\n }\r\n } else {\r\n System.out.println(\"unable to complete sudoku \" + name\r\n + \"\\n\" + HexadecimalSudoku.toString(sudoku, true));\r\n }\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(solution(people, limit));\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"input6.txt\"));\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\n\t\t\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tfor(int i = 1; i <= t; i++)\n\t\t\tSystem.out.println(\"Case #\"+i+\": \"+solve(br));\n\t}", "void process() throws Exception {\n\t\n\n\t\t\tFile inputFile=new File(round+\"/\"+exercice+\"-small-attempt1.in\");\n\t\t\tPrintWriter outputFile= new PrintWriter(round+\"/\"+exercice+\"-small-attempt1.out\",\"UTF-8\");\n\n\t\t\n\t//\tFile inputFile=new File(round+\"/\"+exercice+\"-large.in\");\n\t//\tPrintWriter outputFile= new PrintWriter(round+\"/\"+exercice+\"-large.out\",\"UTF-8\");\n\n\n\t\tScanner scanner=new Scanner(inputFile);\n\t\tscanner.useLocale(Locale.US);\n\t\tint T = scanner.nextInt();\n\t\tSystem.out.println(\"Doing \"+T+\" cases\");\n\n\t\t\n\n\t\tfor (int t=1;t<=T;t++) {\n\t\n\t\t\t// do Something\n\t\t\tN=scanner.nextInt();\n\t\t\tS=new String[N];\n\t\t\n\t\t\t\n\t\t\tfor (int i=0;i<N;i++){\n\t\t\t\tS[i]=scanner.next();\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\tString ss=\"\"+solve();\n\t\t\n\t\t\tSystem.out.println(\"Case #\"+t+\": \"+ss);\n\t\t\toutputFile.println(\"Case #\"+t+\": \"+ss);\n\t\t\t\n\t\t}\n\t\tscanner.close();\n\t\toutputFile.close();\n\n\t}", "public static void printSolution(Node temp) {\n\n Stack<Node> solutionPath = getHistoryNodes(temp);\n\n int size = solutionPath.size();\n for (int i = 0; i < size; i++) {\n temp = solutionPath.pop();\n System.out.println(\"--------------------------------------\");\n printBoard(temp.getCurrentState().getCurrentState());\n System.out.println();\n if(i!=0)\n {\n printValues(temp);\n }\n else {\n System.out.println(\"initial state\");\n }\n\n }\n\n printCost(temp);\n }", "public boolean solve()\n\t{\n\t\t// Call the internal solver with the initial values\n\t\treturn solve(numberOfDiscs, poles[0], poles[1], poles[2]);\n\t}", "public static void main(String[] args) {\n if(args.length < 1) {\n System.out.println(\"Usage: java SudukoSolver <suduko file>\");\n System.exit(1);\n }\n String filename = args[0];\n SudokuSolver solver = new SudokuSolver(filename);\n System.out.println(\"Original:\");\n System.out.println(solver.getBoard());\n System.out.println(\"Solved:\");\n System.out.println(solver.solve());\n }", "@Override\n\tpublic void run(){\n\t\tbranch(0, sol,0);\t\n\t\tSystem.out.println(\"####### \" + counter + \" #######\");\n\t}", "@Override\n\tpublic void solve(String result) {\n\t\tSystem.out.println(\"你告诉我的答案是--->\"+result); \n\t}", "public static void main(String[] args) {\r\n Scanner scanner = new Scanner(System.in);\r\n \r\n long n = scanner.nextLong();\r\n int d = scanner.nextInt();\r\n List<Integer> expenditureList = new ArrayList<>();\r\n for(long i = 0; i < n; i++){\r\n int Ei = scanner.nextInt();\r\n expenditureList.add(Ei);\r\n }\r\n System.out.println(getSolution(expenditureList, d));\r\n }", "public void record(Solver solver) {\n empty = false;\n intmap.clear();\n realmap.clear();\n setmap.clear();\n graphmap.clear();\n Variable[] vars = solver.getVars();\n for (int i = 0; i < vars.length; i++) {\n int kind = vars[i].getTypeAndKind() & Variable.KIND;\n assert (vars[i].isInstantiated()) :\n vars[i] + \" is not instantiated when recording a solution.\";\n switch (kind) {\n case Variable.INT:\n case Variable.BOOL:\n IntVar v = (IntVar) vars[i];\n intmap.put(v, v.getValue());\n break;\n case Variable.REAL:\n RealVar r = (RealVar) vars[i];\n realmap.put(r, new double[]{r.getLB(), r.getUB()});\n break;\n case Variable.SET:\n SetVar s = (SetVar) vars[i];\n setmap.put(s, s.getValue());\n break;\n case Variable.GRAPH:\n GraphVar g = (GraphVar) vars[i];\n graphmap.put(g, g.getValue());\n break;\n }\n }\n }", "public static void main(String[] args) {\n\t\tint [] a= {4,3,2,1};\r\n\t\tfor(int i:solution(a)) System.out.println(i);\r\n\t}", "public static void main(String[] args) {\n\t\tsolve(new int[] {1, 2, 3, 4, 5});\t\t\n\t}", "@Override\n\tpublic SortedSet<String> getSolutions() {\n\t\t// COMPLETE THIS\n\n\t\treturn solutions;\n\n\t}" ]
[ "0.6695793", "0.66691065", "0.6469262", "0.64337355", "0.6370384", "0.62379277", "0.6158299", "0.6116611", "0.6043614", "0.5997823", "0.59885395", "0.598305", "0.5907599", "0.5893137", "0.58792037", "0.58729196", "0.586497", "0.5844744", "0.5829611", "0.57966644", "0.5796556", "0.5775548", "0.5760113", "0.57324475", "0.5706219", "0.56887263", "0.56818783", "0.5669084", "0.5660036", "0.565337", "0.56472266", "0.5635418", "0.5633244", "0.5626601", "0.5606958", "0.56015015", "0.5599129", "0.55923796", "0.55922824", "0.55777264", "0.55712366", "0.5554059", "0.5548033", "0.55376786", "0.551931", "0.55190307", "0.5509003", "0.54990166", "0.54985464", "0.5495011", "0.547828", "0.54747885", "0.54732615", "0.5472282", "0.5444526", "0.54142493", "0.54122925", "0.5406382", "0.5391015", "0.53866357", "0.53703445", "0.5363177", "0.5343508", "0.53426677", "0.5333276", "0.53285664", "0.53237706", "0.5321302", "0.53099144", "0.5303651", "0.530365", "0.5302275", "0.5299324", "0.5290263", "0.52892303", "0.5288153", "0.52837086", "0.52783203", "0.527508", "0.52721643", "0.5269467", "0.5263024", "0.5262133", "0.52588344", "0.5255405", "0.5249467", "0.52485263", "0.5245284", "0.52410305", "0.52410096", "0.5237447", "0.5235833", "0.5235417", "0.5234967", "0.5234735", "0.52248055", "0.5213737", "0.5203858", "0.52024734", "0.52018887", "0.5197499" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { System.setProperty("webdriver.chrome.driver", "F:\\Software\\chromedriver\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://www.cleartrip.com/"); Thread.sleep(2000L); WebElement Adult = driver.findElement(By.id("Adults")); Select adultcount = new Select(Adult); adultcount.selectByValue("2"); WebElement child = driver.findElement(By.id("Childrens")); Select childcount = new Select(child); childcount.selectByValue("3"); Thread.sleep(2000L); driver.findElement(By.xpath("//input[@id='DepartDate']")).click(); Thread.sleep(2000L); driver.findElement(By.cssSelector(".ui-state-default.ui-state-highlight.ui-state-active")).click(); driver.findElement(By.id("MoreOptionsLink")).click(); Thread.sleep(2000L); WebElement travelclass = driver.findElement(By.id("Class")); Select type = new Select(travelclass); type.selectByValue("Business"); Thread.sleep(2000L); driver.findElement(By.id("AirlineAutocomplete")).sendKeys("Indigo"); Thread.sleep(2000L); driver.findElement(By.id("SearchBtn")).click(); Thread.sleep(2000L); System.out.println(driver.findElement(By.id("homeErrorMessage")).getText()); }
{ "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
Use GridBagLayout for dialog user choices
public DialogBoxGridBagLayout(JFrame aOwner) { super(aOwner, true/* modal */); Dimension tDim; _fileDir = "."; _panel = new JPanel(); getContentPane().add(_panel); // create _firstNameLabel and _firstNameComboBox createComponentsRow1(); // create _lastNameLabel and _lastNameComboBox createComponentsRow2(); // create _fileLable, _fileTextField, _fileBrowseButton createComponentsRow3(); // create the main pane for user inputs JPanel tGridPane = createGridPane(); // create the ok/cancel button pane JPanel tButtonPane = createButtonPane(); // setup the main content pane Container contentPane = getContentPane(); contentPane.add(tGridPane, BorderLayout.CENTER); contentPane.add(tButtonPane, BorderLayout.PAGE_END); pack(); setLocationRelativeTo(aOwner); setSize(400, 185); setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildDialogWindow(Ingredient aIng) {\n\t\t\n \t\tGridBagLayout layout = new GridBagLayout();\n GridBagConstraints lc = new GridBagConstraints();\n getContentPane().setLayout(layout);\n\n \n lc.anchor = GridBagConstraints.EAST;\n lc.insets = new Insets(5, 5, 5, 5);\n\n aLabel = new JLabel(\"Name\");\n lc.gridx = 0; lc.gridy = 0;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n\n aLabel = new JLabel(\"Food Group\");\n lc.gridx = 0; lc.gridy = 1;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n \n aLabel = new JLabel(\"Shelf Life\");\n lc.gridx = 0; lc.gridy = 2;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n\n aLabel = new JLabel(\"Calories\");\n lc.gridx = 0; lc.gridy = 3;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n\n \t\t// Add the name field\n\t\tnameField = new JTextField(aIng.getName());\n\t\tnameField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 0;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(nameField, lc);\n \t\tgetContentPane().add(nameField);\n\n\t\t// Add the address field\n\t\tfoodGroupField = new JTextField(aIng.getFoodGroup());\n\t\tfoodGroupField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 1;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(foodGroupField, lc);\n \t\tgetContentPane().add(foodGroupField);\n\n \t\tshelfLifeField = new JTextField(\"\"+aIng.getShelfLife());\n \t\tshelfLifeField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 2;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(shelfLifeField, lc);\n \t\tgetContentPane().add(shelfLifeField);\n \t\t\n \t\tcaloriesField = new JTextField(\"\"+aIng.getCalories());\n \t\tcaloriesField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 3;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(caloriesField, lc);\n \t\tgetContentPane().add(caloriesField);\n \t\t\n\t\t// Add the Update button\n\t\tupdateButton = new JButton(\"UPDATE\");\n lc.gridx = 1; lc.gridy = 6;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(updateButton, lc);\n \t\tgetContentPane().add(updateButton);\n \n\t\t// Add the Delete button\n\t\tdeleteButton = new JButton(\"DELETE\");\n lc.gridx = 2; lc.gridy = 6;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(deleteButton, lc);\n \t\tgetContentPane().add(deleteButton);\n\n \t\t// Add the Cancel button\n\t\tcancelButton = new JButton(\"CANCEL\");\n \n lc.gridx = 3; lc.gridy = 6;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(cancelButton, lc);\n \t\tgetContentPane().add(cancelButton);\n\t\t\n\t\t\n\t}", "public AddAnimalDialog(JFrame frame, String name, String animalFamilyType, String tourType) {\n super(frame, name);\n setLayout(new GridBagLayout());\n\n this.animalFamilyType = animalFamilyType;\n this.tourType = tourType;\n\n imgLabel = new JLabel();\n\n TitledBorder titledBorder = new TitledBorder(\"Current Tournament - \" + animalFamilyType + \" , \" + tourType);\n titledBorder.setTitleColor(Color.RED);\n CompoundBorder border = new CompoundBorder(new EmptyBorder(5, 5, 5, 5), titledBorder);\n super.getRootPane().setBorder(border);\n\n gbc.insets = new Insets(5, 5, 5, 5);\n\n //add the name label\n gbc.fill = GridBagConstraints.HORIZONTAL;\n add(nameLabel, gbc);\n\n //add the name text field\n gbc.gridx = 2;\n gbc.weightx = GridBagConstraints.BOTH;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n add(nameTextField, gbc);\n\n //add the image label\n gbc.gridy = 2;\n gbc.gridx = 0;\n add(imageLabel, gbc);\n\n //add image combobox\n chooseAddItemsToJcb();\n gbc.weightx = GridBagConstraints.BOTH;\n gbc.gridx = 2;\n this.add(imageCbox, gbc);\n\n //add the gender label\n gbc.gridy = 5;\n gbc.gridx = 0;\n add(genLabel, gbc);\n\n //add the radio buttons for gender\n gbc.gridx = 1;\n maleBtn.setActionCommand(\"Male\");\n add(maleBtn, gbc);\n gbc.gridx = 2;\n hermaBtn.setActionCommand(\"Hermaphrodite\");\n add(hermaBtn, gbc);\n gbc.gridx = 3;\n femaleBtn.setActionCommand(\"Female\");\n add(femaleBtn, gbc);\n\n //add buttons to group buttons\n buttons.add(maleBtn);\n buttons.add(femaleBtn);\n buttons.add(hermaBtn);\n\n gbc.gridwidth = 0;\n //add the speed label\n gbc.gridy = 7;\n gbc.gridx = 0;\n add(speedLabel, gbc);\n\n //add the speed slider\n gbc.gridx = 1;\n add(speedSlider, gbc);\n\n //add energy consumption label\n gbc.gridx = 0;\n gbc.gridy = 8;\n add(engLabel, gbc);\n\n //add energy consumption slider\n gbc.gridx = 1;\n add(engSlider, gbc);\n\n //add image choice label\n gbc.gridwidth = 3;\n gbc.gridy = 9;\n gbc.gridx = 0;\n add(imgChoiceLabel, gbc);\n\n //add the create button\n gbc.gridwidth = 2;\n gbc.gridx = 1;\n gbc.gridy = 10;\n gbc.fill = GridBagConstraints.BOTH;\n add(createBtn, gbc);\n\n //adds the matching image\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.gridy = 9;\n gbc.gridx = 2;\n showImage();\n\n nameTextField.addActionListener(this);\n imageCbox.addActionListener(this);\n maleBtn.addActionListener(this);\n hermaBtn.addActionListener(this);\n femaleBtn.addActionListener(this);\n\n speedSlider.setMajorTickSpacing(1);\n speedSlider.setPaintTicks(true);\n speedSlider.setPaintLabels(true);\n\n engSlider.setMajorTickSpacing(10);\n engSlider.setPaintTicks(true);\n engSlider.setPaintLabels(true);\n\n activateSliders();\n\n this.setSize(600, 450);\n this.setVisible(true);\n }", "void guiInit(){\n //Some default names used\n Label label;\n Container container;\n Font font;\n\n GridBagConstraints c = new GridBagConstraints();\n\n font = new Font(\"Dialog\",Font.PLAIN,12);\n \n container = this;\n //container = new Panel();\n container.setLayout(new GridBagLayout());\n container.setFont(font);\n container.setBackground(SystemColor.menu);\n c.insets = new Insets(3,3,3,3);\n \n c.gridx=0; c.gridy=0;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHEAST;\n label = new Label(\"Host:\");\n container.add(label,c);\n \n c.gridx=1; c.gridy=0;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n host_text = new TextField(\"socks-proxy\",15);\n container.add(host_text,c);\n \n c.gridx=3; c.gridy=0;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHEAST;\n label = new Label(\"Port:\");\n container.add(label,c);\n \n c.gridx=4; c.gridy=0;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n port_text = new TextField(\"1080\",5);\n container.add(port_text,c);\n \n c.gridx=0; c.gridy=1;\n c.gridwidth=3; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n socks4radio = new Checkbox(\"Socks4\",socks_group,false);\n //1.0 compatible code\n //socks4radio = new Checkbox(\"Socks4\",false);\n //socks4radio.setCheckboxGroup(socks_group);\n socks4radio.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(socks4radio,c);\n \n c.gridx=3; c.gridy=1;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n socks5radio = new Checkbox(\"Socks5\",socks_group,true);\n //1.0 compatible code\n //socks5radio = new Checkbox(\"Socks5\",true);\n //socks5radio.setCheckboxGroup(socks_group);\n socks5radio.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(socks5radio,c);\n \n c.gridx=0; c.gridy=2;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.EAST;\n label = new Label(\"User Id:\");\n container.add(label,c);\n \n c.gridx=1; c.gridy=2;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n user_text = new TextField(\"\",15);\n user_text.setEnabled(false);\n container.add(user_text,c);\n \n c.gridx=3; c.gridy=2;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n label = new Label(\"Authentication\");\n label.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(label,c);\n \n c.gridx=0; c.gridy=3;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.EAST;\n label = new Label(\"Password:\");\n container.add(label,c);\n \n c.gridx=1; c.gridy=3;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n password_text = new TextField(\"\",15);\n password_text.setEchoChar('*');\n password_text.setEnabled(false);\n //password_text.setEchoCharacter('*');//1.0\n container.add(password_text,c);\n \n c.gridx=3; c.gridy=3;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n none_check = new Checkbox(\"None\",true);\n container.add(none_check,c);\n \n c.gridx=0; c.gridy=4;\n c.gridwidth=3; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n label = new Label(\"Direct Hosts\");\n label.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(label,c);\n \n c.gridx=3; c.gridy=4;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n up_check = new Checkbox(\"User/Password\",false);\n container.add(up_check,c);\n \n c.gridx=0; c.gridy=5;\n c.gridwidth=3; c.gridheight=2;\n c.anchor=GridBagConstraints.NORTHWEST;\n c.fill = GridBagConstraints.BOTH;\n direct_list = new List(3);\n container.add(direct_list,c);\n \n c.gridx=3; c.gridy=5;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n gssapi_check = new Checkbox(\"GSSAPI\",false);\n gssapi_check.setEnabled(false);\n container.add(gssapi_check,c);\n \n c.gridx=0; c.gridy=7;\n c.gridwidth=3; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n direct_text = new TextField(\"\",25);\n container.add(direct_text,c);\n \n c.gridx=3; c.gridy=7;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n add_button = new Button(\"Add\");\n container.add(add_button,c);\n \n c.gridx=3; c.gridy=6;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n remove_button = new Button(\"Remove\");\n container.add(remove_button,c);\n \n c.gridx=1; c.gridy=8;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n cancel_button = new Button(\"Cancel\");\n container.add(cancel_button,c);\n \n c.gridx=0; c.gridy=8;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n ok_button = new Button(\"OK\");\n container.add(ok_button,c);\n\n //up_check.setEnabled(false);\n\n //Warning Dialog\n dismiss_button = new Button(\"Dismiss\");\n warning_label = new Label(\"\",Label.CENTER);\n warning_label.setFont(new Font(\"Dialog\",Font.BOLD,15));\n\n Panel p = new Panel();\n p.add(dismiss_button);\n warning_dialog.add(p,BorderLayout.SOUTH);\n warning_dialog.add(warning_label,BorderLayout.CENTER);\n warning_dialog.setResizable(false);\n }", "private void manageLayout()\r\n {\r\n // gridBaglayout \r\n setLayout(new GridBagLayout());\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n\r\n // intro string\r\n gbc.weighty = 0;\r\n gbc.weightx = 0;\r\n gbc.insets = new Insets(1, 1, 1, 1);\r\n gbc.anchor = GridBagConstraints.CENTER;\r\n add(stringLabel, gbc);\r\n\r\n // State / options list\r\n JPanel panel = new JPanel();\r\n panel.setLayout(new FlowLayout(FlowLayout.CENTER));\r\n panel.add(stateLabel);\r\n panel.add(optionsList);\r\n panel.add(finalStateLabel);\r\n //gbc.insets = new Insets(2,2,2,2);\r\n gbc.weightx = .33;\r\n gbc.weighty = 0;\r\n gbc.gridy = 1;\r\n gbc.fill = 1;\r\n add(panel, gbc);\r\n\r\n // RadioButtons / Reset Button\r\n radioLabel = new JLabel();\r\n radioLabel.setLayout(new GridLayout(5, 1, 0, 0));\r\n radioLabel.setBorder(new TitledBorder(\"Search Types\"));\r\n radioLabel.setPreferredSize(new Dimension(180, 120));\r\n // reset button\r\n gbc.fill = 0;\r\n gbc.gridx = 1;\r\n gbc.weightx = 0;\r\n gbc.gridy = 0;\r\n gbc.weighty = 1;\r\n //radioLabel.add(depthFirstButton);\r\n //radioLabel.add(breadthFirstButton);\r\n radioLabel.add(AStarButton);\r\n radioLabel.add(enhancedAStarButton);\r\n radioLabel.add(solveButton);\r\n radioLabel.add(showNxtMvBtn);\r\n radioLabel.add(showAllMoves);\r\n add(radioLabel, gbc);\r\n gbc.gridy = 1;\r\n add(solutionLabel, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 3;\r\n add(resetButton, gbc);\r\n }", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroupChoice = new javax.swing.ButtonGroup();\n jGTILabelCaption = new de.unisiegen.gtitool.ui.swing.JGTILabel();\n jGTIPanelChoice = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIRadioButtonRegularGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIRadioButtonContextFreeGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIPanelColumn0 = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIPanelButtons = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIButtonPrevious = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonNext = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonCancel = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n\n setLayout(new java.awt.GridBagLayout());\n\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\"); // NOI18N\n jGTILabelCaption.setText(bundle.getString(\"NewDialog.ChooseGrammar\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 16, 5, 16);\n add(jGTILabelCaption, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonRegularGrammar);\n jGTIRadioButtonRegularGrammar.setSelected(true);\n jGTIRadioButtonRegularGrammar.setText(bundle.getString(\"NewDialog.RG\")); // NOI18N\n jGTIRadioButtonRegularGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonRegularGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);\n jGTIPanelChoice.add(jGTIRadioButtonRegularGrammar, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonContextFreeGrammar);\n jGTIRadioButtonContextFreeGrammar.setText(bundle.getString(\"NewDialog.CFG\")); // NOI18N\n jGTIRadioButtonContextFreeGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonContextFreeGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);\n jGTIPanelChoice.add(jGTIRadioButtonContextFreeGrammar, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelChoice, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelColumn0, gridBagConstraints);\n\n jGTIButtonPrevious.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.PreviousMnemonic\").charAt(0));\n jGTIButtonPrevious.setText(bundle.getString(\"NewDialog.Previous\")); // NOI18N\n jGTIButtonPrevious.setToolTipText(bundle.getString(\"NewDialog.PreviousToolTip\")); // NOI18N\n jGTIButtonPrevious.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonPreviousActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jGTIPanelButtons.add(jGTIButtonPrevious, gridBagConstraints);\n\n jGTIButtonNext.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.NextMnemonic\").charAt(0));\n jGTIButtonNext.setText(bundle.getString(\"NewDialog.Next\")); // NOI18N\n jGTIButtonNext.setToolTipText(bundle.getString(\"NewDialog.NextToolTip\")); // NOI18N\n jGTIButtonNext.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonNextActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jGTIPanelButtons.add(jGTIButtonNext, gridBagConstraints);\n\n jGTIButtonCancel.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.CancelMnemonic\").charAt(0));\n jGTIButtonCancel.setText(bundle.getString(\"NewDialog.Cancel\")); // NOI18N\n jGTIButtonCancel.setToolTipText(bundle.getString(\"NewDialog.CancelToolTip\")); // NOI18N\n jGTIButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonCancelActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jGTIPanelButtons.add(jGTIButtonCancel, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 16, 16);\n add(jGTIPanelButtons, gridBagConstraints);\n }", "private void initForm() {\r\n\t\t/**\r\n\t\t * Set the properties of this frame.\r\n\t\t */\r\n\t\tthis.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\r\n\t\tthis.setLayout(new GridLayout(1, 2));\r\n\t\tthis.setMinimumSize(new Dimension(800, 700));\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\t/**\r\n\t\t * Create the constraint object for the view.\r\n\t\t */\r\n\t\tContainer c = this.getContentPane();\r\n\t\tc.setLayout(new GridBagLayout());\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\t\t/**\r\n\t\t * Create panels for the top.\r\n\t\t */\r\n\t\tJPanel panelParse = new JPanel(new GridLayout(3, 2));\r\n\t\tpanelParse.setBorder(new TitledBorder(new EtchedBorder(), \"Parse\"));\r\n\t\tpanelParse.add(labelDelimiter);\r\n\t\tpanelParse.add(textfieldDelimSymbol);\r\n\t\tpanelParse.add(labelContainsHdr);\r\n\t\tpanelParse.add(cbContainsHeader);\r\n\t\tpanelParse.add(labelEmpty);\r\n\t\tpanelParse.add(labelEmpty);\r\n\t\tJPanel panelImport = new JPanel(new GridLayout(4, 2));\r\n\t\tpanelImport.setBorder(new TitledBorder(new EtchedBorder(), \"Import\"));\r\n\t\tpanelImport.add(labelDetectProfiles);\r\n\t\tpanelImport.add(labelValueDetectProfiles);\r\n\t\tpanelImport.add(labelSelectProfiles);\r\n\t\tpanelImport.add(labelValueSelectProfiles);\r\n\t\tpanelImport.add(labelLengthCorrecton);\r\n\t\tpanelImport.add(textfieldLenCorrection);\r\n\t\tpanelImport.add(labelEnableLenCorrect);\r\n\t\tpanelImport.add(cbEnableLenCorrect);\r\n\t\tJPanel panelControl = new JPanel(new GridLayout(2, 1));\r\n\t\tpanelControl.setBorder(new TitledBorder(new EtchedBorder(), \"Control\"));\r\n\t\tpanelControl.add(buttonImport);\r\n\t\tpanelControl.add(buttonCancel);\r\n\t\tJPanel panelTop = new JPanel(new GridLayout(1, 3));\r\n\t\tpanelTop.add(panelParse);\r\n\t\tpanelTop.add(panelImport);\r\n\t\tpanelTop.add(panelControl);\r\n\t\t/**\r\n\t\t * Create panel for the table at the bottom\r\n\t\t */\r\n\t\tpanelTable.add(tableSelectionPD);\r\n\t\t/**\r\n\t\t * Add the panels to the frame with constraints\r\n\t\t */\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tgbc.weightx = 1;\r\n\t\tgbc.weighty = 0.01;\r\n\t\tgbc.anchor = GridBagConstraints.FIRST_LINE_START;\r\n\t\tgbc.fill = GridBagConstraints.BOTH;\r\n\t\tc.add(panelTop, gbc);\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 1;\r\n\t\tgbc.weightx = 1;\r\n\t\tgbc.weighty = 0.99;\r\n\t\tgbc.anchor = GridBagConstraints.LAST_LINE_START;\r\n\t\tgbc.fill = GridBagConstraints.BOTH;\r\n\t\tc.add(panelTable, gbc);\r\n\t}", "private void initComponents()\n\t{\n\t\tGridBagConstraints gridBagConstraints;\n\t\tJLabel tempLabel;\n\n\t\tcmbBonusSkillPoints = new JComboBoxEx();\n\t\tcmbBonusFeats = new JComboBoxEx();\n\n\t\t//txtCR = new JTextField();\n\t\tcmbCR = new JComboBoxEx();\n\t\ttxtDisplayName = new JTextField();\n\t\tcmbHands = new JComboBoxEx();\n\t\ttxtHitDiceAdvancement = new JTextField();\n\t\tcmbHitDiceNumber = new JComboBoxEx();\n\t\tcmbHitDiceSize = new JComboBoxEx();\n\t\tcmbLegs = new JComboBoxEx();\n\t\ttxtLevelAdj = new JTextField();\n\t\tcmbMonsterClass = new JComboBoxEx();\n\t\tcmbMonsterLevel = new JComboBoxEx();\n\t\tcmbReach = new JComboBoxEx();\n\t\tcmbSize = new JComboBoxEx();\n\t\tcmbSkillMult = new JComboBoxEx();\n\n\t\tpnlTemplateMisc = new JPanel();\n\n\t\t//pnlTemplateTypes = new AvailableSelectedPanel();\n\t\tpnlTemplateTypes = new TypePanel(PropertyFactory.getString(\"in_demEnterNewType\"));\n\n\t\tsetLayout(new GridBagLayout());\n\n\t\tpnlTemplateMisc.setLayout(new GridBagLayout());\n\n\t\ttempLabel = new JLabel(\"Display Name\");\n\t\tgridBagConstraints = buildConstraints(0, 0);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 0);\n\t\tgridBagConstraints.gridwidth = 3;\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(txtDisplayName, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Hands\");\n\t\tgridBagConstraints = buildConstraints(0, 1);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 1);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbHands, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Legs\");\n\t\tgridBagConstraints = buildConstraints(2, 1);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 1);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbLegs, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Reach\");\n\t\tgridBagConstraints = buildConstraints(0, 2);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 2);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbReach, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Skill Multiplier\");\n\t\tgridBagConstraints = buildConstraints(2, 2);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 2);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbSkillMult, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Bonus Skill Pts / Level\");\n\t\tgridBagConstraints = buildConstraints(0, 3);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 3);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbBonusSkillPoints, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Bonus Starting Feats\");\n\t\tgridBagConstraints = buildConstraints(2, 3);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 3);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbBonusFeats, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"CR\");\n\t\tgridBagConstraints = buildConstraints(0, 4);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tcmbCR.setEditable(true);\n\t\tgridBagConstraints = buildConstraints(1, 4);\n\t\tgridBagConstraints.weightx = 0.4;\n\n\t\t//pnlTemplateMisc.add(txtCR, gridBagConstraints);\n\t\tpnlTemplateMisc.add(cmbCR, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Level Adjustment\");\n\t\tgridBagConstraints = buildConstraints(2, 4);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 4);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(txtLevelAdj, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Size\");\n\t\tgridBagConstraints = buildConstraints(0, 5);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 5);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbSize, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Hit Dice Advancement\");\n\t\tgridBagConstraints = buildConstraints(2, 5);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 5);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(txtHitDiceAdvancement, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Monster Class\");\n\t\tgridBagConstraints = buildConstraints(0, 6);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 6);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbMonsterClass, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Monster Level\");\n\t\tgridBagConstraints = buildConstraints(2, 6);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 6);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbMonsterLevel, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Number of Hit Dice\");\n\t\tgridBagConstraints = buildConstraints(0, 7);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(1, 7);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbHitDiceNumber, gridBagConstraints);\n\n\t\ttempLabel = new JLabel(\"Hit Dice Size\");\n\t\tgridBagConstraints = buildConstraints(2, 7);\n\t\tpnlTemplateMisc.add(tempLabel, gridBagConstraints);\n\n\t\tgridBagConstraints = buildConstraints(3, 7);\n\t\tgridBagConstraints.weightx = 0.4;\n\t\tpnlTemplateMisc.add(cmbHitDiceSize, gridBagConstraints);\n\n\t\tgridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.gridy = 2;\n\t\tgridBagConstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.weightx = 1.0;\n\t\tadd(pnlTemplateMisc, gridBagConstraints);\n\n\t\t//pnlTemplateTypes.setHeader(PropertyFactory.getString(\"in_type\"));\n\t\tgridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.gridy = 5;\n\t\tgridBagConstraints.gridheight = 4;\n\t\tgridBagConstraints.fill = GridBagConstraints.BOTH;\n\t\tgridBagConstraints.weightx = 1.0;\n\t\tgridBagConstraints.weighty = 1.0;\n\t\tadd(pnlTemplateTypes, gridBagConstraints);\n\t}", "protected void makeContent() {\n\n \t// panel for main control and setup\n\tGridBagLayout setGridBag = new GridBagLayout();\n\tmainPanel.setLayout(setGridBag);\n\n\tInsets sepInsets = new Insets(5, 0, 5, 0);\n\tInsets nullInsets = new Insets(0, 0, 0, 0);\n\tInsets defaultInsets = new Insets(5,5,5,5);\n\t\n\tint sumy = 0;\n\tGridBagConstraints gbc = new GridBagConstraints();\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tgbc.insets = new Insets(10, 5, 10,5);\n\tgbc.gridwidth = 3;\n\tsetGridBag.setConstraints(sequenceLabel, gbc);\n\tmainPanel.add(sequenceLabel);\n\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tJSeparator sep1 = new JSeparator(SwingConstants.HORIZONTAL);\n\tsetGridBag.setConstraints(sep1, gbc);\n\tmainPanel.add(sep1);\n\tsep1.setVisible(true);\n\t\n\tJLabel typeLabel = new JLabel(\"Device Type\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(typeLabel, gbc);\n\tmainPanel.add(typeLabel);\n\t\n\tJLabel pvLabel = new JLabel(\"PV Choice\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(pvLabel, gbc);\n\tmainPanel.add(pvLabel);\n\t\n\tJLabel actionLabel = new JLabel(\"Action Choice\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 2; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(actionLabel, gbc);\n\tmainPanel.add(actionLabel);\t\n\t\n\ttypeList.setListData(nullDevices);\n\ttypeList.setVisibleRowCount(6);\n\ttypeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\t\n\tJScrollPane typeScrollPane = new JScrollPane(typeList);\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(typeScrollPane, gbc);\n\tmainPanel.add(typeScrollPane);\n\ttypeList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.typeSelected();\n }\n\t});\t\n\t\n\tsignalList.setListData(nullSignals);\n\tsignalList.setVisibleRowCount(6);\n\tsignalList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\t\t\n\tJScrollPane signalScrollPane = new JScrollPane(signalList);\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(signalScrollPane, gbc);\n\tmainPanel.add(signalScrollPane);\n\tsignalList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.signalSelected();\n }\n\t});\t\n\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 2; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(actionChoice, gbc);\n\tmainPanel.add(actionChoice);\n\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.gridwidth = 3;\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tJSeparator sep2 = new JSeparator(SwingConstants.HORIZONTAL);\n\tsetGridBag.setConstraints(sep2, gbc);\n\tmainPanel.add(sep2);\n\tsep2.setVisible(true);\n\t\n\tJLabel setValueLabel = new JLabel(\"Set Value\");\n\tgbc.gridwidth = 1;\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(setValueLabel, gbc);\n\tmainPanel.add(setValueLabel);\n\n\tJLabel selectValueLabel = new JLabel(\"Select Value\");\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(selectValueLabel, gbc);\n\tmainPanel.add(selectValueLabel);\n\t\n\tvalueField = new DoubleInputTextField( (new Double(theDoc.newSetValue)).toString());\n\tvalueField.setNumberFormat(new DecimalFormat(\"####.#####\"));\n\tvalueField.setEnabled(false);\n\tvalueField.setPreferredSize(new Dimension(80, 20));\n\tgbc.weightx = 1.; gbc.weighty = 1.;\t\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tvalueField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.newSetValue= valueField.getValue();\n }\n\t});\t\t\n\tsetGridBag.setConstraints(valueField, gbc);\n\tmainPanel.add(valueField);\n\n\tvalueList = new JList<String>(nullValues);\n\tvalueList.setEnabled(false);\n\tgbc.weightx = 1.; gbc.weighty = 1.;\t\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tvalueList.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n theDoc.newSetValueString = valueList.getSelectedValue();\n }\n\t});\t\t\n\tsetGridBag.setConstraints(valueList, gbc);\n\tmainPanel.add(valueList);\n\t\n\tJSeparator sep3 = new JSeparator(SwingConstants.HORIZONTAL);\n\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\tgbc.insets = sepInsets;\n\tgbc.gridwidth = 3;\tgbc.weightx = 1.;\n\tgbc.gridx = 0; gbc.gridy = sumy++;\n\tsetGridBag.setConstraints(sep2, gbc);\n\tmainPanel.add(sep3);\n\tsep3.setVisible(true);\n\t\n\tJButton confirmButton = new JButton(\"Confirm\");\n\tconfirmButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.confirmIt();\t\t\n }\n\t});\t\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(confirmButton, gbc);\n\tmainPanel.add(confirmButton);\n\t\n\t\n\ttextArea = new JTextArea(\"\");\n\tJScrollPane textScrollPane = new JScrollPane(textArea);\n\ttextScrollPane.setVerticalScrollBarPolicy(\n JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n textScrollPane.setPreferredSize(new Dimension(100, 150));\n textScrollPane.setMinimumSize(new Dimension(10, 10));\t\n\tgbc.insets = nullInsets;\n\tgbc.fill = GridBagConstraints.BOTH;\n\tgbc.weightx = 1.; gbc.weighty = 0.;\n\tgbc.gridwidth = 2; gbc.gridheight = 2;\t\n\tgbc.gridx = 1; gbc.gridy = sumy++;\n\tsetGridBag.setConstraints(textScrollPane, gbc);\n\tmainPanel.add(textScrollPane);\t\t\n\t// The analysis plot panel:\t\n\t\n\tJButton doItButton = new JButton(\"Set'em\");\n\tdoItButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n theDoc.fireSignals();\t\t\n }\n\t});\t\n\tgbc.fill = GridBagConstraints.NONE;\n\tgbc.weightx = 0.; gbc.weighty = 0.;\n\tgbc.gridx = 0; gbc.gridy = sumy;\n\tgbc.insets = defaultInsets;\n\tgbc.gridwidth = 1;\n\tsetGridBag.setConstraints(doItButton, gbc);\n\tmainPanel.add(doItButton);\t\n\t\n\t// the type selection list:\n\t\n\t//\tcontainer.add(mainTabbedPane,BorderLayout.CENTER);\n\t//container.add(errorText,BorderLayout.SOUTH);\n\n }", "protected void CreateWindow(){\n\t\tdouble[] colWeight = {1,1,1,1,1,1};\n\t\tdouble[] rowWeight = {5,1,1,1,1};\n\t\tint[] colWidth = {1,1,1,1,1,1};\n\t\tint[] rowHeight = {5,1,1,1,1};\n\t\t\n\t\t//creates new GridBagLayout and the Constraints for it\n\t\tGridBagLayout normal = new GridBagLayout();\n\t\t\n\t\tGridBagConstraints constrain = new GridBagConstraints();\n\t\t\n\t\tnormal.rowHeights = rowHeight;\n\t\tnormal.columnWidths = colWidth;\n\t\tnormal.columnWeights = colWeight;\n\t\tnormal.rowWeights = rowWeight;\n\t\t\n\t\tsetBounds(100,100,400,600);\n\t\tsetLayout(normal);\n\t\t\n\t\t//create messagefield. set the Grid Layout for it.\n\t\tchatDisplay.messageField.setSize(300, 500);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 5;\n\t\tconstrain.gridheight = 18;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 0;\n\t\tnormal.setConstraints(chatDisplay.messageField, constrain);\n\t\t\n\t\t//create input. set the Grid Layout for it.\n\t\tthis.input.setSize(450, 20);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 4;\n\t\tconstrain.gridheight = 2;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.input, constrain);\n\t\t\n\t\t//create send button. set the Grid Layout for it.\n\t\tthis.send.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.send, constrain);\n\t\t\n\t\tthis.quit.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 19;\n\t\tnormal.setConstraints(this.quit, constrain);\n\t\t\n\t\tthis.server.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 20;\n\t\tnormal.setConstraints(this.server, constrain);\n\t\t\n\t\tthis.client.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 21;\n\t\tnormal.setConstraints(this.client, constrain);\n\t\t\n\t\t//add the fields...\n\t\tadd(this.input);\n\t\tadd(chatDisplay.messageField);\n\t\tadd(this.send);\n\t\tadd(this.quit);\n\t\tadd(this.server);\n\t\tadd(this.client);\n\t\t\n\t\t//set windowlistener and set the window resizability to true\n\t\taddWindowListener(this);\n\t\tsetResizable(true);\n\t\t\n\t\t//adds action listeners for use later on.\n\t\tinput.addActionListener(this);\n\t\tsend.addActionListener(this);\n\t\tquit.addActionListener(this);\n\t\tserver.addActionListener(this);\n\t\tclient.addActionListener(this);\n\t\t\n\t\tthis.setVisible(true);\n\t\t\n\t\trun();\n\t}", "public void show(){\n\n \t//Declaring all the variables. Will be using Text Fields\n \tJFrame frame = new JFrame(\"IIITD Fruit Stall\");\n \t\n \t//Setting up the Header Panel\n \tJLabel inven = new JLabel(\"Inventory\",SwingConstants.CENTER);\t\n \tJLabel user = new JLabel(\"User\",SwingConstants.CENTER);\n \tJTextField i1 = new JTextField(\"Items\",SwingConstants.CENTER);\n \ti1.setEnabled(false);\n \tJTextField q1 = new JTextField(\"Quantity\",SwingConstants.CENTER);\n \tq1.setEnabled(false);\n \tJTextField i2 = new JTextField(\"Items\",SwingConstants.CENTER);\n \ti2.setEnabled(false);\n \tJTextField q2 = new JTextField(\"Quantity\",SwingConstants.CENTER);\n \tq2.setEnabled(false);\n \t\n \t\n \t//Making the grid\n \t\n \tJPanel panel = new JPanel(new GridBagLayout());\n GridBagConstraints cst = new GridBagConstraints();\n \n \n \n \n /* ----------------------------------------------------------\n * MAKING THE HEADER PANELS\n * ----------------------------------------------------------\n */\n \n \n //Adding the Inventory and the User Grids\n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=0;\n cst.gridwidth=2;\n panel.add(inven,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=0;\n cst.gridwidth=2;\n panel.add(user, cst);\n \n \n //Adding the Items and Quantity tags\n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=2;\n cst.gridwidth=1;\n panel.add(i1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=2;\n cst.gridwidth=1;\n panel.add(q1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=2;\n cst.gridwidth=1;\n panel.add(i2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=2;\n cst.gridwidth=1;\n panel.add(q2,cst);\n \n \n /* ----------------------------------------------------------\n * FOR THE INVENTORY\n * ----------------------------------------------------------\n */\n \n //Fruit and Quantity list \n JTextField a1 = new JTextField(\"Apple\",SwingConstants.CENTER);\t\n a1.setEnabled(false);\n \t\n \tJTextField m1 = new JTextField(\"Mango\",SwingConstants.CENTER);\t\n \tm1.setEnabled(false);\n \t\n \tJTextField o1 = new JTextField(\"Orange\",SwingConstants.CENTER);\t\n \to1.setEnabled(false);\n \t\n \tJTextField p1 = new JTextField(\"Pineapple\",SwingConstants.CENTER);\t\n \tp1.setEnabled(false);\n \t\n \tJTextField b1 = new JTextField(\"Banana\",SwingConstants.CENTER);\t\n \tb1.setEnabled(false);\n \t\n \tJTextField aq1 = new JTextField(\"10\");\t\n \taq1.setEnabled(false);\n \t\n \tJTextField mq1 = new JTextField(\"6\");\t\n \tmq1.setEnabled(false);\n \t\n \tJTextField oq1 = new JTextField(\"8\");\t\n \toq1.setEnabled(false);\n \t\n \tJTextField pq1 = new JTextField(\"2\");\t\n \tpq1.setEnabled(false);\n \t\n \tJTextField bq1 = new JTextField(\"4\");\t\n \tbq1.setEnabled(false);\n \t\n \t//Displaying the inventory lists\n \t\n \tcst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=4;\n cst.gridwidth=1;\n panel.add(a1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=5;\n cst.gridwidth=1;\n panel.add(m1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=6;\n cst.gridwidth=1;\n panel.add(o1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=7;\n cst.gridwidth=1;\n panel.add(p1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=8;\n cst.gridwidth=1;\n panel.add(b1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=4;\n cst.gridwidth=1;\n panel.add(aq1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=5;\n cst.gridwidth=1;\n panel.add(mq1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=6;\n cst.gridwidth=1;\n panel.add(oq1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=7;\n cst.gridwidth=1;\n panel.add(pq1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=8;\n cst.gridwidth=1;\n panel.add(bq1,cst);\n \t\n /* ----------------------------------------------------------\n * FOR THE USER\n * ----------------------------------------------------------\n */\n \n JTextField a2 = new JTextField(\"Apple\");\t\n a2.setEnabled(false);\n \t\n \tJTextField m2 = new JTextField(\"Mango\");\t\n \tm2.setEnabled(false);\n \t\n \tJTextField o2 = new JTextField(\"Orange\");\t\n \to2.setEnabled(false);\n \t\n \tJTextField p2 = new JTextField(\"Pineapple\");\t\n \tp2.setEnabled(false);\n \t\n \tJTextField b2 = new JTextField(\"Banana\");\t\n \tb2.setEnabled(false);\n \t\n \tJTextField aq2 = new JTextField(\"0\");\t\n \t\n \t\n \tJTextField mq2 = new JTextField(\"0\");\t\n \t\n \t\n \tJTextField oq2 = new JTextField(\"0\");\t\n \t\n \t\n \tJTextField pq2 = new JTextField(\"0\");\t\n \t\n \n \tJTextField bq2 = new JTextField(\"0\");\t\n \n \n \t\n \t//Displaying the user lists\n \t\n \t\n \tcst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=4;\n cst.gridwidth=1;\n panel.add(a2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=5;\n cst.gridwidth=1;\n panel.add(m2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=6;\n cst.gridwidth=1;\n panel.add(o2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=7;\n cst.gridwidth=1;\n panel.add(p2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=8;\n cst.gridwidth=1;\n panel.add(b2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=4;\n cst.gridwidth=1;\n panel.add(aq2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=5;\n cst.gridwidth=1;\n panel.add(mq2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=6;\n cst.gridwidth=1;\n panel.add(oq2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=7;\n cst.gridwidth=1;\n panel.add(pq2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=8;\n cst.gridwidth=1;\n panel.add(bq2,cst);\n \n /* ----------------------------------------------------------\n * Total Fields\n * ----------------------------------------------------------\n */\n \n JTextField t1 = new JTextField(\"Total\");\t\n t1.setEnabled(false);\n \t\n \tJTextField tq1 = new JTextField(\"30\");\t\n \ttq1.setEnabled(false);\n \t\n \tJTextField t2 = new JTextField(\"Total\");\t\n \tt2.setEnabled(false);\n \t\n \tfinal JTextField tq2 = new JTextField(\"0\");\t\n \ttq2.setEditable(false);\n \n \t//Displaying the total cells \n \t\n \t cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=0;\n cst.gridy=9;\n cst.gridwidth=1;\n panel.add(t1,cst);\n \n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=1;\n cst.gridy=9;\n cst.gridwidth=1;\n panel.add(tq1,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=2;\n cst.gridy=9;\n cst.gridwidth=1;\n panel.add(t2,cst);\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=9;\n cst.gridwidth=1;\n panel.add(tq2,cst);\n \n /*\n * The following commented code was written in order to change the \"Total\" field dynamically.\n * Changed after a query raised on BackPack.\n */\n \n /*DocumentFilter df = new DocumentFilter() {\n @Override\n public void insertString(FilterBypass fb, int i, String string, AttributeSet as) throws BadLocationException {\n\n if (isDigit(string)) {\n super.insertString(fb, i, string, as);\n calcAndSetTotal();\n }\n }\n\n @Override\n public void remove(FilterBypass fb, int i, int i1) throws BadLocationException {\n super.remove(fb, i, i1);\n calcAndSetTotal();\n }\n\n @Override\n public void replace(FilterBypass fb, int i, int i1, String string, AttributeSet as) throws BadLocationException {\n if (isDigit(string)) {\n super.replace(fb, i, i1, string, as);\n calcAndSetTotal();\n\n }\n }\n\n private boolean isDigit(String string) {\n for (int n = 0; n < string.length(); n++) {\n char c = string.charAt(n); \n if (!Character.isDigit(c)) {\n return false;\n }\n }\n return true;\n }\n\n void calcAndSetTotal() {\n int sum = 0;\n\n if (!aq2.getText().isEmpty()) {\n sum += Integer.parseInt(aq2.getText());//we must add this\n }\n if (!mq2.getText().isEmpty()) {\n sum += Integer.parseInt(mq2.getText());//we must add this\n }\n if (!oq2.getText().isEmpty()) {\n sum += Integer.parseInt(oq2.getText());//we must add this\n }\n if (!pq2.getText().isEmpty()) {\n sum += Integer.parseInt(pq2.getText());//we must add this\n }\n if (!bq2.getText().isEmpty()) {\n sum += Integer.parseInt(bq2.getText());//we must add this\n }\n \n tq2.setText(String.valueOf(sum));\n }\n };\n \n ((AbstractDocument) (aq2.getDocument())).setDocumentFilter(df);\n ((AbstractDocument) (mq2.getDocument())).setDocumentFilter(df);\n ((AbstractDocument) (oq2.getDocument())).setDocumentFilter(df);\n ((AbstractDocument) (pq2.getDocument())).setDocumentFilter(df);\n ((AbstractDocument) (bq2.getDocument())).setDocumentFilter(df);\n \n \t*/\n \n \n /* ----------------------------------------------------------\n * MAKING THE SUBMIT BUTTON\n * ----------------------------------------------------------\n */\n \t\n JButton b = new JButton(\"Submit\");\n \n /*\n * Adding the Action listener on the Button --------------------\n * \n */\n \n b.addActionListener(new ActionListener(){\n \t public void actionPerformed(ActionEvent e){\n \t \tint sum=0;\n \t int v1=Integer.parseInt(aq2.getText());\n \t int v2=Integer.parseInt(mq2.getText());\n \t int v3=Integer.parseInt(oq2.getText());\n \t int v4=Integer.parseInt(pq2.getText());\n \t int v5=Integer.parseInt(bq2.getText());\n \t \n \t int a= Integer.parseInt(aq1.getText());\n \t int m=Integer.parseInt(mq1.getText());\n \t int o=Integer.parseInt(oq1.getText());\n \t int p=Integer.parseInt(pq1.getText());\n \t int b=Integer.parseInt(bq1.getText());\n \t \n \t if (v1<=a){\n \t \tsum+=v1;\n \t \ta=a-v1;\n \t \tif (a==0){\n \t \t\taq2.setEnabled(false);\n \t \t}\n \t \taq1.setText(Integer.toString(a));\n \t }\n \t if (v2<=m){\n \t \tsum+=v2;\n \t \tm=m-v2;\n \t \tif (m==0){\n \t \t\tmq2.setEnabled(false);\n \t \t}\n \t \tmq1.setText(Integer.toString(m));\n \t }\n \t if (v3<=o){\n \t \tsum+=v3;\n \t \to=o-v3;\n \t \tif (o==0){\n \t \t\toq2.setEnabled(false);\n \t \t}\n \t \toq1.setText(Integer.toString(o));\n \t }\n \t if (v4<=p){\n \t \tsum+=v4;\n \t \tp=p-v4;\n \t \tif (p==0){\n \t \t\tpq2.setEnabled(false);\n \t \t}\n \t \tpq1.setText(Integer.toString(p));\n \t }\n \t if (v5<=b){\n \t \tsum+=v5;\n \t \tb=b-v5;\n \t \tif (b==0){\n \t \t\tbq2.setEnabled(false);\n \t \t}\n \t \tbq1.setText(Integer.toString(b));\n \t }\n \t aq2.setText(\"0\");\n \t mq2.setText(\"0\");\n \t oq2.setText(\"0\");\n \t pq2.setText(\"0\");\n \t bq2.setText(\"0\");\n \t \n \t tq1.setText(Integer.toString(a+m+o+p+b));\n \t tq2.setText(Integer.toString(sum));\n \t }\n\n });\n \n // Displaying the Button\n \n cst.fill = GridBagConstraints.HORIZONTAL;\n cst.gridx=3;\n cst.gridy=13;\n cst.gridwidth=1;\n panel.add(b,cst);\n\n \n //Displaying the Whole Frame\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().add(panel);\n frame.pack();\n frame.setVisible(true);\n \n \n \n\t}", "public void initComponents() {\n greg = new javax.swing.JList();\n textPanel = new javax.swing.JPanel();\n //Istvan phase 5\n text = new javax.swing.JTextField();\n //End Istvan phase 5\n optionsPanel = new javax.swing.JPanel();\n size = new javax.swing.JComboBox();\n families = new javax.swing.JComboBox();\n bold = new javax.swing.JRadioButton();\n italics = new javax.swing.JRadioButton();\n underline = new javax.swing.JRadioButton();\n okPanel = new javax.swing.JPanel();\n Ok = new javax.swing.JButton();\n Cancel = new javax.swing.JButton();\n\n\n addWindowListener(new java.awt.event.WindowAdapter() {\n\n public void windowClosing(java.awt.event.WindowEvent evt) {\n closeDialog(evt);\n }\n });\n\n getContentPane().add(greg, java.awt.BorderLayout.NORTH);\n//Istvan phase 5\n text.setColumns(30);\n text.setMinimumSize(new java.awt.Dimension(30, 20));\n text.setMaximumSize(new java.awt.Dimension(30, 20));\n text.setPreferredSize(new java.awt.Dimension(30, 20));\n textPanel.add(text);\n//End Istvan phase 5\n getContentPane().add(textPanel, java.awt.BorderLayout.NORTH);\n\n optionsPanel.setLayout(new java.awt.GridBagLayout());\n java.awt.GridBagConstraints gridBagConstraints1;\n\n size.setMaximumRowCount(15);\n size.addActionListener(new java.awt.event.ActionListener() {\n\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sizeActionPerformed(evt);\n }\n });\n\n gridBagConstraints1 = new java.awt.GridBagConstraints();\n gridBagConstraints1.gridx = 1;\n gridBagConstraints1.gridy = 1;\n optionsPanel.add(size, gridBagConstraints1);\n\n families.setMaximumRowCount(15);\n//\t families.setSelectedIndex( letterTool.currentFont );\n families.addActionListener(new java.awt.event.ActionListener() {\n\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n\n familiesActionPerformed(evt);\n }\n });\n\n gridBagConstraints1 = new java.awt.GridBagConstraints();\n gridBagConstraints1.gridx = 0;\n gridBagConstraints1.gridy = 1;\n optionsPanel.add(families, gridBagConstraints1);\n\n bold.setText(\"bold\");\n gridBagConstraints1 = new java.awt.GridBagConstraints();\n gridBagConstraints1.gridx = 1;\n gridBagConstraints1.gridy = 0;\n optionsPanel.add(bold, gridBagConstraints1);\n\n italics.setText(\"italics\");\n gridBagConstraints1 = new java.awt.GridBagConstraints();\n optionsPanel.add(italics, gridBagConstraints1);\n\n underline.setText(\"underline\");\n gridBagConstraints1 = new java.awt.GridBagConstraints();\n gridBagConstraints1.gridx = 0;\n gridBagConstraints1.gridy = 0;\n optionsPanel.add(underline, gridBagConstraints1);\n\n getContentPane().add(optionsPanel, java.awt.BorderLayout.SOUTH);\n\n Ok.setText(\"Ok\"); /*FAULT:: Ok.setText(\"okk\"); */\n Ok.addActionListener(new java.awt.event.ActionListener() {\n\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n OkActionPerformed(evt);\n }\n });\n\n okPanel.add(Ok);\n\n Cancel.setText(\"Cancel\");\n Cancel.addActionListener(new java.awt.event.ActionListener() {\n\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n setVisible(false);\n dispose();\n }\n });\n\n okPanel.add(Cancel);\n\n\n getContentPane().add(okPanel, java.awt.BorderLayout.EAST);\n\n pack();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tGridBagLayout gridBagLayout = new GridBagLayout();\n\t\tgridBagLayout.columnWidths = new int[]{48, 80, 162, 80, 48};\n\t\tgridBagLayout.rowHeights = new int[]{36, 0, 0, 0, 0, 0, 0};\n\t\tgridBagLayout.columnWeights = new double[]{0.0, 1.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tgridBagLayout.rowWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tframe.getContentPane().setLayout(gridBagLayout);\n\t\t\n\t\tJButton btnAnalysis = new JButton(\"Analysis\");\n\t\tbtnAnalysis.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tStepChoose stepChoose = new StepChoose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJLabel lblWelcomeTitle = new JLabel(\"welcome title\");\n\t\tlblWelcomeTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tGridBagConstraints gbc_lblWelcomeTitle = new GridBagConstraints();\n\t\tgbc_lblWelcomeTitle.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblWelcomeTitle.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblWelcomeTitle.gridx = 2;\n\t\tgbc_lblWelcomeTitle.gridy = 1;\n\t\tframe.getContentPane().add(lblWelcomeTitle, gbc_lblWelcomeTitle);\n\t\tGridBagConstraints gbc_btnAnalysisBtn = new GridBagConstraints();\n\t\tgbc_btnAnalysisBtn.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnAnalysisBtn.gridx = 1;\n\t\tgbc_btnAnalysisBtn.gridy = 4;\n\t\tframe.getContentPane().add(btnAnalysis, gbc_btnAnalysisBtn);\n\t\t\n\t\tJButton btnDecision = new JButton(\"Decision\");\n\t\tGridBagConstraints gbc_btnDecision= new GridBagConstraints();\n\t\tgbc_btnDecision.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnDecision.gridx = 3;\n\t\tgbc_btnDecision.gridy = 4;\n\t\tframe.getContentPane().add(btnDecision, gbc_btnDecision);\n\t}", "public void displayNewAlerts(User user, JFrame frame, StockMangement sm){\n\n namePanel.removeAll();\n categoryPanel.removeAll();\n locationPanel.removeAll();\n datePanel.removeAll();\n moreButtonPanel.removeAll();\n alertTagPanel.removeAll();\n idNumberPanel.removeAll();\n archiveAlertPanel.removeAll();\n\n namePanel.setLayout(new GridBagLayout());\n GridBagConstraints nameLayout = new GridBagConstraints();\n nameLayout.fill = GridBagConstraints.BOTH;\n nameLayout.weightx = 1.0;\n nameLayout.weighty = 2;\n nameLayout.gridx = 0;\n nameLayout.gridy = 0;\n\n categoryPanel.setLayout(new GridBagLayout());\n GridBagConstraints categoryLayout = new GridBagConstraints();\n categoryLayout.fill = GridBagConstraints.BOTH;\n categoryLayout.weightx = 1.0;\n categoryLayout.weighty = 2;\n categoryLayout.gridx = 0;\n categoryLayout.gridy = 0;\n\n locationPanel.setLayout(new GridBagLayout());\n GridBagConstraints locationLayout = new GridBagConstraints();\n locationLayout.fill = GridBagConstraints.BOTH;\n locationLayout.weightx = 1.0;\n locationLayout.weighty = 2;\n locationLayout.gridx = 0;\n locationLayout.gridy = 0;\n\n datePanel.setLayout(new GridBagLayout());\n GridBagConstraints dateLayout = new GridBagConstraints();\n dateLayout.fill = GridBagConstraints.BOTH;\n dateLayout.weightx = 1.0;\n dateLayout.weighty = 2;\n dateLayout.gridx = 0;\n dateLayout.gridy = 0;\n\n alertTagPanel.setLayout(new GridBagLayout());\n GridBagConstraints tagLayout = new GridBagConstraints();\n tagLayout.fill = GridBagConstraints.BOTH;\n tagLayout.weightx = 1.0;\n tagLayout.weighty = 2;\n tagLayout.gridx = 0;\n tagLayout.gridy = 0;\n\n moreButtonPanel.setLayout(new GridBagLayout());\n GridBagConstraints moreLayout = new GridBagConstraints();\n moreLayout.fill = GridBagConstraints.BOTH;\n moreLayout.weightx = 1.0;\n moreLayout.weighty = 2;\n moreLayout.gridx = 0;\n moreLayout.gridy = 0;\n\n idNumberPanel.setLayout(new GridBagLayout());\n GridBagConstraints idNumberLayout = new GridBagConstraints();\n idNumberLayout.fill = GridBagConstraints.BOTH;\n idNumberLayout.weightx = 1.0;\n idNumberLayout.weighty = 2;\n idNumberLayout.gridx = 0;\n idNumberLayout.gridy = 0;\n\n archiveAlertPanel.setLayout(new GridBagLayout());\n GridBagConstraints archiveLayout = new GridBagConstraints();\n archiveLayout.fill = GridBagConstraints.BOTH;\n archiveLayout.weightx = 1.0;\n archiveLayout.weighty = 2;\n archiveLayout.gridx = 0;\n archiveLayout.gridy = 0;\n\n ArrayList<AlertLine> newAlertsList = null;\n\n //Extract all new alerts\n try {\n newAlertsList = DataBase.ExtractData.extractAllNewAlerts(user, frame, sm);\n\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"New alerts have not been extracted. \",\n \"Extraction new alerts error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //Display all new alerts\n assert newAlertsList != null;\n for (AlertLine alertLine: newAlertsList){\n\n namePanel.add(alertLine.getAlertName(), nameLayout);\n categoryPanel.add(alertLine.getAlertCategory(), categoryLayout);\n locationPanel.add(alertLine.getAlertLocation(), locationLayout);\n datePanel.add(alertLine.getAlertDate(), dateLayout);\n alertTagPanel.add(alertLine.getAlertTag(), tagLayout);\n moreButtonPanel.add(alertLine.getAlertMoreButton(), moreLayout);\n idNumberPanel.add(alertLine.getAlertId(), idNumberLayout);\n archiveAlertPanel.add(alertLine.getAlertDoneButton(), archiveLayout);\n\n nameLayout.gridy += 1;\n categoryLayout.gridy += 1;\n locationLayout.gridy += 1;\n dateLayout.gridy += 1;\n tagLayout.gridy += 1;\n moreLayout.gridy += 1;\n idNumberLayout.gridy += 1;\n archiveLayout.gridy += 1;\n\n }\n\n frame.repaint();\n frame.revalidate();\n\n }", "public void guiSetup(Container pane)\n {\n \t/*\n \t * How it's organized:\n \t * 3 separate columns\n \t * Components in column one are small\n \t * Main grid component in column 2 takes up multiple spaces\n \t * Found word components in column 3 takes up multiple spaces as well\n \t */\n\t\tpane.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.weighty = 0.5;\n\t\t\n\t\t/*\n\t\t * First column GUI components\n\t\t */\n\t\tc.weightx = 0.25;\n\t\tc.gridx = 0;\n\t\t\n\t\tFont f = new Font( \"SansSerif\", Font.ITALIC, 34 );\n\t\ttitle = new JLabel( \"Boggle\" );\n\t\ttitle.setFont( f );\n\t\tc.gridy = 0;\n\t\tpane.add(title, c);\n\t\t\n\t\tscoreLabel = new JLabel( \"Score: 0\" );\n\t\tf = new Font( \"Serif\", Font.PLAIN, 24 );\n\t\tscoreLabel.setFont( f );\n\t\tc.gridy = 1;\n\t\tpane.add(scoreLabel, c);\n\t\n\t\ttimerLabel = new JLabel( \"Timer: 3:00\" );\n\t\ttimerLabel.setFont( f );\n\t\tc.gridy = 2;\n\t\tpane.add(timerLabel, c);\n\t\n\t\tmessagesLabel = new JLabel( \"Enter word: \" );\n\t\tf = new Font( \"Serif\", Font.PLAIN, 20 );\n\t\tmessagesLabel.setFont( f );\n\t\tf = new Font( \"Serif\", Font.PLAIN, 24 );\n\t\tc.gridy = 3;\n\t\tc.fill = GridBagConstraints.VERTICAL;\n\t\tpane.add(messagesLabel, c);\n\t\tc.fill = GridBagConstraints.NONE;\n\t\t\n\t\trestart = new JButton( \"Restart\" );\n\t\trestart.addActionListener( this );\n\t\t\n\t\tc.gridy = 4;\n\t\tpane.add(restart, c);\n\t\t\n\t\tpause = new JButton( \"Pause\" );\n\t\tpause.addActionListener( this );\n\t\t\n\t\tc.gridy = 5;\n\t\tpane.add(pause, c);\n\t\t\n\t\texit = new JButton( \"Exit\" );\n\t\texit.addActionListener( this );\n\t\t\n\t\tc.gridy = 6;\n\t\tpane.add(exit, c);\n\t\t\n\t\t/*\n\t\t * Second column\n\t\t */\n\t\tc.gridx = 1;\n\t\tc.weightx = 0.75;\n\t\t\n\t\tguiGrid = new JPanel( new GridLayout( BOARD_SIZE, BOARD_SIZE ) );\n\t\tgridButtons = new JButton[BOARD_SIZE][BOARD_SIZE];\n\t\tg = new Grid( BOARD_SIZE );\n\t\t\n\t\tfor( int i = 0; i < BOARD_SIZE; i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n\t\t\t{\n\t\t\t\tgridButtons[i][j] = new JButton( Character.toString( g.charAt( i, j ) ) );\n\t\t\t\tgridButtons[i][j].addActionListener( this );\n\t\t\t\tgridButtons[i][j].setFont( f );\n\t\t\t\tguiGrid.add( gridButtons[i][j] );\n\t\t\t}\n\t\t}\n\t\t\n\t\tc.gridx = 1;\n\t\tc.gridheight = 3;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tc.gridy = 1;\n\t\tpane.add(guiGrid, c);\n\t\tc.gridheight = 1;\n\t\tc.fill = GridBagConstraints.NONE;\n\t\t\n\t\tnewWord = new JButton( \"New word\" );\n\t\tnewWord.addActionListener( this );\n\t\tc.gridy = 5;\n\t\tpane.add( newWord, c );\n\t\t\n\t\tguessWordArea = new JTextArea( 1, 1 );\n\t\tguessWordArea.setEditable( false );\n\t\tguessWordArea.setBorder(BorderFactory.createEtchedBorder());\n\t\t\n\t\tc.gridy = 6;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tpane.add(guessWordArea, c);\n\t\tc.fill = GridBagConstraints.NONE;\n\t\t\n\t\tsubmitWord = new JButton( \"Submit word\" );\n\t\tsubmitWord.addActionListener( this );\n\t\t\n\t\tc.gridx = 1;\n\t\tc.gridy = 7;\n\t\tpane.add( submitWord, c );\n\t\t\n\t\t/*\n\t\t * Third column\n\t\t */\n\t\tc.gridx = 2;\n\t\tc.weightx = 0.25;\n\t\t\n\t\tJLabel foundTitle = new JLabel( \"Found words:\" );\n\t\tfoundTitle.setFont( f );\n\t\tc.gridy = 1;\n\t\tpane.add( foundTitle, c);\n\t\t\n\t\tfoundWordsArea = new JTextArea( 10, 16 );\n\t\tfoundWordsArea.setEditable( false );\n\t\tc.gridx = 2;\n\t\tc.gridy = 2;\n\t\tc.gridheight = 2;\n\t\tInsets in = new Insets( 25, 25, 25, 25 );\n\t\tfoundWordsArea.setMargin( in );\n\t\tfoundWordsArea.setBorder(BorderFactory.createEtchedBorder()); \n\t\tpane.add( foundWordsArea, c);\n }", "private void initComponents() {\n\t\tlabel1 = new JLabel();\n\t\tlabel2 = new JLabel();\n\t\tlblId = new JLabel();\n\t\tlabel3 = new JLabel();\n\t\ttxtName = new JTextField();\n\t\tlabel8 = new JLabel();\n\t\ttxtCapacity = new JTextField();\n\t\tlabel4 = new JLabel();\n\t\ttxtSurvivalRate = new JTextField();\n\t\tlabel5 = new JLabel();\n\t\tcomboReserve1 = new JComboBox<>();\n\t\tlabel6 = new JLabel();\n\t\tcomboReserve2 = new JComboBox<>();\n\n\t\t//======== this ========\n\t\tsetLayout(new GridBagLayout());\n\t\t((GridBagLayout)getLayout()).columnWidths = new int[] {54, 0, 0};\n\t\t((GridBagLayout)getLayout()).rowHeights = new int[] {0, 0, 0, 0, 0, 0, 0, 0};\n\t\t((GridBagLayout)getLayout()).columnWeights = new double[] {0.0, 0.0, 1.0E-4};\n\t\t((GridBagLayout)getLayout()).rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4};\n\n\t\t//---- label1 ----\n\t\tlabel1.setText(\"Link Properties\");\n\t\tlabel1.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tadd(label1, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 15, 0), 0, 0));\n\n\t\t//---- label2 ----\n\t\tlabel2.setText(\"id\");\n\t\tadd(label2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.VERTICAL,\n\t\t\tnew Insets(0, 0, 15, 15), 0, 0));\n\t\tadd(lblId, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 15, 0), 0, 0));\n\n\t\t//---- label3 ----\n\t\tlabel3.setText(\"name\");\n\t\tadd(label3, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.VERTICAL,\n\t\t\tnew Insets(0, 0, 15, 15), 0, 0));\n\t\tadd(txtName, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 15, 0), 0, 0));\n\n\t\t//---- label8 ----\n\t\tlabel8.setText(\"capacity\");\n\t\tadd(label8, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.VERTICAL,\n\t\t\tnew Insets(0, 0, 15, 15), 0, 0));\n\t\tadd(txtCapacity, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 15, 0), 0, 0));\n\n\t\t//---- label4 ----\n\t\tlabel4.setText(\"survival rate\");\n\t\tadd(label4, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.VERTICAL,\n\t\t\tnew Insets(0, 0, 15, 15), 0, 0));\n\t\tadd(txtSurvivalRate, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 15, 0), 0, 0));\n\n\t\t//---- label5 ----\n\t\tlabel5.setText(\"reserve 1\");\n\t\tadd(label5, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.VERTICAL,\n\t\t\tnew Insets(0, 0, 15, 15), 0, 0));\n\t\tadd(comboReserve1, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 15, 0), 0, 0));\n\n\t\t//---- label6 ----\n\t\tlabel6.setText(\"reserve 2\");\n\t\tadd(label6, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.VERTICAL,\n\t\t\tnew Insets(0, 0, 0, 15), 0, 0));\n\t\tadd(comboReserve2, new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0,\n\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH,\n\t\t\tnew Insets(0, 0, 0, 0), 0, 0));\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\n\t}", "public SurveyView(String TableNumber) {\r\n \tSurveyView = new JPanel();\r\n// \tcontentPane.add(MenuView, BorderLayout.CENTER);\r\n \tSurveyView.setLayout(new BorderLayout(0, 0));\r\n \ttablenumber = TableNumber;\r\n \t\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tSurveyView.add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tbtnSubmit = new JButton(\"Submit\");\r\n\t\tpanel.add(btnSubmit, BorderLayout.SOUTH);\r\n\t\t\r\n\t\tlblNewLabel = new JLabel(\"Take A Survey\");\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tpanel.add(lblNewLabel, BorderLayout.NORTH);\r\n\t\t\r\n\t\tpanel_1 = new JPanel();\r\n\t\tpanel.add(panel_1, BorderLayout.CENTER);\r\n\t\tGridBagLayout gbl_panel_1 = new GridBagLayout();\r\n\t\tgbl_panel_1.columnWidths = new int[]{124, 92, 104, 0};\r\n\t\tgbl_panel_1.rowHeights = new int[]{14, 0, 0, 0, 0, 0, 0, 0, 0, 0};\r\n\t\tgbl_panel_1.columnWeights = new double[]{0.0, 0.0, 1.0, Double.MIN_VALUE};\r\n\t\tgbl_panel_1.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel_1.setLayout(gbl_panel_1);\r\n\t\t\r\n\t\tlblHowWasThe = new JLabel(\" How was the food?\");\r\n\t\tGridBagConstraints gbc_lblHowWasThe = new GridBagConstraints();\r\n\t\tgbc_lblHowWasThe.anchor = GridBagConstraints.NORTHWEST;\r\n\t\tgbc_lblHowWasThe.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblHowWasThe.gridx = 0;\r\n\t\tgbc_lblHowWasThe.gridy = 0;\r\n\t\tpanel_1.add(lblHowWasThe, gbc_lblHowWasThe);\r\n\t\t\r\n\t\trdbtnDelicious = new JRadioButton(\"Delicious!\");\r\n\t\tGridBagConstraints gbc_rdbtnDelicious = new GridBagConstraints();\r\n\t\tgbc_rdbtnDelicious.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_rdbtnDelicious.gridx = 0;\r\n\t\tgbc_rdbtnDelicious.gridy = 1;\r\n\t\tpanel_1.add(rdbtnDelicious, gbc_rdbtnDelicious);\r\n\t\t\r\n\t\trdbtnPrettyGood = new JRadioButton(\"Pretty Good\");\r\n\t\tGridBagConstraints gbc_rdbtnPrettyGood = new GridBagConstraints();\r\n\t\tgbc_rdbtnPrettyGood.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_rdbtnPrettyGood.gridx = 0;\r\n\t\tgbc_rdbtnPrettyGood.gridy = 2;\r\n\t\tpanel_1.add(rdbtnPrettyGood, gbc_rdbtnPrettyGood);\r\n\t\t\r\n\t\trdbtnNotGreat = new JRadioButton(\"Not Great\");\r\n\t\tGridBagConstraints gbc_rdbtnNotGreat = new GridBagConstraints();\r\n\t\tgbc_rdbtnNotGreat.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_rdbtnNotGreat.gridx = 0;\r\n\t\tgbc_rdbtnNotGreat.gridy = 3;\r\n\t\tpanel_1.add(rdbtnNotGreat, gbc_rdbtnNotGreat);\r\n\t\t\r\n\t\tlblHowWasThe_1 = new JLabel(\" How was the service?\");\r\n\t\tGridBagConstraints gbc_lblHowWasThe_1 = new GridBagConstraints();\r\n\t\tgbc_lblHowWasThe_1.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblHowWasThe_1.anchor = GridBagConstraints.NORTHWEST;\r\n\t\tgbc_lblHowWasThe_1.gridx = 0;\r\n\t\tgbc_lblHowWasThe_1.gridy = 4;\r\n\t\tpanel_1.add(lblHowWasThe_1, gbc_lblHowWasThe_1);\r\n\t\t\r\n\t\ttxtEnterAComment = new JTextField();\r\n\t\ttxtEnterAComment.setText(\"Enter a Comment\");\r\n\t\ttxtEnterAComment.setToolTipText(\"Enter a Comment\");\r\n\t\tGridBagConstraints gbc_txtEnterAComment = new GridBagConstraints();\r\n\t\tgbc_txtEnterAComment.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_txtEnterAComment.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_txtEnterAComment.gridx = 2;\r\n\t\tgbc_txtEnterAComment.gridy = 4;\r\n\t\tpanel_1.add(txtEnterAComment, gbc_txtEnterAComment);\r\n\t\ttxtEnterAComment.setColumns(10);\r\n\t\t\r\n\t\trdbtnExcellent = new JRadioButton(\"Excellent\");\r\n\t\tGridBagConstraints gbc_rdbtnExcellent = new GridBagConstraints();\r\n\t\tgbc_rdbtnExcellent.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_rdbtnExcellent.gridx = 0;\r\n\t\tgbc_rdbtnExcellent.gridy = 5;\r\n\t\tpanel_1.add(rdbtnExcellent, gbc_rdbtnExcellent);\r\n\t\t\r\n\t\trdbtnAcceptable = new JRadioButton(\"Acceptable\");\r\n\t\tGridBagConstraints gbc_rdbtnAcceptable = new GridBagConstraints();\r\n\t\tgbc_rdbtnAcceptable.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_rdbtnAcceptable.gridx = 0;\r\n\t\tgbc_rdbtnAcceptable.gridy = 6;\r\n\t\tpanel_1.add(rdbtnAcceptable, gbc_rdbtnAcceptable);\r\n\t\t\r\n\t\trdbtnPoor = new JRadioButton(\"Poor\");\r\n\t\tGridBagConstraints gbc_rdbtnPoor = new GridBagConstraints();\r\n\t\tgbc_rdbtnPoor.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_rdbtnPoor.gridx = 0;\r\n\t\tgbc_rdbtnPoor.gridy = 7;\r\n\t\tpanel_1.add(rdbtnPoor, gbc_rdbtnPoor);\r\n\t\tbtnSubmit.addActionListener(this);\r\n\t}", "private void initPanel() {\n\n\t\t// Create a group with radioButtons\n\t\tButtonGroup group = new ButtonGroup();\n\t\t// add radioButtons in ButtonGroup\n\t\tgroup.add(configProfilingCondSetRBtn);\n\t\tgroup.add(useAllCondSetsRBtn);\n\n\t\t// table models\n\t\tmodelCondTable = new DefaultTableModel(translator.getTranslation(Tags.CONDTIONS_TABLE_HEAD).split(\";\"), 0);\n\t\t\n\t\t// configure table\n\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\t\ttable.setPreferredScrollableViewportSize(new Dimension(scrollPane.getWidth(), scrollPane.getHeight()));\n\t\ttable.setModel(modelCondTable);\n\n\t\t// Set element transparent.\n\t\tscrollPane.setOpaque(false);\n\n\t\t//set layout manager\n\t\tthis.setLayout(new GridBagLayout());\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\n\t\t// -------------- add the panel for select the document type\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tthis.add(createSelectDocTypePanel(),gbc);\n\n\t\t// -------------- add checkBox for select to check using profiling\n\t\t// conditions\n\t\tgbc.gridy++;\n\t\tgbc.weightx = 1;\n\t\tgbc.insets.top = InsetValues.COMPONENT_TOP_INSET;\n\t\tthis.add(useProfilingCondCBox, gbc);\n\t\t\n\t\t// ------------------ add checkBox for select to check using all available\n\t\t// conditions sets and a button to display Preferences/Profiling/Conditional text.\n\t\tgbc.gridy++;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.insets.left = InsetValues.NEW_LEVEL_LEFT_INSET;\n\t\tthis.add(createAvailableConditionsSetPanel(), gbc);\n\t\t\n\t\t// -------------- Radio button for select to configure a conditions set\n\t\tgbc.gridy++;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tconfigProfilingCondSetRBtn.setSelected(true);\n\t\tthis.add(configProfilingCondSetRBtn, gbc);\n\n\t\t// --------------- add scrollPane, that contains conditionsTable\n\t\tgbc.gridy++;\n\t\tgbc.weighty = 1;\n\t\tgbc.insets.left = 2 * InsetValues.NEW_LEVEL_LEFT_INSET;\n\t\tgbc.fill = GridBagConstraints.BOTH;\n\t\t// add list selection listener\n\t\ttable.getSelectionModel().addListSelectionListener(listSelectionListener);\n\t\tthis.add(scrollPane, gbc);\n\n\t\t// ---------------- add getBtn, addBtn and removeBtn\n\t\tgbc.gridy++;\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.insets.left = 0;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.anchor = GridBagConstraints.EAST;\n\n\t\t// panel that contains get, add and remove buttons\n\t\tJPanel btnsPanel = new JPanel(new GridLayout(1, 2));\n\t\tbtnsPanel.setOpaque(false);\n\n\t\tbtnsPanel.add(addBtn);\n\t\tbtnsPanel.add(remvBtn);\n\n\t\t// add table btnsPanel\n\t\tthis.add(btnsPanel, gbc);\n\n\t\t\n\t\t// ------------------ add reportUndefined checkBox\n\t\tgbc.gridy++;\n\t\tgbc.weightx = 1;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tthis.add(reportUndefinedConditionsCBox,gbc);\n\n\t}", "private void initComponents() {\n dialogPane = new JPanel();\n contentPanel = new JPanel();\n label1 = new JLabel();\n buttonBar = new JPanel();\n compareDesc = new JCheckBox();\n compareUnits = new JCheckBox();\n compareNames = new JCheckBox();\n cancelButton = new JButton();\n okButton = new JButton();\n table1 = new JTextField();\n showMissing = new JCheckBox();\n table2 = new JTextField();\n label2 = new JLabel();\n cleanUnits = new JCheckBox();\n udUnits = new JCheckBox();\n\n // ======== this ========\n setTitle(\"Compare Grib1 tables\");\n Container contentPane = getContentPane();\n contentPane.setLayout(new BorderLayout());\n\n // ======== dialogPane ========\n {\n dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));\n dialogPane.setLayout(new BorderLayout());\n\n // ======== contentPanel ========\n {\n\n // ---- label1 ----\n label1.setText(\"table1:\");\n label1.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\n // ======== buttonBar ========\n {\n buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0));\n buttonBar.setLayout(new GridBagLayout());\n ((GridBagLayout) buttonBar.getLayout()).columnWidths = new int[] {0, 85, 80};\n ((GridBagLayout) buttonBar.getLayout()).columnWeights = new double[] {1.0, 0.0, 0.0};\n }\n\n // ---- compareDesc ----\n compareDesc.setText(\"compare Desc\");\n compareDesc.setSelected(true);\n\n // ---- compareUnits ----\n compareUnits.setText(\"compareUnits\");\n\n // ---- compareNames ----\n compareNames.setText(\"compareNames\");\n\n // ---- cancelButton ----\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(this::cancelButtonActionPerformed);\n\n // ---- okButton ----\n okButton.setText(\"OK\");\n okButton.addActionListener(this::okButtonActionPerformed);\n\n // ---- table1 ----\n table1.setEditable(false);\n\n // ---- showMissing ----\n showMissing.setText(\"showMissing\");\n\n // ---- table2 ----\n table2.setEditable(false);\n\n // ---- label2 ----\n label2.setText(\"table2:\");\n label2.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\n // ---- cleanUnits ----\n cleanUnits.setText(\"cleanUnits\");\n\n // ---- udUnits ----\n udUnits.setText(\"udUnits\");\n udUnits.setSelected(true);\n\n GroupLayout contentPanelLayout = new GroupLayout(contentPanel);\n contentPanel.setLayout(contentPanelLayout);\n contentPanelLayout.setHorizontalGroup(contentPanelLayout.createParallelGroup()\n .addGroup(contentPanelLayout.createSequentialGroup().addContainerGap().addGroup(contentPanelLayout\n .createParallelGroup(GroupLayout.Alignment.LEADING,\n false)\n .addGroup(contentPanelLayout\n .createSequentialGroup().addGroup(contentPanelLayout\n .createParallelGroup().addComponent(label2).addComponent(label1))\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(contentPanelLayout.createParallelGroup().addGroup(contentPanelLayout\n .createSequentialGroup()\n .addGroup(contentPanelLayout.createParallelGroup().addGroup(contentPanelLayout\n .createSequentialGroup()\n .addGroup(contentPanelLayout\n .createParallelGroup().addComponent(compareUnits).addComponent(compareDesc))\n .addGap(26, 26, 26)\n .addGroup(contentPanelLayout.createParallelGroup().addComponent(showMissing)\n .addComponent(cleanUnits))\n .addGroup(contentPanelLayout.createParallelGroup()\n .addGroup(contentPanelLayout.createSequentialGroup().addGap(15, 15, 15)\n .addComponent(udUnits)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,\n Short.MAX_VALUE)\n .addComponent(okButton, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(cancelButton,\n GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE))\n .addGroup(contentPanelLayout.createSequentialGroup().addGap(18, 18, 18)\n .addComponent(compareNames))))\n .addComponent(table1, GroupLayout.PREFERRED_SIZE, 611, GroupLayout.PREFERRED_SIZE))\n .addGap(111, 111, 111))\n .addComponent(table2, GroupLayout.PREFERRED_SIZE, 611, GroupLayout.PREFERRED_SIZE)))\n .addComponent(buttonBar, GroupLayout.Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 779,\n GroupLayout.PREFERRED_SIZE))\n .addContainerGap()));\n contentPanelLayout.setVerticalGroup(contentPanelLayout.createParallelGroup()\n .addGroup(contentPanelLayout.createSequentialGroup().addGap(11, 11, 11)\n .addGroup(contentPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(table1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n GroupLayout.PREFERRED_SIZE)\n .addComponent(label1))\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(contentPanelLayout\n .createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label2).addComponent(table2,\n GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(contentPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(compareDesc).addComponent(showMissing).addComponent(compareNames))\n .addGroup(contentPanelLayout\n .createParallelGroup()\n .addGroup(contentPanelLayout.createSequentialGroup().addGap(22, 22, 22)\n .addGroup(contentPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(cancelButton).addComponent(okButton)))\n .addGroup(contentPanelLayout.createSequentialGroup()\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(contentPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(compareUnits).addComponent(cleanUnits).addComponent(udUnits))))\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE).addComponent(buttonBar,\n GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addContainerGap()));\n }\n dialogPane.add(contentPanel, BorderLayout.SOUTH);\n }\n contentPane.add(dialogPane, BorderLayout.CENTER);\n pack();\n setLocationRelativeTo(getOwner());\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "private void $$$setupUI$$$() {\n panel2 = new JPanel();\n panel2.setLayout(new GridBagLayout());\n titreTextField = new JTextField();\n titreTextField.setText(\"Titre\");\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.gridwidth = 2;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(titreTextField, gbc);\n consoleTextField = new JTextField();\n consoleTextField.setText(\"Console\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(consoleTextField, gbc);\n nbJoueurTextField = new JTextField();\n nbJoueurTextField.setText(\"NbJoueur\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(nbJoueurTextField, gbc);\n checkBox1 = new JCheckBox();\n checkBox1.setText(\"CheckBox\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 4;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n panel2.add(checkBox1, gbc);\n langueTextField1 = new JTextField();\n langueTextField1.setText(\"Langue\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(langueTextField1, gbc);\n genreTextField = new JTextField();\n genreTextField.setText(\"Genre\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(genreTextField, gbc);\n pegiTextField = new JTextField();\n pegiTextField.setText(\"Pegi\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(pegiTextField, gbc);\n dateDeSortieTextField = new JTextField();\n dateDeSortieTextField.setText(\"Date de sortie\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(dateDeSortieTextField, gbc);\n origineTextField = new JTextField();\n origineTextField.setText(\"Origine\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(origineTextField, gbc);\n commentaireTextArea = new JTextArea();\n commentaireTextArea.setText(\"Commentaire\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 5;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.BOTH;\n panel2.add(commentaireTextArea, gbc);\n saveButton = new JButton();\n saveButton.setText(\"Valider\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel2.add(saveButton, gbc);\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n servicesButton = new JButton();\n servicesButton.setText(\"Services management\");\n panel1.add(servicesButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n surveysManagementButton = new JButton();\n surveysManagementButton.setText(\"Surveys management\");\n panel1.add(surveysManagementButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n connectingAndResultsButton = new JButton();\n connectingAndResultsButton.setText(\"Conecting surveys to services\");\n panel1.add(connectingAndResultsButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Choose option below\");\n panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n results = new JButton();\n results.setText(\"Browse the results\");\n panel1.add(results, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagButton = new JButton();\n Font memberImportTagButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagButton.getFont());\n if (memberImportTagButtonFont != null) memberImportTagButton.setFont(memberImportTagButtonFont);\n memberImportTagButton.setText(\"导入选择的标签分组-取并集\");\n panel2.add(memberImportTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagRetainButton = new JButton();\n Font memberImportTagRetainButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagRetainButton.getFont());\n if (memberImportTagRetainButtonFont != null)\n memberImportTagRetainButton.setFont(memberImportTagRetainButtonFont);\n memberImportTagRetainButton.setText(\"导入选择的标签分组-取交集\");\n panel2.add(memberImportTagRetainButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportAllButton = new JButton();\n Font memberImportAllButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportAllButton.getFont());\n if (memberImportAllButtonFont != null) memberImportAllButton.setFont(memberImportAllButtonFont);\n memberImportAllButton.setText(\"导入所有关注公众号的用户\");\n panel2.add(memberImportAllButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionPanel = new JPanel();\n importOptionPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(importOptionPanel, new GridConstraints(1, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionOpenIdCheckBox = new JCheckBox();\n importOptionOpenIdCheckBox.setEnabled(false);\n importOptionOpenIdCheckBox.setSelected(true);\n importOptionOpenIdCheckBox.setText(\"openId\");\n importOptionPanel.add(importOptionOpenIdCheckBox, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n importOptionPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n importOptionBasicInfoCheckBox = new JCheckBox();\n importOptionBasicInfoCheckBox.setText(\"昵称、性别等基本信息\");\n importOptionBasicInfoCheckBox.setToolTipText(\"每获取一条信息会花费一次每日接口调用量\");\n importOptionPanel.add(importOptionBasicInfoCheckBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n importOptionAvatarCheckBox = new JCheckBox();\n importOptionAvatarCheckBox.setText(\"头像\");\n importOptionAvatarCheckBox.setToolTipText(\"勾选会导致左侧列表甚至WePush变卡哦\");\n importOptionPanel.add(importOptionAvatarCheckBox, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n clearDbCacheButton = new JButton();\n clearDbCacheButton.setText(\"清空本地缓存\");\n importOptionPanel.add(clearDbCacheButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n memberImportTagComboBox.setModel(defaultComboBoxModel1);\n panel3.add(memberImportTagComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagFreshButton = new JButton();\n Font memberImportTagFreshButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagFreshButton.getFont());\n if (memberImportTagFreshButtonFont != null) memberImportTagFreshButton.setFont(memberImportTagFreshButtonFont);\n memberImportTagFreshButton.setText(\"刷新\");\n panel3.add(memberImportTagFreshButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"标签分组\");\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "void startPopupDialog(String windowTitle, int colSize)\n { /* startPopupDialog */\n Panel buttonPanel= null;\t /* place buttons here */\n Button\n ok,\t\t /* update data */\n cancel;\t\t \t/* use default data */\n GridLayout gl; /* for layout of text fields, label, etc */\n \n \n /* [1] initialize */\n gl= new GridLayout(4,1);\n this.setLayout(gl);\t /* set gridlayout to frame */\n \n /* [1] Create User instruction label */\n label= new Label(spaces);\n \n /* [2] Create the buttons and arrange to handle button clicks */\n if(addButtonsCnt>0)\n { /* add button panel */\n buttonPanel= new Panel();\n \n if(addButtonsCnt==1)\n ok= new Button(\"Continue\");\n else ok= new Button(\"Ok\");\n ok.addActionListener(this);\n buttonPanel.add(\"Center\",ok);\n \n if(addButtonsCnt==2)\n {\n cancel= new Button(\" Cancel\");\n cancel.addActionListener(this);\n buttonPanel.add(\"Center\", cancel);\n }\n } /* add button panel */\n \n /* [3] add data text fields to panel */\n this.add(label); /* add to grid. data description label */\n if(addButtonsCnt>=2)\n {\n optionPanel= new Panel();\n this.add(optionPanel);\n \n textField= new TextField(colSize);\n this.add(textField); /* editable text */\n }\n \n /* [4] add buttons panel */\n if(buttonPanel!=null)\n this.add(buttonPanel); /* buttons (ok & cancel) */\n this.addWindowListener(this); /* listener for window events */\n \n /* [5] add components and create frame */\n this.setTitle(windowTitle); /* frame title */\n this.pack();\n \n /* Center frame on the screen, PC only */\n Dimension screen= Toolkit.getDefaultToolkit().getScreenSize();\n Point pos= new Point((screen.width-frame.getSize().width)/2,\n (screen.height-frame.getSize().height)/2);\n this.setLocation(pos);\n \n this.setVisible(false);\t /* hide frame which can be shown later */\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ThemChongChiDinh = new javax.swing.JDialog();\n jPanel4 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n cbBenh = new javax.swing.JComboBox<>();\n jLabel3 = new javax.swing.JLabel();\n cbThuoc = new javax.swing.JComboBox<>();\n btnLuuChongChiDinh = new javax.swing.JButton();\n btnThoat = new javax.swing.JButton();\n SuaChongChiDinh = new javax.swing.JDialog();\n jPanel6 = new javax.swing.JPanel();\n jPanel7 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n cbBenhSua = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n cbThuocSua = new javax.swing.JComboBox<>();\n btnCapNhat = new javax.swing.JButton();\n btnThoat1 = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n tbChongChiDinh = new javax.swing.JTable();\n btnThemChongChiDinh = new javax.swing.JButton();\n btnSuaChongChiDinh = new javax.swing.JButton();\n btnXoaChongChiDinh = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n\n ThemChongChiDinh.setSize(new java.awt.Dimension(450, 320));\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"Bênh:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"Thuốc:\");\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(54, 54, 54)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(cbBenh, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbThuoc, 0, 200, Short.MAX_VALUE))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbBenh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbThuoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(38, Short.MAX_VALUE))\n );\n\n btnLuuChongChiDinh.setBackground(new java.awt.Color(0, 153, 51));\n btnLuuChongChiDinh.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnLuuChongChiDinh.setForeground(new java.awt.Color(255, 255, 255));\n btnLuuChongChiDinh.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/floppy-disk-save-button.png\"))); // NOI18N\n btnLuuChongChiDinh.setText(\"Lưu\");\n btnLuuChongChiDinh.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLuuChongChiDinhActionPerformed(evt);\n }\n });\n\n btnThoat.setBackground(new java.awt.Color(255, 51, 51));\n btnThoat.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnThoat.setForeground(new java.awt.Color(255, 255, 255));\n btnThoat.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/cancel-button.png\"))); // NOI18N\n btnThoat.setText(\"Thoát\");\n btnThoat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnThoatActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(btnLuuChongChiDinh, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnThoat))\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(60, Short.MAX_VALUE))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap(31, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnLuuChongChiDinh)\n .addComponent(btnThoat))\n .addGap(49, 49, 49))\n );\n\n javax.swing.GroupLayout ThemChongChiDinhLayout = new javax.swing.GroupLayout(ThemChongChiDinh.getContentPane());\n ThemChongChiDinh.getContentPane().setLayout(ThemChongChiDinhLayout);\n ThemChongChiDinhLayout.setHorizontalGroup(\n ThemChongChiDinhLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n ThemChongChiDinhLayout.setVerticalGroup(\n ThemChongChiDinhLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n SuaChongChiDinh.setSize(new java.awt.Dimension(450, 320));\n\n jPanel6.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Bênh:\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"Thuốc:\");\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGap(54, 54, 54)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(cbBenhSua, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbThuocSua, 0, 200, Short.MAX_VALUE))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbBenhSua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbThuocSua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(38, Short.MAX_VALUE))\n );\n\n btnCapNhat.setBackground(new java.awt.Color(0, 153, 51));\n btnCapNhat.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnCapNhat.setForeground(new java.awt.Color(255, 255, 255));\n btnCapNhat.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/floppy-disk-save-button.png\"))); // NOI18N\n btnCapNhat.setText(\"Câp nhật\");\n btnCapNhat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCapNhatActionPerformed(evt);\n }\n });\n\n btnThoat1.setBackground(new java.awt.Color(255, 51, 51));\n btnThoat1.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnThoat1.setForeground(new java.awt.Color(255, 255, 255));\n btnThoat1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/cancel-button.png\"))); // NOI18N\n btnThoat1.setText(\"Thoát\");\n btnThoat1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnThoat1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()\n .addComponent(btnCapNhat)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnThoat1))\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(60, Short.MAX_VALUE))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addContainerGap(31, Short.MAX_VALUE)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnCapNhat)\n .addComponent(btnThoat1))\n .addGap(49, 49, 49))\n );\n\n javax.swing.GroupLayout SuaChongChiDinhLayout = new javax.swing.GroupLayout(SuaChongChiDinh.getContentPane());\n SuaChongChiDinh.getContentPane().setLayout(SuaChongChiDinhLayout);\n SuaChongChiDinhLayout.setHorizontalGroup(\n SuaChongChiDinhLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n SuaChongChiDinhLayout.setVerticalGroup(\n SuaChongChiDinhLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"Quản lí chống chỉ định của thuốc\");\n setResizable(false);\n\n jPanel3.setBackground(new java.awt.Color(255, 255, 255));\n\n tbChongChiDinh = new javax.swing.JTable () {\n public boolean isCellEditable (int rowIndex, int colIndex) {\n return false; // Không cho phép chỉnh sửa bất kỳ ô nào\n }\n };\n tbChongChiDinh.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tbChongChiDinh.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbChongChiDinhMouseClicked(evt);\n }\n });\n jScrollPane3.setViewportView(tbChongChiDinh);\n\n btnThemChongChiDinh.setBackground(new java.awt.Color(0, 153, 51));\n btnThemChongChiDinh.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnThemChongChiDinh.setForeground(new java.awt.Color(255, 255, 255));\n btnThemChongChiDinh.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/add.png\"))); // NOI18N\n btnThemChongChiDinh.setText(\"Thêm\");\n btnThemChongChiDinh.setToolTipText(\"\");\n btnThemChongChiDinh.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnThemChongChiDinhActionPerformed(evt);\n }\n });\n\n btnSuaChongChiDinh.setBackground(new java.awt.Color(255, 204, 0));\n btnSuaChongChiDinh.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnSuaChongChiDinh.setForeground(new java.awt.Color(255, 255, 255));\n btnSuaChongChiDinh.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/refresh-button.png\"))); // NOI18N\n btnSuaChongChiDinh.setText(\"Sửa\");\n btnSuaChongChiDinh.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSuaChongChiDinhActionPerformed(evt);\n }\n });\n\n btnXoaChongChiDinh.setBackground(new java.awt.Color(255, 51, 51));\n btnXoaChongChiDinh.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnXoaChongChiDinh.setForeground(new java.awt.Color(255, 255, 255));\n btnXoaChongChiDinh.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/round-delete-button.png\"))); // NOI18N\n btnXoaChongChiDinh.setText(\"Xóa\");\n btnXoaChongChiDinh.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnXoaChongChiDinhActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 0, 102));\n jLabel1.setText(\"Danh sách thuốc có chống chỉ định\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/UI/Icon/left-arrow.png\"))); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(229, 229, 229)\n .addComponent(btnThemChongChiDinh)\n .addGap(18, 18, 18)\n .addComponent(btnSuaChongChiDinh, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btnXoaChongChiDinh, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(74, 74, 74)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 643, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(141, 141, 141)\n .addComponent(jLabel1)))))\n .addContainerGap(76, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnThemChongChiDinh)\n .addComponent(btnSuaChongChiDinh)\n .addComponent(btnXoaChongChiDinh))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "private void initGui()\n {\n setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.WHITE));\n\n setLayout(new GridBagLayout());\n\n GridBagConstraints gbc = new GridBagConstraints();\n\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n\n this.add(lblHint, gbc);\n }", "public void cust(){\r\n\t\tcustF = new JFrame(); \r\n\t\tcustF.setTitle(\"MavBay\");\r\n\t\tcustF.setSize(1000,800);\r\n\t\tcustF.setLocation(150,150);\r\n\t\tcustF.setVisible(true);\r\n\t\tcustF.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t JPanel pan = new JPanel();\r\n\t pan.setLayout(new GridBagLayout());\r\n\t pan.setBackground(new Color(100,100,100));\r\n\t GridBagConstraints c = new GridBagConstraints();\t \r\n\t JPanel pan2 = new JPanel();\r\n\t pan2.setBackground(new Color(100,100,100));\r\n\t JPanel pan3 = new JPanel();\r\n\t pan3.setBackground(new Color(100,100,100)); \r\n\t JLabel empL= new JLabel(\"Customers\");\r\n\t empL.setForeground(Color.BLUE);\r\n\t c.fill = GridBagConstraints.HORIZONTAL;\r\n\t c.ipady = 10; \r\n\t c.ipadx= 200;\r\n\t c.gridwidth = 1; \r\n\t c.gridx = 2;\r\n\t c.gridy = 1;\t \r\n\t pan.add(empL,c); \r\n\t custL= new JList(myEnt.convertCust(myEnt.getCustomer()));\t \r\n\t custL.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t empS= new JScrollPane(custL);\t \r\n\t c.fill = GridBagConstraints.HORIZONTAL;\r\n\t c.ipadx= 200;\r\n\t c.ipady=100;\r\n\t c.gridwidth = 1; \r\n\t c.gridx = 2;\r\n\t c.gridy = 2;\r\n\t pan.add(empS, c);\r\n\t String [] years={\"All\",\"2014\",\"2013\"};\r\n\t final JComboBox yearSelection= new JComboBox(years);\r\n\t c.fill = GridBagConstraints.HORIZONTAL;\r\n\t c.ipady = 20; \r\n\t c.ipadx= 200;\r\n\t c.gridwidth = 1; \r\n\t c.gridx = 2;\r\n\t c.gridy = 3;\r\n\t pan.add(yearSelection, c);\r\n\t JButton but;\r\n\t but = new JButton(\"Bids\");\r\n\t but.setForeground(Color.BLUE);\r\n\t but.setBackground(Color.GRAY);\r\n\t c.fill = GridBagConstraints.HORIZONTAL;\r\n\t c.ipady = 20; \r\n\t c.ipadx= 200;\r\n\t c.gridwidth = 1;\r\n\t c.gridheight= 1;\t \t\t \r\n\t c.gridx = 2;\r\n\t c.gridy = 4;\r\n\t but.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tcustT.setText(\"\");\r\n \tint index=custL.getSelectedIndex();\r\n \tString myString= (String)yearSelection.getSelectedItem();\r\n \tcustT.append(myEnt.stringCustBids(index, myString));\r\n }\r\n });\r\n\t pan.add(but, c);\r\n\t JButton but1;\r\n\t but1 = new JButton(\"High/Low\");\r\n\t but1.setForeground(Color.BLUE);\r\n\t but1.setBackground(Color.GRAY);\r\n\t c.fill = GridBagConstraints.HORIZONTAL;\r\n\t c.ipady = 20; \r\n\t c.ipadx= 200;\r\n\t c.gridwidth = 1;\r\n\t c.gridheight= 1;\t \t\t \r\n\t c.gridx = 2;\r\n\t c.gridy = 5;\r\n\t but1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJFrame frame=new JFrame();\r\n \t \tframe.setSize(250,250);\r\n \t \tString yr= (String)yearSelection.getSelectedItem();\r\n \t \tif(yr.equals(\"All\")){\r\n \t \t\tJOptionPane.showMessageDialog(null,myEnt.stringCustRev());\r\n \t \t}else{\r\n \t \t\tJOptionPane.showMessageDialog(null,myEnt.stringCustRev(yr)); \t \t\t\r\n \t \t}\r\n \t \t\r\n }\r\n });\r\n\t pan.add(but1, c);\r\n\t custT= new JTextArea();\r\n\t custT.setEditable(false);\r\n\t c.fill=GridBagConstraints.HORIZONTAL;\r\n\t\tc.gridx=0;\r\n\t\tc.gridy=0;\r\n\t\tc.ipady=480;\r\n\t\tc.ipadx=480;\r\n\t\tc.gridwidth = 2;\r\n\t\tc.gridheight=8;\r\n\t\tpan.add(custT,c); \r\n\t JButton butStart = new JButton(\"Main\");\r\n\t butStart = new JButton(\"Main\");\r\n\t butStart.setForeground(Color.BLUE);\r\n\t butStart.setBackground(Color.GRAY);\r\n\t butStart.setActionCommand(\"Main\");\r\n butStart.addActionListener(this);\r\n\t pan3.add(butStart);\r\n\t JButton butOk=new JButton(\"Employees\");\r\n\t butOk.setForeground(Color.BLUE);\r\n\t butOk.setBackground(Color.GRAY);\r\n\t butOk.setActionCommand(\"Employees\");\r\n\t butOk.addActionListener(this);\r\n\t pan3.add(butOk);\r\n\t JButton butCust = new JButton(\"Customers\");\r\n\t butCust = new JButton(\"Customers\");\r\n\t butCust.setForeground(Color.BLUE);\r\n\t butCust.setBackground(Color.GRAY);\r\n\t butCust.setActionCommand(\"Customers\");\r\n\t butCust.addActionListener(this);\r\n\t pan3.add(butCust);\r\n\t JButton butItem = new JButton(\"Items\");\r\n\t butItem = new JButton(\"Items\");\r\n\t butItem.setForeground(Color.BLUE);\r\n\t butItem.setBackground(Color.GRAY);\r\n\t butItem.setActionCommand(\"Items\");\r\n\t butItem.addActionListener(this);\r\n\t pan3.add(butItem);\r\n\t custF.add(pan,BorderLayout.CENTER);\r\n\t lockedL = new JLabel(\"Customers\");\r\n\t lockedL.setFont(myF); \r\n\t lockedL.setForeground(Color.BLUE);\r\n\t lockedL.setBackground(Color.GRAY);\r\n\t pan2.add(lockedL);\r\n\t custF.add(pan2,BorderLayout.NORTH);\r\n\t custF.add(pan3,BorderLayout.SOUTH);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n promptUserDialog = new javax.swing.JDialog();\n promptTop = new javax.swing.JPanel();\n promptOuter = new javax.swing.JPanel();\n promptMain = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n promptUserMotifIDField = new javax.swing.JTextField();\n promptUserPropertyField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n promptUserOldValueField = new javax.swing.JTextField();\n promptUserNewValueField = new javax.swing.JTextField();\n promptBottom = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n promptUseNewValueButton = new javax.swing.JButton();\n promptKeepCurrentValueButton = new javax.swing.JButton();\n promptMergeOrUseNewButton = new javax.swing.JButton();\n promptMergeOrKeepCurrentButton = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jButton4 = new javax.swing.JButton();\n topPanel = new javax.swing.JPanel();\n settingsPanel = new javax.swing.JPanel();\n propertyLabel = new javax.swing.JLabel();\n propertyCombobox = new javax.swing.JComboBox();\n combineStrategyLabel = new javax.swing.JLabel();\n combineStrategyCombobox = new javax.swing.JComboBox();\n mainPanel = new javax.swing.JPanel();\n tabPane = new javax.swing.JTabbedPane();\n parseListTab = new javax.swing.JPanel();\n scrollpane = new javax.swing.JScrollPane();\n parseListTextArea = new javax.swing.JTextArea();\n internal1 = new javax.swing.JPanel();\n parseListDescriptionLabel = new javax.swing.JLabel();\n importCollectionTab = new javax.swing.JPanel();\n buttonsPanel = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n skipUnrecognizedCheckbox = new javax.swing.JCheckBox();\n useTFnames = new javax.swing.JCheckBox();\n jPanel1 = new javax.swing.JPanel();\n okButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(motiflab.gui.MotifLabApp.class).getContext().getResourceMap(AnnotateMotifsDialog.class);\n promptUserDialog.setTitle(resourceMap.getString(\"promptUserDialog.title\")); // NOI18N\n promptUserDialog.setModal(true);\n promptUserDialog.setName(\"promptUserDialog\"); // NOI18N\n\n promptTop.setName(\"promptTop\"); // NOI18N\n promptUserDialog.getContentPane().add(promptTop, java.awt.BorderLayout.PAGE_START);\n\n promptOuter.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n promptOuter.setName(\"promptOuter\"); // NOI18N\n promptOuter.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 10, 10));\n\n promptMain.setName(\"promptMain\"); // NOI18N\n promptMain.setLayout(new java.awt.GridBagLayout());\n\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 20, 5);\n promptMain.add(jLabel1, gridBagConstraints);\n\n jLabel2.setText(resourceMap.getString(\"jLabel2.text\")); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 20, 20, 5);\n promptMain.add(jLabel2, gridBagConstraints);\n\n promptUserMotifIDField.setColumns(16);\n promptUserMotifIDField.setEditable(false);\n promptUserMotifIDField.setText(resourceMap.getString(\"promptUserMotifIDField.text\")); // NOI18N\n promptUserMotifIDField.setFocusable(false);\n promptUserMotifIDField.setName(\"promptUserMotifIDField\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 20, 5);\n promptMain.add(promptUserMotifIDField, gridBagConstraints);\n\n promptUserPropertyField.setColumns(12);\n promptUserPropertyField.setEditable(false);\n promptUserPropertyField.setText(resourceMap.getString(\"promptUserPropertyField.text\")); // NOI18N\n promptUserPropertyField.setFocusable(false);\n promptUserPropertyField.setName(\"promptUserPropertyField\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 20, 5);\n promptMain.add(promptUserPropertyField, gridBagConstraints);\n\n jLabel3.setText(resourceMap.getString(\"jLabel3.text\")); // NOI18N\n jLabel3.setName(\"jLabel3\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n promptMain.add(jLabel3, gridBagConstraints);\n\n jLabel4.setText(resourceMap.getString(\"jLabel4.text\")); // NOI18N\n jLabel4.setName(\"jLabel4\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n promptMain.add(jLabel4, gridBagConstraints);\n\n promptUserOldValueField.setColumns(26);\n promptUserOldValueField.setEditable(false);\n promptUserOldValueField.setText(resourceMap.getString(\"promptUserOldValueField.text\")); // NOI18N\n promptUserOldValueField.setFocusable(false);\n promptUserOldValueField.setName(\"promptUserOldValueField\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n promptMain.add(promptUserOldValueField, gridBagConstraints);\n\n promptUserNewValueField.setColumns(26);\n promptUserNewValueField.setEditable(false);\n promptUserNewValueField.setText(resourceMap.getString(\"promptUserNewValueField.text\")); // NOI18N\n promptUserNewValueField.setFocusable(false);\n promptUserNewValueField.setName(\"promptUserNewValueField\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n promptMain.add(promptUserNewValueField, gridBagConstraints);\n\n promptOuter.add(promptMain);\n\n promptUserDialog.getContentPane().add(promptOuter, java.awt.BorderLayout.CENTER);\n\n promptBottom.setBorder(javax.swing.BorderFactory.createEmptyBorder(6, 0, 0, 0));\n promptBottom.setName(\"promptBottom\"); // NOI18N\n promptBottom.setLayout(new java.awt.BorderLayout());\n\n jPanel3.setName(\"jPanel3\"); // NOI18N\n jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(motiflab.gui.MotifLabApp.class).getContext().getActionMap(AnnotateMotifsDialog.class, this);\n promptUseNewValueButton.setAction(actionMap.get(\"promptUseNewValue\")); // NOI18N\n promptUseNewValueButton.setMnemonic('n');\n promptUseNewValueButton.setName(\"promptUseNewValueButton\"); // NOI18N\n jPanel3.add(promptUseNewValueButton);\n\n promptKeepCurrentValueButton.setAction(actionMap.get(\"promptKeepOldValue\")); // NOI18N\n promptKeepCurrentValueButton.setMnemonic('c');\n promptKeepCurrentValueButton.setName(\"promptKeepCurrentValueButton\"); // NOI18N\n jPanel3.add(promptKeepCurrentValueButton);\n\n promptMergeOrUseNewButton.setAction(actionMap.get(\"promptMergeOrReplaceCurrent\")); // NOI18N\n promptMergeOrUseNewButton.setMnemonic('m');\n promptMergeOrUseNewButton.setName(\"promptMergeOrUseNewButton\"); // NOI18N\n jPanel3.add(promptMergeOrUseNewButton);\n\n promptMergeOrKeepCurrentButton.setAction(actionMap.get(\"promptMergeOrKeepCurrent\")); // NOI18N\n promptMergeOrKeepCurrentButton.setMnemonic('k');\n promptMergeOrKeepCurrentButton.setName(\"promptMergeOrKeepCurrentButton\"); // NOI18N\n jPanel3.add(promptMergeOrKeepCurrentButton);\n\n promptBottom.add(jPanel3, java.awt.BorderLayout.CENTER);\n\n jPanel4.setName(\"jPanel4\"); // NOI18N\n jPanel4.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));\n\n jButton4.setAction(actionMap.get(\"promptCancel\")); // NOI18N\n jButton4.setName(\"jButton4\"); // NOI18N\n jPanel4.add(jButton4);\n\n promptBottom.add(jPanel4, java.awt.BorderLayout.EAST);\n\n promptUserDialog.getContentPane().add(promptBottom, java.awt.BorderLayout.PAGE_END);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n topPanel.setName(\"topPanel\"); // NOI18N\n topPanel.setLayout(new java.awt.BorderLayout());\n\n settingsPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 5, 4, 5));\n settingsPanel.setName(\"settingsPanel\"); // NOI18N\n settingsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING));\n\n propertyLabel.setText(resourceMap.getString(\"propertyLabel.text\")); // NOI18N\n propertyLabel.setName(\"propertyLabel\"); // NOI18N\n settingsPanel.add(propertyLabel);\n\n propertyCombobox.setName(\"propertyCombobox\"); // NOI18N\n settingsPanel.add(propertyCombobox);\n\n combineStrategyLabel.setText(resourceMap.getString(\"combineStrategyLabel.text\")); // NOI18N\n combineStrategyLabel.setName(\"combineStrategyLabel\"); // NOI18N\n settingsPanel.add(combineStrategyLabel);\n\n combineStrategyCombobox.setName(\"combineStrategyCombobox\"); // NOI18N\n settingsPanel.add(combineStrategyCombobox);\n\n topPanel.add(settingsPanel, java.awt.BorderLayout.SOUTH);\n\n getContentPane().add(topPanel, java.awt.BorderLayout.PAGE_START);\n\n mainPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));\n mainPanel.setName(\"mainPanel\"); // NOI18N\n mainPanel.setLayout(new java.awt.BorderLayout());\n\n tabPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 0, 0, 0));\n tabPane.setName(\"tabPane\"); // NOI18N\n\n parseListTab.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createEmptyBorder(8, 8, 8, 8)));\n parseListTab.setName(\"parseListTab\"); // NOI18N\n parseListTab.setLayout(new java.awt.BorderLayout());\n\n scrollpane.setName(\"scrollpane\"); // NOI18N\n\n parseListTextArea.setColumns(20);\n parseListTextArea.setRows(5);\n parseListTextArea.setName(\"parseListTextArea\"); // NOI18N\n scrollpane.setViewportView(parseListTextArea);\n\n parseListTab.add(scrollpane, java.awt.BorderLayout.CENTER);\n\n internal1.setAlignmentY(0.0F);\n internal1.setMinimumSize(new java.awt.Dimension(96, 70));\n internal1.setName(\"internal1\"); // NOI18N\n internal1.setPreferredSize(new java.awt.Dimension(363, 70));\n internal1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING));\n\n parseListDescriptionLabel.setText(resourceMap.getString(\"parseListDescriptionLabel.text\")); // NOI18N\n parseListDescriptionLabel.setMinimumSize(new java.awt.Dimension(86, 62));\n parseListDescriptionLabel.setName(\"parseListDescriptionLabel\"); // NOI18N\n parseListDescriptionLabel.setPreferredSize(new java.awt.Dimension(736, 62));\n internal1.add(parseListDescriptionLabel);\n\n parseListTab.add(internal1, java.awt.BorderLayout.PAGE_START);\n\n tabPane.addTab(resourceMap.getString(\"parseListTab.TabConstraints.tabTitle\"), parseListTab); // NOI18N\n\n importCollectionTab.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n importCollectionTab.setName(\"importCollectionTab\"); // NOI18N\n importCollectionTab.setLayout(new java.awt.BorderLayout());\n tabPane.addTab(resourceMap.getString(\"importCollectionTab.TabConstraints.tabTitle\"), importCollectionTab); // NOI18N\n\n mainPanel.add(tabPane, java.awt.BorderLayout.CENTER);\n\n getContentPane().add(mainPanel, java.awt.BorderLayout.CENTER);\n\n buttonsPanel.setMinimumSize(new java.awt.Dimension(100, 40));\n buttonsPanel.setName(\"buttonsPanel\"); // NOI18N\n buttonsPanel.setPreferredSize(new java.awt.Dimension(400, 40));\n buttonsPanel.setLayout(new java.awt.BorderLayout());\n\n jPanel2.setName(\"jPanel2\"); // NOI18N\n jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\n\n skipUnrecognizedCheckbox.setText(resourceMap.getString(\"skipUnrecognizedCheckbox.text\")); // NOI18N\n skipUnrecognizedCheckbox.setToolTipText(resourceMap.getString(\"skipUnrecognizedCheckbox.toolTipText\")); // NOI18N\n skipUnrecognizedCheckbox.setName(\"skipUnrecognizedCheckbox\"); // NOI18N\n jPanel2.add(skipUnrecognizedCheckbox);\n\n useTFnames.setText(resourceMap.getString(\"useTFnames.text\")); // NOI18N\n useTFnames.setToolTipText(resourceMap.getString(\"useTFnames.toolTipText\")); // NOI18N\n useTFnames.setName(\"useTFnames\"); // NOI18N\n jPanel2.add(useTFnames);\n\n buttonsPanel.add(jPanel2, java.awt.BorderLayout.CENTER);\n\n jPanel1.setName(\"jPanel1\"); // NOI18N\n jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));\n\n okButton.setText(resourceMap.getString(\"okButton.text\")); // NOI18N\n okButton.setMaximumSize(new java.awt.Dimension(75, 27));\n okButton.setMinimumSize(new java.awt.Dimension(75, 27));\n okButton.setName(\"okButton\"); // NOI18N\n okButton.setPreferredSize(new java.awt.Dimension(75, 27));\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonPressed(evt);\n }\n });\n jPanel1.add(okButton);\n\n cancelButton.setText(resourceMap.getString(\"cancelButton.text\")); // NOI18N\n cancelButton.setMaximumSize(new java.awt.Dimension(75, 27));\n cancelButton.setMinimumSize(new java.awt.Dimension(75, 27));\n cancelButton.setName(\"cancelButton\"); // NOI18N\n cancelButton.setPreferredSize(new java.awt.Dimension(75, 27));\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonPressed(evt);\n }\n });\n jPanel1.add(cancelButton);\n\n buttonsPanel.add(jPanel1, java.awt.BorderLayout.EAST);\n\n getContentPane().add(buttonsPanel, java.awt.BorderLayout.PAGE_END);\n\n pack();\n }", "private void initializeSelectPatientDialog(){\r\n\r\n selectPatientDialog = new JDialog();\r\n selectPatientDialog.setTitle(\"Search Results\");\r\n\r\n selectPatientPanel = new JPanel(new GridBagLayout());\r\n selectPatientPanel.setBackground(MainGUI.backgroundColor);\r\n selectPatientPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\r\n selectPatientPanelConstraints = new GridBagConstraints();\r\n\r\n selectPatient_instructionLabel = new JLabel(\"Choose Patient from Drop down List\");\r\n selectPatient_instructionLabel.setFont(new java.awt.Font(selectPatient_instructionLabel.getFont().getFontName(),\r\n Font.PLAIN, 20));\r\n selectPatient_instructionLabel.setForeground(MainGUI.fontColor);\r\n\r\n selectPatient_choosePatientCB = new JComboBox<String>();\r\n\r\n selectPatient_selectPatientFoundButton = new JButton(\"Select Patient\");\r\n selectPatient_selectPatientFoundButton.setForeground(MainGUI.fontColor);\r\n\r\n // add components to panel\r\n\r\n // add instruction label\r\n selectPatientPanelConstraints.gridx = 10;\r\n selectPatientPanelConstraints.gridy = 10;\r\n selectPatientPanelConstraints.gridwidth = 20;\r\n selectPatientPanelConstraints.weighty = 0.1;\r\n selectPatientPanelConstraints.anchor = GridBagConstraints.NORTH;\r\n selectPatientPanelConstraints.insets = new Insets(20, 0, 0, 0);\r\n selectPatientPanel.add(selectPatient_instructionLabel, selectPatientPanelConstraints);\r\n\r\n // add combo box\r\n selectPatientPanelConstraints.gridy = 20;\r\n selectPatientPanelConstraints.weightx = 0.1;\r\n selectPatientPanelConstraints.anchor = GridBagConstraints.WEST;\r\n selectPatientPanelConstraints.insets = new Insets(0, 80, 0, 0);\r\n selectPatientPanel.add(selectPatient_choosePatientCB, selectPatientPanelConstraints);\r\n\r\n // add select patient button\r\n selectPatientPanelConstraints.gridx = 20;\r\n selectPatientPanelConstraints.ipady = 10;\r\n selectPatientPanelConstraints.anchor = GridBagConstraints.EAST;\r\n selectPatientPanelConstraints.insets = new Insets(0, 0, 0, 80);\r\n selectPatientPanel.add(selectPatient_selectPatientFoundButton, selectPatientPanelConstraints);\r\n\r\n // add panel to dialog\r\n selectPatientDialog.add(selectPatientPanel);\r\n selectPatientDialog.setSize(500, 200);\r\n selectPatientDialog.setLocationRelativeTo(null);\r\n\r\n\r\n }", "private void initComponents() {\n label1 = new JLabel();\n label2 = new JLabel();\n label3 = new JLabel();\n label4 = new JLabel();\n first_name_textField = new JTextField();\n surname_textField = new JTextField();\n phone_textField = new JTextField();\n label5 = new JLabel();\n email_textField = new JTextField();\n cancel_button = new JButton();\n add_button = new JButton();\n\n //======== this ========\n Container contentPane = getContentPane();\n contentPane.setLayout(new GridBagLayout());\n ((GridBagLayout)contentPane.getLayout()).columnWidths = new int[] {70, 106, 46, 78, 0};\n ((GridBagLayout)contentPane.getLayout()).rowHeights = new int[] {0, 0, 0, 0, 0, 0};\n ((GridBagLayout)contentPane.getLayout()).columnWeights = new double[] {0.0, 0.0, 0.0, 0.0, 1.0E-4};\n ((GridBagLayout)contentPane.getLayout()).rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4};\n\n //---- label1 ----\n label1.setText(\"New client item\");\n label1.setFont(label1.getFont().deriveFont(label1.getFont().getStyle() | Font.BOLD));\n contentPane.add(label1, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label2 ----\n label2.setText(\"name\");\n contentPane.add(label2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label3 ----\n label3.setText(\"phone\");\n contentPane.add(label3, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label4 ----\n label4.setText(\"e-mail\");\n contentPane.add(label4, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- first_name_textField ----\n first_name_textField.setToolTipText(\"first name\");\n contentPane.add(first_name_textField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- surname_textField ----\n surname_textField.setToolTipText(\"surname\");\n contentPane.add(surname_textField, new GridBagConstraints(2, 1, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n\n //---- phone_textField ----\n phone_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n phone_textFieldKeyTyped(e);\n }\n });\n contentPane.add(phone_textField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label5 ----\n label5.setText(\"e.g. 0901222333\");\n contentPane.add(label5, new GridBagConstraints(2, 2, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n\n //---- email_textField ----\n email_textField.setToolTipText(\"example@email.net\");\n contentPane.add(email_textField, new GridBagConstraints(1, 3, 3, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n\n //---- cancel_button ----\n cancel_button.setText(\"cancel\");\n contentPane.add(cancel_button, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 0, 5), 0, 0));\n\n //---- add_button ----\n add_button.setText(\"add\");\n contentPane.add(add_button, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 0, 0), 0, 0));\n pack();\n setLocationRelativeTo(getOwner());\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "public PanelCrearJugador( DialogoCrearJugador d )\n {\n dialogo = d;\n\n setLayout( new GridBagLayout( ) );\n\n etiquetaNombre = new JLabel( \"Nombre: \" );\n GridBagConstraints gbc = new GridBagConstraints( );\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets( 3, 3, 3, 3 );\n add( etiquetaNombre, 0 );\n\n txtNombre = new JTextField( );\n txtNombre.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtNombre, gbc );\n\n etiquetaEdad = new JLabel( \"Edad:\" );\n gbc.gridx = 0;\n gbc.gridy = 1;\n add( etiquetaEdad, gbc );\n\n txtEdad = new JTextField( );\n txtEdad.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtEdad, gbc );\n\n etiquetaPosicion = new JLabel( \"Posición:\" );\n gbc.gridx = 0;\n gbc.gridy = 2;\n add( etiquetaPosicion, gbc );\n\n txtPosicion = new JTextField( );\n txtPosicion.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtPosicion, gbc );\n\n etiquetaAltura = new JLabel( \"Altura:\" );\n gbc.gridx = 0;\n gbc.gridy = 3;\n add( etiquetaAltura, gbc );\n\n txtAltura = new JTextField( );\n txtAltura.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtAltura, gbc );\n\n etiquetaPeso = new JLabel( \"Peso:\" );\n gbc.gridx = 0;\n gbc.gridy = 4;\n add( etiquetaPeso, gbc );\n\n txtPeso = new JTextField( );\n txtPeso.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtPeso, gbc );\n\n etiquetaSalario = new JLabel( \"Salario:\" );\n gbc.gridx = 0;\n gbc.gridy = 5;\n add( etiquetaSalario, gbc );\n\n txtSalario = new JTextField( );\n txtSalario.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtSalario, gbc );\n\n etiquetaImagen = new JLabel( \"Imagen:\" );\n gbc.gridx = 0;\n gbc.gridy = 6;\n add( etiquetaImagen, gbc );\n\n JPanel panelImagen = new JPanel( );\n panelImagen.setLayout( new GridLayout( 1, 2, 3, 3 ) );\n txtImagen = new JTextField( );\n panelImagen.add( txtImagen );\n\n botonExplorar = new JButton( \"Explorar\" );\n botonExplorar.setActionCommand( EXPLORAR );\n botonExplorar.addActionListener( this );\n panelImagen.add( botonExplorar );\n\n gbc.gridx = 1;\n add( panelImagen, gbc );\n\n JPanel panelBotones = new JPanel( );\n panelBotones.setLayout( new GridBagLayout( ) );\n\n botonAgregarJugador = new JButton( \"Crear\" );\n botonAgregarJugador.setActionCommand( CREAR_JUGADOR );\n botonAgregarJugador.addActionListener( this );\n gbc.gridx = 0;\n gbc.gridy = 0;\n panelBotones.add( botonAgregarJugador, gbc );\n\n botonCancelar = new JButton( \"Cancelar\" );\n botonCancelar.setActionCommand( CANCELAR );\n botonCancelar.addActionListener( this );\n gbc.gridx = 1;\n panelBotones.add( botonCancelar, gbc );\n\n gbc.gridx = 0;\n gbc.gridy = 7;\n gbc.gridwidth = 2;\n add( panelBotones, gbc );\n\n setBorder( new EmptyBorder( 5, 5, 5, 5 ) );\n }", "private void initComponents() {\n label1 = new JLabel();\n label2 = new JLabel();\n label3 = new JLabel();\n H_time_textField = new JTextField();\n M_time_textField = new JTextField();\n D_date_textField = new JTextField();\n M_date_textField = new JTextField();\n Y_date_textField = new JTextField();\n client_textField = new JTextField();\n label4 = new JLabel();\n label6 = new JLabel();\n label5 = new JLabel();\n agent_textField = new JTextField();\n label7 = new JLabel();\n label8 = new JLabel();\n label9 = new JLabel();\n picked_estate_label = new JLabel();\n pick_estate_textField = new JTextField();\n cancel_button = new JButton();\n add_button = new JButton();\n\n //======== this ========\n Container contentPane = getContentPane();\n contentPane.setLayout(new GridBagLayout());\n ((GridBagLayout)contentPane.getLayout()).columnWidths = new int[] {43, 56, 59, 0, 79, 0};\n ((GridBagLayout)contentPane.getLayout()).rowHeights = new int[] {0, 0, 0, 0, 0, 0, 15, 0, 0};\n ((GridBagLayout)contentPane.getLayout()).columnWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4};\n ((GridBagLayout)contentPane.getLayout()).rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4};\n\n //---- label1 ----\n label1.setText(\"New open house\");\n label1.setFont(label1.getFont().deriveFont(label1.getFont().getStyle() | Font.BOLD));\n contentPane.add(label1, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label2 ----\n label2.setText(\"time\");\n contentPane.add(label2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label3 ----\n label3.setText(\"date\");\n contentPane.add(label3, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- H_time_textField ----\n H_time_textField.setToolTipText(\"HH\");\n H_time_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n H_time_textFieldKeyTyped(e);\n }\n });\n contentPane.add(H_time_textField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- M_time_textField ----\n M_time_textField.setToolTipText(\"MM\");\n M_time_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n M_time_textFieldKeyTyped(e);\n }\n });\n contentPane.add(M_time_textField, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- D_date_textField ----\n D_date_textField.setToolTipText(\"DD\");\n D_date_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n D_date_textFieldKeyTyped(e);\n }\n });\n contentPane.add(D_date_textField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- M_date_textField ----\n M_date_textField.setToolTipText(\"MM\");\n M_date_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n M_date_textFieldKeyTyped(e);\n }\n });\n contentPane.add(M_date_textField, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- Y_date_textField ----\n Y_date_textField.setToolTipText(\"YYYY\");\n Y_date_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n Y_date_textFieldKeyTyped(e);\n }\n });\n contentPane.add(Y_date_textField, new GridBagConstraints(3, 2, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n contentPane.add(client_textField, new GridBagConstraints(1, 3, 3, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label4 ----\n label4.setText(\"client\");\n contentPane.add(label4, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label6 ----\n label6.setText(\"(name)\");\n contentPane.add(label6, new GridBagConstraints(4, 3, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n\n //---- label5 ----\n label5.setText(\"agent\");\n contentPane.add(label5, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n contentPane.add(agent_textField, new GridBagConstraints(1, 4, 3, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label7 ----\n label7.setText(\"(name)\");\n contentPane.add(label7, new GridBagConstraints(4, 4, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n\n //---- label8 ----\n label8.setText(\"estate\");\n contentPane.add(label8, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- label9 ----\n label9.setText(\"pick by id:\");\n label9.setFont(label9.getFont().deriveFont(label9.getFont().getStyle() | Font.ITALIC));\n contentPane.add(label9, new GridBagConstraints(1, 5, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n contentPane.add(picked_estate_label, new GridBagConstraints(2, 5, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 5), 0, 0));\n\n //---- pick_estate_textField ----\n pick_estate_textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n pick_estate_textFieldKeyTyped(e);\n }\n });\n contentPane.add(pick_estate_textField, new GridBagConstraints(3, 5, 2, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 5, 0), 0, 0));\n\n //---- cancel_button ----\n cancel_button.setText(\"cancel\");\n contentPane.add(cancel_button, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 0, 5), 0, 0));\n\n //---- add_button ----\n add_button.setText(\"add\");\n contentPane.add(add_button, new GridBagConstraints(4, 7, 1, 1, 0.0, 0.0,\n GridBagConstraints.CENTER, GridBagConstraints.BOTH,\n new Insets(0, 0, 0, 0), 0, 0));\n pack();\n setLocationRelativeTo(getOwner());\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "GridBagLayoutCalc(){\n\n windowContent = new JPanel();\n\n // Set the layout manager for this panel\n GridBagLayout gblwc = new GridBagLayout();\n windowContent.setLayout(gblwc);\n\n\n // Create the display field and place it in the\n // North area of the window\n\n displayField = new JTextField(20);\n gblwc.setConstraints(displayField, constr);\n windowContent.add(\"0\",displayField);\n \n\n // Create buttons using constructor of the\n // class JButton that takes the label of the\n // button as a parameter\n\n JButton[] numbers = new JButton[10];\n JButton[] equals = new JButton[1];\n JButton[] controllers = new JButton[4];\n\n String[] numbers_name = {\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"};\n String[] equals_name = {\"=\"};\n String[] controllers_name = {\"+\", \"-\", \"*\", \"/\"};\n\n // Create the panel with the GridBagLayout with 15 buttons\n //10 numeric ones, 4 controllers, and the equal sign\n\n p1 = new JPanel();\n GridBagLayout gbl =new GridBagLayout();\n p1.setLayout(gbl);\n\n // Add window controls to the panel p1\n panelMaker(numbers, numbers_name, p1, Color.BLUE);\n panelMaker(equals, equals_name, p1, Color.BLACK);\n panelMaker(controllers, controllers_name, p1, Color.BLACK);\n\n }", "private void $$$setupUI$$$() {\r\n createUIComponents();\r\n pnlMain = new JPanel();\r\n pnlMain.setLayout(new FormLayout(\"fill:d:grow\", \"fill:38dlu:noGrow,top:4dlu:noGrow,fill:225dlu:noGrow,top:4dlu:noGrow,fill:16dlu:noGrow\"));\r\n pnlMain.setMinimumSize(new Dimension(400, 480));\r\n pnlMain.setPreferredSize(new Dimension(500, 480));\r\n pnlForm.setLayout(new FormLayout(\"fill:50dlu:noGrow,left:4dlu:noGrow,fill:100dlu:noGrow,left:4dlu:noGrow,fill:50dlu:noGrow\", \"fill:12dlu:noGrow\"));\r\n CellConstraints cc = new CellConstraints();\r\n pnlMain.add(pnlForm, cc.xy(1, 1));\r\n lblBuscar = new JLabel();\r\n lblBuscar.setText(\"Buscar \");\r\n pnlForm.add(lblBuscar, cc.xy(1, 1));\r\n txtBuscar = new JTextField();\r\n pnlForm.add(txtBuscar, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\r\n btnSearch = new JButton();\r\n btnSearch.setText(\"Buscar\");\r\n pnlForm.add(btnSearch, cc.xy(5, 1));\r\n pnlGrid.setLayout(new FormLayout(\"fill:d:grow\", \"center:max(d;4px):noGrow,top:4dlu:noGrow,fill:14dlu:noGrow,top:4dlu:noGrow,fill:d:grow\"));\r\n pnlGrid.setMinimumSize(new Dimension(400, 333));\r\n pnlGrid.setPreferredSize(new Dimension(500, 333));\r\n pnlMain.add(pnlGrid, cc.xy(1, 3));\r\n pnlTitGrid = new JPanel();\r\n pnlTitGrid.setLayout(new FormLayout(\"fill:16dlu:noGrow,left:4dlu:noGrow,fill:100dlu:noGrow\", \"fill:16dlu:noGrow\"));\r\n pnlGrid.add(pnlTitGrid, cc.xy(1, 1));\r\n chkSel = new JCheckBox();\r\n chkSel.setText(\"\");\r\n pnlTitGrid.add(chkSel, cc.xy(1, 1));\r\n lblTitGrid = new JLabel();\r\n lblTitGrid.setText(\"Lista de Laboratorios\");\r\n pnlTitGrid.add(lblTitGrid, cc.xy(3, 1));\r\n pnlResult = new JScrollPane();\r\n pnlResult.setMinimumSize(new Dimension(400, 300));\r\n pnlResult.setPreferredSize(new Dimension(500, 300));\r\n pnlGrid.add(pnlResult, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.FILL));\r\n tblGrid = new JTable();\r\n pnlResult.setViewportView(tblGrid);\r\n pnlToolBarGrid = new JPanel();\r\n pnlToolBarGrid.setLayout(new FormLayout(\"\", \"\"));\r\n pnlGrid.add(pnlToolBarGrid, cc.xy(1, 3));\r\n footerPanel = new JPanel();\r\n footerPanel.setLayout(new FormLayout(\"fill:d:noGrow,left:4dlu:noGrow,right:d:grow\", \"fill:d:grow\"));\r\n pnlMain.add(footerPanel, cc.xy(1, 5));\r\n lblEnter = new JLabel();\r\n lblEnter.setText(\"F2 = Seleccionar\");\r\n footerPanel.add(lblEnter, cc.xy(1, 1));\r\n lblEsc = new JLabel();\r\n lblEsc.setText(\"Esc = Salir\");\r\n footerPanel.add(lblEsc, cc.xy(3, 1));\r\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1 = new JPanel();\n pan1.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(pan1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Название номера\");\n pan1.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Дата регистрации\");\n pan1.add(label2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Дата истечения\");\n pan1.add(label3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n pan1.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(0, 25), new Dimension(0, 25), new Dimension(0, 25), 0, false));\n number = new JTextField();\n pan1.add(number, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n pan1.add(creationDatePanel, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1.add(expirationDatePanel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n myContentPanel = new JPanel();\n myContentPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n myContentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n myAcceptYoursButton = new JButton();\n myAcceptYoursButton.setEnabled(false);\n myAcceptYoursButton.setText(\"Accept Yours\");\n myAcceptYoursButton.setMnemonic('Y');\n myAcceptYoursButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptYoursButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myAcceptTheirsButton = new JButton();\n myAcceptTheirsButton.setEnabled(false);\n myAcceptTheirsButton.setText(\"Accept Theirs\");\n myAcceptTheirsButton.setMnemonic('T');\n myAcceptTheirsButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptTheirsButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myMergeButton = new JButton();\n myMergeButton.setEnabled(false);\n myMergeButton.setText(\"Merge\");\n myMergeButton.setMnemonic('M');\n myMergeButton.setDisplayedMnemonicIndex(0);\n panel1.add(myMergeButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JBScrollPane jBScrollPane1 = new JBScrollPane();\n myContentPanel.add(jBScrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myItemsTable = new JBTable();\n myItemsTable.putClientProperty(\"Table.isFileList\", Boolean.FALSE);\n jBScrollPane1.setViewportView(myItemsTable);\n }", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jDialogNewContinent = new javax.swing.JDialog();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n buttonNorthAmerica = new javax.swing.JButton();\n buttonSouthAmerica = new javax.swing.JButton();\n buttonAustralia = new javax.swing.JButton();\n buttonAfrica = new javax.swing.JButton();\n buttonAsia = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n DiceEurope = new javax.swing.JLabel();\n backButtonEurope = new javax.swing.JButton();\n europeQuestionWindow = new javax.swing.JPanel();\n submit = new javax.swing.JButton();\n jLabelDiceResult = new javax.swing.JLabel();\n questiontext = new javax.swing.JLabel();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n CheckAnswerResult = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n pointsLabel = new javax.swing.JLabel();\n pointsDisplay = new javax.swing.JLabel();\n LabelPointsNeeded = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n\n jDialogNewContinent.setMinimumSize(new java.awt.Dimension(550, 550));\n jDialogNewContinent.setPreferredSize(new java.awt.Dimension(550, 550));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"You are an expert on European history! Choose your next destination:\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel6.setText(\"Congratulations!!\");\n\n buttonNorthAmerica.setText(\"North America\");\n buttonNorthAmerica.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n buttonNorthAmericaMouseClicked(evt);\n }\n });\n\n buttonSouthAmerica.setText(\"South America\");\n buttonSouthAmerica.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n buttonSouthAmericaMouseClicked(evt);\n }\n });\n buttonSouthAmerica.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonSouthAmericaActionPerformed(evt);\n }\n });\n\n buttonAustralia.setText(\"Australia\");\n buttonAustralia.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n buttonAustraliaMouseClicked(evt);\n }\n });\n buttonAustralia.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonAustraliaActionPerformed(evt);\n }\n });\n\n buttonAfrica.setText(\"Africa\");\n buttonAfrica.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n buttonAfricaMouseClicked(evt);\n }\n });\n\n buttonAsia.setText(\"Asia\");\n buttonAsia.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n buttonAsiaMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jDialogNewContinentLayout = new javax.swing.GroupLayout(jDialogNewContinent.getContentPane());\n jDialogNewContinent.getContentPane().setLayout(jDialogNewContinentLayout);\n jDialogNewContinentLayout.setHorizontalGroup(\n jDialogNewContinentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialogNewContinentLayout.createSequentialGroup()\n .addGroup(jDialogNewContinentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialogNewContinentLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE))\n .addGroup(jDialogNewContinentLayout.createSequentialGroup()\n .addGroup(jDialogNewContinentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialogNewContinentLayout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(jLabel6))\n .addGroup(jDialogNewContinentLayout.createSequentialGroup()\n .addGap(167, 167, 167)\n .addGroup(jDialogNewContinentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(buttonSouthAmerica)\n .addComponent(buttonAustralia, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonNorthAmerica, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonAfrica, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonAsia, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jDialogNewContinentLayout.setVerticalGroup(\n jDialogNewContinentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialogNewContinentLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(buttonNorthAmerica)\n .addGap(18, 18, 18)\n .addComponent(buttonSouthAmerica)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(buttonAustralia, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(buttonAsia)\n .addGap(18, 18, 18)\n .addComponent(buttonAfrica, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(20, Short.MAX_VALUE))\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n jPanel1.setOpaque(false);\n\n DiceEurope.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Game/southamericabackground/dice-md.png\"))); // NOI18N\n DiceEurope.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n DiceEuropeMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n DiceEuropeMouseExited(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n DiceEuropeMouseEntered(evt);\n }\n });\n\n backButtonEurope.setBackground(new java.awt.Color(0, 153, 204));\n backButtonEurope.setForeground(new java.awt.Color(240, 240, 240));\n backButtonEurope.setText(\"Back\");\n backButtonEurope.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backButtonEuropeActionPerformed(evt);\n }\n });\n\n submit.setText(\"submit\");\n submit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n submitMouseClicked(evt);\n }\n });\n\n jLabelDiceResult.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n\n jCheckBox4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout europeQuestionWindowLayout = new javax.swing.GroupLayout(europeQuestionWindow);\n europeQuestionWindow.setLayout(europeQuestionWindowLayout);\n europeQuestionWindowLayout.setHorizontalGroup(\n europeQuestionWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(europeQuestionWindowLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(europeQuestionWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jCheckBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)\n .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jCheckBox3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jCheckBox4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(europeQuestionWindowLayout.createSequentialGroup()\n .addGroup(europeQuestionWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(europeQuestionWindowLayout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jLabelDiceResult, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(europeQuestionWindowLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(submit))\n .addComponent(questiontext, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n europeQuestionWindowLayout.setVerticalGroup(\n europeQuestionWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, europeQuestionWindowLayout.createSequentialGroup()\n .addComponent(jLabelDiceResult, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(questiontext, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBox3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBox4)\n .addGap(16, 16, 16)\n .addComponent(submit)\n .addContainerGap())\n );\n\n CheckAnswerResult.setFont(new java.awt.Font(\"Century\", 1, 48)); // NOI18N\n CheckAnswerResult.setForeground(new java.awt.Color(0, 255, 0));\n CheckAnswerResult.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n CheckAnswerResultMouseEntered(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Segoe UI Light\", 0, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(51, 204, 255));\n jLabel5.setText(\"Click on the dice to roll it\");\n\n jLabel3.setFont(new java.awt.Font(\"Segoe Script\", 0, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Welcome to Europe!\");\n\n pointsLabel.setFont(new java.awt.Font(\"Arial\", 1, 24)); // NOI18N\n pointsLabel.setForeground(new java.awt.Color(255, 255, 255));\n pointsLabel.setText(\"Points:\");\n\n pointsDisplay.setFont(new java.awt.Font(\"Arial\", 0, 24)); // NOI18N\n pointsDisplay.setForeground(new java.awt.Color(255, 255, 255));\n pointsDisplay.setText(\"0\");\n\n LabelPointsNeeded.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n LabelPointsNeeded.setForeground(new java.awt.Color(255, 255, 255));\n LabelPointsNeeded.setText(\"Beat this level by earning 40,000 points!\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pointsLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(pointsDisplay, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(7, 7, 7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(backButtonEurope))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addComponent(DiceEurope))))\n .addGap(76, 76, 76)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(CheckAnswerResult, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(europeQuestionWindow, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(283, 283, 283)\n .addComponent(LabelPointsNeeded)))\n .addContainerGap(215, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(LabelPointsNeeded)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pointsLabel)\n .addComponent(pointsDisplay, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(58, 58, 58)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(CheckAnswerResult, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(europeQuestionWindow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 1, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(DiceEurope)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(backButtonEurope)\n .addGap(40, 40, 40))))\n );\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n getContentPane().add(jPanel1, gridBagConstraints);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Game/neweurope.jpg\"))); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n getContentPane().add(jLabel1, gridBagConstraints);\n\n pack();\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.setBackground(new Color(-3100784));\n mainPanel.setPreferredSize(new Dimension(500, 600));\n contentTablePanel = new JPanel();\n contentTablePanel.setLayout(new GridBagLayout());\n contentTablePanel.setBackground(new Color(-3100784));\n mainPanel.add(contentTablePanel, BorderLayout.NORTH);\n contentTablePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Arial Rounded MT Bold\", Font.BOLD, 14, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n label1.setForeground(new Color(-14342875));\n label1.setHorizontalAlignment(0);\n label1.setHorizontalTextPosition(0);\n label1.setIconTextGap(0);\n label1.setPreferredSize(new Dimension(150, 25));\n label1.setText(\"Poste\");\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n contentTablePanel.add(label1, gbc);\n final JLabel label2 = new JLabel();\n Font label2Font = this.$$$getFont$$$(\"Arial Rounded MT Bold\", Font.BOLD, 14, label2.getFont());\n if (label2Font != null) label2.setFont(label2Font);\n label2.setForeground(new Color(-14342875));\n label2.setHorizontalAlignment(0);\n label2.setHorizontalTextPosition(0);\n label2.setIconTextGap(0);\n label2.setPreferredSize(new Dimension(150, 25));\n label2.setText(\"Mode de Paiement\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n contentTablePanel.add(label2, gbc);\n final JLabel label3 = new JLabel();\n Font label3Font = this.$$$getFont$$$(\"Arial Rounded MT Bold\", Font.BOLD, 14, label3.getFont());\n if (label3Font != null) label3.setFont(label3Font);\n label3.setForeground(new Color(-14342875));\n label3.setHorizontalAlignment(0);\n label3.setHorizontalTextPosition(0);\n label3.setIconTextGap(0);\n label3.setPreferredSize(new Dimension(150, 25));\n label3.setText(\"Valeur\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n contentTablePanel.add(label3, gbc);\n final JLabel label4 = new JLabel();\n label4.setForeground(new Color(-14342875));\n label4.setHorizontalAlignment(0);\n label4.setPreferredSize(new Dimension(150, 18));\n label4.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label4, gbc);\n final JLabel label5 = new JLabel();\n label5.setForeground(new Color(-14342875));\n label5.setHorizontalAlignment(0);\n label5.setPreferredSize(new Dimension(150, 18));\n label5.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label5, gbc);\n final JLabel label6 = new JLabel();\n label6.setForeground(new Color(-14342875));\n label6.setHorizontalAlignment(0);\n label6.setPreferredSize(new Dimension(150, 18));\n label6.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label6, gbc);\n final JLabel label7 = new JLabel();\n label7.setForeground(new Color(-14342875));\n label7.setHorizontalAlignment(0);\n label7.setPreferredSize(new Dimension(150, 18));\n label7.setText(\"{{themeTransaction4}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label7, gbc);\n final JLabel label8 = new JLabel();\n label8.setForeground(new Color(-14342875));\n label8.setHorizontalAlignment(0);\n label8.setPreferredSize(new Dimension(150, 18));\n label8.setText(\"{{themeTransaction5}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label8, gbc);\n final JLabel label9 = new JLabel();\n label9.setForeground(new Color(-14342875));\n label9.setHorizontalAlignment(0);\n label9.setPreferredSize(new Dimension(150, 18));\n label9.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label9, gbc);\n final JLabel label10 = new JLabel();\n label10.setForeground(new Color(-14342875));\n label10.setHorizontalAlignment(0);\n label10.setPreferredSize(new Dimension(150, 18));\n label10.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label10, gbc);\n final JLabel label11 = new JLabel();\n label11.setForeground(new Color(-14342875));\n label11.setHorizontalAlignment(0);\n label11.setPreferredSize(new Dimension(150, 18));\n label11.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label11, gbc);\n final JLabel label12 = new JLabel();\n label12.setForeground(new Color(-14342875));\n label12.setHorizontalAlignment(0);\n label12.setPreferredSize(new Dimension(150, 18));\n label12.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label12, gbc);\n final JLabel label13 = new JLabel();\n label13.setForeground(new Color(-14342875));\n label13.setHorizontalAlignment(0);\n label13.setPreferredSize(new Dimension(150, 18));\n label13.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label13, gbc);\n final JLabel label14 = new JLabel();\n label14.setForeground(new Color(-14342875));\n label14.setHorizontalAlignment(0);\n label14.setPreferredSize(new Dimension(150, 18));\n label14.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label14, gbc);\n final JLabel label15 = new JLabel();\n label15.setForeground(new Color(-14342875));\n label15.setHorizontalAlignment(0);\n label15.setPreferredSize(new Dimension(150, 18));\n label15.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label15, gbc);\n final JLabel label16 = new JLabel();\n label16.setForeground(new Color(-14342875));\n label16.setHorizontalAlignment(0);\n label16.setPreferredSize(new Dimension(150, 18));\n label16.setText(\"{{themeTransaction1}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label16, gbc);\n final JLabel label17 = new JLabel();\n label17.setForeground(new Color(-14342875));\n label17.setHorizontalAlignment(0);\n label17.setPreferredSize(new Dimension(150, 18));\n label17.setText(\"{{themeTransaction2}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label17, gbc);\n final JLabel label18 = new JLabel();\n label18.setForeground(new Color(-14342875));\n label18.setHorizontalAlignment(0);\n label18.setPreferredSize(new Dimension(150, 18));\n label18.setText(\"{{themeTransaction3}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label18, gbc);\n final JLabel label19 = new JLabel();\n label19.setForeground(new Color(-14342875));\n label19.setHorizontalAlignment(0);\n label19.setPreferredSize(new Dimension(150, 18));\n label19.setText(\"{{themeTransaction6}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label19, gbc);\n final JLabel label20 = new JLabel();\n label20.setForeground(new Color(-14342875));\n label20.setHorizontalAlignment(0);\n label20.setPreferredSize(new Dimension(150, 18));\n label20.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label20, gbc);\n final JLabel label21 = new JLabel();\n label21.setForeground(new Color(-14342875));\n label21.setHorizontalAlignment(0);\n label21.setPreferredSize(new Dimension(150, 18));\n label21.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label21, gbc);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridBagLayout());\n panel1.setBackground(new Color(-3100784));\n mainPanel.add(panel1, BorderLayout.EAST);\n final JLabel label22 = new JLabel();\n label22.setEnabled(true);\n label22.setForeground(new Color(-14342875));\n label22.setText(\"Valeur :\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n panel1.add(label22, gbc);\n final JLabel label23 = new JLabel();\n label23.setForeground(new Color(-14342875));\n label23.setText(\"{{currentValue}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 30, 0, 30);\n panel1.add(label23, gbc);\n final JLabel label24 = new JLabel();\n label24.setForeground(new Color(-14342875));\n label24.setText(\"Euros\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n panel1.add(label24, gbc);\n validateBtn = new JButton();\n validateBtn.setBackground(new Color(-5468041));\n validateBtn.setForeground(new Color(-14342875));\n validateBtn.setPreferredSize(new Dimension(100, 30));\n validateBtn.setText(\"OK\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.insets = new Insets(20, 0, 0, 50);\n panel1.add(validateBtn, gbc);\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel2.setBackground(new Color(-3100784));\n mainPanel.add(panel2, BorderLayout.SOUTH);\n backgroundImageLabel = new JLabel();\n backgroundImageLabel.setBackground(new Color(-3100784));\n backgroundImageLabel.setIcon(new ImageIcon(getClass().getResource(\"/img/accountingRecordPrint.png\")));\n backgroundImageLabel.setText(\"\");\n panel2.add(backgroundImageLabel, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initComponents() {\n\t\tpanel2 = new JDialog();\n\t\tfields = new JPanel();\n\t\tlabel_subjectSource4 = new JLabel();\n\t\tcontainerLabel3 = new JTextField();\n\t\tseparator3 = new JSeparator();\n\t\tlabel_subjectTermType3 = new JLabel();\n\t\tcontainer3Type = new JComboBox();\n\t\tlabel_subjectSource7 = new JLabel();\n\t\tcontainer3Type2 = new JComboBox();\n\t\tseparator2 = new JSeparator();\n\t\tpanel1 = new JPanel();\n\t\trights3 = new JCheckBox();\n\t\trights2 = new JCheckBox();\n\t\tpanel3 = new JPanel();\n\t\tcancel = new JButton();\n\t\tCellConstraints cc = new CellConstraints();\n\n\t\t//======== panel2 ========\n\t\t{\n\t\t\tContainer panel2ContentPane = panel2.getContentPane();\n\t\t\tpanel2ContentPane.setLayout(new BorderLayout());\n\n\t\t\t//======== fields ========\n\t\t\t{\n\t\t\t\tfields.setBorder(Borders.DLU4_BORDER);\n\t\t\t\tfields.setBackground(new Color(234, 201, 250));\n\t\t\t\tfields.setOpaque(false);\n\t\t\t\tfields.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tfields.setLayout(new FormLayout(\n\t\t\t\t\tnew ColumnSpec[] {\n\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\n\t\t\t\t\t\tnew ColumnSpec(\"max(default;400px):grow\")\n\t\t\t\t\t},\n\t\t\t\t\tnew RowSpec[] {\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\n\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC\n\t\t\t\t\t}));\n\n\t\t\t\t//---- label_subjectSource4 ----\n\t\t\t\tlabel_subjectSource4.setText(\"Barcode\");\n\t\t\t\tlabel_subjectSource4.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tATFieldInfo.assignLabelInfo(label_subjectSource4, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_BARCODE);\n\t\t\t\tfields.add(label_subjectSource4, cc.xy(1, 1));\n\n\t\t\t\t//---- containerLabel3 ----\n\t\t\t\tcontainerLabel3.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tfields.add(containerLabel3, cc.xy(3, 1));\n\n\t\t\t\t//---- separator3 ----\n\t\t\t\tseparator3.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tseparator3.setForeground(new Color(147, 131, 86));\n\t\t\t\tfields.add(separator3, cc.xywh(1, 3, 3, 1));\n\n\t\t\t\t//---- label_subjectTermType3 ----\n\t\t\t\tlabel_subjectTermType3.setText(\"Container 3 Type\");\n\t\t\t\tlabel_subjectTermType3.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tATFieldInfo.assignLabelInfo(label_subjectTermType3, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE);\n\t\t\t\tfields.add(label_subjectTermType3, cc.xy(1, 5));\n\n\t\t\t\t//---- container3Type ----\n\t\t\t\tcontainer3Type.setOpaque(false);\n\t\t\t\tcontainer3Type.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tfields.add(container3Type, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\n\n\t\t\t\t//---- label_subjectSource7 ----\n\t\t\t\tlabel_subjectSource7.setText(\"User Defined String 2\");\n\t\t\t\tlabel_subjectSource7.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tATFieldInfo.assignLabelInfo(label_subjectSource7, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_STRING2);\n\t\t\t\tfields.add(label_subjectSource7, cc.xy(1, 7));\n\n\t\t\t\t//---- container3Type2 ----\n\t\t\t\tcontainer3Type2.setOpaque(false);\n\t\t\t\tcontainer3Type2.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tfields.add(container3Type2, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\n\n\t\t\t\t//---- separator2 ----\n\t\t\t\tseparator2.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\tseparator2.setForeground(new Color(147, 131, 86));\n\t\t\t\tfields.add(separator2, cc.xywh(1, 9, 3, 1));\n\n\t\t\t\t//======== panel1 ========\n\t\t\t\t{\n\t\t\t\t\tpanel1.setLayout(new FormLayout(\n\t\t\t\t\t\tnew ColumnSpec[] {\n\t\t\t\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\n\t\t\t\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRowSpec.decodeSpecs(\"default\")));\n\n\t\t\t\t\t//---- rights3 ----\n\t\t\t\t\trights3.setText(\"User Defined Boolean 1\");\n\t\t\t\t\trights3.setOpaque(false);\n\t\t\t\t\trights3.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\t\trights3.setText(ATFieldInfo.getLabel(ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_BOOLEAN1));\n\t\t\t\t\tpanel1.add(rights3, cc.xywh(1, 1, 2, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\n\n\t\t\t\t\t//---- rights2 ----\n\t\t\t\t\trights2.setText(\"User Defined Boolean 2\");\n\t\t\t\t\trights2.setOpaque(false);\n\t\t\t\t\trights2.setFont(new Font(\"Trebuchet MS\", Font.PLAIN, 13));\n\t\t\t\t\trights2.setText(ATFieldInfo.getLabel(ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_BOOLEAN2));\n\t\t\t\t\tpanel1.add(rights2, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\n\t\t\t\t}\n\t\t\t\tfields.add(panel1, cc.xywh(1, 11, 3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n\n\t\t\t\t//======== panel3 ========\n\t\t\t\t{\n\t\t\t\t\tpanel3.setLayout(new FormLayout(\n\t\t\t\t\t\tnew ColumnSpec[] {\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRowSpec.decodeSpecs(\"default\")));\n\n\t\t\t\t\t//---- cancel ----\n\t\t\t\t\tcancel.setText(\"Cancel\");\n\t\t\t\t\tcancel.addActionListener(new ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tcancelActionPerformed(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanel3.add(cancel, cc.xy(3, 1));\n\t\t\t\t}\n\t\t\t\tfields.add(panel3, cc.xywh(1, 13, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n\t\t\t}\n\t\t\tpanel2ContentPane.add(fields, BorderLayout.CENTER);\n\t\t\tpanel2.pack();\n\t\t\tpanel2.setLocationRelativeTo(panel2.getOwner());\n\t\t}\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n jDesktopPane1 = new javax.swing.JDesktopPane();\n InstructionLabel = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n jSplitPane1 = new javax.swing.JSplitPane();\n jScrollPane1 = new javax.swing.JScrollPane();\n nameTable = new javax.swing.JTable();\n NameSelectionPane = new javax.swing.JScrollPane();\n listRoster = new javax.swing.JList();\n jSeparator2 = new javax.swing.JSeparator();\n VerifyButton = new javax.swing.JButton();\n CloseButton = new javax.swing.JButton();\n\n javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1);\n jDesktopPane1.setLayout(jDesktopPane1Layout);\n jDesktopPane1Layout.setHorizontalGroup(\n jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n jDesktopPane1Layout.setVerticalGroup(\n jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Bubblit Verification Dialog\");\n setPreferredSize(new java.awt.Dimension(1280, 720));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n InstructionLabel.setText(\"Please verify that the students have been correctly identified.\");\n InstructionLabel.setToolTipText(\"\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(12, 10, 10, 10);\n getContentPane().add(InstructionLabel, gridBagConstraints);\n\n jSeparator1.setPreferredSize(new java.awt.Dimension(10, 3));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0E-4;\n gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);\n getContentPane().add(jSeparator1, gridBagConstraints);\n\n jSplitPane1.setResizeWeight(1.0);\n jSplitPane1.setAlignmentX(0.5F);\n jSplitPane1.setAlignmentY(0.5F);\n jSplitPane1.setMinimumSize(new java.awt.Dimension(100, 23));\n jSplitPane1.setPreferredSize(new java.awt.Dimension(100, 100));\n jSplitPane1.setRequestFocusEnabled(false);\n jSplitPane1.setVerifyInputWhenFocusTarget(false);\n\n jScrollPane1.setMinimumSize(new java.awt.Dimension(460, 21));\n jScrollPane1.setPreferredSize(new java.awt.Dimension(500, 402));\n jScrollPane1.setRequestFocusEnabled(false);\n\n nameTable.setModel(tableModel);\n nameTable.setFocusTraversalPolicyProvider(true);\n nameTable.setInheritsPopupMenu(true);\n jScrollPane1.setViewportView(nameTable);\n\n jSplitPane1.setLeftComponent(jScrollPane1);\n\n NameSelectionPane.setMinimumSize(new java.awt.Dimension(200, 0));\n NameSelectionPane.setPreferredSize(new java.awt.Dimension(240, 6));\n NameSelectionPane.setRequestFocusEnabled(false);\n\n listRoster.setModel(createListModel());\n listRoster.setToolTipText(\"This panel allows you set names to exams via the \\\"Choose Name\\\" button. \");\n listRoster.setAutoscrolls(false);\n listRoster.setRequestFocusEnabled(false);\n listRoster.setValueIsAdjusting(true);\n listRoster.setVisibleRowCount(4);\n listRoster.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n listRosterValueChanged(evt);\n }\n });\n NameSelectionPane.setViewportView(listRoster);\n\n jSplitPane1.setRightComponent(NameSelectionPane);\n NameSelectionPane.getAccessibleContext().setAccessibleName(\"NameSelectionPane\");\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);\n getContentPane().add(jSplitPane1, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0E-4;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 10, 10);\n getContentPane().add(jSeparator2, gridBagConstraints);\n\n VerifyButton.setText(\"Accept\");\n VerifyButton.setToolTipText(\"Accept that these name-to-exam pairs will be used for scoring results.\");\n VerifyButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n VerifyButton.setMargin(new java.awt.Insets(2, 4, 2, 4));\n VerifyButton.setMaximumSize(new java.awt.Dimension(85, 35));\n VerifyButton.setNextFocusableComponent(CloseButton);\n VerifyButton.setPreferredSize(new java.awt.Dimension(85, 35));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 102);\n getContentPane().add(VerifyButton, gridBagConstraints);\n\n CloseButton.setText(\"Cancel\");\n CloseButton.setToolTipText(\"Does the same thing as the close button!\");\n CloseButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CloseButton.setMargin(new java.awt.Insets(2, 4, 2, 4));\n CloseButton.setMaximumSize(new java.awt.Dimension(85, 35));\n CloseButton.setMinimumSize(new java.awt.Dimension(85, 35));\n CloseButton.setPreferredSize(new java.awt.Dimension(85, 35));\n CloseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CloseButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 10);\n getContentPane().add(CloseButton, gridBagConstraints);\n\n pack();\n }", "private void prepareGui() {\n JPanel detailsLabelPanel = new JPanel(new GridLayout(0, 1));\n JLabel attractionDetailsLabel = new JLabel(\"Ticket price list management:\");\n attractionDetailsLabel.setForeground(new Color(235, 127, 0));\n attractionDetailsLabel.setFont(new Font(attractionDetailsLabel.getFont().getName(), Font.PLAIN, 30));\n\n JPanel comboBoxPanel = new JPanel(new GridLayout(2, 1));\n JLabel comboBoxLabel = new JLabel(\"All positions (day, discount group, day time, attraction type, price):\");\n\n JPanel inputPanel = new JPanel(new GridBagLayout());\n JButton addButton = new JButton(\"Add selected to price list\");\n addButton.setBackground(new Color(235, 127, 0));\n addButton.setForeground(Color.WHITE);\n\n JButton showTicketListButton = new JButton(\"Price list\");\n showTicketListButton.setBackground(new Color(235, 127, 0));\n showTicketListButton.setForeground(Color.WHITE);\n\n JButton createPositionButton = new JButton(\"Create new position\");\n createPositionButton.setBackground(new Color(235, 127, 0));\n createPositionButton.setForeground(Color.WHITE);\n\n prepareLists();\n JPanel tablePanel = new JPanel(new GridLayout(1, 0));\n this.tableModel = new DefaultTableModel(tableData, columnNames);\n this.choosenPositionTable = new JTable(tableModel);\n choosenPositionTable.setPreferredSize(new Dimension(800, 200));\n\n detailsLabelPanel.setBackground(Color.WHITE);\n detailsLabelPanel.setPreferredSize(new Dimension(800, 80));\n\n comboBoxPanel.setBackground(Color.WHITE);\n comboBoxPanel.setPreferredSize(new Dimension(800, 80));\n\n inputPanel.setBackground(Color.WHITE);\n inputPanel.setPreferredSize(new Dimension(400, 250));\n\n tablePanel.setBackground(Color.WHITE);\n tablePanel.setPreferredSize(new Dimension(800, 200));\n\n ticketPriceListPositionJComboBox.setPreferredSize(new Dimension(400, 70));\n addButton.setPreferredSize(new Dimension(250, 50));\n showTicketListButton.setPreferredSize(new Dimension(250, 50));\n createPositionButton.setPreferredSize(new Dimension(250, 50));\n choosenPositionTable.setPreferredSize(new Dimension(750, 150));\n\n detailsLabelPanel.add(attractionDetailsLabel);\n comboBoxPanel.add(comboBoxLabel);\n comboBoxPanel.add(ticketPriceListPositionJComboBox);\n\n GridBagConstraints gridBagConstraintsBtn = new GridBagConstraints();\n gridBagConstraintsBtn.fill = GridBagConstraints.HORIZONTAL;\n gridBagConstraintsBtn.gridy = 0;\n gridBagConstraintsBtn.insets = new Insets(0, 0, 20, 0);\n inputPanel.add(createPositionButton, gridBagConstraintsBtn);\n gridBagConstraintsBtn.gridy = 1;\n inputPanel.add(addButton, gridBagConstraintsBtn);\n gridBagConstraintsBtn.gridy = 2;\n inputPanel.add(showTicketListButton, gridBagConstraintsBtn);\n\n showTicketListButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n PriceListView priceListView = new PriceListView(choosenPositionTable);\n }\n });\n\n addButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addPositions();\n }\n });\n\n createPositionButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n CreatePositionView createPositionView = new CreatePositionView(ticketPriceList, ticketPriceListPositionJComboBox);\n }\n });\n\n gridBagConstraints.gridy = 0;\n this.add(detailsLabelPanel, gridBagConstraints);\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new Insets(0, 0, 80, 0);\n this.add(new JSeparator(), gridBagConstraints);\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new Insets(0, 0, 50, 0);\n this.add(comboBoxPanel, gridBagConstraints);\n gridBagConstraints.gridy = 3;\n this.add(inputPanel, gridBagConstraints);\n this.setVisible(true);\n }", "public void displayArchivedAlerts(User user, JFrame frame, StockMangement sm){\n\n nameArchivedPanel.removeAll();\n categoryArchivedPanel.removeAll();\n locationArchivedPanel.removeAll();\n dateArchivedPanel.removeAll();\n tagArchivedPanel.removeAll();\n alertIdArchivedPanel.removeAll();\n\n nameArchivedPanel.setLayout(new GridBagLayout());\n GridBagConstraints nameArchivedLayout = new GridBagConstraints();\n nameArchivedLayout.fill = GridBagConstraints.BOTH;\n nameArchivedLayout.weightx = 1.0;\n nameArchivedLayout.weighty = 2;\n nameArchivedLayout.gridx = 0;\n nameArchivedLayout.gridy = 0;\n\n categoryArchivedPanel.setLayout(new GridBagLayout());\n GridBagConstraints categoryArchivedLayout = new GridBagConstraints();\n categoryArchivedLayout.fill = GridBagConstraints.BOTH;\n categoryArchivedLayout.weightx = 1.0;\n categoryArchivedLayout.weighty = 2;\n categoryArchivedLayout.gridx = 0;\n categoryArchivedLayout.gridy = 0;\n\n locationArchivedPanel.setLayout(new GridBagLayout());\n GridBagConstraints locationArchivedLayout = new GridBagConstraints();\n locationArchivedLayout.fill = GridBagConstraints.BOTH;\n locationArchivedLayout.weightx = 1.0;\n locationArchivedLayout.weighty = 2;\n locationArchivedLayout.gridx = 0;\n locationArchivedLayout.gridy = 0;\n\n dateArchivedPanel.setLayout(new GridBagLayout());\n GridBagConstraints dateArchivedLayout = new GridBagConstraints();\n dateArchivedLayout.fill = GridBagConstraints.BOTH;\n dateArchivedLayout.weightx = 1.0;\n dateArchivedLayout.weighty = 2;\n dateArchivedLayout.gridx = 0;\n dateArchivedLayout.gridy = 0;\n\n tagArchivedPanel.setLayout(new GridBagLayout());\n GridBagConstraints tagArchivedLayout = new GridBagConstraints();\n tagArchivedLayout.fill = GridBagConstraints.BOTH;\n tagArchivedLayout.weightx = 1.0;\n tagArchivedLayout.weighty = 2;\n tagArchivedLayout.gridx = 0;\n tagArchivedLayout.gridy = 0;\n\n alertIdArchivedPanel.setLayout(new GridBagLayout());\n GridBagConstraints idArchivedLayout = new GridBagConstraints();\n idArchivedLayout.fill = GridBagConstraints.BOTH;\n idArchivedLayout.weightx = 1.0;\n idArchivedLayout.weighty = 2;\n idArchivedLayout.gridx = 0;\n idArchivedLayout.gridy = 0;\n\n ArrayList<ArchivedAlertLine> archivedAlertListProduct = null;\n\n //Extract all archived alerts\n try {\n archivedAlertListProduct = DataBase.ExtractData.extractAllArchivedAlerts(user, frame, sm);\n\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Archived alerts have not been extracted. \",\n \"Extraction archived alerts error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //Display products archived alerts\n assert archivedAlertListProduct != null;\n for (ArchivedAlertLine archivedAlertLine: archivedAlertListProduct){\n\n nameArchivedPanel.add(archivedAlertLine.getArchivedAlertName(), nameArchivedLayout);\n categoryArchivedPanel.add(archivedAlertLine.getArchivedAlertCategory(), categoryArchivedLayout);\n locationArchivedPanel.add(archivedAlertLine.getArchivedAlertLocation(), locationArchivedLayout);\n dateArchivedPanel.add(archivedAlertLine.getArchivedAlertDate(), dateArchivedLayout);\n tagArchivedPanel.add(archivedAlertLine.getArchivedAlertTag(), tagArchivedLayout);\n alertIdArchivedPanel.add(archivedAlertLine.getArchivedAlertId(), idArchivedLayout);\n\n nameArchivedLayout.gridy += 1;\n categoryArchivedLayout.gridy += 1;\n locationArchivedLayout.gridy += 1;\n dateArchivedLayout.gridy += 1;\n tagArchivedLayout.gridy += 1;\n idArchivedLayout.gridy += 1;\n\n }\n\n\n frame.repaint();\n frame.revalidate();\n }", "private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }", "private void initialize() {\r\n\t\tthis.setSize(734, 710);\r\n\t\tfinal GridBagLayout gridBagLayout_1 = new GridBagLayout();\r\n\t\tgridBagLayout_1.rowWeights = new double[]{0.0, 1.0,0};\r\n\t\tgridBagLayout_1.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_1.rowHeights = new int[] {0,0, 0}; \r\n\t\tthis.setLayout(gridBagLayout_1);\r\n\r\n\t\teditROIPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_2 = new GridBagLayout();\r\n\t\tgridBagLayout_2.rowHeights = new int[] {0,0,7};\r\n\t\tgridBagLayout_2.columnWidths = new int[] {0,7};\r\n\t\teditROIPanel.setLayout(gridBagLayout_2);\r\n\t\tfinal GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();\r\n\t\tgridBagConstraints_6.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_6.insets = new Insets(2, 2, 5, 2);\r\n\t\tgridBagConstraints_6.weightx = 1.0;\r\n\t\tgridBagConstraints_6.gridy = 0;\r\n\t\tgridBagConstraints_6.gridx = 0;\r\n\t\tadd(editROIPanel, gridBagConstraints_6);\r\n\r\n\t\tfinal JLabel infoLabel = new JLabel();\r\n\t\tinfoLabel.setText(\"Data Info:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_12 = new GridBagConstraints();\r\n\t\tgridBagConstraints_12.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_12.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_12.gridy = 0;\r\n\t\tgridBagConstraints_12.gridx = 0;\r\n\t\teditROIPanel.add(infoLabel, gridBagConstraints_12);\r\n\r\n\t\ttextLabel = new JLabel();\r\n\t\ttextLabel.setPreferredSize(new Dimension(500, 20));\r\n\t\ttextLabel.setMinimumSize(new Dimension(500, 20));\r\n\t\tfinal GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();\r\n\t\tgridBagConstraints_2.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_2.weightx = 1;\r\n\t\tgridBagConstraints_2.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_2.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_2.gridy = 0;\r\n\t\tgridBagConstraints_2.gridx = 1;\r\n\t\tgridBagConstraints_2.gridwidth = 2;\r\n\t\teditROIPanel.add(textLabel, gridBagConstraints_2);\r\n\t\ttextLabel.setText(\"No FRAP DataSet loaded.\");\r\n\r\n\t\tautoCropButton = new JButton(new ImageIcon(getClass().getResource(\"/images/autoCrop.gif\")));\r\n\t\tautoCropButton.setName(\"roiAutoCropBtn\");\r\n\t\tautoCropButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_AUTOCROP_PROPERTY, null,null);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tclearROIbutton = new JButton(new ImageIcon(getClass().getResource(\"/images/clearROI.gif\")));\r\n\t\tclearROIbutton.setEnabled(false);\r\n\t\tclearROIbutton.setName(\"clearROIBtn\");\r\n\t\tclearROIbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tif(roiComboBox.getItemCount() == 0){\r\n\t\t\t\t\tgiveROIRequiredWarning(\"Clear Domain\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_CLEARROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tviewZLabel = new JLabel();\r\n\t\tviewZLabel.setText(\"View Z:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_17 = new GridBagConstraints();\r\n\t\tgridBagConstraints_17.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_17.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_17.gridy = 1;\r\n\t\tgridBagConstraints_17.gridx = 0;\r\n\t\teditROIPanel.add(viewZLabel, gridBagConstraints_17);\r\n\r\n\t\tfinal JPanel panel_1 = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_4 = new GridBagLayout();\r\n\t\tgridBagLayout_4.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_4.columnWidths = new int[] {7};\r\n\t\tpanel_1.setLayout(gridBagLayout_4);\r\n\t\tfinal GridBagConstraints gridBagConstraints_18 = new GridBagConstraints();\r\n\t\tgridBagConstraints_18.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_18.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_18.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_18.weightx = 0;\r\n\t\tgridBagConstraints_18.gridy = 1;\r\n\t\tgridBagConstraints_18.gridx = 1;\r\n\t\teditROIPanel.add(panel_1, gridBagConstraints_18);\r\n\t\tfinal GridBagConstraints gridBagConstraints_19 = new GridBagConstraints();\r\n\t\tgridBagConstraints_19.insets = new Insets(0, 0, 5, 0);\r\n\t\tgridBagConstraints_19.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_19.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_19.weightx = 1;\r\n\t\tgridBagConstraints_19.gridy = 0;\r\n\t\tgridBagConstraints_19.gridx = 0;\r\n\t\tpanel_1.add(getZSlider(), gridBagConstraints_19);\r\n\r\n\t\tviewTLabel = new JLabel();\r\n\t\tviewTLabel.setText(\"View Time:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_13 = new GridBagConstraints();\r\n\t\tgridBagConstraints_13.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_13.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_13.gridy = 2;\r\n\t\tgridBagConstraints_13.gridx = 0;\r\n\t\teditROIPanel.add(viewTLabel, gridBagConstraints_13);\r\n\r\n\t\tfinal JPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new GridBagLayout());\r\n\t\tfinal GridBagConstraints gridBagConstraints_15 = new GridBagConstraints();\r\n\t\tgridBagConstraints_15.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_15.weightx = 1;\r\n\t\tgridBagConstraints_15.insets = new Insets(0, 0, 0, 0);\r\n\t\tgridBagConstraints_15.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_15.gridy = 0;\r\n\t\tgridBagConstraints_15.gridx = 0;\r\n\t\tpanel.add(getTimeSlider(), gridBagConstraints_15);\r\n\t\t\r\n\t\tfinal GridBagConstraints gridBagConstraints_14 = new GridBagConstraints();\r\n\t\tgridBagConstraints_14.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_14.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_14.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_14.gridy = 2;\r\n\t\tgridBagConstraints_14.gridx = 1;\r\n\t\teditROIPanel.add(panel, gridBagConstraints_14);\r\n\r\n\t\tfinal JPanel editROIButtonPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_3 = new GridBagLayout();\r\n\t\tgridBagLayout_3.rowWeights = new double[]{0.0, 1.0};\r\n\t\tgridBagLayout_3.columnWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0};\r\n\t\tgridBagLayout_3.columnWidths = new int[] {0, 0,7,7, 0, 0};\r\n\t\teditROIButtonPanel.setLayout(gridBagLayout_3);\r\n\t\tfinal GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();\r\n\t\tgridBagConstraints_8.gridwidth = 2;\r\n\t\tgridBagConstraints_8.weightx = 0;\r\n\t\tgridBagConstraints_8.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_8.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_8.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_8.gridy = 3;\r\n\t\tgridBagConstraints_8.gridx = 0;\r\n\t\teditROIPanel.add(editROIButtonPanel, gridBagConstraints_8);\r\n\t\t\r\n\t\tpanel_2 = new JPanel();\r\n\t\tGridBagConstraints gbc_panel_2 = new GridBagConstraints();\r\n\t\tgbc_panel_2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_2.weighty = 1.0;\r\n\t\tgbc_panel_2.weightx = 1.0;\r\n\t\tgbc_panel_2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2.gridx = 0;\r\n\t\tgbc_panel_2.gridy = 1;\r\n\t\tadd(panel_2, gbc_panel_2);\r\n\t\tGridBagLayout gbl_panel_2 = new GridBagLayout();\r\n\t\tgbl_panel_2.columnWidths = new int[]{0, 0, 0};\r\n\t\tgbl_panel_2.rowHeights = new int[]{0};\r\n\t\tgbl_panel_2.columnWeights = new double[]{0, 1.0, 0.0};\r\n\t\tgbl_panel_2.rowWeights = new double[]{0.0};\r\n\t\tpanel_2.setLayout(gbl_panel_2);\r\n\t\t\r\n\t\tpanel_3 = new JPanel();\r\n\t\tpanel_3.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_3 = new GridBagConstraints();\r\n\t\tgbc_panel_3.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_3.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_3.gridx = 0;\r\n\t\tgbc_panel_3.gridy = 0;\r\n\t\tpanel_2.add(panel_3, gbc_panel_3);\r\n\t\tGridBagLayout gbl_panel_3 = new GridBagLayout();\r\n\t\tgbl_panel_3.columnWidths = new int[]{0, 0};\r\n\t\tgbl_panel_3.rowHeights = new int[]{0, 0, 0, 0};\r\n\t\tgbl_panel_3.columnWeights = new double[]{0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel_3.setLayout(gbl_panel_3);\r\n\t\t\r\n\t\tdomainRegionLabel = new JLabel(DOMAIN_LIST_TEXT);\r\n\t\tGridBagConstraints gbc_domainRegionLabel = new GridBagConstraints();\r\n\t\tgbc_domainRegionLabel.insets = new Insets(0, 0, 2, 0);\r\n\t\tgbc_domainRegionLabel.gridx = 0;\r\n\t\tgbc_domainRegionLabel.gridy = 0;\r\n\t\tpanel_3.add(domainRegionLabel, gbc_domainRegionLabel);\r\n\t\t\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tGridBagConstraints gbc_scrollPane = new GridBagConstraints();\r\n\t\tgbc_scrollPane.insets = new Insets(0, 2, 0, 0);\r\n\t\tgbc_scrollPane.weighty = 1.0;\r\n\t\tgbc_scrollPane.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_scrollPane.gridx = 0;\r\n\t\tgbc_scrollPane.gridy = 1;\r\n\t\tpanel_3.add(scrollPane, gbc_scrollPane);\r\n\t\tscrollPane.setPreferredSize(new Dimension(125, 10));\r\n\t\tscrollPane.setMinimumSize(new Dimension(125,10));\r\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\r\n\t\tresolvedList = new JList();\r\n\t\tresolvedList.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tsuper.mouseClicked(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(e.getClickCount() == 2){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_FINDROI_PROPERTY, null, resolvedList.getSelectedValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mousePressed(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mouseReleased(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tresolvedList.addListSelectionListener(resolvedListSelectionListener);\r\n\t\tresolvedList.setCellRenderer(resolvedObjectListCellRenderer);\r\n\t\tscrollPane.setViewportView(resolvedList);\r\n\t\t\r\n\t\tmergeButton = new JButton(\"Auto-Merge\");\r\n\t\tmergeButton.setToolTipText(\"Remove regions by merging with neighbor\");\r\n\t\tmergeButton.setEnabled(false);\r\n\t\tmergeButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tresolvedListSelection(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_mergeButton = new GridBagConstraints();\r\n\t\tgbc_mergeButton.gridx = 0;\r\n\t\tgbc_mergeButton.gridy = 2;\r\n\t\tpanel_3.add(mergeButton, gbc_mergeButton);\r\n\t\tGridBagConstraints gbc_jScrollPane2 = new GridBagConstraints();\r\n\t\tgbc_jScrollPane2.weighty = 1.0;\r\n\t\tgbc_jScrollPane2.weightx = 1.0;\r\n\t\tgbc_jScrollPane2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_jScrollPane2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_jScrollPane2.gridx = 1;\r\n\t\tgbc_jScrollPane2.gridy = 0;\r\n\t\tpanel_2.add(getJScrollPane2(), gbc_jScrollPane2);\r\n\t\tGridBagConstraints gbc_toolButtonPanel = new GridBagConstraints();\r\n\t\tgbc_toolButtonPanel.weighty = 1.0;\r\n\t\tgbc_toolButtonPanel.insets = new Insets(2, 2, 0, 2);\r\n\t\tgbc_toolButtonPanel.anchor = GridBagConstraints.NORTH;\r\n\t\tgbc_toolButtonPanel.gridx = 2;\r\n\t\tgbc_toolButtonPanel.gridy = 0;\r\n\t\tpanel_2.add(getToolButtonPanel(), gbc_toolButtonPanel);\r\n\r\n\t\troiComboBox = new JComboBox();\r\n\t\troiComboBox.setName(\"activeROIComboBox\");\r\n\t\troiComboBox.setRenderer(new ListCellRenderer() {\r\n\t\t\tprivate DefaultListCellRenderer listCellRender = new DefaultListCellRenderer();\r\n\t\t\tpublic Component getListCellRendererComponent(JList list, Object value,\r\n\t\t\t\t\tint index, boolean isSelected, boolean cellHasFocus) {\r\n\t\t\t\tROIMultiPaintManager.ComboboxROIName comboboxROIName = (ROIMultiPaintManager.ComboboxROIName)value;\r\n\t\t\t\tif(comboboxROIName == null){//return blank\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\tif(comboboxROIName.getHighlightColor() == null){//return text only\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, comboboxROIName.getROIName(), index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\t//return text with small color box\r\n\t\t\t\tIcon icon = new ColorIcon(20,20,comboboxROIName.getHighlightColor());\r\n\t\t\t\tJLabel jlable = (JLabel)listCellRender.getListCellRendererComponent(list, icon, index, isSelected, cellHasFocus);\r\n\t\t\t\tjlable.setText(comboboxROIName.getROIName());\r\n\t\t\t\treturn jlable;\r\n\t\t\t}\r\n\t\t});\r\n\t\troiComboBox.addActionListener(ROI_COMBOBOX_ACTIONLISTENER);\r\n\t\t\r\n\t\tlblNewLabel = new JLabel(\"Active Domain:\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_lblNewLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblNewLabel.gridx = 0;\r\n\t\tgbc_lblNewLabel.gridy = 0;\r\n\t\teditROIButtonPanel.add(lblNewLabel, gbc_lblNewLabel);\r\n\t\tfinal GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();\r\n\t\tgridBagConstraints_1.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_1.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_1.weightx = 1;\r\n\t\tgridBagConstraints_1.gridy = 0;\r\n\t\tgridBagConstraints_1.gridx = 1;\r\n\t\teditROIButtonPanel.add(roiComboBox, gridBagConstraints_1);\r\n\r\n\t\taddROIButton = new JButton();\r\n\t\taddROIButton.setName(\"roiAddBtn\");\r\n\t\taddROIButton.addActionListener(addROIActionListener);\r\n\t\taddROIButton.setText(\"Add Domain...\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();\r\n\t\tgridBagConstraints_3.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_3.gridy = 0;\r\n\t\tgridBagConstraints_3.gridx = 2;\r\n\t\teditROIButtonPanel.add(addROIButton, gridBagConstraints_3);\r\n\r\n\t\tdelROIButton = new JButton();\r\n\t\tdelROIButton.setName(\"roiDeleteBtn\");\r\n\t\tdelROIButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DELETEROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdelROIButton.setText(\"Delete Domain...\");\r\n\t\tdelROIButton.setEnabled(false);\r\n\t\tfinal GridBagConstraints gridBagConstraints_4 = new GridBagConstraints();\r\n\t\tgridBagConstraints_4.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_4.gridy = 0;\r\n\t\tgridBagConstraints_4.gridx = 3;\r\n\t\teditROIButtonPanel.add(delROIButton, gridBagConstraints_4);\r\n\t\t\r\n\t\tdiscardHighlightsButton = new JButton(\"Clear Selections\");\r\n\t\tdiscardHighlightsButton.setEnabled(false);\r\n\t\tdiscardHighlightsButton.setName(\"clearHighlightsBtn\");\r\n\t\tdiscardHighlightsButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DISCARDHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tGridBagConstraints gbc_specialActionsButton = new GridBagConstraints();\r\n\t\tgbc_specialActionsButton.insets = new Insets(4, 4, 5, 5);\r\n\t\tgbc_specialActionsButton.gridx = 4;\r\n\t\tgbc_specialActionsButton.gridy = 0;\r\n\t\teditROIButtonPanel.add(discardHighlightsButton, gbc_specialActionsButton);\r\n\t\t\r\n\t\tchannelComboBox = new JComboBox();\r\n\t\tGridBagConstraints gbc_channelComboBox = new GridBagConstraints();\r\n\t\tgbc_channelComboBox.insets = new Insets(4, 4, 5, 4);\r\n\t\tgbc_channelComboBox.gridx = 5;\r\n\t\tgbc_channelComboBox.gridy = 0;\r\n\t\teditROIButtonPanel.add(channelComboBox, gbc_channelComboBox);\r\n\t\tchannelComboBox.addActionListener(channelActionListener);\r\n\t\tchannelComboBox.setPreferredSize(new Dimension(100, 22));\r\n\t\tchannelComboBox.setMinimumSize(new Dimension(100, 20));\r\n\t\t\r\n\t\tblendPercentPanel = new JPanel();\r\n\t\tblendPercentPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_2a = new GridBagConstraints();\r\n\t\tgbc_panel_2a.gridwidth = 6;\r\n\t\tgbc_panel_2a.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_panel_2a.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2a.gridx = 0;\r\n\t\tgbc_panel_2a.gridy = 1;\r\n\t\teditROIButtonPanel.add(blendPercentPanel, gbc_panel_2a);\r\n\t\tGridBagLayout gbl_panel_2a = new GridBagLayout();\r\n\t\tblendPercentPanel.setLayout(gbl_panel_2a);\r\n\t\t\r\n\t\tblendPercentROILabel = new JLabel(\"Domains\");\r\n\t\tGridBagConstraints gbc_blendPercentROILabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentROILabel.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_blendPercentROILabel.gridx = 0;\r\n\t\tgbc_blendPercentROILabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentROILabel, gbc_blendPercentROILabel);\r\n\t\t\r\n\t\tblendPercentSlider = new JSlider();\r\n\t\tblendPercentSlider.setToolTipText(\"Mix view of Domains and background image\");\r\n\t\tblendPercentSlider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\tif(!blendPercentSlider.getValueIsAdjusting()){\r\n//\t\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_blendPercentSlider = new GridBagConstraints();\r\n\t\tgbc_blendPercentSlider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_blendPercentSlider.weightx = 0.5;\r\n\t\tgbc_blendPercentSlider.gridx = 1;\r\n\t\tgbc_blendPercentSlider.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentSlider, gbc_blendPercentSlider);\r\n\t\t\r\n\t\tblendPercentImageLabel = new JLabel(\"Image\");\r\n\t\tGridBagConstraints gbc_blendPercentImageLabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentImageLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_blendPercentImageLabel.gridx = 2;\r\n\t\tgbc_blendPercentImageLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentImageLabel, gbc_blendPercentImageLabel);\r\n\t\t\r\n\t\tsmoothOrigLabel = new JLabel(\"Original\");\r\n\t\tGridBagConstraints gbc_smoothOrigLabel = new GridBagConstraints();\r\n\t\tgbc_smoothOrigLabel.insets = new Insets(0, 20, 0, 0);\r\n\t\tgbc_smoothOrigLabel.gridx = 3;\r\n\t\tgbc_smoothOrigLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothOrigLabel, gbc_smoothOrigLabel);\r\n\t\t\r\n\t\tsmoothslider = new JSlider();\r\n\t\tsmoothslider.setToolTipText(\"Smooth background image\");\r\n\t\tsmoothslider.setSnapToTicks(true);\r\n\t\tsmoothslider.setPaintTicks(true);\r\n\t\tsmoothslider.setMajorTickSpacing(1);\r\n\t\tsmoothslider.setMaximum(10);\r\n\t\tsmoothslider.setValue(0);\r\n\t\tsmoothslider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tif(!smoothslider.getValueIsAdjusting()){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_UNDERLAY_SMOOTH_PROPERTY, null, new Integer(smoothslider.getValue()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_smoothslider = new GridBagConstraints();\r\n\t\tgbc_smoothslider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_smoothslider.weightx = 0.5;\r\n\t\tgbc_smoothslider.gridx = 4;\r\n\t\tgbc_smoothslider.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothslider, gbc_smoothslider);\r\n\t\t\r\n\t\tsmootherLabel = new JLabel(\"Smoother\");\r\n\t\tGridBagConstraints gbc_smootherLabel = new GridBagConstraints();\r\n\t\tgbc_smootherLabel.gridx = 5;\r\n\t\tgbc_smootherLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smootherLabel, gbc_smootherLabel);\r\n\t\t\r\n\t\troiDrawButtonGroup.add(selectButton);\r\n\t\troiDrawButtonGroup.add(paintButton);\r\n\t\troiDrawButtonGroup.add(eraseButton);\r\n\t\troiDrawButtonGroup.add(fillButton);\r\n\t\troiDrawButtonGroup.add(cropButton);\r\n\t\troiDrawButtonGroup.add(translateToolButton);\r\n\t\troiDrawButtonGroup.add(scaleToolButton);\r\n\t\t\r\n\t\tBeanUtils.enableComponents(getToolButtonPanel(), false);\r\n\t\tBeanUtils.enableComponents(editROIPanel, false);\r\n\t\t\r\n\t\thistogramPanel = new HistogramPanel();\r\n\t\thistogramPanel.addPropertyChangeListener(new PropertyChangeListener() {\r\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n\t\t\t\tif(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_SELECT_PROPERTY)){\r\n\t\t\t\t\tOverlayEditorPanelJAI.this.firePropertyChange(\r\n\t\t\t\t\tOverlayEditorPanelJAI.FRAP_DATA_HISTOUPDATEHIGHLIGHT_PROPERTY, null, (ListSelectionModel)evt.getNewValue());\r\n\t\t\t\t}else if(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_APPLY_ACTION)){\r\n\t\t\t\t\tfirePropertyChange(OverlayEditorPanelJAI.FRAP_DATA_UPDATEROI_WITHHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\thistogramPanel.setVisible(false);\r\n\t\thistogramPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_histogramButton = new GridBagConstraints();\r\n\t\tgbc_histogramButton.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_histogramButton.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_histogramButton.gridx = 0;\r\n\t\tgbc_histogramButton.gridy = 2;\r\n\t\tadd(histogramPanel, gbc_histogramButton);\r\n\t}", "private void init() {\n\t\tsetModal(true);\n\t\t\n\t\tsetResizable(false);\n\t\tgetContentPane().setLayout(new GridBagLayout());\n\t\tc = new GridBagConstraints();\n\t\tc.insets = new Insets(10, 10, 10, 10);\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, new Dimension(100, 20), new Dimension(100, 20), new Dimension(100, 20), 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel2.add(buttonClose, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n messageLabel = new JLabel();\n messageLabel.setText(\"\");\n panel3.add(messageLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initPanel(){\n setBackground(Color.decode(\"#D9E4E8\"));\n unmatchedLilsTextField = new UnmatchedTextArea(\"littles\", new JTextArea());\n unmatchedBigsTextField = new UnmatchedTextArea(\"bigs\", new JTextArea());\n\n scoresLabel = new JLabel();\n\n littlesRanksTitleLabel = new JLabel(\"Select a little to see her preferences:\");\n littlesRanksTitleLabel.setPreferredSize(new Dimension(400,20));\n littlesRankingsBox = new JComboBox<>();\n littlesRankingsBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n littlesRankingsResultsLabel = new JTextArea();\n\n\n bigsRanksTitleLabel = new JLabel(\"Select a big to see her preferences:\");\n bigsRanksTitleLabel.setPreferredSize(new Dimension(400,20));\n bigsRankingsBox = new JComboBox<>();\n bigsRankingsResultsLabel = new JTextArea();\n\n whoRanksLittleTitleLabel = new JLabel (\"Select a Little to see who ranked her:\");\n whoRanksLittleTitleLabel.setPreferredSize(new Dimension(400,20));\n whoRanksLittleBox = new JComboBox<String>();\n whoRanksLittleResultsLabel = new JTextArea();\n\n whoRanksBigTitleLabel = new JLabel (\"Select a Big to see who ranked her:\");\n whoRanksBigTitleLabel.setPreferredSize(new Dimension(400,20));\n whoRanksBigBox = new JComboBox<String>();\n whoRanksBigResultsLabel = new JTextArea();\n\n// got rid of this button for now so I could improve its functionality\n// button = new JButton(\"Click to display computed matches\");\n// button.setPreferredSize(new Dimension(300,20));\n\n setLayout(new FlowLayout());\n// add(button);\n add(scoresLabel);\n add(unmatchedLilsTextField);\n add(unmatchedBigsTextField);\n add(littlesRanksTitleLabel);\n add(littlesRankingsBox);\n add(littlesRankingsResultsLabel);\n add(bigsRanksTitleLabel);\n add(bigsRankingsBox);\n add(bigsRankingsResultsLabel);\n add(whoRanksLittleTitleLabel);\n add(whoRanksLittleBox);\n add(whoRanksLittleResultsLabel);\n add(whoRanksBigTitleLabel);\n add(whoRanksBigBox);\n add(whoRanksBigResultsLabel);\n setPreferredSize(new Dimension(500,700));\n }", "public VistaArticulosBajas() {\r\n\t\tsetTitle(\"Baja_Art\\u00EDculos\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 367, 208);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\t// Definir el Diálogo Confirmar Baja Artículo\r\n\t\tdlgConfBaja.setLayout(new FlowLayout());\r\n\t\tdlgConfBaja.add(lblConfBaja);\r\n\t\tdlgConfBaja.add(btnConfBajaSi);\r\n\t\tdlgConfBaja.add(btnConfBajaNo);\r\n\t\tdlgConfBaja.setSize(200, 150);\r\n\t\tdlgConfBaja.setLocationRelativeTo(null);\r\n\t\tdlgConfBaja.addWindowListener(this);\r\n\t\tbtnConfBajaSi.addActionListener(this);\r\n\t\tbtnConfBajaNo.addActionListener(this);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"Escoge un Art\\u00EDculo\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblNewLabel.setBounds(10, 23, 147, 23);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\r\n\t\tchcArticuloBajas = new Choice();\r\n\t\tchcArticuloBajas.setBounds(10, 46, 169, 20);\r\n\t\tcontentPane.add(chcArticuloBajas);\r\n\t\t// Mostrar los artículos en el choice chcArticuloBajas conectando con la BD\r\n\t\tResultSet articulos = null;\r\n\t\tConnection conArticulo = null;\r\n\t\tconArticulo = modelo.conectar();\r\n\t\tarticulos = modelo.consultaArticulos(conArticulo);\r\n\t\ttry {\r\n\t\t\tString id;\r\n\t\t\tString descripcion;\r\n\t\t\twhile(articulos.next()) {\r\n\t\t\t\tid = articulos.getInt(\"idArticulos\")+\"\";\r\n\t\t\t\tdescripcion = articulos.getString(\"descripcionArticulo\");\r\n\t\t\t\tchcArticuloBajas.add(id+\" - \"+descripcion);\r\n\t\t\t}\r\n\t\t\tmodelo.desconectar(conArticulo);\r\n\t\t}catch(SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Botón Volver. Acción --> vuelve al Menú Principal\r\n\t\tJButton btnVolverBajas = new JButton(\"VOLVER\");\r\n\t\tbtnVolverBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVolverBajas.setBounds(252, 46, 89, 23);\r\n\t\tcontentPane.add(btnVolverBajas);\r\n\r\n\t\t// Botón Eliminar. Acción --> abre el Diálogo Confirmar_Baja \r\n\t\tJButton btnEliminarBajas = new JButton(\"ELIMINAR\");\r\n\t\tbtnEliminarBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdlgConfBaja.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnEliminarBajas.setBounds(252, 126, 89, 23);\r\n\t\tcontentPane.add(btnEliminarBajas);\r\n\r\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n this.$$$loadButtonText$$$(buttonCancel, ResourceBundle.getBundle(\"strings\").getString(\"cancel\"));\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"strings\").getString(\"resource-name\"));\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n nameField = new JTextField();\n panel3.add(nameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label2 = new JLabel();\n this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle(\"strings\").getString(\"resource-availability\"));\n panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel3.add(scrollPane1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(availabilitiesList);\n label1.setLabelFor(nameField);\n }", "private void setupOpnameImportDialog( ) {\n\t// Create modal dialog for editing opname record\n String title = \"Update Opname Import (\" + Integer.toString(opnameKeys.size()) + \" records)\";\n\tif ( parentObject instanceof JFrame ) {\n\t dialog = new JDialog( ( JFrame )parentObject, title, true );\n\t} else if ( parentObject instanceof JDialog ) {\n\t dialog = new JDialog( ( JDialog )parentObject, title, true );\n\t} else {\n\t logger.severe( \"Unexpected parent object class: \" +\n\t\t\t parentObject.getClass( ).getName( ) );\n\t return;\n\t}\n\n\t// Set grid bag layout manager\n\tContainer container = dialog.getContentPane( );\n\tcontainer.setLayout( new GridBagLayout( ) );\n GridBagConstraints constraints = new GridBagConstraints( );\n\n //////////////////////////////////////////\n // Import Type Combo Box, Import Datum\n //////////////////////////////////////////\n\n constraints.anchor = GridBagConstraints.EAST;\n constraints.insets = new Insets( 5, 20, 5, 5 );\n constraints.gridx = 0;\n constraints.gridy = 1;\n constraints.gridwidth = 1;\n container.add( new JLabel( \"Import:\" ), constraints );\n\n // Setup a JComboBox for ImportType\n importTypeComboBox = new ImportTypeComboBox( conn, defaultImportTypeId );\n importTypeComboBox.addActionListener( ( ActionEvent actionEvent ) -> {\n if (importTypeComboBox.getSelectedImportTypeId( ) == 0) {\n importDatumSpinner.setEnabled(false);\n }\n else {\n importDatumSpinner.setEnabled(true);\n }\n } );\n\n final JPanel importPanel = new JPanel();\n importPanel.add( importTypeComboBox );\n\n // Import datum\n GregorianCalendar calendar = new GregorianCalendar( );\n if (defaultImportDatum == null) {\n defaultImportDatum = calendar.getTime();\n }\n\n calendar.add( Calendar.YEAR, -50 );\n Date earliestDate = calendar.getTime( );\n calendar.add( Calendar.YEAR, 100 );\n Date latestDate = calendar.getTime( );\n SpinnerDateModel importDatumSpinnerDatemodel = new SpinnerDateModel(defaultImportDatum,\n earliestDate,\n latestDate,\n Calendar.DAY_OF_MONTH );\n importDatumSpinner = new JSpinner( importDatumSpinnerDatemodel );\n importDatumSpinner.setEditor( new JSpinner.DateEditor( importDatumSpinner, \"dd-MM-yyyy\" ) );\n importPanel.add( importDatumSpinner );\n\n // Set the import datum to enabled or disabled according to the selected medium type ID\n if (importTypeComboBox.getSelectedImportTypeId( ) == 0) {\n importDatumSpinner.setEnabled(false);\n }\n else {\n importDatumSpinner.setEnabled(true);\n }\n\n constraints.insets = new Insets( 5, 0, 5, 20 );\n constraints.anchor = GridBagConstraints.WEST;\n constraints.gridx = GridBagConstraints.RELATIVE;\n constraints.gridwidth = 2;\n container.add( importPanel, constraints );\n\n\n\t//////////////////////////////////////////\n\t// Update/Insert, Cancel buttons\n\t//////////////////////////////////////////\n\n\tJPanel buttonPanel = new JPanel( );\n\n\tActionListener buttonPanelActionListener = ( ActionEvent actionEvent ) -> {\n boolean result = true;\n\n if ( actionEvent.getActionCommand( ).equals( \"updateOpnameImport\" ) ) {\n result = updateOpnameImport( );\n }\n\n // Any other actionCommand, including cancel, has no action\n if ( result ) {\n dialog.setVisible( false );\n }\n };\n\n\tJButton editOpnameButton = new JButton( \"Update (\" + Integer.toString(opnameKeys.size()) + \" opname records)\");\n\teditOpnameButton.setActionCommand( \"updateOpnameImport\" );\n\teditOpnameButton.addActionListener( buttonPanelActionListener );\n\tbuttonPanel.add( editOpnameButton );\n\n\tJButton cancelOpnameButton = new JButton( \"Cancel\" );\n\tcancelOpnameButton.setActionCommand( \"cancelOpnameImport\" );\n\tcancelOpnameButton.addActionListener( buttonPanelActionListener );\n\tbuttonPanel.add( cancelOpnameButton );\n\n constraints.anchor = GridBagConstraints.CENTER;\n constraints.insets = new Insets( 5, 20, 20, 20 );\n\tconstraints.gridx = 0;\n\tconstraints.gridy = 14;\n\tconstraints.gridwidth = 3;\n\tcontainer.add( buttonPanel, constraints );\n\n // Default dialog size\n final Dimension dialogSize = new Dimension( 400, 150 );\n\tdialog.setSize( dialogSize );\n\tdialog.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );\n\tdialog.setVisible( true );\n }", "private void initialize() {\r\n\t\t\r\n\t\tthis.setBounds(100, 100, 500, 350);\r\n\t\tGridBagLayout gridBagLayout = new GridBagLayout();\r\n\t\tgridBagLayout.columnWidths = new int[]{71, 132, 111, 0, 101, 79, 0};\r\n\t\tgridBagLayout.rowHeights = new int[]{-5, 49, 38, 28, 25, 0, 1, 37, 44, 8, 0};\r\n\t\tgridBagLayout.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\r\n\t\tgridBagLayout.rowWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\r\n\t\tsetLayout(gridBagLayout);\r\n\t\t\r\n\t\tImageIcon icon = new ImageIcon(\"Img/Logo80x80.png\", \"Pródigo\");\r\n\t\tlblTitulo = new JLabel(\"Apofenia\", icon, JLabel.RIGHT);\r\n\t\tGridBagConstraints gbc_lblTitulo = new GridBagConstraints();\r\n\t\tgbc_lblTitulo.gridwidth = 2;\r\n\t\tgbc_lblTitulo.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_lblTitulo.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblTitulo.gridx = 1;\r\n\t\tgbc_lblTitulo.gridy = 1;\r\n\t\tadd(lblTitulo, gbc_lblTitulo);\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Ingrese el numero\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblNewLabel.gridx = 1;\r\n\t\tgbc_lblNewLabel.gridy = 2;\r\n\t\tadd(lblNewLabel, gbc_lblNewLabel);\r\n\t\t\r\n\t\ttextIngreso = new JTextField();\r\n\t\ttextIngreso.setEnabled(false);\r\n\t\ttextIngreso.setColumns(10);\r\n\t\tGridBagConstraints gbc_textIngreso = new GridBagConstraints();\r\n\t\tgbc_textIngreso.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_textIngreso.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_textIngreso.gridx = 2;\r\n\t\tgbc_textIngreso.gridy = 2;\r\n\t\tadd(textIngreso, gbc_textIngreso);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tbtnIntento = new JButton(\"Intentar\");\r\n\t\tGridBagConstraints gbc_btnIntento = new GridBagConstraints();\r\n\t\tgbc_btnIntento.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_btnIntento.gridx = 3;\r\n\t\tgbc_btnIntento.gridy = 2;\r\n\t\tadd(btnIntento, gbc_btnIntento);\r\n\t\tbtnIntento.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint num = Integer.parseInt(textIngreso.getText());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(num>0 && num<=1000) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tResultadoIntento res = controlador.realizarIntento(num);\r\n\t\t\t\t\r\n\t\t\t\t\t\t//Registro la cantidad de intentos\r\n\t\t\t\t\t\tcontador+=1;\r\n\t\t\t\t\t\tlblNroIntentos.setText(Integer.toString(contador));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Registro el puntaje de la partida\r\n\t\t\t\t\t\tInfoLogin j = vInicio.getJugador();\r\n\t\t\t\t\t\tString codigo = j.getCodigo();\r\n\t\t\t\t\t\tString nombre = j.getUsuario();\r\n\t\t\t\t\t\tVOJugador jugador= new VOJugador(nombre, codigo);\r\n\t\t\t\t\t\tint puntaje = controlador.devolverpuntajePartida(contador);\r\n\t\t\t\t\t\tlblNroPuntaje.setText(Integer.toString(puntaje));\r\n\t\t\t\t\t\tbtnNuevaPartida.setEnabled(false);\r\n\t\t\t\t\t\tif (res== ResultadoIntento.IGUAL) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbtnNuevaPartida.setEnabled(true);\r\n\t\t\t\t\t\t\tbtnIntento.setEnabled(false);\r\n\t\t\t\t\t\t\tbtnAbandonar.setEnabled(false);\r\n\t\t\t\t\t\t\ttextIngreso.setEnabled(false);\r\n\t\t\t\t\t\t\tsetMensaje(\"Acertó !!\");\r\n\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t//Despliego JSOptionPane\r\n\t\t\t\t\t\t\tif(res!=ResultadoIntento.ERROR)\r\n\t\t\t\t\t\t\t\tsetMensaje(\"El numero secreto es \"+res + \" al ingresado\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tsetMensaje(\"Hubo un error al ingresar el intento!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tsetMensaje(\"El numero debe ser entre 1 y 1000\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(NumberFormatException e) {\r\n\t\t\t\t\tsetMensaje(\"Debe ingresar un número\");\r\n\t\t\t\t}catch(Exception e) {\r\n\t\t\t\t\tSystem.out.print(e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel lblPuntaje = new JLabel(\"Puntaje\");\r\n\t\tGridBagConstraints gbc_lblPuntaje = new GridBagConstraints();\r\n\t\tgbc_lblPuntaje.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblPuntaje.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblPuntaje.gridx = 1;\r\n\t\tgbc_lblPuntaje.gridy = 4;\r\n\t\tadd(lblPuntaje, gbc_lblPuntaje);\r\n\t\t\r\n\t\tlblNroPuntaje = new JLabel(\"\");\r\n\t\tlblNroPuntaje.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tGridBagConstraints gbc_lblNroPuntaje = new GridBagConstraints();\r\n\t\tgbc_lblNroPuntaje.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_lblNroPuntaje.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblNroPuntaje.gridx = 2;\r\n\t\tgbc_lblNroPuntaje.gridy = 4;\r\n\t\tadd(lblNroPuntaje, gbc_lblNroPuntaje);\r\n\t\t\r\n\t\tJLabel lblCantIntentos = new JLabel(\"#Intentos\");\r\n\t\tGridBagConstraints gbc_lblCantIntentos = new GridBagConstraints();\r\n\t\tgbc_lblCantIntentos.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblCantIntentos.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblCantIntentos.gridx = 1;\r\n\t\tgbc_lblCantIntentos.gridy = 5;\r\n\t\tadd(lblCantIntentos, gbc_lblCantIntentos);\r\n\t\t\r\n\t\tbtnNuevaPartida = new JButton(\"Nueva Partida\");\r\n\t\tbtnNuevaPartida.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tInfoLogin j = vInicio.getJugador();\r\n\t\t\t\tString codigo = j.getCodigo();\r\n\t\t\t\tString nombre = j.getUsuario();\r\n\t\t\t\tVOJugador jugador= new VOJugador(nombre, codigo);\r\n\r\n\t\t\t\tcontrolador.nuevaPartida(jugador);\r\n\t\t\t\tbtnNuevaPartida.setEnabled(false);\r\n\t\t\t\tbtnAbandonar.setEnabled(true);\r\n\t\t\t\tbtnIntento.setEnabled(true);\r\n\t\t\t\ttextIngreso.setEnabled(true);\r\n\t\t\t\ttextIngreso.setText(\"\");\r\n\t\t\t\tlblNroPuntaje.setText(\"1000\");\r\n\t\t\t\tlblNroIntentos.setText(\"0\");\r\n\t\t\t\tcontador = 0;\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tlblNroIntentos = new JLabel(\"\");\r\n\t\tlblNroIntentos.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tGridBagConstraints gbc_lblNroIntentos = new GridBagConstraints();\r\n\t\tgbc_lblNroIntentos.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_lblNroIntentos.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblNroIntentos.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblNroIntentos.gridx = 2;\r\n\t\tgbc_lblNroIntentos.gridy = 5;\r\n\t\tadd(lblNroIntentos, gbc_lblNroIntentos);\r\n\t\tGridBagConstraints gbc_btnNuevaPartida = new GridBagConstraints();\r\n\t\tgbc_btnNuevaPartida.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_btnNuevaPartida.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_btnNuevaPartida.gridx = 1;\r\n\t\tgbc_btnNuevaPartida.gridy = 8;\r\n\t\tadd(btnNuevaPartida, gbc_btnNuevaPartida);\r\n\t\t\r\n\t\tbtnAbandonar = new JButton(\"Abandonar\");\r\n\t\tbtnAbandonar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tInfoLogin j = vInicio.getJugador();\r\n\t\t\t\tString codigo = j.getCodigo();\r\n\t\t\t\tString nombre = j.getUsuario();\r\n\t\t\t\tVOJugador jugador= new VOJugador(nombre, codigo);\r\n\t\t\t\tcontrolador.abandonarPartidaEnCurso(jugador);\r\n\t\t\t\t\r\n\t\t\t\tbtnAbandonar.setEnabled(false);\r\n\t\t\t\tbtnIntento.setEnabled(false);\r\n\r\n\t\t\t\tbtnNuevaPartida.setEnabled(true);\r\n\t\t\t\ttextIngreso.setEnabled(false);\r\n\r\n\t\t\t\ttextIngreso.setText(null);\r\n\t\t\t\tlblNroIntentos.setText(null);\r\n\t\t\t\tlblNroPuntaje.setText(null);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_btnAbandonar = new GridBagConstraints();\r\n\t\tgbc_btnAbandonar.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_btnAbandonar.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_btnAbandonar.gridx = 4;\r\n\t\tgbc_btnAbandonar.gridy = 8;\r\n\t\tadd(btnAbandonar, gbc_btnAbandonar);\r\n\t}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(10, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setBackground(new Color(-5461075));\n buttonBack = new JButton();\n buttonBack.setText(\"Cancel\");\n panel1.add(buttonBack, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n labelTitle = new JLabel();\n Font labelTitleFont = this.$$$getFont$$$(\"Droid Sans Mono\", Font.BOLD, 18, labelTitle.getFont());\n if (labelTitleFont != null) labelTitle.setFont(labelTitleFont);\n labelTitle.setForeground(new Color(-12828863));\n labelTitle.setText(\"Rename Billboard\");\n panel1.add(labelTitle, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCreate = new JButton();\n buttonCreate.setText(\"Rename\");\n panel1.add(buttonCreate, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n fieldName = new JTextField();\n panel1.add(fieldName, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n labelName = new JLabel();\n labelName.setForeground(new Color(-11578538));\n labelName.setHorizontalAlignment(0);\n labelName.setHorizontalTextPosition(0);\n labelName.setText(\"New Billboard Name\");\n panel1.add(labelName, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(85, 30), null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel1.add(spacer2, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(18, 18), null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel1.add(spacer3, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(10, 10), null, null, 0, false));\n final Spacer spacer4 = new Spacer();\n panel1.add(spacer4, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new Dimension(15, 15), null, null, 0, false));\n final Spacer spacer5 = new Spacer();\n panel1.add(spacer5, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new Dimension(15, 15), null, null, 0, false));\n final Spacer spacer6 = new Spacer();\n panel1.add(spacer6, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new Dimension(300, 0), null, null, 0, false));\n final Spacer spacer7 = new Spacer();\n panel1.add(spacer7, new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(-1, 10), null, null, 0, false));\n }", "private void initPlayers() {\n UIManager.put(\"Panel.background\", LIGHT_GRAY);\n UIManager.put(\"OptionPane.background\", LIGHT_GRAY);\n\n JOptionPane pane = new JOptionPane();\n JDialog dialog = pane.createDialog(\"\");\n dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\n JButton onePlayer = createButton(\"1P\", dialog);\n JButton twoPlayer = createButton(\"2P\", dialog);\n Object option[] = {onePlayer, Box.createRigidArea(new Dimension(20,0)), twoPlayer};\n\n JPanel panel = new JPanel(new BorderLayout());\n pane.setMessage(panel);\n pane.setOptions(option);\n\n dialog.setSize(new Dimension(150, 100));\n dialog.setLocationRelativeTo(null);\n dialog.setVisible(true);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n \n okButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n javax.swing.JPanel navigationPanel = new javax.swing.JPanel();\n javax.swing.JLabel cladeLabel = new javax.swing.JLabel();\n cladeCombo = new javax.swing.JComboBox();\n javax.swing.JLabel genomeLabel = new javax.swing.JLabel();\n genomeCombo = new javax.swing.JComboBox();\n javax.swing.JLabel groupLabel = new javax.swing.JLabel();\n groupCombo = new javax.swing.JComboBox();\n javax.swing.JLabel trackLabel = new javax.swing.JLabel();\n trackCombo = new javax.swing.JComboBox();\n javax.swing.JLabel formatLabelLabel = new javax.swing.JLabel();\n formatLabel = new javax.swing.JLabel();\n formatCombo = new javax.swing.JComboBox();\n \n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"UCSC Genome Database\");\n getContentPane().setLayout(new java.awt.GridBagLayout());\n \n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n getContentPane().add(okButton, gridBagConstraints);\n \n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n getContentPane().add(cancelButton, gridBagConstraints);\n \n navigationPanel.setLayout(new java.awt.GridBagLayout());\n \n cladeLabel.setText(\"Clade:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n navigationPanel.add(cladeLabel, gridBagConstraints);\n \n cladeCombo.setMaximumSize(new java.awt.Dimension(300, 32767));\n cladeCombo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cladeComboActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n navigationPanel.add(cladeCombo, gridBagConstraints);\n \n genomeLabel.setText(\"Genome:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n navigationPanel.add(genomeLabel, gridBagConstraints);\n \n genomeCombo.setMaximumSize(new java.awt.Dimension(300, 32767));\n genomeCombo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n genomeComboActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n navigationPanel.add(genomeCombo, gridBagConstraints);\n \n groupLabel.setText(\"Group:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n navigationPanel.add(groupLabel, gridBagConstraints);\n \n groupCombo.setMaximumRowCount(9);\n groupCombo.setMaximumSize(new java.awt.Dimension(300, 32767));\n groupCombo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n groupComboActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n navigationPanel.add(groupCombo, gridBagConstraints);\n \n trackLabel.setText(\"Track:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n navigationPanel.add(trackLabel, gridBagConstraints);\n \n trackCombo.setMaximumSize(new java.awt.Dimension(300, 32767));\n trackCombo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n trackComboActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n navigationPanel.add(trackCombo, gridBagConstraints);\n \n formatLabelLabel.setText(\"Format:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n navigationPanel.add(formatLabelLabel, gridBagConstraints);\n \n formatLabel.setText(\"BED\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n navigationPanel.add(formatLabel, gridBagConstraints);\n \n formatCombo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n formatComboActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n navigationPanel.add(formatCombo, gridBagConstraints);\n \n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8);\n getContentPane().add(navigationPanel, gridBagConstraints);\n \n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jDialog1 = new javax.swing.JDialog();\n jLabel6 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jDialog2 = new javax.swing.JDialog();\n jLabel7 = new javax.swing.JLabel();\n jButton5 = new javax.swing.JButton();\n jDialog3 = new javax.swing.JDialog();\n jLabel9 = new javax.swing.JLabel();\n jButton7 = new javax.swing.JButton();\n jDialog4 = new javax.swing.JDialog();\n jLabel10 = new javax.swing.JLabel();\n jButton8 = new javax.swing.JButton();\n jDialog5 = new javax.swing.JDialog();\n jLabel11 = new javax.swing.JLabel();\n jButton9 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jButton6 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n\n jLabel6.setText(\"Some Of The Fields Are Incomplete !!\");\n\n jButton4.setText(\"Ok\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());\n jDialog1.getContentPane().setLayout(jDialog1Layout);\n jDialog1Layout.setHorizontalGroup(\n jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog1Layout.createSequentialGroup()\n .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog1Layout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addComponent(jLabel6))\n .addGroup(jDialog1Layout.createSequentialGroup()\n .addGap(166, 166, 166)\n .addComponent(jButton4)))\n .addContainerGap(126, Short.MAX_VALUE))\n );\n jDialog1Layout.setVerticalGroup(\n jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog1Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel6)\n .addGap(32, 32, 32)\n .addComponent(jButton4)\n .addContainerGap(33, Short.MAX_VALUE))\n );\n\n jLabel7.setText(\"Staff Details Stored Successfully !!!\");\n\n jButton5.setText(\"Ok\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jDialog2Layout = new javax.swing.GroupLayout(jDialog2.getContentPane());\n jDialog2.getContentPane().setLayout(jDialog2Layout);\n jDialog2Layout.setHorizontalGroup(\n jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog2Layout.createSequentialGroup()\n .addGroup(jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog2Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel7))\n .addGroup(jDialog2Layout.createSequentialGroup()\n .addGap(115, 115, 115)\n .addComponent(jButton5)))\n .addContainerGap(55, Short.MAX_VALUE))\n );\n jDialog2Layout.setVerticalGroup(\n jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog2Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jLabel7)\n .addGap(26, 26, 26)\n .addComponent(jButton5)\n .addContainerGap(42, Short.MAX_VALUE))\n );\n\n jLabel9.setText(\"No Data Found !! Kindly Enter Your Details !\");\n\n jButton7.setText(\"Ok\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jDialog3Layout = new javax.swing.GroupLayout(jDialog3.getContentPane());\n jDialog3.getContentPane().setLayout(jDialog3Layout);\n jDialog3Layout.setHorizontalGroup(\n jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog3Layout.createSequentialGroup()\n .addGroup(jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog3Layout.createSequentialGroup()\n .addGap(74, 74, 74)\n .addComponent(jLabel9))\n .addGroup(jDialog3Layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jButton7)))\n .addContainerGap(83, Short.MAX_VALUE))\n );\n jDialog3Layout.setVerticalGroup(\n jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog3Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel9)\n .addGap(31, 31, 31)\n .addComponent(jButton7)\n .addContainerGap(54, Short.MAX_VALUE))\n );\n\n jLabel10.setText(\"You Have Already Created The Account !!\");\n\n jButton8.setText(\"Ok\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jDialog4Layout = new javax.swing.GroupLayout(jDialog4.getContentPane());\n jDialog4.getContentPane().setLayout(jDialog4Layout);\n jDialog4Layout.setHorizontalGroup(\n jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog4Layout.createSequentialGroup()\n .addGroup(jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog4Layout.createSequentialGroup()\n .addGap(59, 59, 59)\n .addComponent(jLabel10))\n .addGroup(jDialog4Layout.createSequentialGroup()\n .addGap(126, 126, 126)\n .addComponent(jButton8)))\n .addContainerGap(42, Short.MAX_VALUE))\n );\n jDialog4Layout.setVerticalGroup(\n jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog4Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel10)\n .addGap(29, 29, 29)\n .addComponent(jButton8)\n .addContainerGap(36, Short.MAX_VALUE))\n );\n\n jLabel11.setText(\"Enter Ur Password !!\");\n\n jButton9.setText(\"Ok\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jDialog5Layout = new javax.swing.GroupLayout(jDialog5.getContentPane());\n jDialog5.getContentPane().setLayout(jDialog5Layout);\n jDialog5Layout.setHorizontalGroup(\n jDialog5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog5Layout.createSequentialGroup()\n .addGroup(jDialog5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog5Layout.createSequentialGroup()\n .addGap(98, 98, 98)\n .addComponent(jLabel11))\n .addGroup(jDialog5Layout.createSequentialGroup()\n .addGap(112, 112, 112)\n .addComponent(jButton9)))\n .addContainerGap(101, Short.MAX_VALUE))\n );\n jDialog5Layout.setVerticalGroup(\n jDialog5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jDialog5Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)\n .addComponent(jButton9)\n .addGap(25, 25, 25))\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n\n jLabel1.setText(\"Staff Name :\");\n\n jLabel2.setText(\"Enrolment No :\");\n\n jLabel3.setText(\"Designation :\");\n\n jLabel4.setText(\"Annual Salary :\");\n\n jButton1.setText(\"Submit\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Cancel\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Gender :\");\n\n jRadioButton1.setText(\"Male\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton1ActionPerformed(evt);\n }\n });\n\n jRadioButton2.setText(\"Female\");\n\n jButton6.setText(\"Fetch\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n jLabel8.setText(\"Enter Password :\");\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1)\n .addComponent(jTextField3)\n .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\n .addComponent(jButton6))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton2)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addGap(10, 10, 10)\n .addComponent(jRadioButton2)))\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel8)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton6)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap())\n );\n\n pack();\n }", "private void addComponentsToOptionsPanel(){\r\n\t\tBox box = Box.createVerticalBox();\r\n\t\tbox.add(new JLabel(\"Active Feature Type\",SwingConstants.LEFT));\r\n\t\tJPanel featuresPanel = new JPanel(new GridLayout(2, 2));\r\n\t\tfeaturesPanel.setBorder(BorderFactory.createLineBorder (Color.black, 1));\r\n\t\tfeaturesPanel.add(asCB);\r\n\t\tfeaturesPanel.add(new JLabel(\"\"));\r\n\t\tfeaturesPanel.add(bldngCB);\r\n\t\tfeaturesPanel.add(stuCB);\r\n\t\tbox.add(featuresPanel);\r\n\r\n\t\t//creating empty space\r\n\t\tbox.add(new JPanel());\r\n\t\t\r\n\t\tJLabel queryLabel = new JLabel(\"Query\",SwingConstants.LEFT);\r\n\t\tbox.add(queryLabel);\r\n\t\tJPanel queriesRB = new JPanel();\r\n\t\tqueriesRB.setLayout(new BoxLayout(queriesRB, BoxLayout.Y_AXIS));\r\n\t\tbuttonGroup = new ButtonGroup();\r\n\t\twholeRegion = new JRadioButton(\"Whole Region\");\r\n\t\twholeRegion.addItemListener(new ItemListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tpointQuery = new JRadioButton(\"Point Query\");\r\n\t\tpointQuery.addItemListener(new ItemListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tpointQuery.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Point Query\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpointQuery.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t\tsetPqX(-300);\r\n\t\t\t\t\tsetPqY(-300);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\trangeQuery = new JRadioButton(\"Range Query\");\r\n\t\trangeQuery.addItemListener(new ItemListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\trangeQuery.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Range Query\");\r\n\t\t\t\t\tsetDrawPoly(true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trangeQuery.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t\tgetPath().clear();\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\tsurrStudent = new JRadioButton(\"Surrounding Student\");\r\n\t\tsurrStudent.addItemListener(new ItemListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tsurrStudent.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Surrounding Student\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsurrStudent.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\temerQuery = new JRadioButton(\"Emergency Query\");\r\n\t\temerQuery.addItemListener(new ItemListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\temerQuery.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Emergency Query\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\temerQuery.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tbuttonGroup.add(wholeRegion);\r\n\t\tbuttonGroup.add(pointQuery);\r\n\t\tbuttonGroup.add(rangeQuery);\r\n\t\tbuttonGroup.add(surrStudent);\r\n\t\tbuttonGroup.add(emerQuery);\r\n\t\tqueriesRB.add(wholeRegion);\r\n\t\tqueriesRB.add(pointQuery);\r\n\t\tqueriesRB.add(rangeQuery);\r\n\t\tqueriesRB.add(surrStudent);\r\n\t\tqueriesRB.add(emerQuery);\r\n\t\tqueriesRB.setBorder(BorderFactory.createLineBorder (Color.black, 1));\r\n\t\tbox.add(queriesRB);\r\n\t\t//creating empty space\r\n\t\tbox.add(new JPanel());\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tbuttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));\r\n\t\tsubmitButton = new JButton(\"Submit Query\");\r\n\t\tsubmitButton.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\r\n\t\t\t\tQuery query = new Query();\r\n\t\t\t\tquery.setAsFlag(asCB.isSelected());\r\n\t\t\t\tquery.setBuildingFlag(bldngCB.isSelected());\r\n\t\t\t\tquery.setStudentFlag(stuCB.isSelected());\r\n\t\t\t\tquery.setSubmitFlag(true);\r\n\t\t\t\tfor(Enumeration<AbstractButton> radButtons = buttonGroup.getElements(); radButtons.hasMoreElements();){\r\n\t\t\t\t\tAbstractButton ab = radButtons.nextElement();\r\n\t\t\t\t\tif(ab.isSelected()){\r\n\t\t\t\t\t\tquery.setSelectedQuery(ab.getText());\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\t\tsetQuery(query);\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPanel.add(submitButton);\r\n\t\tbuttonPanel.setBorder(BorderFactory.createLineBorder (Color.black, 1));\r\n\t\tbox.add(buttonPanel);\r\n\t\toptionsPanel.add(box);\r\n\t}", "private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }", "public RelationshipDialog() {\n super(getRTParent(), \"Add Relationship...\", true);\n getContentPane().setLayout(new BorderLayout(5,5));\n JPanel center = new JPanel(new GridLayout(5,2,5,5));\n center.add(new JLabel(\"From\")); \n center.add(new JLabel(\"To\"));\n\n String blanks[] = KeyMaker.blanks(getRTParent().getRootBundles().getGlobals());\n center.add(from_cb = new JComboBox(blanks));\n center.add(to_cb = new JComboBox(blanks));\n\n center.add(from_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(to_symbol_cb = new JComboBox(Utils.SHAPE_STRS));\n center.add(from_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(to_typed_cb = new JCheckBox(\"Field Typed\", false));\n center.add(ignore_ns_cb = new JCheckBox(\"Ignore Not Sets\", true));\n getContentPane().add(\"Center\", center);\n\n getContentPane().add(\"North\", style_cb = new JComboBox(STYLE_STRS));\n\n JPanel bottom = new JPanel(new FlowLayout());\n JButton add_bt, cancel_bt;\n bottom.add(add_bt = new JButton(\"Add\"));\n bottom.add(cancel_bt = new JButton(\"Cancel\"));\n getContentPane().add(\"South\", bottom);\n\n // Add listeners\n cancel_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) { setVisible(false); dispose(); } } );\n add_bt.addActionListener(new ActionListener() { \n public void actionPerformed(ActionEvent ae) {\n setVisible(false); dispose();\n\t addRelationship((String) from_cb.getSelectedItem(), \n\t (String) from_symbol_cb.getSelectedItem(),\n\t \t\t from_typed_cb.isSelected(),\n\t (String) to_cb.getSelectedItem(), \n\t (String) to_symbol_cb.getSelectedItem(),\n\t\t \t to_typed_cb.isSelected(),\n (String) style_cb.getSelectedItem(), \n\t\t\t ignore_ns_cb.isSelected(), \n\t\t\t false);\n } } );\n pack(); setVisible(true);\n }", "private void makeDialog() {\n \t\tfinal BackgroundGame thisPanel = this;\n \n \t\tfinal JInternalFrame dialog = new JInternalFrame(\"Question!\");\n \t\tdialog.addInternalFrameListener(new InternalFrameListener() {\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameOpened(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosing(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosed(InternalFrameEvent arg0) {\n \t\t\t\tthisPanel.requestFocusInWindow();\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameIconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeiconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameActivated(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeactivated(InternalFrameEvent arg0) {\n \t\t\t}\n \t\t});\n \n \t\tQuestion randQuestion = questions.get(\n \t\t\t\t(int) (Math.random() * questions.size()));\n \n \t\tJLabel label = new JLabel(randQuestion.getQuestion());\n \t\tlabel.setHorizontalAlignment(SwingConstants.LEFT);\n \t\tFont font = label.getFont();\n \t\tlabel.setFont(label.getFont().deriveFont(font.PLAIN, 14.0f));\n \n \t\tJPanel a = new JPanel();\n \t\ta.setLayout(new BoxLayout(a, BoxLayout.Y_AXIS));\n \t\ta.add(label);\n \t\t\n \t\tJPanel choicesPanel = new JPanel();\n \t\tfor (int i = 1; i <= 4; ++i) {\n \t\t\tString choice = randQuestion.getChoice(i);\n \t\t\tJButton button = new JButton();\n \t\t\tif (randQuestion.answerIs(choice)) {\n \t\t\t\t//Remove the \"--\" marker\n \t\t\t\tchoice = choice.substring(0, choice.indexOf(\"--\"));\n \t\t\t\t\n \t\t\t\tbutton.addActionListener(new ActionListener() {\n \t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\t\t\tdialog.setVisible(false);\n \t\t\t\t\t\tdialog.dispose();\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t}\n \t\t\t\t\t\t\t\n \t\t\tbutton.setText(choice);\n \t\t\tchoicesPanel.add(button);\n \t\t}\n \t\ta.add(choicesPanel);\n \n \t\tdialog.setContentPane(a);\n \n \t\tdialog.pack();\n \t\tdialog.setVisible(true);\n \t\tadd(dialog);\n \n \t\tdialog.setLocation(\n \t\t\t\t(int) (Math.random() * (getWidth() - dialog.getWidth())),\n \t\t\t\t(int) (Math.random() * (getHeight() - dialog.getHeight())));\n \t\t/*\n \t\t\n \t\tfor (max = max; max >= 1; max--) {\n \t\ttest = choices.get((int) (Math.random() * max) + min);\n \t\tSystem.out.println(test);\n \t\tSystem.out.println(choices.indexOf(test));\n \t\tchoices.remove(test);\n \t\tSystem.out.println(max);\n \t\t}*/\n \n \t\tincreaseCpuUsage(2);\n \t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n mainPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n listResults = new JList();\n listResults.setDoubleBuffered(true);\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n listResults.setModel(defaultListModel1);\n listResults.setValueIsAdjusting(false);\n scrollPane1.setViewportView(listResults);\n mainButton = new JButton();\n mainButton.setText(\"Button\");\n mainPanel.add(mainButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n radioButtonAllStyles = new JRadioButton();\n radioButtonAllStyles.setLabel(\"Alle Styles\");\n radioButtonAllStyles.setSelected(true);\n radioButtonAllStyles.setText(\"Alle Styles\");\n panel1.add(radioButtonAllStyles, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n radioButtonStyle = new JRadioButton();\n radioButtonStyle.setLabel(\"Ein Style\");\n radioButtonStyle.setSelected(false);\n radioButtonStyle.setText(\"Ein Style\");\n panel1.add(radioButtonStyle, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n radioButtonAllBeers = new JRadioButton();\n radioButtonAllBeers.setLabel(\"Alle Biere\");\n radioButtonAllBeers.setText(\"Alle Biere\");\n panel1.add(radioButtonAllBeers, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n radioButtonBeerWithId = new JRadioButton();\n radioButtonBeerWithId.setActionCommand(\"Beer mit bestimmter Style\");\n radioButtonBeerWithId.setLabel(\"Beer mit bestimmter Id\");\n radioButtonBeerWithId.setText(\"Beer mit bestimmter Id\");\n panel1.add(radioButtonBeerWithId, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldArgs = new JTextField();\n mainPanel.add(textFieldArgs, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(2, 4, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setBackground(new Color(-1973532));\n panel1.setMaximumSize(new Dimension(1200, 800));\n panel1.setMinimumSize(new Dimension(1200, 800));\n panel1.setPreferredSize(new Dimension(1200, 800));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(11, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel2.setBackground(new Color(-1973532));\n panel2.setOpaque(false);\n panel1.add(panel2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n question = new JLabel();\n question.setForeground(new Color(-16777216));\n question.setText(\"¿Desea continuar alguna partida?\");\n panel2.add(question, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel3.setOpaque(false);\n panel2.add(panel3, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n loadButton = new JButton();\n loadButton.setBackground(new Color(-16777216));\n loadButton.setBorderPainted(false);\n loadButton.setContentAreaFilled(false);\n loadButton.setFocusPainted(false);\n loadButton.setOpaque(false);\n loadButton.setText(\"Cargar\");\n panel3.add(loadButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, 40), new Dimension(100, 40), new Dimension(100, 40), 0, false));\n newButton = new JButton();\n newButton.setBorderPainted(false);\n newButton.setContentAreaFilled(false);\n newButton.setFocusPainted(false);\n newButton.setOpaque(false);\n newButton.setText(\"Nueva\");\n panel3.add(newButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, 40), new Dimension(100, 40), new Dimension(100, 40), 0, false));\n volverButton = new JButton();\n volverButton.setBorderPainted(false);\n volverButton.setContentAreaFilled(false);\n volverButton.setFocusPainted(false);\n volverButton.setOpaque(false);\n volverButton.setText(\"Volver\");\n panel2.add(volverButton, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(252, 40), new Dimension(252, 40), new Dimension(252, 40), 0, false));\n final Spacer spacer1 = new Spacer();\n panel2.add(spacer1, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(-1, 80), new Dimension(-1, 80), new Dimension(-1, 80), 0, false));\n final Spacer spacer2 = new Spacer();\n panel2.add(spacer2, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 70), new Dimension(-1, 70), new Dimension(-1, 70), 0, false));\n final Spacer spacer3 = new Spacer();\n panel2.add(spacer3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 80), new Dimension(-1, 80), new Dimension(-1, 80), 0, false));\n final Spacer spacer4 = new Spacer();\n panel2.add(spacer4, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 15), new Dimension(-1, 15), new Dimension(-1, 15), 0, false));\n final Spacer spacer5 = new Spacer();\n panel2.add(spacer5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 35), new Dimension(-1, 35), null, 0, false));\n training = new JButton();\n training.setBorderPainted(false);\n training.setContentAreaFilled(false);\n training.setFocusPainted(false);\n training.setText(\"Modo Entrenamiento\");\n panel2.add(training, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer6 = new Spacer();\n panel2.add(spacer6, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 50), new Dimension(-1, 50), new Dimension(-1, 50), 0, false));\n logo = new JLabel();\n logo.setText(\"\");\n panel2.add(logo, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(252, 200), new Dimension(252, 200), new Dimension(252, 200), 1, false));\n final Spacer spacer7 = new Spacer();\n panel1.add(spacer7, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, new Dimension(42, -1), new Dimension(42, -1), null, 0, false));\n photo.setAlignmentY(0.5f);\n photo.setText(\"\");\n panel1.add(photo, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(800, 800), new Dimension(800, 800), new Dimension(800, 800), 0, false));\n final Spacer spacer8 = new Spacer();\n panel1.add(spacer8, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, 1, new Dimension(50, -1), new Dimension(50, -1), null, 0, false));\n config = new JButton();\n config.setBorderPainted(false);\n config.setContentAreaFilled(false);\n config.setFocusPainted(false);\n config.setHorizontalAlignment(0);\n config.setHorizontalTextPosition(0);\n config.setText(\"\\uF013\");\n panel1.add(config, new GridConstraints(0, 2, 1, 2, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(40, 40), null, 0, false));\n }", "@SuppressWarnings( \"unchecked\" )\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel4 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n jCheckBox7 = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n jCheckBox8 = new javax.swing.JCheckBox();\n jCheckBox9 = new javax.swing.JCheckBox();\n jCheckBox10 = new javax.swing.JCheckBox();\n\n setBackground(new java.awt.Color(255, 255, 255));\n setForeground(new java.awt.Color(255, 255, 255));\n setPreferredSize(new java.awt.Dimension(903, 484));\n setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 0, 0));\n jLabel1.setText(\"Department\");\n add(jLabel1);\n jLabel1.setBounds(10, 10, 90, 20);\n\n jLabel3.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(0, 0, 0));\n jLabel3.setText(\"Permissions\");\n add(jLabel3);\n jLabel3.setBounds(360, 10, 80, 20);\n\n jComboBox1.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n add(jComboBox1);\n jComboBox1.setBounds(110, 10, 210, 30);\n\n jLabel4.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 0));\n jLabel4.setText(\"Resource\");\n add(jLabel4);\n jLabel4.setBounds(360, 130, 80, 20);\n\n jComboBox2.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n add(jComboBox2);\n jComboBox2.setBounds(480, 110, 210, 30);\n\n jTable1.setAutoCreateRowSorter(true);\n jTable1.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n add(jScrollPane1);\n jScrollPane1.setBounds(10, 270, 880, 260);\n\n jButton1.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jButton1.setText(\"Add\");\n jButton1.setOpaque(false);\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n add(jButton1);\n jButton1.setBounds(770, 50, 90, 40);\n\n jButton2.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jButton2.setText(\"Update\");\n jButton2.setOpaque(false);\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n add(jButton2);\n jButton2.setBounds(770, 100, 90, 40);\n\n jButton3.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jButton3.setText(\"Close\");\n jButton3.setOpaque(false);\n add(jButton3);\n jButton3.setBounds(770, 150, 90, 40);\n\n jCheckBox1.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox1.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox1.setText(\"Add\");\n jCheckBox1.setOpaque(false);\n add(jCheckBox1);\n jCheckBox1.setBounds(790, 50, 50, 24);\n\n jCheckBox2.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox2.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox2.setText(\"Read\");\n jCheckBox2.setOpaque(false);\n add(jCheckBox2);\n jCheckBox2.setBounds(790, 70, 60, 24);\n\n jCheckBox3.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox3.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox3.setText(\"Update\");\n jCheckBox3.setOpaque(false);\n add(jCheckBox3);\n jCheckBox3.setBounds(790, 30, 66, 24);\n\n jCheckBox4.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox4.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox4.setText(\"Disable\");\n jCheckBox4.setOpaque(false);\n add(jCheckBox4);\n jCheckBox4.setBounds(790, 150, 66, 24);\n\n jCheckBox5.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox5.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox5.setText(\"Export to file\");\n jCheckBox5.setOpaque(false);\n jCheckBox5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox5ActionPerformed(evt);\n }\n });\n add(jCheckBox5);\n jCheckBox5.setBounds(790, 90, 94, 24);\n\n jCheckBox6.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox6.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox6.setText(\"Import from file\");\n jCheckBox6.setOpaque(false);\n add(jCheckBox6);\n jCheckBox6.setBounds(790, 110, 112, 24);\n\n jCheckBox7.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox7.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox7.setText(\"Select All\");\n jCheckBox7.setOpaque(false);\n jCheckBox7.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jCheckBox7MouseClicked(evt);\n }\n });\n jCheckBox7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox7ActionPerformed(evt);\n }\n });\n add(jCheckBox7);\n jCheckBox7.setBounds(790, 10, 76, 24);\n\n jLabel2.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(0, 0, 0));\n jLabel2.setText(\"Role\");\n add(jLabel2);\n jLabel2.setBounds(10, 130, 90, 20);\n\n jCheckBox8.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox8.setText(\"Checker\");\n jCheckBox8.setOpaque(false);\n jCheckBox8.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jCheckBox8ItemStateChanged(evt);\n }\n });\n add(jCheckBox8);\n jCheckBox8.setBounds(110, 180, 76, 20);\n\n jCheckBox9.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox9.setText(\"Maker\");\n jCheckBox9.setOpaque(false);\n add(jCheckBox9);\n jCheckBox9.setBounds(110, 180, 64, 20);\n\n jCheckBox10.setFont(new java.awt.Font(\"Leelawadee UI\", 0, 12)); // NOI18N\n jCheckBox10.setForeground(new java.awt.Color(0, 0, 0));\n jCheckBox10.setText(\"Access from mobile app\");\n jCheckBox10.setOpaque(false);\n add(jCheckBox10);\n jCheckBox10.setBounds(790, 130, 170, 24);\n }", "public void intitialiseGUI(){\n\t\tsetTitle(\"Search\");//Setting the title for this frame\n\t\tsetSize(1100, 650);//Setting the size for this frame\n\t setLocationRelativeTo(null);//Putting the frame in the centre of the screen\n\n\t optionsPane = new JPanel(new BorderLayout());//Creating a panel for the left hand size of the frame which will hold the options\n\t\tjpCmbBoxes = new JPanel();//Creating a panels to hold the combo boxes\n\t\tpic = new JPanel();//Creating a panel to hold the picture\n\t\tdisclaimer = new JPanel(new BorderLayout());//Creating a panel to contain the disclaimer at the bottom of the frame\n\t\tsearchResults = new JPanel();//Creating a panel to hold the search results on the right hand side of the screen\n\t\tscrollbar = new JScrollPane(searchResults, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);//Creating a new scroll pane and disabling the horizontal scroll bar\n\t\t\n\t\tdisclaim = new JLabel(j.getAcknowledgement());//Creating a label for the disclaimer\n\t\tsubTitle = new JLabel(\"Shark Tracker\");//Creating a label for the subtitle\n\t\ttrackingRangeLabel = new JLabel(\"Tracking Range\");//Creating a label for the tracking range\n\t\tgenderLabel = new JLabel(\"Gender\");//Creating a label for the gender\n\t\tstageOfLifeLabel = new JLabel(\"Stage of Life\");//Creating a label for the stage of life\n\t\ttagLocationLabel = new JLabel(\"Tag Location\");//Creating a label for the tag location\n\t\tsearchButton = new JButton(\"Search\");//Creating a label for the search button\n\t\tsearchByName = new JButton(\"Search by Name\");//Creating a label for the searchByName button\n\t\t\n\t\t/*Setting the alignment of each of the components*/\n\t\tsubTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\ttrackingRangeLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tgenderLabel.setAlignmentX(Component.CENTER_ALIGNMENT);;\n\t\tstageOfLifeLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\ttagLocationLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tsearchButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tsearchByName.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tsubTitle.setFont(new Font(\"Serif\", Font.PLAIN, 40));//Setting the font for the subtitle\n\t\t\n\t\ttrackingRange = new JComboBox<String>(ranges);//Creating a combo box for the tracking range options\n\t\tgenderBox = new JComboBox<String>(gender);//Creating a combo box for the gender options\n\t\tstageofLifeBox = new JComboBox<String>(stages);//Creating a combo box for the stage of life options\n\t\ttagLocationBox = new JComboBox<String>();//Creating a combo box for the tag location options\n\t\ttagLocationBox.addItem(\"All\");//Adding an extra field for tag location \"all\"\n\t\t\n\t\tfor(String s : locations){//This for loop gets the tag locations and then adds them to the combo box\n\t\t\ttagLocationBox.addItem(s);//Adding the location to the combo box\n\t\t}\n\t\tscrollbar = new JScrollPane(searchResults);//Adding a scroll pane for the search results\n\t}", "private void placeFrameComponents()\n\t{\n\t\tthis.setJMenuBar(menuBar);\n\t\t/*Status Bar - Place the Status Bar onto the frame.*/\n\t\tpanelStatusBar = new JPanel(new BorderLayout());\n\t\t\tpanelStatusBar.setBorder(new BevelBorder(BevelBorder.LOWERED));\n\t\t\tpanelStatusBar.add(statusBar, BorderLayout.CENTER);\n\t\t/*Form Instructions - Place the instructions onto its own panel*/\n\t\tpanelFormInstructions = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.gridx=0;\t//\n\t\tgbc.gridy=0;\t//\n\t\tpanelFormInstructions.add(windowImageLabel, gbc);\n\t\tgbc.gridx++;\n\t\tpanelFormInstructions.add(instructionTxtPane, gbc);\n\t\t/*Form Input - Place the input field and submit button onto its own panel.*/\n\t\tpanelFormInput = new JPanel(new GridBagLayout());\n\t\tgbc = new GridBagConstraints();\n\t\tgbc.gridx=0;\n\t\tgbc.gridx=0;\n\t\t\tpanelFormInput.add(inputFieldLabel, gbc);\n\t\tgbc.gridx++;\n\t\t\tpanelFormInput.add(inputField, gbc);\n\t\tgbc.gridx++;\n\t\t\tpanelFormInput.add(btnSubmit, gbc);\n\t\t/*Form Radio Buttons*/\n\t\trBtnGroupLabel = new JLabel(\"Search by: \");\n\t\trBtnGroup = new ButtonGroup();\n\t\trBtnGroup.add(rBtnID);\n\t\trBtnGroup.add(rBtnFirst);\n\t\trBtnGroup.add(rBtnLast);\n\t\trBtnGroup.add(rBtnEntries);\n\t\t\t\n\t\tpanelFormRBtn = new JPanel();\n\t\tpanelFormRBtn.add(rBtnGroupLabel);\n\t\tpanelFormRBtn.add(rBtnID);\t\t\n\t\tpanelFormRBtn.add(rBtnLast);\t\t\n\t\tpanelFormRBtn.add(rBtnFirst);\n\t\tpanelFormRBtn.add(rBtnEntries);\n\t\t/*panel Form*/\n\t\tpanelForm = new JPanel(new BorderLayout());\n\t\tpanelForm.add(panelFormInstructions, BorderLayout.NORTH);\n\t\tpanelForm.add(panelFormRBtn, BorderLayout.CENTER);\n\t\tpanelForm.add(panelFormInput, BorderLayout.SOUTH);\n\t\t/*Results Table*/\n\t\tpanelTable = new JPanel();\n\t\tscrollPaneRecordTable = new JScrollPane(recordTable); \t\t\t\t//Stick table into scrollpane\n\t\tscrollPaneRecordTable.setPreferredSize(new Dimension(PREF_WIDTH-50, PREF_HEIGHT/2));\n\t\tpanelTable.add(scrollPaneRecordTable);\n\t\t/*Results Buttons*/\n\t\tpanelButtons = new JPanel();\n\t\tpanelButtons.add(btnExamine);\n\t\tpanelButtons.add(btnCreate);\n\t\t/*panel Results*/\n\t\tpanelResults = new JPanel(new GridBagLayout());\n\t\tgbc = new GridBagConstraints();\n\t\tgbc.gridx=0;\n\t\tgbc.gridy=0;\n\t\t\tpanelResults.add(panelTable, gbc);\n\t\tgbc.gridy++;\n\t\t\tpanelResults.add(panelButtons, gbc);\t\n\t\t/*panel Parent*/\n\t\tpanelBasket = new JPanel(new GridBagLayout());\n\t\tgbc = new GridBagConstraints();\n\t\tgbc.gridx=0;\n\t\tgbc.gridy=0;\n\t\t\tpanelBasket.add(panelForm,gbc);\n\t\tgbc.gridy++;\n\t\t\tpanelBasket.add(panelResults, gbc);\n\t\t\t\n\t\t/*Frame Settings*/\n\t\tpanelUppermost = new JPanel(new BorderLayout());\n\t\tpanelUppermost.add(panelBasket, BorderLayout.CENTER);\n\t\tpanelUppermost.add(panelStatusBar, BorderLayout.SOUTH);\n\t\t\n\t\tthis.add(panelUppermost);\t//Add panel to the frame.\n\t\tthis.pack();\n\t\tthis.setTitle(windowName);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setMinimumSize(new Dimension(PREF_WIDTH, PREF_HEIGHT));\n\t\tthis.setResizable(false);\n\t\tthis.addWindowListener(new SearchWindowExitListener());\n\t\t\n\t\t//Center the window to the screen...\n\t\tDimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint x = (screen.width/2)-(PREF_WIDTH/2);\t//X Center\n\t\tint y = (screen.height/2)-(PREF_HEIGHT/2);\t//Y Center\n\t\tthis.setBounds(x,y, PREF_WIDTH, PREF_HEIGHT);\t//Center\n\t\t\n\t\tthis.setVisible(true);\n\t\tthis.setEnabled(true);\n\t\tupdateStatus(\"Ready\");\n\t}", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(5, 5, new Insets(5, 5, 5, 5), -1, -1));\n final JLabel label1 = new JLabel();\n label1.setText(\"Client\");\n panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Server\");\n panel1.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel1.add(scrollPane1, new GridConstraints(1, 0, 1, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n textArea1 = new JTextArea();\n textArea1.setText(\"\");\n scrollPane1.setViewportView(textArea1);\n final JScrollPane scrollPane2 = new JScrollPane();\n panel1.add(scrollPane2, new GridConstraints(3, 0, 1, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n textArea2 = new JTextArea();\n scrollPane2.setViewportView(textArea2);\n closeButton = new JButton();\n closeButton.setText(\"Close\");\n panel1.add(closeButton, new GridConstraints(4, 4, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n pnlHD = new javax.swing.JPanel();\n lblHDQuant = new javax.swing.JLabel();\n spnHDCrits = new javax.swing.JSpinner();\n pnlCT = new javax.swing.JPanel();\n lblCTQuant = new javax.swing.JLabel();\n spnCTCrits = new javax.swing.JSpinner();\n pnlLT = new javax.swing.JPanel();\n lblLTQuant = new javax.swing.JLabel();\n spnLTCrits = new javax.swing.JSpinner();\n pnlRT = new javax.swing.JPanel();\n lblRTQuant = new javax.swing.JLabel();\n spnRTCrits = new javax.swing.JSpinner();\n pnlLA = new javax.swing.JPanel();\n lblLAQuant = new javax.swing.JLabel();\n spnLACrits = new javax.swing.JSpinner();\n pnlRA = new javax.swing.JPanel();\n lblRAQuant = new javax.swing.JLabel();\n spnRACrits = new javax.swing.JSpinner();\n pnlLL = new javax.swing.JPanel();\n lblLLQuant = new javax.swing.JLabel();\n spnLLCrits = new javax.swing.JSpinner();\n pnlRL = new javax.swing.JPanel();\n lblRLQuant = new javax.swing.JLabel();\n spnRLCrits = new javax.swing.JSpinner();\n jPanel1 = new javax.swing.JPanel();\n btnOkay = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n lblItemCrits = new javax.swing.JLabel();\n lblAllocateItem = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n pnlHD.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"HD\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlHD.setLayout(new java.awt.BorderLayout());\n\n lblHDQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblHDQuant.setText(\"00 of 00\");\n pnlHD.add(lblHDQuant, java.awt.BorderLayout.CENTER);\n\n spnHDCrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnHDCrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnHDCrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnHDCrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnHDCritsStateChanged(evt);\n }\n });\n pnlHD.add(spnHDCrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n getContentPane().add(pnlHD, gridBagConstraints);\n\n pnlCT.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"CT\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlCT.setLayout(new java.awt.BorderLayout());\n\n lblCTQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblCTQuant.setText(\"00 of 00\");\n pnlCT.add(lblCTQuant, java.awt.BorderLayout.CENTER);\n\n spnCTCrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnCTCrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnCTCrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnCTCrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnCTCritsStateChanged(evt);\n }\n });\n pnlCT.add(spnCTCrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n getContentPane().add(pnlCT, gridBagConstraints);\n\n pnlLT.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"LT\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlLT.setLayout(new java.awt.BorderLayout());\n\n lblLTQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblLTQuant.setText(\"00 of 00\");\n pnlLT.add(lblLTQuant, java.awt.BorderLayout.CENTER);\n\n spnLTCrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnLTCrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnLTCrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnLTCrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnLTCritsStateChanged(evt);\n }\n });\n pnlLT.add(spnLTCrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridheight = 2;\n getContentPane().add(pnlLT, gridBagConstraints);\n\n pnlRT.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"RT\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlRT.setLayout(new java.awt.BorderLayout());\n\n lblRTQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblRTQuant.setText(\"00 of 00\");\n pnlRT.add(lblRTQuant, java.awt.BorderLayout.CENTER);\n\n spnRTCrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnRTCrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnRTCrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnRTCrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnRTCritsStateChanged(evt);\n }\n });\n pnlRT.add(spnRTCrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridheight = 2;\n getContentPane().add(pnlRT, gridBagConstraints);\n\n pnlLA.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"LA\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlLA.setLayout(new java.awt.BorderLayout());\n\n lblLAQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblLAQuant.setText(\"00 of 00\");\n pnlLA.add(lblLAQuant, java.awt.BorderLayout.CENTER);\n\n spnLACrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnLACrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnLACrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnLACrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnLACritsStateChanged(evt);\n }\n });\n pnlLA.add(spnLACrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n getContentPane().add(pnlLA, gridBagConstraints);\n\n pnlRA.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"RA\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlRA.setLayout(new java.awt.BorderLayout());\n\n lblRAQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblRAQuant.setText(\"00 of 00\");\n pnlRA.add(lblRAQuant, java.awt.BorderLayout.CENTER);\n\n spnRACrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnRACrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnRACrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnRACrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnRACritsStateChanged(evt);\n }\n });\n pnlRA.add(spnRACrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 2;\n getContentPane().add(pnlRA, gridBagConstraints);\n\n pnlLL.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"LL\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlLL.setLayout(new java.awt.BorderLayout());\n\n lblLLQuant.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n lblLLQuant.setText(\"00 of 00\");\n lblLLQuant.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n pnlLL.add(lblLLQuant, java.awt.BorderLayout.CENTER);\n\n spnLLCrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnLLCrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnLLCrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnLLCrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnLLCritsStateChanged(evt);\n }\n });\n pnlLL.add(spnLLCrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n getContentPane().add(pnlLL, gridBagConstraints);\n\n pnlRL.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"RL\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n pnlRL.setLayout(new java.awt.BorderLayout());\n\n lblRLQuant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblRLQuant.setText(\"00 of 00\");\n pnlRL.add(lblRLQuant, java.awt.BorderLayout.CENTER);\n\n spnRLCrits.setMaximumSize(new java.awt.Dimension(50, 25));\n spnRLCrits.setMinimumSize(new java.awt.Dimension(50, 25));\n spnRLCrits.setPreferredSize(new java.awt.Dimension(50, 25));\n spnRLCrits.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnRLCritsStateChanged(evt);\n }\n });\n pnlRL.add(spnRLCrits, java.awt.BorderLayout.PAGE_START);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 3;\n getContentPane().add(pnlRL, gridBagConstraints);\n\n btnOkay.setText(\"Okay\");\n btnOkay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnOkayActionPerformed(evt);\n }\n });\n jPanel1.add(btnOkay);\n\n btnCancel.setText(\"Cancel\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n jPanel1.add(btnCancel);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n getContentPane().add(jPanel1, gridBagConstraints);\n\n lblItemCrits.setText(\"00 of 00 Allocated\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.insets = new java.awt.Insets(8, 0, 8, 0);\n getContentPane().add(lblItemCrits, gridBagConstraints);\n\n lblAllocateItem.setText(\"Allocating Endo-Steel\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);\n getContentPane().add(lblAllocateItem, gridBagConstraints);\n\n pack();\n }", "public StartPanel() {\n\n\t\tGridBagLayout gbl_startPane = new GridBagLayout();\n\t\tgbl_startPane.columnWidths = new int[]{141, 174, 0, 0};\n\t\tgbl_startPane.rowHeights = new int[]{57, 23, 23, 0, 0, 0, 63, 48, 0, 0, 0, 0, 0};\n\t\tgbl_startPane.columnWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_startPane.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tsetLayout(gbl_startPane);\n\t\t\n\t\t/*\n\t\t * Label declarations\n\t\t */\n\t\tselectLabel = new JLabel(\"Select Actions to Perform\");\n\t\tGridBagConstraints gbc_selectLabel = new GridBagConstraints();\n\t\tgbc_selectLabel.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_selectLabel.gridx = 1;\n\t\tgbc_selectLabel.gridy = 0;\n\t\t\n\t\t\n\t\t/*\n\t\t * Checkbox declarations\n\t\t */\n\t\ttrimCkBox = new JCheckBox(\"Trim\");\n\t\tGridBagConstraints gbc_trimCkBox = new GridBagConstraints();\n\t\tgbc_trimCkBox.anchor = GridBagConstraints.WEST;\n\t\tgbc_trimCkBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_trimCkBox.gridx = 1;\n\t\tgbc_trimCkBox.gridy = 4;\n\t\t\n\t\trefCkBox = new JCheckBox(\"Build Reference\");\n\t\tGridBagConstraints gbc_refCkBox = new GridBagConstraints();\n\t\tgbc_refCkBox.anchor = GridBagConstraints.WEST;\n\t\tgbc_refCkBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_refCkBox.gridx = 1;\n\t\tgbc_refCkBox.gridy = 5;\n\t\t\n\t\t/*alignCkBox = new JCheckBox(\"Align\");\n\t\tGridBagConstraints gbc_alignCkBox = new GridBagConstraints();\n\t\tgbc_alignCkBox.anchor = GridBagConstraints.WEST;\n\t\tgbc_alignCkBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_alignCkBox.gridx = 1;\n\t\tgbc_alignCkBox.gridy = 5;*/\n\t\t\n\t\t\n\t\tadd(selectLabel, gbc_selectLabel);\n\t\tadd(trimCkBox, gbc_trimCkBox);\n\t\tadd(refCkBox, gbc_refCkBox);\n\t\t//add(alignCkBox, gbc_alignCkBox);\n\t\t\n\t\t\n\t}", "private javax.swing.JPanel getJDialogContentPane() {\r\n\tif (ivjJDialogContentPane == null) {\r\n\t\ttry {\r\n\t\t\tivjJDialogContentPane = new javax.swing.JPanel();\r\n\t\t\tivjJDialogContentPane.setName(\"JDialogContentPane\");\r\n\t\t\tivjJDialogContentPane.setLayout(new java.awt.GridBagLayout());\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsLabFile = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsLabFile.gridx = 1; constraintsLabFile.gridy = 1;\r\n\t\t\tconstraintsLabFile.ipadx = 26;\r\n\t\t\tconstraintsLabFile.insets = new java.awt.Insets(17, 16, 11, 40);\r\n\t\t\tgetJDialogContentPane().add(getLabFile(), constraintsLabFile);\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsLabRange = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsLabRange.gridx = 1; constraintsLabRange.gridy = 2;\r\n\t\t\tconstraintsLabRange.ipadx = 9;\r\n\t\t\tconstraintsLabRange.insets = new java.awt.Insets(9, 15, 0, 6);\r\n\t\t\tgetJDialogContentPane().add(getLabRange(), constraintsLabRange);\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsTxtFile = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsTxtFile.gridx = 2; constraintsTxtFile.gridy = 1;\r\n\t\t\tconstraintsTxtFile.fill = java.awt.GridBagConstraints.HORIZONTAL;\r\n\t\t\tconstraintsTxtFile.weightx = 1.0;\r\n\t\t\tconstraintsTxtFile.ipadx = 255;\r\n\t\t\tconstraintsTxtFile.insets = new java.awt.Insets(14, 8, 8, 7);\r\n\t\t\tgetJDialogContentPane().add(getTxtFile(), constraintsTxtFile);\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsTxtRange = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsTxtRange.gridx = 2; constraintsTxtRange.gridy = 2;\r\nconstraintsTxtRange.gridheight = 2;\r\n\t\t\tconstraintsTxtRange.fill = java.awt.GridBagConstraints.HORIZONTAL;\r\n\t\t\tconstraintsTxtRange.weightx = 1.0;\r\n\t\t\tconstraintsTxtRange.ipadx = 255;\r\n\t\t\tconstraintsTxtRange.insets = new java.awt.Insets(6, 7, 15, 8);\r\n\t\t\tgetJDialogContentPane().add(getTxtRange(), constraintsTxtRange);\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsBtnFile = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsBtnFile.gridx = 3; constraintsBtnFile.gridy = 1;\r\n\t\t\tconstraintsBtnFile.ipadx = -5;\r\n\t\t\tconstraintsBtnFile.insets = new java.awt.Insets(12, 7, 5, 6);\r\n\t\t\tgetJDialogContentPane().add(getBtnFile(), constraintsBtnFile);\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsLabOptional = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsLabOptional.gridx = 1; constraintsLabOptional.gridy = 3;\r\n\t\t\tconstraintsLabOptional.ipadx = 7;\r\n\t\t\tconstraintsLabOptional.insets = new java.awt.Insets(1, 13, 3, 26);\r\n\t\t\tgetJDialogContentPane().add(getLabOptional(), constraintsLabOptional);\r\n\r\n\t\t\tjava.awt.GridBagConstraints constraintsJPanel1 = new java.awt.GridBagConstraints();\r\n\t\t\tconstraintsJPanel1.gridx = 1; constraintsJPanel1.gridy = 4;\r\n\t\t\tconstraintsJPanel1.gridwidth = 3;\r\n\t\t\tconstraintsJPanel1.fill = java.awt.GridBagConstraints.BOTH;\r\n\t\t\tconstraintsJPanel1.weightx = 1.0;\r\n\t\t\tconstraintsJPanel1.weighty = 1.0;\r\n\t\t\tconstraintsJPanel1.ipadx = 272;\r\n\t\t\tconstraintsJPanel1.ipady = -4;\r\n\t\t\tconstraintsJPanel1.insets = new java.awt.Insets(4, 10, 8, 5);\r\n\t\t\tgetJDialogContentPane().add(getJPanel1(), constraintsJPanel1);\r\n\t\t\t// user code begin {1}\r\n\t\t\t// user code end\r\n\t\t} catch (java.lang.Throwable ivjExc) {\r\n\t\t\t// user code begin {2}\r\n\t\t\t// user code end\r\n\t\t\thandleException(ivjExc);\r\n\t\t}\r\n\t}\r\n\treturn ivjJDialogContentPane;\r\n}", "public void buildGUI(){\n\n\t\tsetLayout(new BorderLayout());//Setting a borderlayout for the frame\n\t\toptionsPane.setBorder(BorderFactory.createLineBorder(Color.black));//This sets a border around the options panel\n\t\tadd(disclaimer, BorderLayout.SOUTH);//Adds the disclaimer panel to the frame\n\t\tadd(optionsPane, BorderLayout.LINE_START);//Adds the options panel to the frame\n\t\tadd(scrollbar);//Adds the scrollbar to the frame (contains the search frame)\n\t\toptionsPane.add(jpCmbBoxes, BorderLayout.NORTH);//Adds the combo boxes to the options pane\n\t\toptionsPane.add(pic, BorderLayout.SOUTH);//Adds the picture to the options pane\n\t\tdisclaimer.add(disclaim, BorderLayout.LINE_START);//Adds the disclaimer text to the disclaimer panel\n\t\t\n\t\t/*Sets borders around each of the combo boxes, buttons and the disclaimer text */\n\t\ttrackingRange.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tgenderBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tstageofLifeBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\ttagLocationBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchButton.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tdisclaimer.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchByName.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tsearchResults.setLayout((new BoxLayout(searchResults, BoxLayout.PAGE_AXIS)));//Setting the layout for search results panel\n\t\tsearchResults.setBorder(BorderFactory.createLineBorder(Color.black));//Sets a border around the panel\n\t\t/*Adding components to the combo boxes panel */\n\t\tjpCmbBoxes.setLayout(new BoxLayout(jpCmbBoxes, BoxLayout.Y_AXIS));//Sets the layout for this panel\n\t\tjpCmbBoxes.add(subTitle);\n\t\tjpCmbBoxes.add(trackingRangeLabel);\n\t\tjpCmbBoxes.add(trackingRange);\n\t\tjpCmbBoxes.add(genderLabel);\n\t\tjpCmbBoxes.add(genderBox);\n\t\tjpCmbBoxes.add(stageOfLifeLabel);\n\t\tjpCmbBoxes.add(stageofLifeBox);\n\t\tjpCmbBoxes.add(tagLocationLabel);\n\t\tjpCmbBoxes.add(tagLocationBox);\n\t\tjpCmbBoxes.add(searchButton);\n\t\tjpCmbBoxes.add(searchByName);\n\t\t\n\t\ttry {//Importing the image for this panel\n\t\t\tsharkImage = ImageIO.read(new File(\"source/images/shark2.png\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJLabel image = new JLabel(new ImageIcon(sharkImage));//Creating a label and adding the image to the label\n\t\tpic.add(image);//adding the label to the panel\n\t}", "private void initComponents() {\r\n java.awt.GridBagConstraints gridBagConstraints;\r\n\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n pnlMainValidationCheck = new javax.swing.JPanel();\r\n btnPrint = new javax.swing.JButton();\r\n btnOk = new javax.swing.JButton();\r\n\r\n setLayout(new java.awt.GridBagLayout());\r\n\r\n jScrollPane1.setMinimumSize(new java.awt.Dimension(500, 400));\r\n jScrollPane1.setPreferredSize(new java.awt.Dimension(500, 400));\r\n pnlMainValidationCheck.setLayout(new javax.swing.BoxLayout(pnlMainValidationCheck, javax.swing.BoxLayout.Y_AXIS));\r\n\r\n pnlMainValidationCheck.setBackground(new java.awt.Color(255, 255, 255));\r\n jScrollPane1.setViewportView(pnlMainValidationCheck);\r\n\r\n gridBagConstraints = new java.awt.GridBagConstraints();\r\n gridBagConstraints.gridx = 0;\r\n gridBagConstraints.gridy = 0;\r\n gridBagConstraints.gridwidth = 17;\r\n gridBagConstraints.gridheight = 2;\r\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\r\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\r\n add(jScrollPane1, gridBagConstraints);\r\n\r\n btnPrint.setFont(CoeusFontFactory.getLabelFont());\r\n btnPrint.setMnemonic('P');\r\n btnPrint.setText(\"Print\");\r\n btnPrint.setMinimumSize(new java.awt.Dimension(75, 26));\r\n btnPrint.setPreferredSize(new java.awt.Dimension(75, 26));\r\n gridBagConstraints = new java.awt.GridBagConstraints();\r\n gridBagConstraints.gridx = 17;\r\n gridBagConstraints.gridy = 1;\r\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;\r\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 8, 4);\r\n add(btnPrint, gridBagConstraints);\r\n\r\n btnOk.setFont(CoeusFontFactory.getLabelFont());\r\n btnOk.setMnemonic('O');\r\n btnOk.setText(\"OK\");\r\n btnOk.setMaximumSize(new java.awt.Dimension(85, 23));\r\n btnOk.setMinimumSize(new java.awt.Dimension(85, 23));\r\n btnOk.setPreferredSize(new java.awt.Dimension(85, 23));\r\n gridBagConstraints = new java.awt.GridBagConstraints();\r\n gridBagConstraints.gridx = 17;\r\n gridBagConstraints.gridy = 0;\r\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\r\n gridBagConstraints.weighty = 1.0;\r\n gridBagConstraints.insets = new java.awt.Insets(3, 5, 7, 4);\r\n add(btnOk, gridBagConstraints);\r\n\r\n }", "private void buildUI() {\n grid.setPadding(new Insets(10));\n grid.setHgap(10);\n grid.setVgap(10);\n \n // First row\n grid.add(tagsSelectLabel, 0, 0, 1, 1);\n selectTextSelector = new TextSelector();\n /*selectTextSelector.setEditable(true);\n selectTextSelector.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n UserPrefs.getShared().setPref\n (SELECT_TAGS, selectTextSelector.getText());\n }\n }); */\n grid.add(selectTextSelector, 1, 0, 1, 1);\n \n // Second row\n grid.add(tagsSuppressLabel, 0, 1, 1, 1);\n suppressTextSelector = new TextSelector();\n /* suppressTextSelector.setEditable(true);\n suppressTextSelector.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n UserPrefs.getShared().setPref\n (SUPPRESS_TAGS, suppressTextSelector.getText());\n }\n }); */\n grid.add(suppressTextSelector, 1, 1, 1, 1);\n \n selectTextSelector.setText\n (UserPrefs.getShared().getPref (SELECT_TAGS, \"\"));\n suppressTextSelector.setText\n (UserPrefs.getShared().getPref (SUPPRESS_TAGS, \"\"));\n \n }", "public WindowAutoLineaging()\n\t\t{\n\t\tsetLayout(new GridLayout(1,1));\n\t\t/*\n\t\tJPanel top=new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c=new GridBagConstraints();\n\t\tc.gridy=0; top.add(new JLabel(\"Lineage \"),c);\n\t\t//c.gridy=1; top.add(new JLabel(\"Channel \"),c);\n\t\tc.gridy=1; top.add(new JLabel(\"Algorithm \"),c);\n\t\t\n\t\tc.fill=GridBagConstraints.HORIZONTAL;\n\t\tc.gridx=1;\n\t\tc.weightx=1;\n\t\t\n\t\tc.gridy=0; top.add(comboLin,c);\n//\t\tc.gridy=1; top.add(comboChan,c);\n\t\tc.gridy=1; top.add(comboAlgo,c);\n\t\t*/\n\t\tJComponent top=EvSwingUtil.layoutTableCompactWide(\n\t\t\t\tnew JLabel(\"Lineage \"),comboLin,\n\t\t\t\tnew JLabel(\"Algorithm \"),comboAlgo\n\t\t\t\t);\n\t\t\n\t\tpanelOptions.setBorder(BorderFactory.createTitledBorder(\"Options\"));\n\n\t\t\n\t\tadd(EvSwingUtil.layoutCompactVertical(\n\t\t\t\ttop,\n\t\t\t\tpanelOptions,\n\t\t\t\tpanelStatus,\n\t\t\t\tEvSwingUtil.withLabel(\"Frame\", frameStart),\n\t\t\t\tEvSwingUtil.layoutEvenHorizontal(bStartStop,bStep,bFlatten)));\n\t\t\n\t\tcomboAlgo.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){updateCurrentAlgo();}});\n\t\t\n\t\tbStartStop.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){startStop();}});\n\n\t\tbStep.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){step();}});\n\n\n\t\tbFlatten.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){flatten();}});\n\n\t\tsetTitleEvWindow(\"Auto-lineage\");\n\t\tupdateCurrentAlgo();\n\t\tpackEvWindow();\n\t\tsetVisibleEvWindow(true);\n\t\t}", "public OptionsWindow(Manager m) {\n super(\"Options\");\n manager = m; \n JPanel optionsPanel = new JPanel(new SpringLayout());\n JLabel managerPoll = new JLabel(\"Manager Poll\", JLabel.TRAILING);\n optionsPanel.add(managerPoll);\n managerPollTextField = new JTextField(10);\n currentManagerPollPeriod = manager.getPollPeriod();\n managerPollTextField.setText(new Integer(currentManagerPollPeriod).toString());\n managerPoll.setLabelFor(managerPollTextField);\n optionsPanel.add(managerPollTextField);\n JLabel performancePoll = new JLabel(\"Performance Poll\", JLabel.TRAILING);\n optionsPanel.add(performancePoll);\n performancePollTextField = new JTextField(10);\n currentPerformancePollPeriod = manager.getPerformanceUpdatePeriod();\n performancePollTextField.setText(new Integer(currentPerformancePollPeriod).toString()); \n performancePoll.setLabelFor(performancePollTextField);\n optionsPanel.add(performancePollTextField); \n\n SpringUtilities.makeCompactGrid(optionsPanel,\n 2, 2, //rows, cols\n 6, 6, //initX, initY\n 6, 6); //xPad, yPad\n \n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER));\n JButton okButton = new JButton(OKCOMMAND);\n okButton.setActionCommand(OKCOMMAND);\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n if (OKCOMMAND.equals(evt.getActionCommand())) { \n Integer i = new Integer(managerPollTextField.getText());\n Integer j = new Integer(currentManagerPollPeriod);\n if (!(i.equals(j))) {\n OMMLogger.logger.info(\"change of manager poll period from \" + j + \" to \" + i);\n currentManagerPollPeriod = i.intValue();\n manager.setPollPeriod(currentManagerPollPeriod);\n }\n i = new Integer(performancePollTextField.getText());\n j = new Integer(currentPerformancePollPeriod);\n if (!(i.equals(j))) {\n OMMLogger.logger.info(\"change of performance poll period from \" + j + \" to \" + i);\n currentPerformancePollPeriod = i.intValue();\n manager.setPerformancePollPeriod(currentPerformancePollPeriod);\n }\n dispose();\n }\n }\n }); \n \n buttonPanel.add(okButton); \n \n JButton cancelButton = new JButton(CANCELCOMMAND);\n cancelButton.setActionCommand(CANCELCOMMAND);\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dispose();\n }\n }); \n \n buttonPanel.add(cancelButton);\n \n optionsPanel.setOpaque(true);\n buttonPanel.setOpaque(true);\n \n Container mainPane = getContentPane();\n mainPane.setLayout(new BoxLayout(mainPane, BoxLayout.PAGE_AXIS));\n mainPane.add(optionsPanel, BorderLayout.PAGE_START); \n mainPane.add(buttonPanel, BorderLayout.PAGE_END); \n \n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); \n pack();\n }", "private void addChangeSecurityQuestionForm() {\n // The panel to hold all form components to change the login accounts security question\n final JPanel changeSecurityQuestionForm = new JPanel();\n changeSecurityQuestionForm.setPreferredSize(new Dimension(650, 345));\n changeSecurityQuestionForm.setVisible(true);\n changeSecurityQuestionForm.setBackground(Color.white);\n changeSecurityQuestionForm.setLayout(new GridBagLayout());\n \n /**\n * Security Question label and text field and info label.\n */\n // Label to hold the login accounts security question form field text.\n final JLabel securityQuestionLabel = new JLabel(\"Security Question:\");\n setLabelAttributes(securityQuestionLabel);\n securityQuestionLabel.setPreferredSize(new Dimension(220, 50));\n\n // The coordinates for where to add this component to the add login account form layout.\n c.gridx = 0;\n c.gridy = 0;\n changeSecurityQuestionForm.add(securityQuestionLabel, c);\n \n // The text field input for login accounts security question\n securityQuestionField = new JTextField(15);\n securityQuestionField.setInputVerifier(inputVerifier);\n securityQuestionField.setName(securityQuestionFieldName);\n securityQuestionField.setFont(textFont);\n \n // The coordinates for where to add this component to the add login account form layout.\n c.gridx = 1;\n c.gridy = 0;\n changeSecurityQuestionForm.add(securityQuestionField, c);\n \n // Label to hold the information tooltip and tooltip icon for the login accounts security question field\n final JLabel info1Label = new JLabel();\n // Sets the standard attributes for a info label\n setInfoLabelAttributes(info1Label);\n // The info image icon for the label\n info1Label.setIcon(new ImageIcon(\"images/icons/information.png\"));\n // The tooltip on mouse hover for the icon\n info1Label.setToolTipText(\"<HTML> The <b> security question </b>field cannot: \"\n + \"be empty.</b> </HTML>\");\n \n // The coordinates for where to add this component to the layout.\n c.gridx = 2;\n c.gridy = 0;\n changeSecurityQuestionForm.add(info1Label, c);\n \n \n /**\n * Security Question Answer label and text field and info label.\n */\n // Label to hold the login accounts security question answer form field text.\n final JLabel securityQuestionAnswerLabel = new JLabel(\"Security Question Answer:\");\n setLabelAttributes(securityQuestionAnswerLabel);\n securityQuestionAnswerLabel.setPreferredSize(new Dimension(220, 50));\n\n // The coordinates for where to add this component to the add login account form layout.\n c.gridx = 0;\n c.gridy = 1;\n changeSecurityQuestionForm.add(securityQuestionAnswerLabel, c);\n \n // The text field input for login accounts security question answer\n securityQuestionAnswerField = new JTextField(15);\n securityQuestionAnswerField.setInputVerifier(inputVerifier);\n securityQuestionAnswerField.setName(securityQuestionAnswerFieldName);\n securityQuestionAnswerField.setFont(textFont);\n \n // The coordinates for where to add this component to the add login account form layout.\n c.gridx = 1;\n c.gridy = 1;\n changeSecurityQuestionForm.add(securityQuestionAnswerField, c);\n \n // Label to hold the information tooltip and tooltip icon for the login accounts username field\n final JLabel info2Label = new JLabel();\n // Sets the standard attributes for a info label\n setInfoLabelAttributes(info2Label);\n // The info image icon for the label\n info2Label.setIcon(new ImageIcon(\"images/icons/information.png\"));\n // The tooltip on mouse hover for the icon\n info2Label.setToolTipText(\"<HTML> The <b> security question answer </b>field cannot: \"\n + \"be empty.</b> </HTML>\");\n \n // The coordinates for where to add this component to the layout.\n c.gridx = 2;\n c.gridy = 1;\n changeSecurityQuestionForm.add(info2Label, c);\n \n // Adds the change security question form to the dynamic edit panel and updates the UI.\n dynamicEditPanel.add(changeSecurityQuestionForm);\n dynamicEditPanel.updateUI();\n }", "public AskExcommDialog(ViewClient view, AskExcomm mex ){\n\t\tsuper(view);\n\t\tthis.mex = mex;\n\t\t\n\t\tmainPanel.setLayout(new GridLayout(0, 1));\n\t\t\n\t\t\n\t\tthis.setTitle(\"Vuoi appoggiare la chiesa?\");\n\t\tb1 = new JRadioButton(\"Si\");\n\t\tgroup.add(b1);\n\t mainPanel.add(b1);\n\t \n\t b2 = new JRadioButton(\"No\");\n\t group.add(b2);\n\t mainPanel.add(b2);\n\n\t mainPanel.add(confirmButton);\n\t \n\t confirmButton.addActionListener(new ConfirmListener());\n\t\t\n\t this.setMinimumSize(new Dimension(150,200));\n\t}", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n targetClassesTextField = new JTextField();\n panel.add(targetClassesTextField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n targetClassesLabel = new JLabel();\n targetClassesLabel.setText(\"Target classes\");\n panel.add(targetClassesLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n sourceDirTextField = new JTextField();\n panel.add(sourceDirTextField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sourceDirLabel = new JLabel();\n sourceDirLabel.setText(\"Source dir\");\n panel.add(sourceDirLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n reportDirTextField = new JTextField();\n panel.add(reportDirTextField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n reportDirLabel = new JLabel();\n reportDirLabel.setText(\"Report dir\");\n panel.add(reportDirLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n otherParamsTextField = new JTextField();\n panel.add(otherParamsTextField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n otherParamsLabel = new JLabel();\n otherParamsLabel.setText(\"Other params\");\n panel.add(otherParamsLabel, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void createGUI() \n {\n Rectangle screenSize = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();\n setSize(screenSize.width, screenSize.height);\n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n if (JOptionPane.showConfirmDialog(main, \"Are you sure you want to quit?\", \"Confirm exit.\", JOptionPane.OK_OPTION, 0, new ImageIcon(\"\")) != 0) {\n return;\n }\n stop();\n }\n });\n LookAndFeel.set();\n gbll=new GridBagLayout();\n mpane=new JPanel(gbll);\n mpane.setOpaque(false);\n mpane.setBackground(Color.WHITE);\n mpane.setBorder(new EtchedBorder());\n setGlassPane(mpane);\n \n jp=new JPanel(new BorderLayout()){\n @Override\n protected void paintComponent(Graphics grphcs) {\n Graphics2D g2d = (Graphics2D) grphcs;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);\n GradientPaint gp = new GradientPaint(0, 0,getBackground().brighter(), 0, getHeight(),getBackground().darker());\n g2d.setPaint(gp);\n g2d.fillRect(0, 0, getWidth(), getHeight());\n super.paintComponent(grphcs);\n }\n };\n jp.setOpaque(false);\n user=new HintTextField(\"Username\");\n user.setColumns(18);\n pass=new HintPasswordField(\"Password\");\n pass.setColumns(18);\n JButton login=new JButton(\"Login\");\n login.setMnemonic(KeyEvent.VK_ENTER);\n login.addActionListener(new LoginAction(main,user,pass,domain,client));\n username=new JLabel(\"Username\");\n jcb=new JComboBox(new String[]{ \"Home\", \"Rules\", \"Logout\" }); //help setting\n jcb.setLightWeightPopupEnabled(false);\n jcb.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n int sel=jcb.getSelectedIndex();\n if(sel==1)\n {\n try\n {\n String url = \"http://\"+domain+\"/rules/index.html\";\n String os = System.getProperty(\"os.name\").toLowerCase();\n Runtime rt = Runtime.getRuntime();\n \n if (os.indexOf( \"win\" ) >= 0) {\n \n // this doesn't support showing urls in the form of \"page.html#nameLink\" \n rt.exec( \"rundll32 url.dll,FileProtocolHandler \" + url);\n \n } else if (os.indexOf( \"mac\" ) >= 0) {\n \n rt.exec( \"open \" + url);\n \n } else if (os.indexOf( \"nix\") >=0 || os.indexOf( \"nux\") >=0) {\n \n // Do a best guess on unix until we get a platform independent way\n // Build a list of browsers to try, in this order.\n String[] browsers = {\"epiphany\", \"firefox\", \"mozilla\", \"konqueror\",\n \"netscape\",\"opera\",\"links\",\"lynx\"};\n \n // Build a command string which looks like \"browser1 \"url\" || browser2 \"url\" ||...\"\n StringBuffer cmd = new StringBuffer();\n for (int i=0; i<browsers.length; i++)\n cmd.append( (i==0 ? \"\" : \" || \" ) + browsers[i] +\" \\\"\" + url + \"\\\" \");\n \n rt.exec(new String[] { \"sh\", \"-c\", cmd.toString() });\n }\n //main.getAppletContext().showDocument(new URL(), \"_blank\");\n }catch(Exception ee){ee.printStackTrace();}\n }\n else if(sel==2)\n {\n main.stop();\n //main.getAppletContext().showDocument(main.getDocumentBase(), \"_self\");\n }\n }\n });\n JLabel space=new JLabel(\" \");\n space.setOpaque(false);\n JLabel space2=new JLabel(\" \");\n space2.setOpaque(false);\n \n jp2=new JPanel(new FlowLayout());\n jp2.setOpaque(false);\n jp2.add(username);\n jp2.add(jcb);\n jp2.add(space2);\n \n jp1=new JPanel(new FlowLayout());\n jp1.setOpaque(false);\n jp1.add(user);\n jp1.add(pass);\n jp1.add(login);\n jp1.add(space);\n \n Font f=null;\n try{\n //f=Font.createFont(Font.TRUETYPE_FONT,getClass().getResourceAsStream(\"OLYMPIQUES.ttf\"));\n f=Font.createFont(Font.TRUETYPE_FONT, this.getClass().getResourceAsStream(\"OLYMPIQUES.ttf\"));\n }catch(Exception bb){bb.printStackTrace();}\n JLabel tit=new JLabel(\" StockMart @ celesta'13\");\n tit.setOpaque(false);\n try{\n tit.setFont(f.deriveFont(Font.PLAIN,25)); //new Font(\"Forte\",Font.BOLD,20)\n tit.setForeground(Color.gray.darker());\n }catch(Exception bb){bb.printStackTrace();}\n jp.add(tit,BorderLayout.WEST);\n jp.add(jp1,BorderLayout.EAST);\n jp.setBorder(new BevelBorder(BevelBorder.RAISED));\n jp.setPreferredSize(new Dimension(mpane.getWidth(),45));\n gbc=new GridBagConstraints();\n gbc.gridx=0;\n gbc.gridy=0;\n gbc.fill=GridBagConstraints.HORIZONTAL;\n gbc.gridwidth=8;\n gbc.gridheight=1;\n gbc.ipadx=0;\n gbc.ipady=0;\n gbc.anchor=GridBagConstraints.PAGE_START;\n gbc.weightx=1.0;\n gbc.weighty=1.0;\n mpane.add(jp,gbc);\n \n HintTextField regno=new HintTextField(\"Registration No.\");\n regno.setColumns(10);\n //textField.setMaximumSize( .getPreferredSize() );\n HintTextField ruser=new HintTextField(\"Username\");\n ruser.setColumns(10);\n HintPasswordField rpass=new HintPasswordField(\"Password\");\n rpass.setColumns(10);\n JButton register=new JButton(\"Register\");\n register.addActionListener(new RegisterAction(regno,ruser,rpass,domain,client));\n \n JPanel regpane=new JPanel(){\n @Override\n protected void paintComponent(Graphics grphcs) {\n Graphics2D g2d = (Graphics2D) grphcs;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);\n GradientPaint gp = new GradientPaint(0, 0,getBackground().brighter(), 0, getHeight(),getBackground().darker());\n g2d.setPaint(gp);\n g2d.fillRect(0, 0, getWidth(), getHeight());\n super.paintComponent(grphcs);\n }\n };\n regpane.setOpaque(false);\n regpane.setLayout(new BoxLayout(regpane, BoxLayout.PAGE_AXIS));\n regpane.setBorder(new EmptyBorder(10,20,10,20)); //tlbr\n regpane.add(Box.createRigidArea(new Dimension(0,5)));\n regpane.add(regno);\n regpane.add(Box.createRigidArea(new Dimension(0,5)));\n regpane.add(ruser);\n regpane.add(Box.createRigidArea(new Dimension(0,5)));\n regpane.add(rpass);\n regpane.add(Box.createRigidArea(new Dimension(0,5)));\n regpane.add(register);\n regpane.add(Box.createRigidArea(new Dimension(0,5)));\n \n internalFrame=new JInternalFrame(\"Register:\",false,false,false,false);\n internalFrame.setContentPane(regpane);\n internalFrame.pack();\n \n unmovable(internalFrame);\n \n imgpane=new JPanel();\n imgpane.setOpaque(false);\n JLabel imglabel=new JLabel();\n imglabel.setSize((int)(.384*(double)getWidth1()),(int)(.79*(double)getHeight1()));\n imglabel.setOpaque(false);\n imglabel.setIcon(new ImageIcon(img.getScaledInstance(imglabel.getWidth(),imglabel.getHeight(),Image.SCALE_SMOOTH)));\n imgpane.add(imglabel);\n \n gbc.gridx=6;\n gbc.gridy=3;\n gbc.fill=GridBagConstraints.NONE;\n gbc.gridwidth=1;\n gbc.gridheight=3;\n gbc.ipadx=200;\n gbc.ipady=55;\n gbc.anchor=GridBagConstraints.CENTER;\n gbc.insets=new Insets(0,0,100,0);\n mpane.add(internalFrame,gbc);\n \n gbc.gridx=1;\n gbc.gridy=2;\n gbc.fill=GridBagConstraints.BOTH;\n gbc.gridwidth=2;\n gbc.gridheight=7;\n gbc.ipadx=0;\n gbc.ipady=0;\n gbc.insets=new Insets(0,10,30,0);\n mpane.add(imgpane,gbc);\n \n tester = new BackgroundAnimation();\n JPanel anipane=new JPanel();\n anipane.setLayout(new BoxLayout(anipane, BoxLayout.Y_AXIS));\n anipane.add(Box.createRigidArea(new Dimension(0,45)));\n anipane.add(tester);\n \n rb=new RibbonPane(140,client);\n rb.setPreferredSize(new Dimension(mpane.getWidth(),28));\n anipane.add(rb);\n setContentPane(anipane);\n mpane.setVisible(true);\n internalFrame.setVisible(true);\n try{\n internalFrame.setSelected(true);\n }catch(Exception v){};\n rb.startAnimation();\n }", "public void init() {\n\tGridBagLayout gbag = new GridBagLayout();\r\n\tGridBagConstraints gbc = new GridBagConstraints();\r\n\tsetLayout(gbag);\r\n\tLabel heading = new\r\n\tLabel(\"Future Value of an Investment\");\r\n\tLabel amountLab = new Label(\"Principal\");\r\n\tLabel periodLab = new Label(\"Years\");\r\n\tLabel rateLab = new Label(\"Rate of Return\");\r\n\tLabel futvalLab =\r\n\tnew Label(\"Future Value of Investment\");\r\n\tLabel compLab =\r\n\tnew Label(\"Compounding Periods per Year \");\r\n\tamountText = new TextField(16);\r\n\tperiodText = new TextField(16);\r\n\tfutvalText = new TextField(16);\r\n\trateText = new TextField(16);\r\n\tcompText = new TextField(16);\r\n\t// Future value field for display only.\r\n\tfutvalText.setEditable(false);\r\n\tdoIt = new Button(\"Compute\");\r\n\t// Define the grid bag.\r\n\tgbc.weighty = 1.0; // use a row weight of 1\r\n\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\tgbc.anchor = GridBagConstraints.NORTH;\r\n\tgbag.setConstraints(heading, gbc);\r\n\t// Anchor most components to the right.\r\n\tgbc.anchor = GridBagConstraints.EAST;\r\n\tgbc.gridwidth = GridBagConstraints.RELATIVE;\r\n\tgbag.setConstraints(amountLab, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\tgbag.setConstraints(amountText, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.RELATIVE;\r\n\tgbag.setConstraints(periodLab, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\tgbag.setConstraints(periodText, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.RELATIVE;\r\n\tgbag.setConstraints(rateLab, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\tgbag.setConstraints(rateText, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.RELATIVE;\r\n\tgbag.setConstraints(compLab, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\tgbag.setConstraints(compText, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.RELATIVE;\r\n\tgbag.setConstraints(futvalLab, gbc);\r\n\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\tgbag.setConstraints(futvalText, gbc);\r\n\tgbc.anchor = GridBagConstraints.CENTER;\r\n\tgbag.setConstraints(doIt, gbc);\r\n\tadd(heading);\r\n\tadd(amountLab);\r\n\tadd(amountText);\r\n\tadd(periodLab);\r\n\tadd(periodText);\r\n\tadd(rateLab);\r\n\tadd(rateText);\r\n\tadd(compLab);\r\n\tadd(compText);\r\n\tadd(futvalLab);\r\n\tadd(futvalText);\r\n\tadd(doIt);\r\n\t// Register to receive action events.\r\n\tamountText.addActionListener(this);\r\n\tperiodText.addActionListener(this);\r\n\trateText.addActionListener(this);\r\n\tcompText.addActionListener(this);\r\n\tdoIt.addActionListener(this);\r\n\tnf = NumberFormat.getInstance();\r\n\tnf.setMinimumFractionDigits(2);\r\n\tnf.setMaximumFractionDigits(2);\r\n\t}", "private void initialize() {\n\n\n\t\tfrmTesis = new JFrame();\n\t\tfrmTesis.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);\n\t\tfrmTesis.setTitle(\"CDSS-Workbench v1.0\");\n\t\tfrmTesis.setBounds(100, 100, 670, 797);\n\t\tfrmTesis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmTesis.getContentPane().setLayout(new BoxLayout(frmTesis.getContentPane(), BoxLayout.X_AXIS));\n\n\t\tExpresion.valores.setDefault(1.0);\n\t\tExpresion.valores.put(\"clorhidrato\",0.1);\t\n\t\tExpresion.valores.put(\"vitamina\",0.1);\t\n\t\tExpresion.valores.put(\"cloruro\",0.1);\n\t\tExpresion.valores.put(\"fosfato\",0.1);\n\n\n\t\tfinal JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\ttabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);\n\t\tfrmTesis.getContentPane().add(tabbedPane);\n\n\t\tJPanel panel = new JPanel();\n\t\ttabbedPane.addTab(\"1.Crear BD\", null, panel, null);\n\t\tGridBagLayout gbl_panel = new GridBagLayout();\n\t\tgbl_panel.columnWidths = new int[]{0, 203, 147, 0, 0};\n\t\tgbl_panel.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tgbl_panel.columnWeights = new double[]{1.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\n\t\tgbl_panel.rowWeights = new double[]{1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};\n\t\tpanel.setLayout(gbl_panel);\n\n\t\tbtn_tConceptos_crear = new JButton(\"1.1 - Instanciar tabla Conceptos\");\n\t\tbtn_tConceptos_crear.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btn_tConceptos_crear, \"instanciarTablaConceptos\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal JButton btn_1ClicConstructor = new JButton(\"1Click Constructor\");\n\t\tbtn_1ClicConstructor.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarEsquema\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablaConceptos\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablaDescripciones\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablaCalificadores\",false);\n\t\t\t\t\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarBDAleman\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablaAnmat\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablaExcepciones\",false);\n\t\t\t\t\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablaInteracciones\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablasDosificaciones\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablasInteraccionesCondiciones\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablasReportes\",false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"createProcesatedTableFromDrogasSnomed\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"createProcesatedTableFromCalificadoresSnomed\",false);\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"reProcesatedTableDrogasToCreateSimplefiedTableDrugs\",false);\n\t\t\t\t\n\t\t\t\tdoActionController(btn_1ClicConstructor, \"instanciarTablasCasoTesting\",false);\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_3 = new GridBagConstraints();\n\t\tgbc_btnNewButton_3.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_3.gridwidth = 2;\n\t\tgbc_btnNewButton_3.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton_3.gridx = 1;\n\t\tgbc_btnNewButton_3.gridy = 1;\n\t\tpanel.add(btn_1ClicConstructor, gbc_btnNewButton_3);\n\n\t\tComponent horizontalStrut_1 = Box.createHorizontalStrut(20);\n\t\tGridBagConstraints gbc_horizontalStrut_1 = new GridBagConstraints();\n\t\tgbc_horizontalStrut_1.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_horizontalStrut_1.gridx = 3;\n\t\tgbc_horizontalStrut_1.gridy = 2;\n\t\tpanel.add(horizontalStrut_1, gbc_horizontalStrut_1);\n\n\t\tComponent verticalGlue = Box.createVerticalGlue();\n\t\tGridBagConstraints gbc_verticalGlue = new GridBagConstraints();\n\t\tgbc_verticalGlue.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_verticalGlue.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_verticalGlue.gridx = 1;\n\t\tgbc_verticalGlue.gridy = 3;\n\t\tpanel.add(verticalGlue, gbc_verticalGlue);\n\n\t\tfinal JButton btnCrearEsquema = new JButton(\"1.0 - Crear esquema\");\n\t\tbtnCrearEsquema.setToolTipText(\"Crea un esquema donde se intancia todo el proyecto\");\n\t\tbtnCrearEsquema.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btnCrearEsquema, \"instanciarEsquema\");\n\t\t\t}\n\t\t});\n\n\t\tGridBagConstraints gbc_btnCrearEsquema = new GridBagConstraints();\n\t\tgbc_btnCrearEsquema.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnCrearEsquema.gridwidth = 2;\n\t\tgbc_btnCrearEsquema.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnCrearEsquema.gridx = 1;\n\t\tgbc_btnCrearEsquema.gridy = 4;\n\t\tpanel.add(btnCrearEsquema, gbc_btnCrearEsquema);\n\n\t\tComponent horizontalStrut = Box.createHorizontalStrut(20);\n\t\tGridBagConstraints gbc_horizontalStrut = new GridBagConstraints();\n\t\tgbc_horizontalStrut.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_horizontalStrut.gridx = 0;\n\t\tgbc_horizontalStrut.gridy = 5;\n\t\tpanel.add(horizontalStrut, gbc_horizontalStrut);\n\t\tGridBagConstraints gbc_btn_tConceptos_crear = new GridBagConstraints();\n\t\tgbc_btn_tConceptos_crear.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btn_tConceptos_crear.gridwidth = 2;\n\t\tgbc_btn_tConceptos_crear.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btn_tConceptos_crear.gridx = 1;\n\t\tgbc_btn_tConceptos_crear.gridy = 5;\n\t\tpanel.add(btn_tConceptos_crear, gbc_btn_tConceptos_crear);\n\n\t\tbtn_tRelaciones_crear = new JButton(\"1.2 - Instanciar tabla Relaciones\");\n\t\tbtn_tRelaciones_crear.setEnabled(false);\n\t\tbtn_tRelaciones_crear.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\tbtn_tRelaciones_crear.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\tString createStament= \"CREATE TABLE `\"+ txt_esquema.getText() +\"`.`relations` (\" +\n\t\t\t\t\t\t\" `id` VARCHAR(20) NOT NULL ,\" +\n\t\t\t\t\t\t\" `effectiveTime` VARCHAR(45) NOT NULL ,\" +\n\t\t\t\t\t\t\"\t`active` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\"\t`moduleId` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" `sourceId` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" `destinationId` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" `relationshipGroup` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" `typeId` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" `characteristicTypeId` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" `modifierId` VARCHAR(45) NULL ,\" +\n\t\t\t\t\t\t\" PRIMARY KEY (`id`, `effectiveTime`) );\",\n\t\t\t\t\t\tdropStament= \"DROP TABLE `\"+ txt_esquema.getText() +\"`.`relations`;\",\n\t\t\t\t\t\tinsertStament= \"INSERT INTO `\"+ txt_esquema.getText() +\"`.`relations` VALUES\";\n\t\t\t\tboolean[] string = {false,false,false,false,false,false,false,false,false,false};\t\t\t\t\n\n\t\t\t\tbtn_tRelaciones_crear.setText(\"En ejecucion...\");\t\n\t\t\t\tbtn_tRelaciones_crear.updateUI();\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Esta acción puede demorar algunos minutos, por favor no cierre el programa.\");\t\t\t\t\t\t\n\n\t\t\t\tmakeSQL(dropStament, insertStament, createStament, string, getPathSnomed()+\"RF2Release/Snapshot/Terminology/\",\"sct2_Relationship_Snapshot_INT_\",\"\",2);\n\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Se finalizó correctamente.\");\t\t\t\t\t\t\n\t\t\t\tbtn_tRelaciones_crear.setText(\"1.2 - Instanciar tabla Relaciones\");\t\n\t\t\t\tbtn_tRelaciones_crear.updateUI();\t\t\t\n\n\n\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btn_tRelaciones_crear = new GridBagConstraints();\n\t\tgbc_btn_tRelaciones_crear.gridwidth = 2;\n\t\tgbc_btn_tRelaciones_crear.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btn_tRelaciones_crear.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btn_tRelaciones_crear.gridx = 1;\n\t\tgbc_btn_tRelaciones_crear.gridy = 6;\n\t\tpanel.add(btn_tRelaciones_crear, gbc_btn_tRelaciones_crear);\n\n\t\tfinal JButton btn_filtro_activos = new JButton(\"2.0 - Creo drogas_snomed (Snomed + Manuales)\");\n\t\tbtn_filtro_activos.setToolTipText(\"Creo la tabla procesando los datos datos de drogas en la tabla snomed y las drogas manuales \");\n\n\t\tbtn_filtro_activos.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tbtn_filtro_activos.setText(\"En ejecucion...\");\t\n\t\t\t\tbtn_filtro_activos.updateUI();\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Esta acción puede demorar algunos minutos, por favor no cierre el programa.\");\t\t\t\t\t\t\n\n\t\t\t\tcontroller.createProcesatedTableFromDrogasSnomed();\n\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Se finalizó correctamente.\");\t\t\t\t\t\t\n\t\t\t\tbtn_filtro_activos.setText(\"2.1 - Realizar Filtrado por Actividad\");\t\n\t\t\t\tbtn_filtro_activos.updateUI();\t\t\t\n\n\n\t\t\t}\n\t\t});\n\n\t\tfinal JButton btnCargarTablaDescripciones = new JButton(\"1.3 - Instanciar tabla Descripcion (Drogas)\");\n\t\tbtnCargarTablaDescripciones.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\tbtnCargarTablaDescripciones.setText(\"En ejecucion...\");\t\n\t\t\t\tbtnCargarTablaDescripciones.updateUI();\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Esta acción puede demorar algunos minutos, por favor no cierre el programa.\");\t\t\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.instanciarTablaDescripciones();\n\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null,e2);\n\t\t\t\t\t// TODO: handle exception\n\n\t\t\t\t}\n\n\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Se finalizó correctamente.\");\t\t\t\t\t\t\n\t\t\t\tbtnCargarTablaDescripciones.setText(\"1.3 - Instanciar tabla Descripcion\");\t\n\t\t\t\tbtnCargarTablaDescripciones.updateUI();\t\t\t\n\n\t\t\t}\n\n\t\t});\n\t\tGridBagConstraints gbc_btnCargarTablaDescripciones = new GridBagConstraints();\n\t\tgbc_btnCargarTablaDescripciones.gridwidth = 2;\n\t\tgbc_btnCargarTablaDescripciones.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnCargarTablaDescripciones.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnCargarTablaDescripciones.gridx = 1;\n\t\tgbc_btnCargarTablaDescripciones.gridy = 7;\n\t\tpanel.add(btnCargarTablaDescripciones, gbc_btnCargarTablaDescripciones);\n\n\t\tfinal JButton btn_CrearAnmat = new JButton(\"1.4 - Instanciar tabla ANMAT\");\n\t\tbtn_CrearAnmat.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t\tbtn_CrearAnmat.setText(\"En ejecucion...\");\t\n\t\t\t\tbtn_CrearAnmat.updateUI();\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Esta acción puede demorar algunos minutos, por favor no cierre el programa.\");\t\t\t\t\t\t\n\t\t\t\tcontroller.instanciarTablaAnmat();\t\n\t\t\t\tbtn_CrearAnmat.setText(\"1.4 - Instanciar tabla ANMAT\");\n\t\t\t\tbtn_CrearAnmat.updateUI();\n\t\t\t\tJOptionPane.showMessageDialog(frmTesis, \"Se finalizó correctamente.\");\n\n\t\t\t}\n\t\t});\n\n\t\tfinal JButton btnNewButton = new JButton(\"1.4 - Instanciar tabla Descripcion (Calificadores)\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdoActionController(btnNewButton, \"instanciarTablaCalificadores\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton = new GridBagConstraints();\n\t\tgbc_btnNewButton.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton.gridwidth = 2;\n\t\tgbc_btnNewButton.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton.gridx = 1;\n\t\tgbc_btnNewButton.gridy = 8;\n\t\tpanel.add(btnNewButton, gbc_btnNewButton);\n\t\tGridBagConstraints gbc_btn_CrearAnmat = new GridBagConstraints();\n\t\tgbc_btn_CrearAnmat.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btn_CrearAnmat.gridwidth = 2;\n\t\tgbc_btn_CrearAnmat.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btn_CrearAnmat.gridx = 1;\n\t\tgbc_btn_CrearAnmat.gridy = 9;\n\t\tpanel.add(btn_CrearAnmat, gbc_btn_CrearAnmat);\n\n\t\tfinal JButton btnNewButton_4 = new JButton(\"1.5 - Instanciar tabla de excepciones\");\n\t\tbtnNewButton_4.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btnNewButton_4, \"instanciarTablaExcepciones\");\t\t\t\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_4 = new GridBagConstraints();\n\t\tgbc_btnNewButton_4.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_4.gridwidth = 2;\n\t\tgbc_btnNewButton_4.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton_4.gridx = 1;\n\t\tgbc_btnNewButton_4.gridy = 10;\n\t\tpanel.add(btnNewButton_4, gbc_btnNewButton_4);\n\n\t\tfinal JButton btnNewButton_6 = new JButton(\"1.6 - Instanciar tabla interacciones\");\n\t\tbtnNewButton_6.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btnNewButton_6, \"instanciarTablaInteracciones\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_6 = new GridBagConstraints();\n\t\tgbc_btnNewButton_6.gridwidth = 2;\n\t\tgbc_btnNewButton_6.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_6.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton_6.gridx = 1;\n\t\tgbc_btnNewButton_6.gridy = 11;\n\t\tpanel.add(btnNewButton_6, gbc_btnNewButton_6);\n\n\t\tComponent verticalGlue_1 = Box.createVerticalGlue();\n\t\tGridBagConstraints gbc_verticalGlue_1 = new GridBagConstraints();\n\t\tgbc_verticalGlue_1.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_verticalGlue_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_verticalGlue_1.gridx = 1;\n\t\tgbc_verticalGlue_1.gridy = 12;\n\t\tpanel.add(verticalGlue_1, gbc_verticalGlue_1);\n\t\tGridBagConstraints gbc_btn_filtro_activos = new GridBagConstraints();\n\t\tgbc_btn_filtro_activos.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btn_filtro_activos.gridwidth = 2;\n\t\tgbc_btn_filtro_activos.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btn_filtro_activos.gridx = 1;\n\t\tgbc_btn_filtro_activos.gridy = 13;\n\t\tpanel.add(btn_filtro_activos, gbc_btn_filtro_activos);\n\t\t\n\n\t\t\n\t\tfinal JButton btn_instanciarBdAleman = new JButton(\"3. - Instanciar bdAleman\");\n\t\tbtn_instanciarBdAleman.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btn_instanciarBdAleman, \"instanciarBDAleman\");\n\t\t\t}\n\t\t});\n\n\t\tfinal JButton btnAgregar = new JButton(\"2.5 - Agregar drogas padre en la tabla drogas\");\n\t\tbtnAgregar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdoActionController(btnAgregar, \"reProcesatedTableDrogasToCreateSimplefiedTableDrugs\");\n\t\t\t}\n\t\t});\n\n\t\tfinal JButton btnNewButton_2 = new JButton(\"2.1 - Creo calificadores_snomed (Snomed + Manuales)\");\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdoActionController(btnNewButton_2, \"createProcesatedTableFromCalificadoresSnomed\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_2 = new GridBagConstraints();\n\t\tgbc_btnNewButton_2.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_2.gridwidth = 2;\n\t\tgbc_btnNewButton_2.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton_2.gridx = 1;\n\t\tgbc_btnNewButton_2.gridy = 14;\n\t\tpanel.add(btnNewButton_2, gbc_btnNewButton_2);\n\t\tGridBagConstraints gbc_btnAgregar = new GridBagConstraints();\n\t\tgbc_btnAgregar.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnAgregar.gridwidth = 2;\n\t\tgbc_btnAgregar.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnAgregar.gridx = 1;\n\t\tgbc_btnAgregar.gridy = 15;\n\t\tpanel.add(btnAgregar, gbc_btnAgregar);\n\n\t\tComponent verticalGlue_3 = Box.createVerticalGlue();\n\t\tGridBagConstraints gbc_verticalGlue_3 = new GridBagConstraints();\n\t\tgbc_verticalGlue_3.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_verticalGlue_3.gridx = 1;\n\t\tgbc_verticalGlue_3.gridy = 16;\n\t\tpanel.add(verticalGlue_3, gbc_verticalGlue_3);\n\t\tGridBagConstraints gbc_btnNewButton_31 = new GridBagConstraints();\n\t\tgbc_btnNewButton_31.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_31.gridwidth = 2;\n\t\tgbc_btnNewButton_31.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton_31.gridx = 1;\n\t\tgbc_btnNewButton_31.gridy = 17;\n\t\tpanel.add(btn_instanciarBdAleman, gbc_btnNewButton_31);\n\t\t\n\t\tfinal JButton btnInsertarTablasDosis = new JButton(\"Insertar tablas dosis\");\n\t\tbtnInsertarTablasDosis.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tdoActionController(btnInsertarTablasDosis, \"instanciarTablasDosificaciones\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnInsertarTablasDosis = new GridBagConstraints();\n\t\tgbc_btnInsertarTablasDosis.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnInsertarTablasDosis.gridwidth = 2;\n\t\tgbc_btnInsertarTablasDosis.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnInsertarTablasDosis.gridx = 1;\n\t\tgbc_btnInsertarTablasDosis.gridy = 18;\n\t\tpanel.add(btnInsertarTablasDosis, gbc_btnInsertarTablasDosis);\n\t\t\n\t\tfinal JButton btnInsertarTablasInteracciones = new JButton(\"Insertar tablas interacciones condicion\");\n\t\tbtnInsertarTablasInteracciones.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tdoActionController(btnInsertarTablasInteracciones, \"instanciarTablasInteraccionesCondiciones\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnInsertarTablasInteracciones = new GridBagConstraints();\n\t\tgbc_btnInsertarTablasInteracciones.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnInsertarTablasInteracciones.gridwidth = 2;\n\t\tgbc_btnInsertarTablasInteracciones.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnInsertarTablasInteracciones.gridx = 1;\n\t\tgbc_btnInsertarTablasInteracciones.gridy = 19;\n\t\tpanel.add(btnInsertarTablasInteracciones, gbc_btnInsertarTablasInteracciones);\n\t\t\n\t\tfinal JButton btnInsertarTablasTestreportes = new JButton(\"Insertar tablas test/reportes\");\n\t\tbtnInsertarTablasTestreportes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdoActionController(btnInsertarTablasTestreportes, \"instanciarTablasReportes\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnInsertarTablasTestreportes = new GridBagConstraints();\n\t\tgbc_btnInsertarTablasTestreportes.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnInsertarTablasTestreportes.gridwidth = 2;\n\t\tgbc_btnInsertarTablasTestreportes.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnInsertarTablasTestreportes.gridx = 1;\n\t\tgbc_btnInsertarTablasTestreportes.gridy = 20;\n\t\tpanel.add(btnInsertarTablasTestreportes, gbc_btnInsertarTablasTestreportes);\n\t\t\n\t\tComponent verticalGlue_2 = Box.createVerticalGlue();\n\t\tGridBagConstraints gbc_verticalGlue_2 = new GridBagConstraints();\n\t\tgbc_verticalGlue_2.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_verticalGlue_2.gridx = 1;\n\t\tgbc_verticalGlue_2.gridy = 22;\n\t\tpanel.add(verticalGlue_2, gbc_verticalGlue_2);\n\n\t\tJPanel panel_2 = new JPanel();\n\t\ttabbedPane.addTab(\"2.Buscar diccionario\", null, panel_2, null);\n\t\tGridBagLayout gbl_panel_2 = new GridBagLayout();\n\t\tgbl_panel_2.columnWidths = new int[]{0, 0, 0, 0, 0};\n\t\tgbl_panel_2.rowHeights = new int[]{0, 0, 0, 0};\n\t\tgbl_panel_2.columnWeights = new double[]{0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_panel_2.rowWeights = new double[]{1.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tpanel_2.setLayout(gbl_panel_2);\n\n\t\tfinal JScrollPane scrollPane_1 = new JScrollPane();\n\t\tscrollPane_1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane_1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tGridBagConstraints gbc_scrollPane_1 = new GridBagConstraints();\n\t\tgbc_scrollPane_1.gridwidth = 2;\n\t\tgbc_scrollPane_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_scrollPane_1.fill = GridBagConstraints.BOTH;\n\t\tgbc_scrollPane_1.gridx = 1;\n\t\tgbc_scrollPane_1.gridy = 0;\n\t\tpanel_2.add(scrollPane_1, gbc_scrollPane_1);\n\n\t\tString[] titulos = {\"Certeza\",\"Termino no hallado\",\"Sugerencia\",\"Es equivaltente? SI\",\"Es equivaltente? NO\" };\n\t\tmodel = new TableModel_withClases(titulos);\n\t\ttable = new JTable(model);\n\n\t\tscrollPane_1.setViewportView(table);\n\t\tJButton btnNewButton_1 = new JButton(\"Buscar equiv Drogas\");\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\tList<Expresion> provi = new ArrayList<Expresion>();\n\n\n\t\t\t\tList<String> lista_med_faltan = managerDB.executeScript_Query(\t\t\t\"select distinct drug.droga_nombre \" +\n\t\t\t\t\t\t\"from \"+ txt_esquema.getText() +\".drogas_anmat as drug \" +\n\t\t\t\t\t\t\"where not exists ( \" +\n\t\t\t\t\t\t\"\tselect * \" +\n\t\t\t\t\t\t\"\tfrom \"+ txt_esquema.getText() +\".drogas_snomed as au \" +\n\t\t\t\t\t\t\"\twhere au.iddrogas_Anmat = drug.droga_nombre) \" +\n\t\t\t\t\t\t\"\t;\",\"droga_nombre\");\n\n\n\t\t\t\tList<String> valores = new ArrayList<String>(); valores.add(\"iddrogas_Anmat\"); valores.add(\"iddrogas_Snomed\");\t\t\t\n\t\t\t\tList<List<String>> lista_med_existen = managerDB.consultar(txt_esquema.getText() +\".drogas_snomed\", \"true\", valores);\n\n\t\t\t\tList<String> exclusion = new ArrayList<String>();\n\t\t\t\texclusion.add(\"de\");\n\t\t\t\texclusion.add(\"cloruro\");\n\t\t\t\texclusion.add(\"clorhidrato\");\n\t\t\t\texclusion.add(\"sulfato\");\n\t\t\t\texclusion.add(\"cloruro\");\n\n\n\t\t\t\tlista_med_existen=lista_med_existen.subList(0, lista_med_existen.size());\n\n\t\t\t\tint cant=0;\n\t\t\t\tfloat valor;\n\t\t\t\tfor (String string : lista_med_faltan) \n\t\t\t\t{\n\t\t\t\t\tcant++;\n\t\t\t\t\tSystem.out.println((float)cant/lista_med_faltan.size());\n\t\t\t\t\tfor (List<String> string2 : lista_med_existen) {\n\t\t\t\t\t\tvalor = Expresion.getCorrelacionT1(string, string2.get(0),exclusion, (float)0.9, (float)0.1);\n\t\t\t\t\t\tif (valor>0.2)\n\t\t\t\t\t\t\tprovi.add( new Expresion(string,string2.get(0),valor,\"\"));\n\n\n\t\t\t\t\t}\n\n\t\t\t\t}\t\n\n\n\t\t\t\tCollections.sort(provi);\n\n\n\t\t\t\tSystem.out.println(\"el tamaño es \" + provi.size());\n\n\t\t\t\tObject[] aux = {\"a\",\"e\",\"b\",\"c\",\"d\"};\n\t\t\t\tfor (Expresion string : provi) {\n\t\t\t\t\taux[0] = string.getCorrelacion()*100 + \"%\";\n\t\t\t\t\taux[1] = string.getTerminoSugerido();\n\t\t\t\t\taux[2] = string.getTerminoOriginal();\n\t\t\t\t\taux[3] = new Boolean(string.getCorrelacion()>0.9);\n\t\t\t\t\taux[4] = new Boolean(false);\n\t\t\t\t\tmodel.addRow(aux);\n\n\t\t\t\t}\n\t\t\t\t//\t\t\t\ttable.setModel(model);\t\t\t\t\n\t\t\t\ttable.updateUI();\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_1 = new GridBagConstraints();\n\t\tgbc_btnNewButton_1.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnNewButton_1.gridx = 1;\n\t\tgbc_btnNewButton_1.gridy = 1;\n\t\tpanel_2.add(btnNewButton_1, gbc_btnNewButton_1);\n\n\t\tJButton btnRegistrarEquivalencias = new JButton(\"Registrar equivalencias\");\n\t\tGridBagConstraints gbc_btnRegistrarEquivalencias = new GridBagConstraints();\n\t\tgbc_btnRegistrarEquivalencias.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnRegistrarEquivalencias.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_btnRegistrarEquivalencias.gridx = 2;\n\t\tgbc_btnRegistrarEquivalencias.gridy = 1;\n\t\tpanel_2.add(btnRegistrarEquivalencias, gbc_btnRegistrarEquivalencias);\n\n\t\tJButton btnBuscarEquivMedicamentos = new JButton(\"Buscar equiv Medicamentos\");\n\t\tbtnBuscarEquivMedicamentos.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\tcontroller.buscarMedicamentos(table);\n\n\t\t\t}});\n\t\tGridBagConstraints gbc_btnBuscarEquivMedicamentos = new GridBagConstraints();\n\t\tgbc_btnBuscarEquivMedicamentos.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnBuscarEquivMedicamentos.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnBuscarEquivMedicamentos.gridx = 1;\n\t\tgbc_btnBuscarEquivMedicamentos.gridy = 2;\n\t\tpanel_2.add(btnBuscarEquivMedicamentos, gbc_btnBuscarEquivMedicamentos);\n\n\t\tJButton btnRegistrarMedic = new JButton(\"Registrar medic\");\n\t\tbtnRegistrarMedic.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t\tfor (int i=0; i<model.getRowCount();i++)\n\t\t\t\t\tif(model.getValueAt(i, 3).equals(true))\n\t\t\t\t\t{\n\t\t\t\t\t\tString ver = \"INSERT INTO `testapp`.`medicamentos_manfar` values (\" + model.getValueAt(i,5) + \",'\" + model.getValueAt(i,1) + \"','A');\";\n\t\t\t\t\t\tSystem.out.println(ver);\n\t\t\t\t\t\tmanagerDB.executeScript_Void(ver);\n\t\t\t\t\t}\n\n\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnRegistrarMedic = new GridBagConstraints();\n\t\tgbc_btnRegistrarMedic.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnRegistrarMedic.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnRegistrarMedic.gridx = 2;\n\t\tgbc_btnRegistrarMedic.gridy = 2;\n\t\tpanel_2.add(btnRegistrarMedic, gbc_btnRegistrarMedic);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\ttabbedPane.addTab(\"3.Consultar\", null, panel_1, null);\n\t\tGridBagLayout gbl_panel_1 = new GridBagLayout();\n\t\tgbl_panel_1.columnWidths = new int[]{0, 0, 0, 0};\n\t\tgbl_panel_1.rowHeights = new int[]{0, 0, 0, 0};\n\t\tgbl_panel_1.columnWeights = new double[]{0.0, 1.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_panel_1.rowWeights = new double[]{0.0, 1.0, 0.0, Double.MIN_VALUE};\n\t\tpanel_1.setLayout(gbl_panel_1);\n\n\t\tJLabel lblMedicamento = new JLabel(\"Nuevo medicamento\");\n\t\tGridBagConstraints gbc_lblMedicamento = new GridBagConstraints();\n\t\tgbc_lblMedicamento.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblMedicamento.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblMedicamento.gridx = 0;\n\t\tgbc_lblMedicamento.gridy = 0;\n\t\tpanel_1.add(lblMedicamento, gbc_lblMedicamento);\n\n\t\tfinal JComboBox<String> lista_todos_medicamentos = new JComboBox<String>();\n\t\tGridBagConstraints gbc_lista_todos_medicamentos = new GridBagConstraints();\n\t\tgbc_lista_todos_medicamentos.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lista_todos_medicamentos.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_lista_todos_medicamentos.gridx = 1;\n\t\tgbc_lista_todos_medicamentos.gridy = 0;\n\t\tpanel_1.add(lista_todos_medicamentos, gbc_lista_todos_medicamentos);\n\n\t\tJButton btnAadir = new JButton(\"A\\u00F1adir\");\n\t\tbtnAadir.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\t\t\n\t\t\t\ttextPane.setText(textPane.getText() + lista_todos_medicamentos.getSelectedItem().toString() + \"\\n\");\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnAadir = new GridBagConstraints();\n\t\tgbc_btnAadir.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnAadir.gridx = 2;\n\t\tgbc_btnAadir.gridy = 0;\n\t\tpanel_1.add(btnAadir, gbc_btnAadir);\n\n\t\tJLabel lblMedicamentos = new JLabel(\"Medicamentos\");\n\t\tGridBagConstraints gbc_lblMedicamentos = new GridBagConstraints();\n\t\tgbc_lblMedicamentos.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblMedicamentos.gridx = 0;\n\t\tgbc_lblMedicamentos.gridy = 1;\n\t\tpanel_1.add(lblMedicamentos, gbc_lblMedicamentos);\n\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tGridBagConstraints gbc_scrollPane = new GridBagConstraints();\n\t\tgbc_scrollPane.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_scrollPane.gridwidth = 2;\n\t\tgbc_scrollPane.fill = GridBagConstraints.BOTH;\n\t\tgbc_scrollPane.gridx = 1;\n\t\tgbc_scrollPane.gridy = 1;\n\t\tpanel_1.add(scrollPane, gbc_scrollPane);\n\n\t\ttextPane = new JTextPane();\n\t\tscrollPane.setViewportView(textPane);\n\n\t\tJButton btnChequearInteracciones = new JButton(\"Chequear Interacciones\");\n\t\tGridBagConstraints gbc_btnChequearInteracciones = new GridBagConstraints();\n\t\tgbc_btnChequearInteracciones.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnChequearInteracciones.gridx = 1;\n\t\tgbc_btnChequearInteracciones.gridy = 2;\n\t\tpanel_1.add(btnChequearInteracciones, gbc_btnChequearInteracciones);\n\n\t\tJPanel panel_3 = new JPanel();\n\t\ttabbedPane.addTab(\"4.Contrasena\", null, panel_3, null);\n\t\tGridBagLayout gbl_panel_3 = new GridBagLayout();\n\t\tgbl_panel_3.columnWidths = new int[]{0, 52, 0, 0, 0};\n\t\tgbl_panel_3.rowHeights = new int[]{24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tgbl_panel_3.columnWeights = new double[]{0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tpanel_3.setLayout(gbl_panel_3);\n\n\t\tJLabel lblPuerto = new JLabel(\"Usuario\");\n\t\tlblPuerto.setToolTipText(\"\");\n\t\tGridBagConstraints gbc_lblPuerto = new GridBagConstraints();\n\t\tgbc_lblPuerto.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblPuerto.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblPuerto.gridx = 1;\n\t\tgbc_lblPuerto.gridy = 1;\n\t\tpanel_3.add(lblPuerto, gbc_lblPuerto);\n\n\t\ttxt_userBD = new JTextField();\n\t\ttxt_userBD.setText(getEnvirometValue(UI.USUARIO));\n\t\tGridBagConstraints gbc_txt_user = new GridBagConstraints();\n\t\tgbc_txt_user.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txt_user.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txt_user.gridx = 2;\n\t\tgbc_txt_user.gridy = 1;\n\t\tpanel_3.add(txt_userBD, gbc_txt_user);\n\t\ttxt_userBD.setColumns(10);\n\n\t\tJLabel lblPassword = new JLabel(\"Password\");\n\t\tGridBagConstraints gbc_lblPassword = new GridBagConstraints();\n\t\tgbc_lblPassword.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblPassword.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblPassword.gridx = 1;\n\t\tgbc_lblPassword.gridy = 2;\n\t\tpanel_3.add(lblPassword, gbc_lblPassword);\n\n\t\ttxt_passwordBD = new JTextField();\n\t\ttxt_passwordBD.setText(getEnvirometValue(UI.PASSWORD));\n\t\tGridBagConstraints gbc_txt_password = new GridBagConstraints();\n\t\tgbc_txt_password.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txt_password.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txt_password.gridx = 2;\n\t\tgbc_txt_password.gridy = 2;\n\t\tpanel_3.add(txt_passwordBD, gbc_txt_password);\n\t\ttxt_passwordBD.setColumns(10);\n\n\t\tJLabel lblEsquema = new JLabel(\"Esquema\");\n\t\tGridBagConstraints gbc_lblEsquema = new GridBagConstraints();\n\t\tgbc_lblEsquema.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblEsquema.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblEsquema.gridx = 1;\n\t\tgbc_lblEsquema.gridy = 3;\n\t\tpanel_3.add(lblEsquema, gbc_lblEsquema);\n\n\t\ttxt_esquema = new JTextField();\n\t\ttxt_esquema.setText(getEnvirometValue(UI.ESQUEMA));\n\t\tGridBagConstraints gbc_txt_esquema = new GridBagConstraints();\n\t\tgbc_txt_esquema.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txt_esquema.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txt_esquema.gridx = 2;\n\t\tgbc_txt_esquema.gridy = 3;\n\t\tpanel_3.add(txt_esquema, gbc_txt_esquema);\n\t\ttxt_esquema.setColumns(10);\n\n\t\tJLabel lblCarpetaArchivosSnomed = new JLabel(\"Carpeta Archivos Snomed\");\n\t\tGridBagConstraints gbc_lblCarpetaArchivosSnomed = new GridBagConstraints();\n\t\tgbc_lblCarpetaArchivosSnomed.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblCarpetaArchivosSnomed.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblCarpetaArchivosSnomed.gridx = 1;\n\t\tgbc_lblCarpetaArchivosSnomed.gridy = 4;\n\t\tpanel_3.add(lblCarpetaArchivosSnomed, gbc_lblCarpetaArchivosSnomed);\n\n\t\ttxt_pathSnomed = new JTextField();\n\t\ttxt_pathSnomed.setText(getEnvirometValue(UI.CARPETA_SNOMED));\n\n\t\tGridBagConstraints gbc_txt_pathSnomed = new GridBagConstraints();\n\t\tgbc_txt_pathSnomed.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txt_pathSnomed.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txt_pathSnomed.gridx = 2;\n\t\tgbc_txt_pathSnomed.gridy = 4;\n\t\tpanel_3.add(txt_pathSnomed, gbc_txt_pathSnomed);\n\t\ttxt_pathSnomed.setColumns(10);\n\n\t\tJLabel lblCarpetaArchivoAnmat = new JLabel(\"Carpeta Archivo Anmat\");\n\t\tGridBagConstraints gbc_lblCarpetaArchivoAnmat = new GridBagConstraints();\n\t\tgbc_lblCarpetaArchivoAnmat.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblCarpetaArchivoAnmat.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblCarpetaArchivoAnmat.gridx = 1;\n\t\tgbc_lblCarpetaArchivoAnmat.gridy = 5;\n\t\tpanel_3.add(lblCarpetaArchivoAnmat, gbc_lblCarpetaArchivoAnmat);\n\n\t\ttxt_pathFiles = new JTextField();\n\t\ttxt_pathFiles.setText(getEnvirometValue(UI.CARPETA_FILES));\n\t\tGridBagConstraints gbc_txt_pathAnmat = new GridBagConstraints();\n\t\tgbc_txt_pathAnmat.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txt_pathAnmat.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txt_pathAnmat.gridx = 2;\n\t\tgbc_txt_pathAnmat.gridy = 5;\n\t\tpanel_3.add(txt_pathFiles, gbc_txt_pathAnmat);\n\t\ttxt_pathFiles.setColumns(10);\n\t\t\n\t\tJLabel lblIpSoapWebservice = new JLabel(\"IP SOAP WebService\");\n\t\t\n\t\tGridBagConstraints gbc_lblIpSoapWebservice = new GridBagConstraints();\n\t\tgbc_lblIpSoapWebservice.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblIpSoapWebservice.anchor = GridBagConstraints.EAST;\n\t\tgbc_lblIpSoapWebservice.gridx = 1;\n\t\tgbc_lblIpSoapWebservice.gridy = 6;\n\t\tpanel_3.add(lblIpSoapWebservice, gbc_lblIpSoapWebservice);\n\t\t\n\t\ttxt_ipSoapWebService = new JTextField();\n\t\ttxt_ipSoapWebService.setText(getEnvirometValue(UI.IP_WEB_SERVICE));\n\t\tGridBagConstraints gbc_txt_ipSoapWebService = new GridBagConstraints();\n\t\tgbc_txt_ipSoapWebService.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txt_ipSoapWebService.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txt_ipSoapWebService.gridx = 2;\n\t\tgbc_txt_ipSoapWebService.gridy = 6;\n\t\tpanel_3.add(txt_ipSoapWebService, gbc_txt_ipSoapWebService);\n\t\ttxt_ipSoapWebService.setColumns(10);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Funciones Adicionales\");\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\n\t\tgbc_lblNewLabel.gridwidth = 2;\n\t\tgbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblNewLabel.gridx = 1;\n\t\tgbc_lblNewLabel.gridy = 10;\n\t\tpanel_3.add(lblNewLabel, gbc_lblNewLabel);\n\n\t\ttxtCarpeta = new JTextField();\n\t\ttxtCarpeta.setText(\"C:\\\\Users\\\\ARGENTINA\\\\Google Drive\\\\PC\\\\Tesis\\\\SnomedCT_Release_INT_20140731\\\\\");\n\t\tGridBagConstraints gbc_txtCarpeta = new GridBagConstraints();\n\t\tgbc_txtCarpeta.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txtCarpeta.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txtCarpeta.gridx = 1;\n\t\tgbc_txtCarpeta.gridy = 11;\n\t\tpanel_3.add(txtCarpeta, gbc_txtCarpeta);\n\t\ttxtCarpeta.setColumns(10);\n\n\t\ttxtArchivo = new JTextField();\n\t\ttxtArchivo.setText(\"anmat.txt\");\n\t\tGridBagConstraints gbc_txtArchivo = new GridBagConstraints();\n\t\tgbc_txtArchivo.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_txtArchivo.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_txtArchivo.gridx = 2;\n\t\tgbc_txtArchivo.gridy = 11;\n\t\tpanel_3.add(txtArchivo, gbc_txtArchivo);\n\t\ttxtArchivo.setColumns(10);\n\n\t\tJButton btnNewButton_5 = new JButton(\"filtrar\");\n\t\tbtnNewButton_5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t\tList<String> lista = SimpleFile.readFile(txtCarpeta.getText(), txtArchivo.getText());\n\t\t\t\tHashSet<String> a = new HashSet<String>();\n\t\t\t\ta.addAll(lista);\n\t\t\t\tlista.clear();\n\t\t\t\tlista.addAll(a);\n\t\t\t\tCollections.sort(lista);\n\t\t\t\tSimpleFile.writeFile(txtCarpeta.getText(), txtArchivo.getText(), lista);\n\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_5 = new GridBagConstraints();\n\t\tgbc_btnNewButton_5.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_5.gridwidth = 2;\n\t\tgbc_btnNewButton_5.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnNewButton_5.gridx = 1;\n\t\tgbc_btnNewButton_5.gridy = 12;\n\t\tpanel_3.add(btnNewButton_5, gbc_btnNewButton_5);\n\n\t\tJPanel panel_4 = new JPanel();\n\t\ttabbedPane.addTab(\"5. Buscar Interacciones\", null, panel_4, null);\n\t\tGridBagLayout gbl_panel_4 = new GridBagLayout();\n\t\tgbl_panel_4.columnWidths = new int[]{0, 0};\n\t\tgbl_panel_4.rowHeights = new int[]{0, 0};\n\t\tgbl_panel_4.columnWeights = new double[]{0.0, Double.MIN_VALUE};\n\t\tgbl_panel_4.rowWeights = new double[]{0.0, Double.MIN_VALUE};\n\t\tpanel_4.setLayout(gbl_panel_4);\n\n\t\tJButton btnRastrearInteracciones = new JButton(\"Rastrear Interacciones\");\n\t\n\t\tGridBagConstraints gbc_btnRastrearInteracciones = new GridBagConstraints();\n\t\tgbc_btnRastrearInteracciones.gridx = 0;\n\t\tgbc_btnRastrearInteracciones.gridy = 0;\n\t\tpanel_4.add(btnRastrearInteracciones, gbc_btnRastrearInteracciones);\n\t\t\n\t\tJPanel panel_5 = new JPanel();\n\t\ttabbedPane.addTab(\"Testing\", null, panel_5, null);\n\t\tGridBagLayout gbl_panel_5 = new GridBagLayout();\n\t\tgbl_panel_5.columnWidths = new int[]{0, 0, 0, 0};\n\t\tgbl_panel_5.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tgbl_panel_5.columnWeights = new double[]{1.0, 1.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_panel_5.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tpanel_5.setLayout(gbl_panel_5);\n\t\t\n\t\tfinal JComboBox<Test> comboBoxTextFiles = new JComboBox<Test>();\n\t\tGridBagConstraints gbc_comboBox = new GridBagConstraints();\n\t\tgbc_comboBox.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_comboBox.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_comboBox.gridx = 0;\n\t\tgbc_comboBox.gridy = 1;\n\t\tpanel_5.add(comboBoxTextFiles, gbc_comboBox);\n\t\t\n\t\tList<String> listFileTest = UI_Controller.loadTestFiles(getEnvirometValue(UI.CARPETA_FILES));\n\t\tfor (String string : listFileTest) {\n\t\t\tcomboBoxTextFiles.addItem(new Test(string));\n\t\t}\n\t\t\n\t\tJButton btnRunTest = new JButton(\"Run Test !\");\n\n\t\t\n\t\tfinal JLabel lblResultText = new JLabel(\"\");\n\t\tlblResultText.setOpaque(true);\n\t\tlblResultText.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\tGridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();\n\t\tgbc_lblNewLabel_1.fill = GridBagConstraints.BOTH;\n\t\tgbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblNewLabel_1.gridx = 1;\n\t\tgbc_lblNewLabel_1.gridy = 1;\n\t\tpanel_5.add(lblResultText, gbc_lblNewLabel_1);\n\t\tGridBagConstraints gbc_btnRunTest = new GridBagConstraints();\n\t\tgbc_btnRunTest.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnRunTest.gridx = 2;\n\t\tgbc_btnRunTest.gridy = 1;\n\t\tpanel_5.add(btnRunTest, gbc_btnRunTest);\n\t\t\n\t\ttextField = new JTextField();\n\t\tGridBagConstraints gbc_textField = new GridBagConstraints();\n\t\tgbc_textField.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_textField.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_textField.gridx = 0;\n\t\tgbc_textField.gridy = 2;\n\t\tpanel_5.add(textField, gbc_textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\tGridBagConstraints gbc_textField_1 = new GridBagConstraints();\n\t\tgbc_textField_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_textField_1.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_textField_1.gridx = 1;\n\t\tgbc_textField_1.gridy = 2;\n\t\tpanel_5.add(textField_1, gbc_textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tfinal JButton btnInstanciarcasostesting = new JButton(\"InstanciarCasosTesting\");\n\t\tbtnInstanciarcasostesting.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btnInstanciarcasostesting, \"instanciarTablasCasoTesting\",false);\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnInstanciarcasostesting = new GridBagConstraints();\n\t\tgbc_btnInstanciarcasostesting.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnInstanciarcasostesting.gridwidth = 3;\n\t\tgbc_btnInstanciarcasostesting.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnInstanciarcasostesting.gridx = 0;\n\t\tgbc_btnInstanciarcasostesting.gridy = 4;\n\t\tpanel_5.add(btnInstanciarcasostesting, gbc_btnInstanciarcasostesting);\n\t\t\n\t\tfinal JButton btnTestingDosis = new JButton(\"Testing Dosis\");\n\t\tbtnTestingDosis.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btnTestingDosis, \"runCasoTestingDosis\",false);\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnTestingDosis = new GridBagConstraints();\n\t\tgbc_btnTestingDosis.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnTestingDosis.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnTestingDosis.gridwidth = 3;\n\t\tgbc_btnTestingDosis.gridx = 0;\n\t\tgbc_btnTestingDosis.gridy = 5;\n\t\tpanel_5.add(btnTestingDosis, gbc_btnTestingDosis);\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"Testing Med\");\n\t\tbtnNewButton_3.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tdoActionController(btnTestingDosis, \"runCasoTestingMed\",false);\n\t\t\t}\n\t\t});\n\t\tGridBagConstraints gbc_btnNewButton_63 = new GridBagConstraints();\n\t\tgbc_btnNewButton_63.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_btnNewButton_63.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_63.gridwidth = 3;\n\t\tgbc_btnNewButton_63.gridx = 0;\n\t\tgbc_btnNewButton_63.gridy = 6;\n\t\tpanel_5.add(btnNewButton_3, gbc_btnNewButton_63);\n\t\t\n\t\tJButton btnNewButton_7 = new JButton(\"Test Masivo\");\n\t\tbtnNewButton_7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcontroller.runCasoTestingMedFragmento();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_7.setToolTipText(\"Se ejecuta un test con 1000 consultas\");\n\t\tGridBagConstraints gbc_btnNewButton_7 = new GridBagConstraints();\n\t\tgbc_btnNewButton_7.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_btnNewButton_7.gridwidth = 3;\n\t\tgbc_btnNewButton_7.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnNewButton_7.gridx = 0;\n\t\tgbc_btnNewButton_7.gridy = 7;\n\t\tpanel_5.add(btnNewButton_7, gbc_btnNewButton_7);\n\n\n\n\t\tGridBagConstraints gbc_chckbxNewCheckBox = new GridBagConstraints();\n\t\tgbc_chckbxNewCheckBox.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_chckbxNewCheckBox.gridx = 0;\n\t\tgbc_chckbxNewCheckBox.gridy = 4;\n\n\t\tList<String> lista_med = managerDB.executeScript_Query(\"SELECT concat(man.id_manfar,\\\" - \\\" ,upper(man.nombre)) as nombre FROM \"+txt_esquema.getText()+\".medicamentos_manfar as man group by man.id_manfar;\", \"nombre\");\n\n\t\tif (lista_med!=null)\n\t\t\tfor (String string : lista_med) {\n\t\t\t\tlista_todos_medicamentos.addItem(string);\n\t\t\t}\n\n\n\n\t\tbtnRunTest.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif(((Test)comboBoxTextFiles.getSelectedItem()).runTest()){\n\t\t\t\t\t\tlblResultText.setBackground(Color.GREEN);\n\t\t\t\t\t\tlblResultText.setText(\"Successful\");\n\t\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tlblResultText.setBackground(Color.RED);\n\t\t\t\t\t\tlblResultText.setText(\"Fail\");\n\t\t\t\t\t\t}\n\t\t\t\t} catch (SOAPException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException 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}\n\t\t});\n\n\n\n\t}", "private void initialize(ReadYaml quiz) {\r\n\t\tString title = \"Score: \" + TestGui.SCORE + \"/\" + TestGui.ATTEMPTS + \" - \" + quiz.getTitle();\r\n\t\tfrmMultipleChoiceQuestion = new JDialog(null, title, Dialog.ModalityType.APPLICATION_MODAL);\r\n\t\tfrmMultipleChoiceQuestion.setLocationRelativeTo(null);\r\n\t\tfrmMultipleChoiceQuestion.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\r\n\t\tGridBagLayout gridBagLayout = new GridBagLayout();\r\n\t\tfrmMultipleChoiceQuestion.getContentPane().setLayout(gridBagLayout);\r\n\r\n\t\t// This is the question\r\n\t\tString question = \"<html>\"+quiz.getQuestion().replaceAll(\"(\\r\\n|\\n)\", \"<br />\")+\"</html>\";\r\n\t\tJLabel label = new JLabel(question);\r\n\t\tGridBagConstraints gbc_label = new GridBagConstraints();\r\n\t\tgbc_label.gridx = 0;\r\n\t\tgbc_label.gridy = 0;\r\n\t\tfrmMultipleChoiceQuestion.getContentPane().add(label, gbc_label);\r\n\r\n\t\t// These are the answers\r\n\t\tint i=0;\r\n\t\tfor (String s : quiz.getAnswers()) {\r\n\t\t\trdbtnAnswers.add(new JRadioButton(s));\r\n\t\t\trdbtnAnswers.get(i).setActionCommand(String.valueOf(i));\r\n\t\t\tbuttonGroup.add(rdbtnAnswers.get(i));\r\n\t\t\tgbc_rdbtnAnswers.add(new GridBagConstraints());\r\n\t\t\tgbc_rdbtnAnswers.get(i).anchor = GridBagConstraints.WEST;\r\n\t\t\tgbc_rdbtnAnswers.get(i).gridx = 0;\r\n\t\t\tgbc_rdbtnAnswers.get(i).gridy = i+1;\r\n\t\t\tfrmMultipleChoiceQuestion.getContentPane().add(rdbtnAnswers.get(i), gbc_rdbtnAnswers.get(i));\r\n\t\t\ti++;\r\n\t\t}\r\n\t\ti++;\r\n\t\t// Confirm button\r\n\t\tJButton btnConfirm = new JButton(\"Confirm\");\r\n\t\tbtnConfirm.addActionListener(new Confirm());\r\n\t\tGridBagConstraints gbc_btnConfirm = new GridBagConstraints();\r\n\t\tgbc_btnConfirm.gridx = 0;\r\n\t\tgbc_btnConfirm.gridy = i;\r\n\t\tfrmMultipleChoiceQuestion.getContentPane().add(btnConfirm, gbc_btnConfirm);\r\n\r\n\t\t// Hint button, will only be displayed if there is a hint\r\n\t\tif (quiz.getHintText() != null || quiz.getHintImage() != null) {\r\n\t\t\tJButton btnHint = new JButton(\"Hint\");\r\n\t\t\tbtnHint.addActionListener(new Hint(quiz));\r\n\t\t\tGridBagConstraints gbc_btnHint = new GridBagConstraints();\r\n\t\t\tgbc_btnHint.gridx = 1;\r\n\t\t\tgbc_btnHint.gridy = i;\r\n\t\t\tfrmMultipleChoiceQuestion.getContentPane().add(btnHint, gbc_btnHint);\r\n\t\t}\r\n\t\t// Citation button\r\n\t\tif (quiz.getAuthor() != null && quiz.getUrl() != null) {\r\n\t\t\tbtnCitation = new JButton(\"Citation\");\r\n\t\t\tbtnCitation.addActionListener(new Citation(quiz));\r\n\t\t\tGridBagConstraints gbc_btnCitation = new GridBagConstraints();\r\n\t\t\tgbc_btnCitation.gridx = 2;\r\n\t\t\tgbc_btnCitation.gridy = i;\r\n\t\t\tfrmMultipleChoiceQuestion.getContentPane().add(btnCitation, gbc_btnCitation);\r\n\t\t}\r\n\t}", "private void buildUI()\n {\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridy = 0;\n\n // Adds the title to the panel, changes the font, and centers it\n c.gridwidth = 2;\n Font displayFont = new Font(\"Serif\", Font.BOLD, 18);\n JLabel cardTitle = new JLabel(\"Transition Options\");\n cardTitle.setFont(displayFont);\n cardTitle.setHorizontalAlignment(JLabel.CENTER);\n add(cardTitle, c);\n\n // Adds a separator between the title and the rules text field\n c.gridy++;\n JSeparator separator = new JSeparator();\n separator.setPreferredSize(new Dimension(0, 15));\n add(separator, c);\n\n // Adds a label for the rules field\n c.gridy++;\n c.gridwidth = 1;\n JLabel rulesLabel = new JLabel(\"Rules:\");\n add(rulesLabel, c);\n\n // Sets the insets to 3 on every side\n c.insets = new Insets(3, 3, 3, 3);\n\n // Creates the rules text field of size 100, sets the action command\n // to enter\n c.gridy++;\n c.ipadx = 100;\n ruleTextField = new JTextField();\n ruleTextField.setActionCommand(\"enter\");\n ruleTextField.addActionListener(this);\n add(ruleTextField, c);\n\n // Creates an enter button, resets padding to 0\n c.gridx = 1;\n c.ipadx = 0;\n enterButton = new JButton(\"Enter\");\n enterButton.setActionCommand(\"enter\");\n enterButton.addActionListener(this);\n add(enterButton, c);\n\n // Creates a button that adds an epsilon transition to the rule text field\n c.gridy++;\n c.gridx = 0;\n c.gridwidth = 2;\n epsilonButton = new JButton(\"Add Epsilon Transition\");\n epsilonButton.setActionCommand(\"epsilon\");\n epsilonButton.addActionListener(this);\n add(epsilonButton, c);\n\n // Adds a separator between the rule text field items and the delete button\n c.gridy++;\n separator = new JSeparator();\n separator.setPreferredSize(new Dimension(0, 15));\n add(separator, c);\n\n // Creates a delete button\n c.gridy++;\n deleteButton = new JButton(\"Delete Transition\");\n deleteButton.setVerticalTextPosition(AbstractButton.BOTTOM);\n deleteButton.setHorizontalTextPosition(AbstractButton.CENTER);\n deleteButton.setActionCommand(\"delete\");\n deleteButton.addActionListener(this);\n add(deleteButton, c);\n\n // I hate Alby for making this work.\n // Pushes the panel to the top\n c.gridy++;\n c.weighty = 1;\n JLabel blank = new JLabel();\n add(blank, c);\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n title = new javax.swing.JLabel();\n titleValue = new javax.swing.JTextField();\n iconPreview48 = new ImagePreview(48,48);\n browse48 = new javax.swing.JButton();\n icon48 = new javax.swing.JLabel();\n icon16 = new javax.swing.JLabel();\n iconPreview16 = new ImagePreview(16,16);\n browse16 = new javax.swing.JButton();\n icon32 = new javax.swing.JLabel();\n iconPreview32 = new ImagePreview(32,32);\n browse32 = new javax.swing.JButton();\n lblSpacer = new javax.swing.JLabel();\n\n setLayout(new java.awt.GridBagLayout());\n\n title.setLabelFor(titleValue);\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"org/netbeans/modules/apisupport/project/ui/branding/Bundle\"); // NOI18N\n org.openide.awt.Mnemonics.setLocalizedText(title, bundle.getString(\"LBL_AppTitle\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0);\n add(title, gridBagConstraints);\n title.getAccessibleContext().setAccessibleDescription(bundle.getString(\"ACS_Title\")); // NOI18N\n\n titleValue.setColumns(20);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);\n add(titleValue, gridBagConstraints);\n\n iconPreview48.setLabelFor(iconPreview48);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 12);\n add(iconPreview48, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(browse48, bundle.getString(\"CTL_Browse\")); // NOI18N\n browse48.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browse48ActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);\n add(browse48, gridBagConstraints);\n browse48.getAccessibleContext().setAccessibleDescription(bundle.getString(\"ACS_Browse\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(icon48, bundle.getString(\"LBL_AppIcon48\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 0, 12);\n add(icon48, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(icon16, bundle.getString(\"LBL_AppIcon16\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(23, 10, 0, 12);\n add(icon16, gridBagConstraints);\n\n iconPreview16.setLabelFor(iconPreview48);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(23, 0, 0, 12);\n add(iconPreview16, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(browse16, bundle.getString(\"CTL_Browse\")); // NOI18N\n browse16.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browse16ActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(23, 0, 0, 0);\n add(browse16, gridBagConstraints);\n browse16.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(BasicBrandingPanel.class, \"ACS_Browse\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(icon32, bundle.getString(\"LBL_AppIcon32\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 0, 12);\n add(icon32, gridBagConstraints);\n\n iconPreview32.setLabelFor(iconPreview48);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 12);\n add(iconPreview32, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(browse32, bundle.getString(\"CTL_Browse\")); // NOI18N\n browse32.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browse32ActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);\n add(browse32, gridBagConstraints);\n browse32.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(BasicBrandingPanel.class, \"ACS_Browse\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 10);\n add(lblSpacer, gridBagConstraints);\n }", "void jbInit() throws Exception {\n this.getContentPane().setLayout(gridBagLayout1);\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n jLabel1.setText(\"key\");\n this.getContentPane().setBackground(Color.white);\n okButton.setBackground(Color.white);\n okButton.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n okButton.setText(\"ok\");\n okButton.addActionListener(\n new java.awt.event.ActionListener() {\n public void actionPerformed(ActionEvent e) {\n okButton_actionPerformed(e);\n }\n });\n cancelButton.setBackground(Color.white);\n cancelButton.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n cancelButton.setText(\"cancel\");\n cancelButton.addActionListener(\n new java.awt.event.ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelButton_actionPerformed(e);\n }\n });\n jLabel2.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n jLabel2.setText(\"value\");\n this.getContentPane().add(keyTextField, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0\n , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));\n this.getContentPane().add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0\n , GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));\n this.getContentPane().add(jLabel2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0\n , GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));\n this.getContentPane().add(cancelButton, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0\n , GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));\n this.getContentPane().add(valueTextField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0\n , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));\n this.getContentPane().add(okButton, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0\n , GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, -16, 0, 0), 0, 0));\n }", "void buildBasicGUI()\r\n\t{\r\n\t\tJLabel dateLabel;\r\n\t\tJLabel nameLabel;\r\n\t\tJLabel codeLabel;\r\n\t\tJLabel inMileLabel;\r\n\t\tJLabel retMileLabel;\r\n\t\tJLabel billRateLabel;\r\n\t\tJLabel comLabel;\r\n\r\n\t\tdateLabel = new JLabel(\"Date (MM-dd-yyyy)\");\r\n\t\tnameLabel = new JLabel(\"Patient Name\");\r\n\t\tcodeLabel = new JLabel(\"Service Code\");\r\n\t\tinMileLabel = new JLabel(\"Initial Miles\");\r\n\t\tretMileLabel = new JLabel(\"Return Miles\");\r\n\t\tbillRateLabel = new JLabel(\"Bill Rate\");\r\n\t\tcomLabel = new JLabel(\"Comment\");\r\n\r\n\t\tdateOfTripTF = new JTextField(\"\");\r\n\t\tpatientNameTF = new JTextField(\"\");\r\n\t\tinitialMileTF = new JTextField(\"\");\r\n\t\tretMileTF = new JTextField(\"\");\r\n\t\tbillRateTF = new JTextField(\"\");\r\n\t\tcommentTF = new JTextField(\"\");\r\n\r\n\t\tString[] array = new String[]{\"A0428 Non-emergency transport\",\r\n\t\t\t\t\t\t\t\t\t\t\"A0429 Emergency transport\",\r\n\t\t\t\t\t\t\t\t\t\t\"A0427 Advanced life support\",\r\n\t\t\t\t\t\t\t\t\t\t\"A0434 Specialty care transport\"};\r\n\r\n\t\tservCodeList = new JComboBox(array);\r\n\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGroupLayout layout = new GroupLayout(panel);\r\n\t\tpanel.setLayout(layout);\r\n\r\n\t\tlayout.setAutoCreateGaps(true);\r\n\r\n\t\tlayout.setAutoCreateContainerGaps(true);\r\n\r\n\t\tGroupLayout.SequentialGroup hGroup = layout.createSequentialGroup();\r\n\r\n\t\thGroup.addGroup(layout.createParallelGroup().addComponent(dateLabel).\r\n\t\t\t\taddComponent(nameLabel).addComponent(codeLabel).\r\n\t\t\t\taddComponent(inMileLabel).addComponent(retMileLabel).\r\n\t\t\t\taddComponent(billRateLabel).addComponent(comLabel));\r\n\r\n\t\thGroup.addGroup(layout.createParallelGroup().addComponent(dateOfTripTF).\r\n\t\t\t\taddComponent(patientNameTF).addComponent(servCodeList).\r\n\t\t\t\taddComponent(initialMileTF).addComponent(retMileTF).addComponent(billRateTF).\r\n\t\t\t\taddComponent(commentTF));\r\n\r\n\t\tlayout.setHorizontalGroup(hGroup);\r\n\r\n\t\tGroupLayout.SequentialGroup vGroup = layout.createSequentialGroup();\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(dateLabel).addComponent(dateOfTripTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(nameLabel).addComponent(patientNameTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(codeLabel).addComponent(servCodeList));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(inMileLabel).addComponent(initialMileTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(retMileLabel).addComponent(retMileTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(billRateLabel).addComponent(billRateTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(comLabel).addComponent(commentTF));\r\n\r\n\t\tlayout.setVerticalGroup(vGroup);\r\n\r\n\t\tadd(panel, BorderLayout.CENTER);\r\n\r\n\t\t//setupDialog();\r\n\t}", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n buttonGroup3 = new javax.swing.ButtonGroup();\n buttonGroup4 = new javax.swing.ButtonGroup();\n buttonGroup5 = new javax.swing.ButtonGroup();\n buttonGroup6 = new javax.swing.ButtonGroup();\n buttonGroupNeuro_ata = new javax.swing.ButtonGroup();\n buttonGroupNeuro_ftn = new javax.swing.ButtonGroup();\n buttonGroupNeuro_cn = new javax.swing.ButtonGroup();\n buttonGroupLung_caus = new javax.swing.ButtonGroup();\n ga_pale = new javax.swing.ButtonGroup();\n ga_juandice = new javax.swing.ButtonGroup();\n buttonGroupEye_pter = new javax.swing.ButtonGroup();\n buttonGroupEye_inj = new javax.swing.ButtonGroup();\n buttonGroupEye_opa = new javax.swing.ButtonGroup();\n buttonGroupEye_her = new javax.swing.ButtonGroup();\n buttonGroupMur_type = new javax.swing.ButtonGroup();\n buttonGroupLung_whee = new javax.swing.ButtonGroup();\n buttonGroupLung_rhon = new javax.swing.ButtonGroup();\n buttonGroupLung_fine = new javax.swing.ButtonGroup();\n buttonGroupLung_coar = new javax.swing.ButtonGroup();\n buttonGroupMurmur = new javax.swing.ButtonGroup();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel33 = new javax.swing.JPanel();\n jPanel4 = new javax.swing.JPanel();\n jCheckBoxHeart_requ = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeart_gall = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeart_irre = new com.hosv3.gui.component.HCheckBox();\n jPanel14 = new javax.swing.JPanel();\n jRadioButtonHeart_mur_syst = new javax.swing.JRadioButton();\n jRadioButtonHeart_mur_dias = new javax.swing.JRadioButton();\n jPanel11 = new javax.swing.JPanel();\n jLabel13 = new javax.swing.JLabel();\n jComboBoxHeart_dias_grad = new javax.swing.JComboBox();\n jLabel12 = new javax.swing.JLabel();\n jComboBoxHeart_dias_area = new javax.swing.JComboBox();\n jPanel47 = new javax.swing.JPanel();\n jLabel25 = new javax.swing.JLabel();\n jComboBoxHeart_sys_grad = new javax.swing.JComboBox();\n jLabel26 = new javax.swing.JLabel();\n jComboBoxHeart_sys_area = new javax.swing.JComboBox();\n jCheckBoxHeart_murm = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeart_no_murm = new com.hosv3.gui.component.HCheckBox();\n jLabel16 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jCheckBox_ga_no_jaun = new com.hosv3.gui.component.HCheckBox();\n jPanel22 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jComboBox_ga_gcs_m = new javax.swing.JComboBox();\n jLabel11 = new javax.swing.JLabel();\n jComboBox_ga_gcs_e = new javax.swing.JComboBox();\n jLabel10 = new javax.swing.JLabel();\n jComboBox_ga_gcs_v = new javax.swing.JComboBox();\n jCheckBox_ga_gcs = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_not_pale = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_feb = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_dys = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_tach = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_look = new com.hosv3.gui.component.HCheckBox();\n jPanel24 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTextArea_ga_other = new javax.swing.JTextArea();\n jPanel41 = new javax.swing.JPanel();\n jCheckBox_ga_dehy_ser = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_dehy_mod = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_dehy_mild = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_dehy_no = new com.hosv3.gui.component.HCheckBox();\n jLabel22 = new javax.swing.JLabel();\n jPanel46 = new javax.swing.JPanel();\n jCheckBox_ga_normal = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_jaun = new com.hosv3.gui.component.HCheckBox();\n jCheckBox_ga_pale = new com.hosv3.gui.component.HCheckBox();\n jPanel2 = new javax.swing.JPanel();\n jPanel9 = new javax.swing.JPanel();\n jPanel23 = new javax.swing.JPanel();\n jCheckBoxHeent_eye_p = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_eye_o = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_eye_i = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_eye_h = new com.hosv3.gui.component.HCheckBox();\n jRadioButtonHeent_eye_p_l = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_i_r = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_h_b = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_i_l = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_p_r = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_o_b = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_o_l = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_o_r = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_i_b = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_h_l = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_h_r = new javax.swing.JRadioButton();\n jRadioButtonHeent_eye_p_b = new javax.swing.JRadioButton();\n jLabel39 = new javax.swing.JLabel();\n jPanel26 = new javax.swing.JPanel();\n jCheckBoxHeent_ton_ex = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_ton_en = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_ton_nor = new com.hosv3.gui.component.HCheckBox();\n jLabel15 = new javax.swing.JLabel();\n jTextFieldTonsils_others = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n jPanel29 = new javax.swing.JPanel();\n jCheckBoxHeent_thyr_e = new com.hosv3.gui.component.HCheckBox();\n jTextFieldThyroids_others = new javax.swing.JTextField();\n jCheckBoxHeent_thyr_nor = new com.hosv3.gui.component.HCheckBox();\n jLabel19 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n jPanel36 = new javax.swing.JPanel();\n jCheckBoxHeent_not_p = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_pale = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_inje_p = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_not_inj = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_no_ict = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_icte_s = new com.hosv3.gui.component.HCheckBox();\n jPanel35 = new javax.swing.JPanel();\n jCheckBoxHeent_cerv_n = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxHeent_cerv_p = new com.hosv3.gui.component.HCheckBox();\n jLabel17 = new javax.swing.JLabel();\n jCheckBoxHeent_normal = new com.hosv3.gui.component.HCheckBox();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jCheckBoxLung_clear = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxLung_rhon = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxLung_whee = new com.hosv3.gui.component.HCheckBox();\n jPanel25 = new javax.swing.JPanel();\n jRadioButtonLung_fine_b = new javax.swing.JRadioButton();\n jRadioButtonLung_fine_l = new javax.swing.JRadioButton();\n jRadioButtonLung_fine_r = new javax.swing.JRadioButton();\n jCheckBoxLung_fine = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxLung_coar = new com.hosv3.gui.component.HCheckBox();\n jRadioButtonLung_coar_l = new javax.swing.JRadioButton();\n jRadioButtonLung_coar_r = new javax.swing.JRadioButton();\n jRadioButtonLung_coar_b = new javax.swing.JRadioButton();\n jLabel40 = new javax.swing.JLabel();\n jTextFieldLung_others = new javax.swing.JTextField();\n jLabel29 = new javax.swing.JLabel();\n jRadioButtonLung_whee_l = new javax.swing.JRadioButton();\n jRadioButtonLung_whee_r = new javax.swing.JRadioButton();\n jRadioButtonLung_whee_b = new javax.swing.JRadioButton();\n jRadioButtonLung_rhon_l = new javax.swing.JRadioButton();\n jRadioButtonLung_rhon_r = new javax.swing.JRadioButton();\n jRadioButtonLung_rhon_b = new javax.swing.JRadioButton();\n jLabel6 = new javax.swing.JLabel();\n jPanel13 = new javax.swing.JPanel();\n jButtonSave1 = new javax.swing.JButton();\n jButtonCancel1 = new javax.swing.JButton();\n jPanel34 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jPanel15 = new javax.swing.JPanel();\n jCheckBoxAbdomen_bowe_inc = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_bowe_dec = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_bowe_nor = new com.hosv3.gui.component.HCheckBox();\n jLabel23 = new javax.swing.JLabel();\n jPanel30 = new javax.swing.JPanel();\n jCheckBoxAbdomen_nor = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_sca = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_dis = new com.hosv3.gui.component.HCheckBox();\n jLabel24 = new javax.swing.JLabel();\n jPanel38 = new javax.swing.JPanel();\n jTextFieldAbdomen_pal_dec = new javax.swing.JTextField();\n jLabel21 = new javax.swing.JLabel();\n jPanel40 = new javax.swing.JPanel();\n jCheckBoxAbdomen_rig = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_soft = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_gua = new com.hosv3.gui.component.HCheckBox();\n jPanel42 = new javax.swing.JPanel();\n jCheckBoxAbdomen_ten = new com.hosv3.gui.component.HCheckBox();\n jTextFieldAbdomen_tend_dec = new javax.swing.JTextField();\n jLabel32 = new javax.swing.JLabel();\n jPanel39 = new javax.swing.JPanel();\n jCheckBoxAbdomen_dark = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_clear = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxAbdomen_regu = new com.hosv3.gui.component.HCheckBox();\n jLabel20 = new javax.swing.JLabel();\n jPanel6 = new javax.swing.JPanel();\n jCheckBoxExtreme_norm = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxExtreme_pitt = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxExtreme_non_p = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxExtreme_ten = new com.hosv3.gui.component.HCheckBox();\n jTextFieldExtreme_ten_dec = new javax.swing.JTextField();\n jPanel44 = new javax.swing.JPanel();\n jTextFieldExtremity_oth = new javax.swing.JTextField();\n jLabel30 = new javax.swing.JLabel();\n jPanel10 = new javax.swing.JPanel();\n jPanel21 = new javax.swing.JPanel();\n jCheckBoxNeuro_refl_l = new com.hosv3.gui.component.HCheckBox();\n jComboBoxNeuro_refl_l = new javax.swing.JComboBox();\n jComboBoxNeuro_refl_r = new javax.swing.JComboBox();\n jCheckBoxNeuro_refl_r = new com.hosv3.gui.component.HCheckBox();\n jLabel38 = new javax.swing.JLabel();\n jPanel32 = new javax.swing.JPanel();\n jPanel31 = new javax.swing.JPanel();\n jPanel16 = new javax.swing.JPanel();\n jComboBoxNeuro_cn = new javax.swing.JComboBox();\n jRadioButtonNeuro_cn_abno = new javax.swing.JRadioButton();\n jRadioButtonNeuro_cn_inta = new javax.swing.JRadioButton();\n jCheckBoxNeuro_cn = new com.hosv3.gui.component.HCheckBox();\n jPanel18 = new javax.swing.JPanel();\n jPanel19 = new javax.swing.JPanel();\n jCheckBoxNeuro_up_l = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxNeuro_up_r = new com.hosv3.gui.component.HCheckBox();\n jComboBoxNeuro_grad_u_r = new javax.swing.JComboBox();\n jComboBoxNeuro_grad_u_l = new javax.swing.JComboBox();\n jLabel35 = new javax.swing.JLabel();\n jPanel20 = new javax.swing.JPanel();\n jCheckBoxNeuro_low_l = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxNeuro_low_r = new com.hosv3.gui.component.HCheckBox();\n jComboBoxNeuro_grad_l_l = new javax.swing.JComboBox();\n jComboBoxNeuro_grad_l_r = new javax.swing.JComboBox();\n jLabel36 = new javax.swing.JLabel();\n jLabel34 = new javax.swing.JLabel();\n jCheckBoxNeuro_gros = new com.hosv3.gui.component.HCheckBox();\n jPanel12 = new javax.swing.JPanel();\n jCheckBoxNeuro_atax = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxNeuro_ftn = new com.hosv3.gui.component.HCheckBox();\n jRadioButtonNeuro_cn_inta2 = new javax.swing.JRadioButton();\n jRadioButtonNeuro_cn_imp2 = new javax.swing.JRadioButton();\n jRadioButtonNeuro_cn_inta1 = new javax.swing.JRadioButton();\n jRadioButtonNeuro_cn_imp1 = new javax.swing.JRadioButton();\n jLabel37 = new javax.swing.JLabel();\n jPanel45 = new javax.swing.JPanel();\n jTextFieldNeuro_oth = new javax.swing.JTextField();\n jLabel33 = new javax.swing.JLabel();\n jPanel7 = new javax.swing.JPanel();\n jCheckBoxSkin_nor = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxSkin_bull = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxSkin_tine = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxSkin_exfo = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxSkin_puts = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxSkin_scal = new com.hosv3.gui.component.HCheckBox();\n jCheckBoxSkin_ecze = new com.hosv3.gui.component.HCheckBox();\n jPanel43 = new javax.swing.JPanel();\n jTextFieldSkin_oth = new javax.swing.JTextField();\n jLabel31 = new javax.swing.JLabel();\n jPanel17 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaOther = new javax.swing.JTextArea();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jPanel8 = new javax.swing.JPanel();\n jButtonSave = new javax.swing.JButton();\n jButtonCancel = new javax.swing.JButton();\n panelWound1 = new com.hosv3.gui.dialog.PanelWound();\n\n setLayout(new java.awt.GridBagLayout());\n\n jPanel33.setLayout(new java.awt.GridBagLayout());\n\n jPanel4.setLayout(new java.awt.GridBagLayout());\n\n jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxHeart_requ.setText(\"Regular\");\n jCheckBoxHeart_requ.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeart_requActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel4.add(jCheckBoxHeart_requ, gridBagConstraints);\n\n jCheckBoxHeart_gall.setText(\"Gallop\");\n jCheckBoxHeart_gall.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeart_gallActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel4.add(jCheckBoxHeart_gall, gridBagConstraints);\n\n jCheckBoxHeart_irre.setText(\"Irregular\");\n jCheckBoxHeart_irre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeart_irreActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel4.add(jCheckBoxHeart_irre, gridBagConstraints);\n\n jPanel14.setLayout(new java.awt.GridBagLayout());\n\n jPanel14.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n buttonGroupMur_type.add(jRadioButtonHeart_mur_syst);\n jRadioButtonHeart_mur_syst.setText(\"systolic\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 2, 5);\n jPanel14.add(jRadioButtonHeart_mur_syst, gridBagConstraints);\n\n buttonGroupMur_type.add(jRadioButtonHeart_mur_dias);\n jRadioButtonHeart_mur_dias.setText(\"diastolic\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 5);\n jPanel14.add(jRadioButtonHeart_mur_dias, gridBagConstraints);\n\n jPanel11.setLayout(new java.awt.GridBagLayout());\n\n jPanel11.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jLabel13.setText(\"Grade\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n jPanel11.add(jLabel13, gridBagConstraints);\n\n jComboBoxHeart_dias_grad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n jPanel11.add(jComboBoxHeart_dias_grad, gridBagConstraints);\n\n jLabel12.setText(\"Area\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 2, 5);\n jPanel11.add(jLabel12, gridBagConstraints);\n\n jComboBoxHeart_dias_area.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"MVA\", \"AVA\", \"PVA\", \"LLPB\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);\n jPanel11.add(jComboBoxHeart_dias_area, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel14.add(jPanel11, gridBagConstraints);\n\n jPanel47.setLayout(new java.awt.GridBagLayout());\n\n jPanel47.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jLabel25.setText(\"Grade\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n jPanel47.add(jLabel25, gridBagConstraints);\n\n jComboBoxHeart_sys_grad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n jPanel47.add(jComboBoxHeart_sys_grad, gridBagConstraints);\n\n jLabel26.setText(\"Area\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 2, 5);\n jPanel47.add(jLabel26, gridBagConstraints);\n\n jComboBoxHeart_sys_area.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"MVA\", \"AVA\", \"PVA\", \"LLPB\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);\n jPanel47.add(jComboBoxHeart_sys_area, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel14.add(jPanel47, gridBagConstraints);\n\n jCheckBoxHeart_murm.setText(\"murmur\");\n jCheckBoxHeart_murm.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeart_murmActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);\n jPanel14.add(jCheckBoxHeart_murm, gridBagConstraints);\n\n jCheckBoxHeart_no_murm.setText(\"no murmur\");\n jCheckBoxHeart_no_murm.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeart_no_murmActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);\n jPanel14.add(jCheckBoxHeart_no_murm, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel4.add(jPanel14, gridBagConstraints);\n\n jLabel16.setText(\"Beat\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel4.add(jLabel16, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 5);\n jPanel33.add(jPanel4, gridBagConstraints);\n\n jPanel1.setLayout(new java.awt.GridBagLayout());\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBox_ga_no_jaun.setText(\"no jaundice\");\n jCheckBox_ga_no_jaun.setActionCommand(\"Normal conrciouness\\n\");\n jCheckBox_ga_no_jaun.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_no_jaunActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_no_jaun, gridBagConstraints);\n\n jPanel22.setLayout(new java.awt.GridBagLayout());\n\n jLabel1.setText(\"E\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel22.add(jLabel1, gridBagConstraints);\n\n jComboBox_ga_gcs_m.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 5);\n jPanel22.add(jComboBox_ga_gcs_m, gridBagConstraints);\n\n jLabel11.setText(\"V\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel22.add(jLabel11, gridBagConstraints);\n\n jComboBox_ga_gcs_e.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 5);\n jPanel22.add(jComboBox_ga_gcs_e, gridBagConstraints);\n\n jLabel10.setText(\"M\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel22.add(jLabel10, gridBagConstraints);\n\n jComboBox_ga_gcs_v.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 6;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 5);\n jPanel22.add(jComboBox_ga_gcs_v, gridBagConstraints);\n\n jCheckBox_ga_gcs.setText(\"GCS\");\n jCheckBox_ga_gcs.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_gcsActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n jPanel22.add(jCheckBox_ga_gcs, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jPanel22, gridBagConstraints);\n\n jCheckBox_ga_not_pale.setText(\"not pale\");\n jCheckBox_ga_not_pale.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_not_paleActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_not_pale, gridBagConstraints);\n\n jCheckBox_ga_feb.setText(\"febrile\");\n jCheckBox_ga_feb.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_febActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_feb, gridBagConstraints);\n\n jCheckBox_ga_dys.setText(\"dyspnea\");\n jCheckBox_ga_dys.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_dysActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_dys, gridBagConstraints);\n\n jCheckBox_ga_tach.setText(\"tachypnea\");\n jCheckBox_ga_tach.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_tachActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_tach, gridBagConstraints);\n\n jCheckBox_ga_look.setText(\"look sick\");\n jCheckBox_ga_look.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_lookActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_look, gridBagConstraints);\n\n jPanel24.setLayout(new java.awt.GridBagLayout());\n\n jPanel24.setMinimumSize(new java.awt.Dimension(112, 24));\n jLabel2.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jPanel24.add(jLabel2, gridBagConstraints);\n\n jTextArea_ga_other.setPreferredSize(new java.awt.Dimension(0, 21));\n jScrollPane2.setViewportView(jTextArea_ga_other);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jPanel24.add(jScrollPane2, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n jPanel1.add(jPanel24, gridBagConstraints);\n\n jPanel41.setLayout(new java.awt.GridBagLayout());\n\n jPanel41.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBox_ga_dehy_ser.setText(\"severe\");\n jCheckBox_ga_dehy_ser.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_dehy_serActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jPanel41.add(jCheckBox_ga_dehy_ser, gridBagConstraints);\n\n jCheckBox_ga_dehy_mod.setText(\"moderate\");\n jCheckBox_ga_dehy_mod.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_dehy_modActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jPanel41.add(jCheckBox_ga_dehy_mod, gridBagConstraints);\n\n jCheckBox_ga_dehy_mild.setText(\"mild\");\n jCheckBox_ga_dehy_mild.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_dehy_mildActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jPanel41.add(jCheckBox_ga_dehy_mild, gridBagConstraints);\n\n jCheckBox_ga_dehy_no.setText(\"no \");\n jCheckBox_ga_dehy_no.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_dehy_noActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jPanel41.add(jCheckBox_ga_dehy_no, gridBagConstraints);\n\n jLabel22.setText(\"dehydration\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel41.add(jLabel22, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 0);\n jPanel1.add(jPanel41, gridBagConstraints);\n\n jPanel46.setLayout(new java.awt.GridBagLayout());\n\n jCheckBox_ga_normal.setText(\"normal\");\n jCheckBox_ga_normal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_normalActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel46.add(jCheckBox_ga_normal, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n jPanel1.add(jPanel46, gridBagConstraints);\n\n jCheckBox_ga_jaun.setText(\"jaundice\");\n jCheckBox_ga_jaun.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_jaunActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_jaun, gridBagConstraints);\n\n jCheckBox_ga_pale.setText(\"pale\");\n jCheckBox_ga_pale.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox_ga_paleActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel1.add(jCheckBox_ga_pale, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel33.add(jPanel1, gridBagConstraints);\n\n jPanel2.setLayout(new java.awt.GridBagLayout());\n\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel9.setLayout(new java.awt.GridBagLayout());\n\n jPanel23.setLayout(new java.awt.GridBagLayout());\n\n jPanel23.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxHeent_eye_p.setText(\"pterygium\");\n jCheckBoxHeent_eye_p.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_eye_pActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jCheckBoxHeent_eye_p, gridBagConstraints);\n\n jCheckBoxHeent_eye_o.setText(\"opaque len\");\n jCheckBoxHeent_eye_o.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_eye_oActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jCheckBoxHeent_eye_o, gridBagConstraints);\n\n jCheckBoxHeent_eye_i.setText(\"inject conjuctiva\");\n jCheckBoxHeent_eye_i.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_eye_iActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jCheckBoxHeent_eye_i, gridBagConstraints);\n\n jCheckBoxHeent_eye_h.setText(\"hordeolum\");\n jCheckBoxHeent_eye_h.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_eye_hActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel23.add(jCheckBoxHeent_eye_h, gridBagConstraints);\n\n buttonGroupEye_pter.add(jRadioButtonHeent_eye_p_l);\n jRadioButtonHeent_eye_p_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jRadioButtonHeent_eye_p_l, gridBagConstraints);\n\n buttonGroupEye_inj.add(jRadioButtonHeent_eye_i_r);\n jRadioButtonHeent_eye_i_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jRadioButtonHeent_eye_i_r, gridBagConstraints);\n\n buttonGroupEye_her.add(jRadioButtonHeent_eye_h_b);\n jRadioButtonHeent_eye_h_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3);\n jPanel23.add(jRadioButtonHeent_eye_h_b, gridBagConstraints);\n\n buttonGroupEye_inj.add(jRadioButtonHeent_eye_i_l);\n jRadioButtonHeent_eye_i_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jRadioButtonHeent_eye_i_l, gridBagConstraints);\n\n buttonGroupEye_pter.add(jRadioButtonHeent_eye_p_r);\n jRadioButtonHeent_eye_p_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jRadioButtonHeent_eye_p_r, gridBagConstraints);\n\n buttonGroupEye_opa.add(jRadioButtonHeent_eye_o_b);\n jRadioButtonHeent_eye_o_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 3);\n jPanel23.add(jRadioButtonHeent_eye_o_b, gridBagConstraints);\n\n buttonGroupEye_opa.add(jRadioButtonHeent_eye_o_l);\n jRadioButtonHeent_eye_o_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jRadioButtonHeent_eye_o_l, gridBagConstraints);\n\n buttonGroupEye_opa.add(jRadioButtonHeent_eye_o_r);\n jRadioButtonHeent_eye_o_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);\n jPanel23.add(jRadioButtonHeent_eye_o_r, gridBagConstraints);\n\n buttonGroupEye_inj.add(jRadioButtonHeent_eye_i_b);\n jRadioButtonHeent_eye_i_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 3);\n jPanel23.add(jRadioButtonHeent_eye_i_b, gridBagConstraints);\n\n buttonGroupEye_her.add(jRadioButtonHeent_eye_h_l);\n jRadioButtonHeent_eye_h_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel23.add(jRadioButtonHeent_eye_h_l, gridBagConstraints);\n\n buttonGroupEye_her.add(jRadioButtonHeent_eye_h_r);\n jRadioButtonHeent_eye_h_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel23.add(jRadioButtonHeent_eye_h_r, gridBagConstraints);\n\n buttonGroupEye_pter.add(jRadioButtonHeent_eye_p_b);\n jRadioButtonHeent_eye_p_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 3);\n jPanel23.add(jRadioButtonHeent_eye_p_b, gridBagConstraints);\n\n jLabel39.setText(\"eye\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 2, 10);\n jPanel23.add(jLabel39, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weighty = 1.0;\n jPanel9.add(jPanel23, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel2.add(jPanel9, gridBagConstraints);\n\n jPanel26.setLayout(new java.awt.GridBagLayout());\n\n jPanel26.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxHeent_ton_ex.setText(\"exudate\");\n jCheckBoxHeent_ton_ex.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_ton_exActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel26.add(jCheckBoxHeent_ton_ex, gridBagConstraints);\n\n jCheckBoxHeent_ton_en.setText(\"enlarged\");\n jCheckBoxHeent_ton_en.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_ton_enActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel26.add(jCheckBoxHeent_ton_en, gridBagConstraints);\n\n jCheckBoxHeent_ton_nor.setText(\"normal\");\n jCheckBoxHeent_ton_nor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_ton_norActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel26.add(jCheckBoxHeent_ton_nor, gridBagConstraints);\n\n jLabel15.setText(\"tonsils\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel26.add(jLabel15, gridBagConstraints);\n\n jTextFieldTonsils_others.setMinimumSize(new java.awt.Dimension(112, 24));\n jTextFieldTonsils_others.setPreferredSize(new java.awt.Dimension(112, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 9, 2, 5);\n jPanel26.add(jTextFieldTonsils_others, gridBagConstraints);\n\n jLabel27.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 2, 5);\n jPanel26.add(jLabel27, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n jPanel2.add(jPanel26, gridBagConstraints);\n\n jPanel29.setLayout(new java.awt.GridBagLayout());\n\n jPanel29.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxHeent_thyr_e.setText(\"enlarge\");\n jCheckBoxHeent_thyr_e.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_thyr_eActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 5);\n jPanel29.add(jCheckBoxHeent_thyr_e, gridBagConstraints);\n\n jTextFieldThyroids_others.setMinimumSize(new java.awt.Dimension(200, 24));\n jTextFieldThyroids_others.setPreferredSize(new java.awt.Dimension(200, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 2, 5);\n jPanel29.add(jTextFieldThyroids_others, gridBagConstraints);\n\n jCheckBoxHeent_thyr_nor.setText(\"normal\");\n jCheckBoxHeent_thyr_nor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_thyr_norActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel29.add(jCheckBoxHeent_thyr_nor, gridBagConstraints);\n\n jLabel19.setText(\"thyroids\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel29.add(jLabel19, gridBagConstraints);\n\n jLabel28.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 2, 5);\n jPanel29.add(jLabel28, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n jPanel2.add(jPanel29, gridBagConstraints);\n\n jPanel36.setLayout(new java.awt.GridBagLayout());\n\n jCheckBoxHeent_not_p.setText(\"not pale conjunctivae\");\n jCheckBoxHeent_not_p.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_not_pActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel36.add(jCheckBoxHeent_not_p, gridBagConstraints);\n\n jCheckBoxHeent_pale.setText(\"pale conjunctivae\");\n jCheckBoxHeent_pale.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_paleActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel36.add(jCheckBoxHeent_pale, gridBagConstraints);\n\n jCheckBoxHeent_inje_p.setText(\"injected pharynx\");\n jCheckBoxHeent_inje_p.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_inje_pActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel36.add(jCheckBoxHeent_inje_p, gridBagConstraints);\n\n jCheckBoxHeent_not_inj.setText(\"not injected pharynx\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel36.add(jCheckBoxHeent_not_inj, gridBagConstraints);\n\n jCheckBoxHeent_no_ict.setText(\"no icteric sclerae\");\n jCheckBoxHeent_no_ict.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_no_ictActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel36.add(jCheckBoxHeent_no_ict, gridBagConstraints);\n\n jCheckBoxHeent_icte_s.setText(\"icteric sclerae\");\n jCheckBoxHeent_icte_s.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_icte_sActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel36.add(jCheckBoxHeent_icte_s, gridBagConstraints);\n\n jPanel35.setLayout(new java.awt.GridBagLayout());\n\n jCheckBoxHeent_cerv_n.setText(\"palpable\");\n jCheckBoxHeent_cerv_n.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_cerv_nActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel35.add(jCheckBoxHeent_cerv_n, gridBagConstraints);\n\n jCheckBoxHeent_cerv_p.setText(\"normal\");\n jCheckBoxHeent_cerv_p.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_cerv_pActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel35.add(jCheckBoxHeent_cerv_p, gridBagConstraints);\n\n jLabel17.setText(\"cervical LN\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel35.add(jLabel17, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);\n jPanel36.add(jPanel35, gridBagConstraints);\n\n jCheckBoxHeent_normal.setText(\"normal\");\n jCheckBoxHeent_normal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxHeent_normalActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 0, 5);\n jPanel36.add(jCheckBoxHeent_normal, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n jPanel2.add(jPanel36, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel33.add(jPanel2, gridBagConstraints);\n\n jLabel3.setText(\"GA\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel33.add(jLabel3, gridBagConstraints);\n\n jLabel4.setText(\"HEENT\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel33.add(jLabel4, gridBagConstraints);\n\n jLabel5.setText(\"Heart\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel33.add(jLabel5, gridBagConstraints);\n\n jPanel3.setLayout(new java.awt.GridBagLayout());\n\n jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxLung_clear.setText(\"Clear\");\n jCheckBoxLung_clear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxLung_clearActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 0);\n jPanel3.add(jCheckBoxLung_clear, gridBagConstraints);\n\n jCheckBoxLung_rhon.setText(\"Rhonchi\");\n jCheckBoxLung_rhon.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxLung_rhonActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);\n jPanel3.add(jCheckBoxLung_rhon, gridBagConstraints);\n\n jCheckBoxLung_whee.setText(\"Wheezing\");\n jCheckBoxLung_whee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxLung_wheeActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);\n jPanel3.add(jCheckBoxLung_whee, gridBagConstraints);\n\n jPanel25.setLayout(new java.awt.GridBagLayout());\n\n jPanel25.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n buttonGroupLung_fine.add(jRadioButtonLung_fine_b);\n jRadioButtonLung_fine_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 0);\n jPanel25.add(jRadioButtonLung_fine_b, gridBagConstraints);\n\n buttonGroupLung_fine.add(jRadioButtonLung_fine_l);\n jRadioButtonLung_fine_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel25.add(jRadioButtonLung_fine_l, gridBagConstraints);\n\n buttonGroupLung_fine.add(jRadioButtonLung_fine_r);\n jRadioButtonLung_fine_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel25.add(jRadioButtonLung_fine_r, gridBagConstraints);\n\n jCheckBoxLung_fine.setText(\"fine\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel25.add(jCheckBoxLung_fine, gridBagConstraints);\n\n jCheckBoxLung_coar.setText(\"coarse\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel25.add(jCheckBoxLung_coar, gridBagConstraints);\n\n buttonGroupLung_coar.add(jRadioButtonLung_coar_l);\n jRadioButtonLung_coar_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel25.add(jRadioButtonLung_coar_l, gridBagConstraints);\n\n buttonGroupLung_coar.add(jRadioButtonLung_coar_r);\n jRadioButtonLung_coar_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel25.add(jRadioButtonLung_coar_r, gridBagConstraints);\n\n buttonGroupLung_coar.add(jRadioButtonLung_coar_b);\n jRadioButtonLung_coar_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 0);\n jPanel25.add(jRadioButtonLung_coar_b, gridBagConstraints);\n\n jLabel40.setText(\"Crepitation\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 10);\n jPanel25.add(jLabel40, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 5;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel3.add(jPanel25, gridBagConstraints);\n\n jTextFieldLung_others.setMinimumSize(new java.awt.Dimension(150, 24));\n jTextFieldLung_others.setPreferredSize(new java.awt.Dimension(150, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = 4;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 1);\n jPanel3.add(jTextFieldLung_others, gridBagConstraints);\n\n jLabel29.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel3.add(jLabel29, gridBagConstraints);\n\n buttonGroupLung_whee.add(jRadioButtonLung_whee_l);\n jRadioButtonLung_whee_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n jPanel3.add(jRadioButtonLung_whee_l, gridBagConstraints);\n\n buttonGroupLung_whee.add(jRadioButtonLung_whee_r);\n jRadioButtonLung_whee_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n jPanel3.add(jRadioButtonLung_whee_r, gridBagConstraints);\n\n buttonGroupLung_whee.add(jRadioButtonLung_whee_b);\n jRadioButtonLung_whee_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3);\n jPanel3.add(jRadioButtonLung_whee_b, gridBagConstraints);\n\n buttonGroupLung_rhon.add(jRadioButtonLung_rhon_l);\n jRadioButtonLung_rhon_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n jPanel3.add(jRadioButtonLung_rhon_l, gridBagConstraints);\n\n buttonGroupLung_rhon.add(jRadioButtonLung_rhon_r);\n jRadioButtonLung_rhon_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n jPanel3.add(jRadioButtonLung_rhon_r, gridBagConstraints);\n\n buttonGroupLung_rhon.add(jRadioButtonLung_rhon_b);\n jRadioButtonLung_rhon_b.setText(\"both\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3);\n jPanel3.add(jRadioButtonLung_rhon_b, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel33.add(jPanel3, gridBagConstraints);\n\n jLabel6.setText(\"Lung\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel33.add(jLabel6, gridBagConstraints);\n\n jPanel13.setLayout(new java.awt.GridBagLayout());\n\n jButtonSave1.setText(\"\\u0e1a\\u0e31\\u0e19\\u0e17\\u0e36\\u0e01\");\n jButtonSave1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSave1ActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n jPanel13.add(jButtonSave1, gridBagConstraints);\n\n jButtonCancel1.setText(\"\\u0e22\\u0e01\\u0e40\\u0e25\\u0e34\\u0e01\");\n jButtonCancel1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCancel1ActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 2);\n jPanel13.add(jButtonCancel1, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;\n jPanel33.add(jPanel13, gridBagConstraints);\n\n jTabbedPane1.addTab(\"\\u0e15\\u0e23\\u0e27\\u0e08\\u0e23\\u0e48\\u0e32\\u0e07\\u0e01\\u0e32\\u0e22 1\", jPanel33);\n\n jPanel34.setLayout(new java.awt.GridBagLayout());\n\n jPanel5.setLayout(new java.awt.GridBagLayout());\n\n jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel15.setLayout(new java.awt.GridBagLayout());\n\n jPanel15.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxAbdomen_bowe_inc.setText(\"increased\");\n jCheckBoxAbdomen_bowe_inc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbdomen_bowe_incActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel15.add(jCheckBoxAbdomen_bowe_inc, gridBagConstraints);\n\n jCheckBoxAbdomen_bowe_dec.setText(\"decreased\");\n jCheckBoxAbdomen_bowe_dec.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbdomen_bowe_decActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel15.add(jCheckBoxAbdomen_bowe_dec, gridBagConstraints);\n\n jCheckBoxAbdomen_bowe_nor.setText(\"normal\");\n jCheckBoxAbdomen_bowe_nor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbdomen_bowe_norActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel15.add(jCheckBoxAbdomen_bowe_nor, gridBagConstraints);\n\n jLabel23.setText(\"bowel sound\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel15.add(jLabel23, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel5.add(jPanel15, gridBagConstraints);\n\n jPanel30.setLayout(new java.awt.GridBagLayout());\n\n jPanel30.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxAbdomen_nor.setText(\"normal\");\n jCheckBoxAbdomen_nor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbdomen_norActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel30.add(jCheckBoxAbdomen_nor, gridBagConstraints);\n\n jCheckBoxAbdomen_sca.setText(\"scaphoid\");\n jCheckBoxAbdomen_sca.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbdomen_scaActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel30.add(jCheckBoxAbdomen_sca, gridBagConstraints);\n\n jCheckBoxAbdomen_dis.setText(\"distend\");\n jCheckBoxAbdomen_dis.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbdomen_disActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel30.add(jCheckBoxAbdomen_dis, gridBagConstraints);\n\n jLabel24.setText(\"contour\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel30.add(jLabel24, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel5.add(jPanel30, gridBagConstraints);\n\n jPanel38.setLayout(new java.awt.GridBagLayout());\n\n jPanel38.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jTextFieldAbdomen_pal_dec.setMinimumSize(new java.awt.Dimension(150, 24));\n jTextFieldAbdomen_pal_dec.setPreferredSize(new java.awt.Dimension(150, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 4, 2, 2);\n jPanel38.add(jTextFieldAbdomen_pal_dec, gridBagConstraints);\n\n jLabel21.setText(\"palpation\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel38.add(jLabel21, gridBagConstraints);\n\n jPanel40.setLayout(new java.awt.GridBagLayout());\n\n jCheckBoxAbdomen_rig.setText(\"rigidity\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel40.add(jCheckBoxAbdomen_rig, gridBagConstraints);\n\n jCheckBoxAbdomen_soft.setText(\"soft\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel40.add(jCheckBoxAbdomen_soft, gridBagConstraints);\n\n jCheckBoxAbdomen_gua.setText(\"guarding\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel40.add(jCheckBoxAbdomen_gua, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);\n jPanel38.add(jPanel40, gridBagConstraints);\n\n jPanel42.setLayout(new java.awt.GridBagLayout());\n\n jCheckBoxAbdomen_ten.setText(\"tender (area)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(1, 5, 0, 1);\n jPanel42.add(jCheckBoxAbdomen_ten, gridBagConstraints);\n\n jTextFieldAbdomen_tend_dec.setMinimumSize(new java.awt.Dimension(112, 24));\n jTextFieldAbdomen_tend_dec.setPreferredSize(new java.awt.Dimension(112, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(1, 10, 0, 1);\n jPanel42.add(jTextFieldAbdomen_tend_dec, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 1);\n jPanel38.add(jPanel42, gridBagConstraints);\n\n jLabel32.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 11, 2, 3);\n jPanel38.add(jLabel32, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n jPanel5.add(jPanel38, gridBagConstraints);\n\n jPanel39.setLayout(new java.awt.GridBagLayout());\n\n jPanel39.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxAbdomen_dark.setText(\"\\u0e17\\u0e36\\u0e1a\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel39.add(jCheckBoxAbdomen_dark, gridBagConstraints);\n\n jCheckBoxAbdomen_clear.setText(\"\\u0e42\\u0e1b\\u0e23\\u0e48\\u0e07\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel39.add(jCheckBoxAbdomen_clear, gridBagConstraints);\n\n jCheckBoxAbdomen_regu.setText(\"\\u0e1b\\u0e01\\u0e15\\u0e34\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel39.add(jCheckBoxAbdomen_regu, gridBagConstraints);\n\n jLabel20.setText(\"\\u0e40\\u0e04\\u0e32\\u0e30\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel39.add(jLabel20, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel5.add(jPanel39, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel34.add(jPanel5, gridBagConstraints);\n\n jPanel6.setLayout(new java.awt.GridBagLayout());\n\n jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxExtreme_norm.setText(\"normal\");\n jCheckBoxExtreme_norm.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxExtreme_normActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel6.add(jCheckBoxExtreme_norm, gridBagConstraints);\n\n jCheckBoxExtreme_pitt.setText(\"pitting edema\");\n jCheckBoxExtreme_pitt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxExtreme_pittActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 5);\n jPanel6.add(jCheckBoxExtreme_pitt, gridBagConstraints);\n\n jCheckBoxExtreme_non_p.setText(\"non pitting edema\");\n jCheckBoxExtreme_non_p.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxExtreme_non_pActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel6.add(jCheckBoxExtreme_non_p, gridBagConstraints);\n\n jCheckBoxExtreme_ten.setText(\"tender at\");\n jCheckBoxExtreme_ten.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxExtreme_tenActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel6.add(jCheckBoxExtreme_ten, gridBagConstraints);\n\n jTextFieldExtreme_ten_dec.setMinimumSize(new java.awt.Dimension(112, 24));\n jTextFieldExtreme_ten_dec.setPreferredSize(new java.awt.Dimension(112, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jPanel6.add(jTextFieldExtreme_ten_dec, gridBagConstraints);\n\n jPanel44.setLayout(new java.awt.GridBagLayout());\n\n jTextFieldExtremity_oth.setMinimumSize(new java.awt.Dimension(150, 24));\n jTextFieldExtremity_oth.setPreferredSize(new java.awt.Dimension(150, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n jPanel44.add(jTextFieldExtremity_oth, gridBagConstraints);\n\n jLabel30.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel44.add(jLabel30, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 1, 0);\n jPanel6.add(jPanel44, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel34.add(jPanel6, gridBagConstraints);\n\n jPanel10.setLayout(new java.awt.GridBagLayout());\n\n jPanel10.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel21.setLayout(new java.awt.GridBagLayout());\n\n jPanel21.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxNeuro_refl_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 2);\n jPanel21.add(jCheckBoxNeuro_refl_l, gridBagConstraints);\n\n jComboBoxNeuro_refl_l.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1+\", \"2+\", \"3+\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 2);\n jPanel21.add(jComboBoxNeuro_refl_l, gridBagConstraints);\n\n jComboBoxNeuro_refl_r.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1+\", \"2+\", \"3+\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 2);\n jPanel21.add(jComboBoxNeuro_refl_r, gridBagConstraints);\n\n jCheckBoxNeuro_refl_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 2);\n jPanel21.add(jCheckBoxNeuro_refl_r, gridBagConstraints);\n\n jLabel38.setText(\"Reflex\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 6);\n jPanel21.add(jLabel38, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel10.add(jPanel21, gridBagConstraints);\n\n jPanel32.setLayout(new java.awt.GridBagLayout());\n\n jPanel31.setLayout(new java.awt.GridBagLayout());\n\n jPanel31.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel16.setLayout(new java.awt.GridBagLayout());\n\n jComboBoxNeuro_cn.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n jPanel16.add(jComboBoxNeuro_cn, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel31.add(jPanel16, gridBagConstraints);\n\n buttonGroupNeuro_cn.add(jRadioButtonNeuro_cn_abno);\n jRadioButtonNeuro_cn_abno.setText(\"Abnormal\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel31.add(jRadioButtonNeuro_cn_abno, gridBagConstraints);\n\n buttonGroupNeuro_cn.add(jRadioButtonNeuro_cn_inta);\n jRadioButtonNeuro_cn_inta.setText(\"Intact\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel31.add(jRadioButtonNeuro_cn_inta, gridBagConstraints);\n\n jCheckBoxNeuro_cn.setText(\"CN\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel31.add(jCheckBoxNeuro_cn, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n jPanel32.add(jPanel31, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel10.add(jPanel32, gridBagConstraints);\n\n jPanel18.setLayout(new java.awt.GridBagLayout());\n\n jPanel18.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel19.setLayout(new java.awt.GridBagLayout());\n\n jCheckBoxNeuro_up_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 0);\n jPanel19.add(jCheckBoxNeuro_up_l, gridBagConstraints);\n\n jCheckBoxNeuro_up_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);\n jPanel19.add(jCheckBoxNeuro_up_r, gridBagConstraints);\n\n jComboBoxNeuro_grad_u_r.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3);\n jPanel19.add(jComboBoxNeuro_grad_u_r, gridBagConstraints);\n\n jComboBoxNeuro_grad_u_l.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n jPanel19.add(jComboBoxNeuro_grad_u_l, gridBagConstraints);\n\n jLabel35.setText(\"Upper\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n jPanel19.add(jLabel35, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 2);\n jPanel18.add(jPanel19, gridBagConstraints);\n\n jPanel20.setLayout(new java.awt.GridBagLayout());\n\n jCheckBoxNeuro_low_l.setText(\"L\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 0);\n jPanel20.add(jCheckBoxNeuro_low_l, gridBagConstraints);\n\n jCheckBoxNeuro_low_r.setText(\"R\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);\n jPanel20.add(jCheckBoxNeuro_low_r, gridBagConstraints);\n\n jComboBoxNeuro_grad_l_l.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n jPanel20.add(jComboBoxNeuro_grad_l_l, gridBagConstraints);\n\n jComboBoxNeuro_grad_l_r.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\" }));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3);\n jPanel20.add(jComboBoxNeuro_grad_l_r, gridBagConstraints);\n\n jLabel36.setText(\"Lower\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n jPanel20.add(jLabel36, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 2);\n jPanel18.add(jPanel20, gridBagConstraints);\n\n jLabel34.setText(\"Motor Grade\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.ipady = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel18.add(jLabel34, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;\n gridBagConstraints.weighty = 1.0;\n jPanel10.add(jPanel18, gridBagConstraints);\n\n jCheckBoxNeuro_gros.setText(\"Grossly intact\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel10.add(jCheckBoxNeuro_gros, gridBagConstraints);\n\n jPanel12.setLayout(new java.awt.GridBagLayout());\n\n jPanel12.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxNeuro_atax.setText(\"Ataxia\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel12.add(jCheckBoxNeuro_atax, gridBagConstraints);\n\n jCheckBoxNeuro_ftn.setText(\"FTN\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel12.add(jCheckBoxNeuro_ftn, gridBagConstraints);\n\n buttonGroupNeuro_ftn.add(jRadioButtonNeuro_cn_inta2);\n jRadioButtonNeuro_cn_inta2.setText(\"Intact\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel12.add(jRadioButtonNeuro_cn_inta2, gridBagConstraints);\n\n buttonGroupNeuro_ftn.add(jRadioButtonNeuro_cn_imp2);\n jRadioButtonNeuro_cn_imp2.setText(\"Impare\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel12.add(jRadioButtonNeuro_cn_imp2, gridBagConstraints);\n\n buttonGroupNeuro_ata.add(jRadioButtonNeuro_cn_inta1);\n jRadioButtonNeuro_cn_inta1.setText(\"Intact\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel12.add(jRadioButtonNeuro_cn_inta1, gridBagConstraints);\n\n buttonGroupNeuro_ata.add(jRadioButtonNeuro_cn_imp1);\n jRadioButtonNeuro_cn_imp1.setText(\"Impare\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel12.add(jRadioButtonNeuro_cn_imp1, gridBagConstraints);\n\n jLabel37.setText(\"Cerebellar\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 6);\n jPanel12.add(jLabel37, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n jPanel10.add(jPanel12, gridBagConstraints);\n\n jPanel45.setLayout(new java.awt.GridBagLayout());\n\n jTextFieldNeuro_oth.setMinimumSize(new java.awt.Dimension(150, 24));\n jTextFieldNeuro_oth.setPreferredSize(new java.awt.Dimension(150, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n jPanel45.add(jTextFieldNeuro_oth, gridBagConstraints);\n\n jLabel33.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 5);\n jPanel45.add(jLabel33, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n jPanel10.add(jPanel45, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel34.add(jPanel10, gridBagConstraints);\n\n jPanel7.setLayout(new java.awt.GridBagLayout());\n\n jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jCheckBoxSkin_nor.setText(\"normal\");\n jCheckBoxSkin_nor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_norActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_nor, gridBagConstraints);\n\n jCheckBoxSkin_bull.setText(\"bullous\");\n jCheckBoxSkin_bull.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_bullActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_bull, gridBagConstraints);\n\n jCheckBoxSkin_tine.setText(\"tined\");\n jCheckBoxSkin_tine.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_tineActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_tine, gridBagConstraints);\n\n jCheckBoxSkin_exfo.setText(\"exfoliative\");\n jCheckBoxSkin_exfo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_exfoActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_exfo, gridBagConstraints);\n\n jCheckBoxSkin_puts.setText(\"pustula\");\n jCheckBoxSkin_puts.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_putsActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_puts, gridBagConstraints);\n\n jCheckBoxSkin_scal.setText(\"scale\");\n jCheckBoxSkin_scal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_scalActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_scal, gridBagConstraints);\n\n jCheckBoxSkin_ecze.setText(\"eczema\");\n jCheckBoxSkin_ecze.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxSkin_eczeActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jPanel7.add(jCheckBoxSkin_ecze, gridBagConstraints);\n\n jPanel43.setLayout(new java.awt.GridBagLayout());\n\n jTextFieldSkin_oth.setMinimumSize(new java.awt.Dimension(150, 24));\n jTextFieldSkin_oth.setPreferredSize(new java.awt.Dimension(150, 24));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n jPanel43.add(jTextFieldSkin_oth, gridBagConstraints);\n\n jLabel31.setText(\"others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 5, 2, 5);\n jPanel43.add(jLabel31, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 0);\n jPanel7.add(jPanel43, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel34.add(jPanel7, gridBagConstraints);\n\n jPanel17.setLayout(new java.awt.GridBagLayout());\n\n jPanel17.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jScrollPane1.setViewportView(jTextAreaOther);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n jPanel17.add(jScrollPane1, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 8;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 2, 2, 2);\n jPanel34.add(jPanel17, gridBagConstraints);\n\n jLabel7.setText(\"Abdomen\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel34.add(jLabel7, gridBagConstraints);\n\n jLabel8.setText(\"Neuro\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel34.add(jLabel8, gridBagConstraints);\n\n jLabel9.setText(\"Extremity\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel34.add(jLabel9, gridBagConstraints);\n\n jLabel14.setText(\"Others (describe)\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 7;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel34.add(jLabel14, gridBagConstraints);\n\n jLabel18.setText(\"Skin\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);\n jPanel34.add(jLabel18, gridBagConstraints);\n\n jPanel8.setLayout(new java.awt.GridBagLayout());\n\n jButtonSave.setText(\"\\u0e1a\\u0e31\\u0e19\\u0e17\\u0e36\\u0e01\");\n jButtonSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSaveActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n jPanel8.add(jButtonSave, gridBagConstraints);\n\n jButtonCancel.setText(\"\\u0e22\\u0e01\\u0e40\\u0e25\\u0e34\\u0e01\");\n jButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCancelActionPerformed(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 2);\n jPanel8.add(jButtonCancel, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 9;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;\n jPanel34.add(jPanel8, gridBagConstraints);\n\n jTabbedPane1.addTab(\"\\u0e15\\u0e23\\u0e27\\u0e08\\u0e23\\u0e48\\u0e32\\u0e07\\u0e01\\u0e32\\u0e22 2\", jPanel34);\n\n jTabbedPane1.addTab(\"\\u0e15\\u0e23\\u0e27\\u0e08\\u0e23\\u0e48\\u0e32\\u0e07\\u0e01\\u0e32\\u0e22 3\", panelWound1);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n add(jTabbedPane1, gridBagConstraints);\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 20));\n jLabel1 = new javax.swing.JLabel();\n filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 20));\n jPanel3 = new javax.swing.JPanel();\n level = new javax.swing.JComboBox();\n jPanel4 = new javax.swing.JPanel();\n filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 20));\n jLabel2 = new javax.swing.JLabel();\n filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 32767));\n jPanel6 = new javax.swing.JPanel();\n principalTeacher = new javax.swing.JComboBox();\n jPanel5 = new javax.swing.JPanel();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));\n jButton1 = new javax.swing.JButton();\n filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setAlwaysOnTop(true);\n setModal(true);\n setResizable(false);\n\n jPanel1.setLayout(new java.awt.GridLayout(3, 2));\n\n jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.LINE_AXIS));\n jPanel2.add(filler3);\n\n jLabel1.setText(\"Niveau\");\n jPanel2.add(jLabel1);\n jPanel2.add(filler8);\n\n jPanel1.add(jPanel2);\n\n jPanel3.setLayout(new javax.swing.BoxLayout(jPanel3, javax.swing.BoxLayout.LINE_AXIS));\n\n level.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Sixième\", \"Cinquième\", \"Quatrième\", \"Troisième\" }));\n level.setMaximumSize(new java.awt.Dimension(32767, 20));\n jPanel3.add(level);\n\n jPanel1.add(jPanel3);\n\n jPanel4.setMaximumSize(new java.awt.Dimension(32838, 20));\n jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.LINE_AXIS));\n jPanel4.add(filler4);\n\n jLabel2.setText(\"Professeur principal\");\n jPanel4.add(jLabel2);\n jPanel4.add(filler7);\n\n jPanel1.add(jPanel4);\n\n jPanel6.setLayout(new javax.swing.BoxLayout(jPanel6, javax.swing.BoxLayout.LINE_AXIS));\n\n principalTeacher.setMaximumSize(new java.awt.Dimension(32767, 20));\n jPanel6.add(principalTeacher);\n\n jPanel1.add(jPanel6);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n jPanel5.setLayout(new javax.swing.BoxLayout(jPanel5, javax.swing.BoxLayout.LINE_AXIS));\n jPanel5.add(filler1);\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/gui/images/add.png\"))); // NOI18N\n jButton1.setText(\"Ajouter la classe\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n jPanel5.add(jButton1);\n jPanel5.add(filler2);\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/gui/images/cancel.png\"))); // NOI18N\n jButton2.setText(\"Annuler\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jPanel5.add(jButton2);\n\n getContentPane().add(jPanel5, java.awt.BorderLayout.SOUTH);\n\n pack();\n }", "private void initComponents(String label, Object[] items) {\r\n\t\tFormLayout layout = new FormLayout(\"3dlu, 21px, p:g, 21px, 3dlu\", \"3dlu, t:16px, 3dlu\");\r\n\t\t\r\n\t\tthis.setLayout(layout);\r\n\t\t\r\n\t\tthis.add(new JLabel(label), CC.xyw(2, 2, 2));\r\n\t\t\r\n\t\tint row = 2;\r\n\t\t\r\n\t\tif (items != null) {\r\n\t\t\tlayout.appendRow(RowSpec.decode(\"f:21px\"));\r\n\t\t\tlayout.appendRow(RowSpec.decode(\"3dlu\"));\r\n\t\t\t\r\n\t\t\tJComboBox comboBox = new JComboBox(items);\r\n\t\t\tcomboBox.addPopupMenuListener(new BoundsPopupMenuListener(true, false));\r\n\t\t\t((JTextField) comboBox.getEditor().getEditorComponent()).setMargin(new Insets(1, 3, 2, 1));\r\n\t\t\t\r\n\t\t\tthis.add(comboBox, CC.xyw(2, 4, 2));\r\n\t\t\t\r\n\t\t\trow += 2;\r\n\t\t}\r\n\r\n\t\tfinal JToggleButton blockBtn = new JToggleButton(IconConstants.PLUGIN_ICON);\r\n\t\tblockBtn.setRolloverIcon(IconConstants.PLUGIN_ROLLOVER_ICON);\r\n\t\tblockBtn.setPressedIcon(IconConstants.PLUGIN_PRESSED_ICON);\r\n\t\tblockBtn.setOpaque(false);\r\n\t\tblockBtn.setContentAreaFilled(false);\r\n\t\tblockBtn.setBorder(null);\r\n\t\tblockBtn.setFocusPainted(false);\r\n\t\tblockBtn.setToolTipText(\"Append/Remove \" + label + \" Block\");\r\n\r\n\t\tfinal JPopupMenu blockPop = new JPopupMenu();\r\n\t\t\r\n\t\tappendItem = new JMenuItem(\"Append \" + label + \" Block\", IconConstants.ADD_ICON);\r\n\t\tappendItem.setRolloverIcon(IconConstants.ADD_ROLLOVER_ICON);\r\n\t\tappendItem.setPressedIcon(IconConstants.ADD_PRESSED_ICON);\r\n\t\t\r\n\t\tremoveItem = new JMenuItem(\"Remove \" + label + \" Block\", IconConstants.DELETE_ICON);\r\n\t\tremoveItem.setRolloverIcon(IconConstants.DELETE_ROLLOVER_ICON);\r\n\t\tremoveItem.setPressedIcon(IconConstants.DELETE_PRESSED_ICON);\r\n\t\tremoveItem.setEnabled(false);\r\n\t\t\r\n\t\tremoveItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tremoveBlock();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tappendItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tappendBlock();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tblockPop.add(appendItem);\r\n\t\tblockPop.add(removeItem);\r\n\t\t\r\n\t\tblockBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tblockPop.show(blockBtn, -3, blockBtn.getSize().height / 2 + 11);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.add(blockBtn, CC.xy(4, row));\r\n\t}", "public final void initUI() {\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\t\n\t\tJPanel nameChoicePanel = new JPanel();\n\t\tnameChoicePanel.setLayout(new BoxLayout(nameChoicePanel, BoxLayout.Y_AXIS));\n\t\tnameChoicePanel.setName(\"Panel\");\n\t\t\n\t\t// Add instructions for what to do:\n\t\tinstructionLabel = new JLabel(\"Enter your name here:\", JLabel.CENTER);\n\t\tinstructionLabel.setMinimumSize(new Dimension(0, 40));\n\t\tinstructionLabel.setPreferredSize(new Dimension(instructionLabel.getPreferredSize().width, 40));\n\t\tinstructionLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tnameChoicePanel.add(instructionLabel);\n\t\t\n\t\t// Add textfield for user's name\n\t\tnameField = new JTextField(10);\n\t\tnameField.setName(\"textField\");\n\t\tnameField.getDocument().addDocumentListener(this);\n\t\tnameField.setMinimumSize(new Dimension(nameField.getWidth(), 41));\n\t\tnameField.setMaximumSize(new Dimension(250, 41));\n\t\t\n\t\tnameChoicePanel.add(nameField);\n\t\t\n\t\t// Add button\n\t\ttimeToPick = new JButton(\"Pick your team\");\n\t\ttimeToPick.setName(\"Test\");\n\t\ttimeToPick.addActionListener(nameChoiceListener);\n\t\ttimeToPick.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\ttimeToPick.setEnabled(false);\n\t\tnameChoicePanel.add(timeToPick);\n\t\t\n\t\t// Add name choice panel dimensions\n\t\tadd(nameChoicePanel);\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\tnameChoicePanel.setMinimumSize(new Dimension(400,240));\n\t\tnameChoicePanel.setPreferredSize(new Dimension(400,240));\n\t}", "public void menu() {\n\t\tsuper.menu();\n\n\t\tfor(JCheckBox cb : arrayCompo){\n\t\t\tcb.setPreferredSize(new Dimension(largeur-30, hauteur));\n\t\t\tgbc.gridy++;\n\t\t\tpan.add(cb, gbc);\n\t\t}\n\t}", "private void $$$setupUI$$$() {\n adminSelectFunctionPanel = new JPanel();\n adminSelectFunctionPanel.setLayout(new GridLayoutManager(4, 3, new Insets(30, 30, 30, 30), 10, 30, true, false));\n adminSelectFunctionPanel.setBackground(new Color(-1));\n adminSelectFunctionPanel.setForeground(new Color(-1));\n adminSelectFunctionPanel.setMinimumSize(new Dimension(800, 600));\n adminSelectFunctionPanel.setPreferredSize(new Dimension(800, 600));\n changeATMBalanceButton = new JButton();\n changeATMBalanceButton.setBackground(new Color(-10592674));\n Font changeATMBalanceButtonFont = this.$$$getFont$$$(null, -1, 20, changeATMBalanceButton.getFont());\n if (changeATMBalanceButtonFont != null) changeATMBalanceButton.setFont(changeATMBalanceButtonFont);\n changeATMBalanceButton.setForeground(new Color(-1));\n changeATMBalanceButton.setText(\"Change ATM Balance\");\n adminSelectFunctionPanel.add(changeATMBalanceButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 100), null, 0, false));\n changeLocaleButton = new JButton();\n changeLocaleButton.setBackground(new Color(-10592674));\n Font changeLocaleButtonFont = this.$$$getFont$$$(null, -1, 20, changeLocaleButton.getFont());\n if (changeLocaleButtonFont != null) changeLocaleButton.setFont(changeLocaleButtonFont);\n changeLocaleButton.setForeground(new Color(-1));\n changeLocaleButton.setText(\"Change Locale\");\n adminSelectFunctionPanel.add(changeLocaleButton, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 100), null, 0, false));\n addAdminButton = new JButton();\n addAdminButton.setBackground(new Color(-10592674));\n Font addAdminButtonFont = this.$$$getFont$$$(null, -1, 20, addAdminButton.getFont());\n if (addAdminButtonFont != null) addAdminButton.setFont(addAdminButtonFont);\n addAdminButton.setForeground(new Color(-1));\n addAdminButton.setText(\"Add Admin\");\n adminSelectFunctionPanel.add(addAdminButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 100), null, 0, false));\n atmStateLabel = new JLabel();\n atmStateLabel.setBackground(new Color(-15024996));\n Font atmStateLabelFont = this.$$$getFont$$$(null, -1, 24, atmStateLabel.getFont());\n if (atmStateLabelFont != null) atmStateLabel.setFont(atmStateLabelFont);\n atmStateLabel.setForeground(new Color(-1));\n atmStateLabel.setHorizontalAlignment(0);\n atmStateLabel.setHorizontalTextPosition(0);\n atmStateLabel.setOpaque(true);\n atmStateLabel.setText(\"\");\n adminSelectFunctionPanel.add(atmStateLabel, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(100, -1), null, 0, false));\n removeAdminButton = new JButton();\n removeAdminButton.setBackground(new Color(-10592674));\n Font removeAdminButtonFont = this.$$$getFont$$$(null, -1, 20, removeAdminButton.getFont());\n if (removeAdminButtonFont != null) removeAdminButton.setFont(removeAdminButtonFont);\n removeAdminButton.setForeground(new Color(-1));\n removeAdminButton.setText(\"Remove Admin\");\n adminSelectFunctionPanel.add(removeAdminButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 100), null, 0, false));\n queryATMBalanceButton = new JButton();\n queryATMBalanceButton.setBackground(new Color(-10592674));\n Font queryATMBalanceButtonFont = this.$$$getFont$$$(null, -1, 20, queryATMBalanceButton.getFont());\n if (queryATMBalanceButtonFont != null) queryATMBalanceButton.setFont(queryATMBalanceButtonFont);\n queryATMBalanceButton.setForeground(new Color(-1));\n queryATMBalanceButton.setText(\"Query ATM Balance\");\n adminSelectFunctionPanel.add(queryATMBalanceButton, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 100), null, 0, false));\n toggleStateButton = new JButton();\n toggleStateButton.setBackground(new Color(-10592674));\n Font toggleStateButtonFont = this.$$$getFont$$$(null, -1, 20, toggleStateButton.getFont());\n if (toggleStateButtonFont != null) toggleStateButton.setFont(toggleStateButtonFont);\n toggleStateButton.setForeground(new Color(-1));\n toggleStateButton.setText(\"Toggle State\");\n adminSelectFunctionPanel.add(toggleStateButton, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 100), null, 0, false));\n logoutButton = new JButton();\n logoutButton.setBackground(new Color(-10592674));\n Font logoutButtonFont = this.$$$getFont$$$(null, -1, 20, logoutButton.getFont());\n if (logoutButtonFont != null) logoutButton.setFont(logoutButtonFont);\n logoutButton.setForeground(new Color(-1));\n logoutButton.setText(\"Logout\");\n adminSelectFunctionPanel.add(logoutButton, new GridConstraints(3, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(150, 50), null, 0, false));\n }", "private JPanel createSelectDocTypePanel(){\n\t\tJPanel toReturn = new JPanel(new GridBagLayout());\n\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\t\n\t\t//add document type JLabel\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\ttoReturn.add(new JLabel(translator.getTranslation(Tags.SELECT_DOCUMENT_TYPE)) , gbc);\n\t\t\t\n\t\t//add comboBox\n\t\tgbc.gridx++;\n\t\tgbc.weightx = 1;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tgbc.insets.left = 2;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoReturn.add(combBoxDocumentTypes, gbc);\n\t\t\n\t\t//action for add button\n\t\tAction addDocTypeAction = new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString docType = JOptionPane.showInputDialog(null, (Object)new JLabel(translator.getTranslation(Tags.INSERT_DOC_TYPE_LABEL)), \"\", \n\t\t\t\t\t\t JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tif(docType !=null && !docType.isEmpty()){\n\t\t\t\t\tcombBoxDocumentTypes.addItem(docType);\n\t\t\t\t\tcombBoxDocumentTypes.setSelectedItem(docType);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\taddDocumentTypeButton = new ToolbarButton(addDocTypeAction, false);\n\t\t\n\t\t// Get the image for toolbar button\n\t\tURL imageToLoad = getClass().getClassLoader().getResource(Images.ADD_ICON);\n\t\tif (imageToLoad != null) {\n\t\t\taddDocumentTypeButton.setText(\"\");\n\t\t\taddDocumentTypeButton.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t}\n\t\t\n\t\t//add the addButton\n\t\tgbc.gridx++;\n\t\tgbc.weightx = 0;\n\t\tgbc.insets.left = 0;\n\t\ttoReturn.add(addDocumentTypeButton,gbc);\n\t\t\n\t\t\n\t\t\n\t\t//action for remove button\n\t\t\tAction removeAction = new AbstractAction() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tcombBoxDocumentTypes.removeItem(combBoxDocumentTypes.getSelectedItem());\n\t\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tremoveDocumentTypeButton = new ToolbarButton(removeAction, false);\n\t\t\t\n\t\t\t// Get the image for toolbar button\n\t\t\timageToLoad = getClass().getClassLoader().getResource(Images.REMOVE_ICON);\n\t\t\tif (imageToLoad != null) {\n\t\t\t\tremoveDocumentTypeButton.setText(\"\");\n\t\t\t\tremoveDocumentTypeButton.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t\t}\n\t\t\t\n\t\t\t//add the addButton\n\t\t\tgbc.gridx++;\n\t\t\ttoReturn.add(removeDocumentTypeButton,gbc);\n\t\t\n\t\t\n\t\treturn toReturn;\n\t\t\n\t}", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n manageCompoundJButton = new javax.swing.JButton();\r\n enterpriseLabel = new javax.swing.JLabel();\r\n valueLabel = new javax.swing.JLabel();\r\n drugComboBox = new javax.swing.JComboBox();\r\n\r\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\r\n jLabel1.setText(\"My Work Area -Supplier Role\");\r\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, -1, -1));\r\n\r\n manageCompoundJButton.setText(\"Manage Compound\");\r\n manageCompoundJButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n manageCompoundJButtonActionPerformed(evt);\r\n }\r\n });\r\n add(manageCompoundJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 290, -1, -1));\r\n\r\n enterpriseLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n enterpriseLabel.setText(\"EnterPrise :\");\r\n add(enterpriseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 120, 30));\r\n\r\n valueLabel.setText(\"<value>\");\r\n add(valueLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 100, 130, -1));\r\n\r\n drugComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n add(drugComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 210, 210, -1));\r\n }", "private void makeGUI() {\r\n\t\tInstrument[] instruments = getAvailableInstruments();\r\n\r\n\t\tJPanel channels = new JPanel();\r\n\t\tchannels.setLayout(new BoxLayout(channels, BoxLayout.Y_AXIS));\r\n\r\n\t\tcomboBoxes = new JComboBox[16];\r\n\t\tfor (int chan = 0; chan < 16; chan++) {\r\n\t\t\tJPanel channelPanel = new JPanel();\r\n\t\t\tchannelPanel\r\n\t\t\t\t\t.setLayout(new BoxLayout(channelPanel, BoxLayout.X_AXIS));\r\n\t\t\tJLabel label = new JLabel(\"Channel \" + chan);\r\n\t\t\tlabel.setPreferredSize(LABEL_DIMENSION);\r\n\t\t\tchannelPanel.add(label);\r\n\t\t\tJComboBox cb = new JComboBox(instruments);\r\n\t\t\tcb.setMaximumRowCount(25);\r\n\t\t\tint program = pianoRollPanel.getProgram(chan);\r\n\t\t\tcb.setSelectedIndex(program);\r\n\t\t\tchannelPanel.add(cb);\r\n\t\t\tcomboBoxes[chan] = cb;\r\n\t\t\tchannels.add(channelPanel);\r\n\t\t}\r\n\t\tadd(channels, BorderLayout.CENTER);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tJButton okButton = new JButton(OK);\r\n\t\tokButton.setActionCommand(OK);\r\n\t\tokButton.setMnemonic('O');\r\n\t\tokButton.addActionListener(this);\r\n\t\tJButton cancelButton = new JButton(CANCEL);\r\n\t\tcancelButton.setActionCommand(CANCEL);\r\n\t\tcancelButton.setMnemonic('C');\r\n\t\tcancelButton.addActionListener(this);\r\n\t\tbuttonPanel.add(okButton);\r\n\t\tbuttonPanel.add(cancelButton);\r\n\t\tadd(buttonPanel, BorderLayout.SOUTH);\r\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "private void componentsInitializers() {\r\n\t\tfrmVehiculos = new JFrame();\r\n\t\tfrmVehiculos.setTitle(\"Vehiculos\");\r\n\t\tlblNewLabel = new JLabel(\"* Matricula:\");\r\n\t\tlblNewLabel_1 = new JLabel(\"Marca:\");\r\n\t\tlblModelo = new JLabel(\"Modelo:\");\r\n\t\tlblPuertas = new JLabel(\"* Puertas:\");\r\n\t\trb_2puertas = new JRadioButton(\"2\");\r\n\t\tbuttonGroup.add(rb_2puertas);\r\n\t\trb_3puertas = new JRadioButton(\"3\");\r\n\t\tbuttonGroup.add(rb_3puertas);\r\n\t\trb_3puertas.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\trb_5puertas = new JRadioButton(\"5\");\r\n\t\tbuttonGroup.add(rb_5puertas);\r\n\t\trb_5puertas.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\tlblAnioMatriculacion = new JLabel(\"Matriculaci\\u00F3n:\");\r\n\t\tlblCaballos = new JLabel(\"* Potencia:\");\r\n\t\tlblTipoCombustible = new JLabel(\"Combustible:\");\r\n\t\tbtnClientes = new JButton(\"Clientes\");\r\n\t\tbtnRepararVehvulo = new JButton(\"Reparar Veh\\u00EDvulo\");\r\n\t\tbtnAtrs = new JButton(\"Atras\");\r\n\t\tlabelContadorVehiculos = new JLabel(\"0/0\");\r\n\t\tbuttonLeftArrow = new JButton(\"<\");\r\n\t\tbuttonRightArrow = new JButton(\">\");\r\n\t\tbtnGuardar = new JButton(\"A\\u00F1adir\");\r\n\t\tlbl_cv = new JTextField();\r\n\t\tlbl_cv.setEditable(false);\r\n\t\ttxt_marca = new JTextField();\r\n\t\ttxt_matricula = new JTextField();\r\n\t\ttxt_modelo = new JTextField();\r\n\t\ttxt_potencia = new JTextField();\r\n\t\tcbox_dia = new JComboBox<Integer>();\r\n\t\tcbox_mes = new JComboBox<Integer>();\r\n\t\tcbox_ano = new JComboBox<Integer>();\r\n\t\tbtnBorrarVehiculo = new JButton(\"Borrar Vehiculo\");\r\n\t\tcbTipoCombustible = new JComboBox<Integer>();\r\n\t\tlblTipoVehiculo = new JLabel(\"Tipo Vehiculo\");\r\n\t\tcb_TipoVehiculo = new JComboBox<Integer>();\r\n\t\tcb_TipoVehiculo.setEnabled(false);\r\n\t\tlblCamposObligatorios = new JLabel(\"* Campos obligatorios\");\r\n\t\tlblNifCliente = new JLabel(\"* NIF cliente:\");\r\n\t\tcb_nifCliente = new JComboBox();\r\n\t\tbtnRefrescarnifs = new JButton(\"\");\r\n\t}", "private void init() {\r\n setTitle(\"Crop Boundary Pixels\");\r\n setSize(350, 230);\r\n setForeground(Color.black);\r\n\r\n Box contentBox = new Box(BoxLayout.Y_AXIS);\r\n JPanel optionPanel = new JPanel();\r\n\r\n // make border\r\n optionPanel.setBorder(buildTitledBorder(\"Pixels Around Image\"));\r\n contentBox.add(optionPanel);\r\n\r\n // set layout\r\n GridBagLayout gbl = new GridBagLayout();\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n optionPanel.setLayout(gbl);\r\n\r\n gbc.anchor = GridBagConstraints.NORTHWEST;\r\n // make content, place into layout\r\n\r\n // left\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel leftSideLabel = new JLabel(\"Pixels on the left side:\");\r\n leftSideLabel.setFont(serif12);\r\n leftSideLabel.setForeground(Color.black);\r\n leftSideLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(leftSideLabel, gbc);\r\n optionPanel.add(leftSideLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n leftSideInput = new JTextField(\"0\", 4);\r\n leftSideInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(leftSideInput, false);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(leftSideInput, gbc);\r\n optionPanel.add(leftSideInput);\r\n\r\n // right\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel rightSideLabel = new JLabel(\"Pixels on the right side:\");\r\n rightSideLabel.setFont(serif12);\r\n rightSideLabel.setForeground(Color.black);\r\n rightSideLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(rightSideLabel, gbc);\r\n optionPanel.add(rightSideLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n rightSideInput = new JTextField(\"0\", 4);\r\n rightSideInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(rightSideInput, false);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(rightSideInput, gbc);\r\n optionPanel.add(rightSideInput);\r\n\r\n // top\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel topLabel = new JLabel(\"Pixels on top:\");\r\n topLabel.setFont(serif12);\r\n topLabel.setForeground(Color.black);\r\n topLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(topLabel, gbc);\r\n optionPanel.add(topLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n topInput = new JTextField(\"0\", 4);\r\n topInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(topInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(topInput, gbc);\r\n optionPanel.add(topInput);\r\n\r\n // bottom\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel bottomLabel = new JLabel(\"Pixels on bottom:\");\r\n bottomLabel.setFont(serif12);\r\n bottomLabel.setForeground(Color.black);\r\n bottomLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(bottomLabel, gbc);\r\n optionPanel.add(bottomLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n bottomInput = new JTextField(\"0\", 4);\r\n bottomInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(bottomInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(bottomInput, gbc);\r\n optionPanel.add(bottomInput);\r\n\r\n // front\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel frontLabel = new JLabel(\"Slices at the front of image:\");\r\n frontLabel.setFont(serif12);\r\n frontLabel.setForeground(Color.black);\r\n frontLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2; // GridBagConstraints.RELATIVE;\r\n gbl.setConstraints(frontLabel, gbc);\r\n optionPanel.add(frontLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n frontInput = new JTextField(\"0\", 4);\r\n frontInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(frontInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(frontInput, gbc);\r\n optionPanel.add(frontInput);\r\n\r\n // back\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel backLabel = new JLabel(\"Slices at the back of image:\");\r\n backLabel.setFont(serif12);\r\n backLabel.setForeground(Color.black);\r\n backLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2; // GridBagConstraints.RELATIVE;\r\n gbl.setConstraints(backLabel, gbc);\r\n optionPanel.add(backLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n backInput = new JTextField(\"0\", 4);\r\n backInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(backInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(backInput, gbc);\r\n optionPanel.add(backInput);\r\n\r\n // image destination select\r\n JPanel destPanel = new JPanel(); // panel carries no content but box & border\r\n destPanel.setBorder(buildTitledBorder(\"Select Destination\"));\r\n\r\n Box destinationBox = new Box(BoxLayout.Y_AXIS);\r\n\r\n destinationGroup = new ButtonGroup();\r\n newImage = new JRadioButton(\"New Image\", true);\r\n newImage.setFont(serif12);\r\n newImage.addActionListener(this);\r\n destinationGroup.add(newImage);\r\n destinationBox.add(newImage);\r\n newImage.setEnabled(true);\r\n\r\n replaceImage = new JRadioButton(\"Replace Image\", false);\r\n replaceImage.setFont(serif12);\r\n replaceImage.addActionListener(this);\r\n destinationGroup.add(replaceImage);\r\n destinationBox.add(replaceImage);\r\n replaceImage.setEnabled(true);\r\n destPanel.add(destinationBox);\r\n contentBox.add(destPanel);\r\n\r\n // test speed panel (choice 1: algo has personal buff, imported into img,\r\n // choice 2: algo calcs where to insert a row. methinks fewer loops)\r\n /*\r\n * JPanel loopingTestPanel = new JPanel(); loopingTestPanel.setBorder(buildTitledBorder(\"Looping test\")); Box\r\n * loopingTestBox = new Box(BoxLayout.Y_AXIS); loopingGroup = new ButtonGroup(); noBuffer = new JRadioButton(\"No\r\n * Buffer\", true); noBuffer.setFont(serif12); noBuffer.addActionListener(this); loopingGroup.add(noBuffer);\r\n * loopingTestBox.add(noBuffer); usingBuffer = new JRadioButton(\"Uses Buffer\", false);\r\n * usingBuffer.setFont(serif12); usingBuffer.addActionListener(this); loopingGroup.add(usingBuffer);\r\n * loopingTestBox.add(usingBuffer); loopingTestPanel.add(loopingTestBox); contentBox.add(loopingTestPanel);\r\n */\r\n // end looping test display\r\n\r\n /*\r\n * JPanel OKCancelPanel = new JPanel(new FlowLayout()); OKButton = buildOKButton(); OKCancelPanel.add(OKButton);\r\n *\r\n * cancelButton = buildCancelButton(); OKCancelPanel.add(cancelButton); contentBox.add(OKCancelPanel);\r\n */\r\n contentBox.add(buildButtons());\r\n\r\n // if this is a 2D image, turn off slice margins\r\n if (image.getNDims() == 2) {\r\n frontLabel.setEnabled(false);\r\n frontInput.setEnabled(false);\r\n backLabel.setEnabled(false);\r\n backInput.setEnabled(false);\r\n }\r\n\r\n mainDialogPanel.add(contentBox);\r\n getContentPane().add(mainDialogPanel);\r\n\r\n pack();\r\n setVisible(true);\r\n }" ]
[ "0.72592777", "0.71754557", "0.6853378", "0.66627735", "0.6602087", "0.65386575", "0.65142024", "0.6493085", "0.6488232", "0.6477106", "0.6459037", "0.6443627", "0.64147687", "0.64063454", "0.63669217", "0.63610154", "0.63501376", "0.6341643", "0.6328519", "0.632584", "0.631781", "0.6303332", "0.6289499", "0.6278757", "0.62648463", "0.6255434", "0.62315756", "0.6209225", "0.6199956", "0.6199049", "0.6196753", "0.61884016", "0.6179064", "0.61754465", "0.6173278", "0.6160928", "0.6152673", "0.6147353", "0.61398333", "0.6133391", "0.6124296", "0.61176896", "0.61122334", "0.6110297", "0.60986215", "0.609035", "0.6088002", "0.6078369", "0.60649425", "0.6060211", "0.6053446", "0.60441613", "0.60291743", "0.6028676", "0.60229856", "0.6021555", "0.6018287", "0.6012765", "0.60088986", "0.60084647", "0.6007475", "0.6006575", "0.59985757", "0.5994522", "0.59886616", "0.59789354", "0.59747165", "0.5972431", "0.5970147", "0.5968771", "0.596273", "0.59604543", "0.5958565", "0.5954281", "0.59433", "0.59419066", "0.59393", "0.5939256", "0.5936997", "0.59346724", "0.59314454", "0.5928372", "0.59282696", "0.592687", "0.5920846", "0.5920358", "0.59192365", "0.5916892", "0.591685", "0.5897848", "0.58868843", "0.58849514", "0.5884739", "0.58843434", "0.5884206", "0.58774865", "0.587722", "0.5872977", "0.58678913", "0.58626205" ]
0.70463437
2
Create the panel to hold the file text field/browse button combination.
JPanel createFilePane() { /* * Use a BoxLayout pane for the filename field and browse button. */ JPanel tFilePane = new JPanel(); tFilePane.setLayout(new BoxLayout(tFilePane, BoxLayout.LINE_AXIS)); tFilePane.add(_fileTextField); tFilePane.add(Box.createRigidArea(new Dimension(5, 0))); tFilePane.add(_fileBrowseButton); return tFilePane; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public FileReaderPanel()\r\n\t{\r\n\t\t// Set layout of this FileReaderPanel to BorderLayout.\r\n\t\tsetLayout(new BorderLayout());\r\n\t\t\r\n\t\t\r\n\t\t// Initialize load file sub-panel.\r\n\t\tJPanel loadFilePanel = new JPanel();\r\n\t\tloadFilePanel.setLayout(new BoxLayout(loadFilePanel, BoxLayout.X_AXIS));\r\n\t\t\r\n\t\t// Initialize components of load file sub-panel.\r\n\t\tfilePathLabel = new JLabel(\"File path: \");\r\n\t\tfilePathField = new JTextField(15);\r\n\t\tloadFileButton = new JButton(\"Load File\");\r\n\t\t\r\n\t\t// Add the same action listener to the button and input field\r\n\t\tLoadFileListener listener = new LoadFileListener();\r\n\t\tfilePathField.addActionListener(listener);\r\n\t\tloadFileButton.addActionListener(listener);\r\n\t\t\r\n\t\t// Add components to load file sub-panel.\r\n\t\tloadFilePanel.add(filePathLabel);\r\n\t\tloadFilePanel.add(filePathField);\r\n\t\tloadFilePanel.add(loadFileButton);\r\n\t\t\r\n\t\t// Add the load file sub-panel to the south of this panel.\r\n\t\tadd(loadFilePanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\t\r\n\t\t// Initialize file preview text area.\r\n\t\tfilePreviewTextArea = new JTextArea(30, 50);\r\n\t\tfilePreviewTextArea.setEditable(false);\r\n\t\tfilePreviewTextArea.setText(\"Please load a file.\");\r\n\t\t\r\n\t\t// Initialize scroll pane containing the file preview text area.\t\t\r\n\t\tJScrollPane filePreviewScrollPane = new JScrollPane(filePreviewTextArea);\r\n\t\tfilePreviewScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n\t\tfilePreviewScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\r\n\t\t// Add the scroll pane to the center of this panel.\r\n\t\tadd(filePreviewScrollPane, BorderLayout.CENTER);\r\n\t}", "private JPanel getFilePanel() {\n\t\tif (filePanel == null) {\n\t\t\tfilePanel = new JPanel();\n\t\t\tfilePanel.add(getBtnAnnexateDocument());\n\t\t\tfilePanel.add(getBtnAddFile());\n\t\t\tfilePanel.add(getBtnDownloadDocument());\n\t\t}\n\t\treturn filePanel;\n\t}", "public FileChooserField() {\n \n \tsuper(new BorderLayout());\n \n destinationTextField = new JTextField();\n destinationTextField.addMouseListener(new MouseAdapter() {\n // on mouse click pull up the file chooser\n public void mouseClicked(MouseEvent e) {\n int returnVal = fileChooser.showOpenDialog(FileChooserField.this);\n \t\t \n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fileChooser.getSelectedFile();\n destinationTextField.setText(file.getPath());\n }\n \n destinationTextField.setCaretPosition(destinationTextField.getDocument().getLength());\n }\n });\n \n //add the text field to the pane\n add(destinationTextField);\n \n //create the file chooser\n fileChooser = new JFileChooser();\n \n fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n \n }", "private void filesPanel() {\n\t\tJPanel FilesPanel = new JPanel();\n\t\tFilesPanel.setSize(filesPanelDimension);\n\t\tFilesPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\tFilesPanel.setLayout(new GridLayout(5, 1, 6, 2));\n\t\tFilesPanel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\t\n\t\t//Label title\n\t\tJLabel filesLabel = new JLabel(\"Files Import\");\n\t\tfilesLabel.setHorizontalAlignment(0);\n\t\tFilesPanel.add(filesLabel);\n\t\t\n\t\t//Spam Tools File - rules.cf\n\t\tJPanel rulesPanel = new JPanel();\n\t\trulesPanel.setSize(frameWidth, 40);\n\t\trulesPanel.setLayout(new GridLayout(2, 1, 1, 2));\n\t\tJLabel rulesFileTitle = new JLabel(\"Rules File\");\n\t\trulesPanel.add(rulesFileTitle);\n\t\trulesFile_Input = new JTextField(\"rules.cf\"); \n\t\trulesFile_Input.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\trulesFile_Input.setSize(inputsDimension);\n\t\trulesPanel.add(rulesFile_Input);\n\t\tFilesPanel.add(rulesPanel);\n\t\t\n\t\t//Valid Emails - ham.log\n\t\tJPanel hamPanel = new JPanel();\n\t\thamPanel.setSize(frameWidth, 40);\n\t\thamPanel.setLayout(new GridLayout(2, 1, 1, 2));\n\t\tJLabel hamFileTitle = new JLabel(\"Ham File\");\n\t\thamPanel.add(hamFileTitle);\n\t\thamFile_Input = new JTextField(\"ham.log\");\n\t\thamFile_Input.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\thamFile_Input.setSize(inputsDimension);\n\t\thamPanel.add(hamFile_Input);\n\t\tFilesPanel.add(hamPanel);\n\t\t\n\t\t//Spam Emails - spam.log\n\t\tJPanel spamPanel = new JPanel();\n\t\tspamPanel.setSize(frameWidth, 40);\n\t\tspamPanel.setLayout(new GridLayout(2, 1, 1, 2));\n\t\tJLabel spamFileTitle = new JLabel(\"SPAM File\");\n\t\tspamPanel.add(spamFileTitle);\n\t\tspamFile_Input = new JTextField(\"spam.log\");\n\t\tspamFile_Input.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\tspamFile_Input.setSize(inputsDimension);\n\t\tspamPanel.add(spamFile_Input);\n\t\tFilesPanel.add(spamPanel);\n\t\t\n\t\t//Get Files Button\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tbuttonPanel.setSize(frameWidth/2, 40);\n\t\tgetFilesButton.setHorizontalAlignment(0);\n\t\tbuttonPanel.add(getFilesButton);\n\t\tFilesPanel.add(buttonPanel);\n\t\t\n\t\tgetFilesButton.addActionListener(\n\t\t\tnew ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcopyFiles(BoardControl.getFile(rulesFile_Input.getText()), AntiSpamFilterControl.rules);\n\t\t\t\t\t\tAntiSpamFilterControl.treatRulesFile();\n\t\t\t\t\t\tcopyFiles(BoardControl.getFile(hamFile_Input.getText()), AntiSpamFilterControl.ham);\n\t\t\t\t\t\tcopyFiles(BoardControl.getFile(spamFile_Input.getText()), AntiSpamFilterControl.spam);\n\t\t\t\t\t\tstartFilesConfig(false);\n\t\t\t\t\t\tstartSpamFilterTest(true);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t\n\t\tframe.add(FilesPanel);\n\t}", "@Override\r\n\tpublic void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NULL);\r\n\t\t// container.setTouchEnabled(true);\r\n\r\n\t\tsetControl(container);\r\n\r\n\t\tLabel lblAgentName = new Label(container, SWT.NONE);\r\n\t\tlblAgentName.setBounds(102, 54, 177, 13);\r\n\t\tlblAgentName.setText(\"Please enter the ZIP filename :\");\r\n\r\n\t\tfileText = new Text(container, SWT.BORDER);\r\n\t\tfileText.setText(\"C:\\\\Documents and Settings\\\\jlouis\\\\My Documents\\\\Downloads\\\\apache_net.zip\");\r\n\t\tfileText.setBounds(102, 75, 289, 19);\r\n\r\n\t\tButton btnBrowse = new Button(container, SWT.NONE);\r\n\t\tbtnBrowse.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\r\n\t\t\t\tfileDialog.setFilterPath(System.getProperty(\"user.home\"));\r\n\t\t\t\tfileDialog.setText(\"Please select a zip file and click OK\");\r\n\r\n\t\t\t\tString filename = fileDialog.open();\r\n\t\t\t\tif (filename != null) {\r\n\t\t\t\t\tfileText.setText(filename);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnBrowse.setBounds(102, 100, 68, 23);\r\n\t\tbtnBrowse.setText(\"Browse\");\r\n\t}", "private void initComponents() {\n\n itemFilePanel = new javax.swing.JPanel();\n itemFileLabel = new javax.swing.JLabel();\n itemFileButton = new javax.swing.JButton();\n entryFilePanel = new javax.swing.JPanel();\n entryFileLabel = new javax.swing.JLabel();\n entryFileButton = new javax.swing.JButton();\n outputFilePanel = new javax.swing.JPanel();\n outputFolderLabel = new javax.swing.JLabel();\n outputFolderButton = new javax.swing.JButton();\n fileTitle = new javax.swing.JLabel();\n\n itemFilePanel.setMinimumSize(new java.awt.Dimension(200, 200));\n itemFilePanel.setLayout(new java.awt.BorderLayout());\n\n itemFilePanel.setBorder(MasterDisplay.getTitledBorder(\"ITEMS FILE\"));\n\n itemFileLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n itemFileLabel.setText(\"NO FILE SELECTED!\");\n itemFilePanel.add(itemFileLabel, java.awt.BorderLayout.CENTER);\n\n itemFileButton.setText(\"CHOOSE OR CHANGE FILE\");\n itemFileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemFileButtonActionPerformed(evt);\n }\n });\n itemFilePanel.add(itemFileButton, java.awt.BorderLayout.PAGE_END);\n\n entryFilePanel.setMinimumSize(new java.awt.Dimension(200, 200));\n entryFilePanel.setLayout(new java.awt.BorderLayout());\n \n entryFilePanel.setBorder(MasterDisplay.getTitledBorder(\"ENTRIES FILE\"));\n\n entryFileLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n entryFileLabel.setText(\"NO FILE SELECTED!\");\n entryFilePanel.add(entryFileLabel, java.awt.BorderLayout.CENTER);\n\n entryFileButton.setText(\"CHOOSE OR CHANGE FILE\");\n entryFileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n entryFileButtonActionPerformed(evt);\n }\n });\n entryFilePanel.add(entryFileButton, java.awt.BorderLayout.PAGE_END);\n\n outputFilePanel.setMinimumSize(new java.awt.Dimension(200, 200));\n outputFilePanel.setLayout(new java.awt.BorderLayout());\n\n outputFilePanel.setBorder(MasterDisplay.getTitledBorder(\"OUTPUT FOLDER\"));\n\n outputFolderLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n outputFolderLabel.setText(\"NO FOLDER SELECTED!\");\n outputFilePanel.add(outputFolderLabel, java.awt.BorderLayout.CENTER);\n\n outputFolderButton.setText(\"CHOOSE OR CHANGE FOLDER\");\n outputFolderButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n outputFolderButtonActionPerformed(evt);\n }\n });\n outputFilePanel.add(outputFolderButton, java.awt.BorderLayout.PAGE_END);\n\n setLayout(new java.awt.BorderLayout());\n\n fileTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n fileTitle.setText(\"FILES\");\n add(fileTitle, java.awt.BorderLayout.PAGE_START);\n }", "private void todoChooserGui() {\r\n jframe = makeFrame(\"My Todo List\", 500, 800, JFrame.EXIT_ON_CLOSE);\r\n panelSelectFile = makePanel(jframe, BorderLayout.CENTER,\r\n \"Choose a Todo\", 150, 50, 200, 25);\r\n JButton clickRetrieve = makeButton(\"retrieveTodo\", \"Retrieve A TodoList\",\r\n 175, 100, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickRetrieve);\r\n JTextField textFieldName = makeJTextField(1, 100, 150, 150, 25);\r\n textFieldName.setName(\"Name\");\r\n panelSelectFile.add(textFieldName);\r\n JButton clickNew = makeButton(\"newTodo\", \"Make New TodoList\",\r\n 250, 150, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickNew);\r\n panelSelectFile.setBackground(Color.WHITE);\r\n jframe.setBackground(Color.PINK);\r\n jframe.setVisible(true);\r\n }", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n fileLabel = new javax.swing.JLabel();\n fileTextField = new javax.swing.JTextField();\n fileSelectButton = new javax.swing.JButton();\n rowEditorsCountLabel_ = new javax.swing.JLabel();\n rowEditorsCountTextField = new javax.swing.JTextField();\n panelViewersCountLabel = new javax.swing.JLabel();\n panelViewersCountTextField = new javax.swing.JTextField();\n panelEditorsCountLabel = new javax.swing.JLabel();\n panelEditorsCountTextField = new javax.swing.JTextField();\n\n fileLabel.setText(\"File\");\n\n fileSelectButton.setText(\"Select...\");\n fileSelectButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fileSelectButtonActionPerformed(evt);\n }\n });\n\n rowEditorsCountLabel_.setText(\"Row Editors Count\");\n\n panelViewersCountLabel.setText(\"Panel Viewers Count\");\n\n panelEditorsCountLabel.setText(\"Panel Editors Count\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rowEditorsCountTextField)\n .addGroup(layout.createSequentialGroup()\n .addComponent(fileTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(fileSelectButton))\n .addComponent(panelViewersCountTextField, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(panelEditorsCountTextField, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fileLabel)\n .addComponent(panelViewersCountLabel)\n .addComponent(rowEditorsCountLabel_)\n .addComponent(panelEditorsCountLabel))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(fileLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fileSelectButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rowEditorsCountLabel_)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rowEditorsCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(panelViewersCountLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelViewersCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelEditorsCountLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelEditorsCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(137, Short.MAX_VALUE))\n );\n }", "public ClientPanel() {\n initComponents();\n chooser = new JFileChooser();\n \n }", "private void initComponents() {\n\n projectNameLabel = new javax.swing.JLabel();\n projectNameTextField = new javax.swing.JTextField();\n projectLocationLabel = new javax.swing.JLabel();\n projectLocationTextField = new javax.swing.JTextField();\n browseButton = new javax.swing.JButton();\n createdFolderLabel = new javax.swing.JLabel();\n createdFolderTextField = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n inputFiles = new javax.swing.JList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n outputFolder = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n\n projectNameLabel.setLabelFor(projectNameTextField);\n org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.projectNameLabel.text\")); // NOI18N\n\n projectLocationLabel.setLabelFor(projectLocationTextField);\n org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.projectLocationLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.browseButton.text\")); // NOI18N\n browseButton.setActionCommand(org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.browseButton.actionCommand\")); // NOI18N\n browseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browseButtonActionPerformed(evt);\n }\n });\n\n createdFolderLabel.setLabelFor(createdFolderTextField);\n org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.createdFolderLabel.text\")); // NOI18N\n\n createdFolderTextField.setEditable(false);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jLabel1.text\")); // NOI18N\n\n inputFiles.setModel(getListModel());\n jScrollPane1.setViewportView(inputFiles);\n inputFiles.setModel(getListModel());\n inputFiles.setCellRenderer(new FileListCellRenderer());\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton1.text\")); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton2.text\")); // NOI18N\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jLabel2.text\")); // NOI18N\n\n outputFolder.setText(org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.outputFolder.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton3, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton3.text\")); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectNameLabel)\n .addComponent(projectLocationLabel)\n .addComponent(createdFolderLabel)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browseButton))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(outputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectNameLabel)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectLocationLabel)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(browseButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(createdFolderLabel)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(18, 18, 18)\n .addComponent(jButton2)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(36, 36, 36))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(outputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addContainerGap())))\n );\n }", "public FileInputFrame() {\n\t\tinitUI();\n\t\tthis.setTitle(\"Load Input File\");\n\t\tthis.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\tthis.add(fileInputPanel);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setResizable(false);\n\t}", "public FilePanel(PropertyChangeListener listener) {\n pcs = new PropertyChangeSupport(this);\n pcs.addPropertyChangeListener(listener);\n initComponents();\n setFonts();\n init();\n }", "public ADD_OFFICER() {\n initComponents();\n filltf();\n jLabel12.setText(\"Select a file\");\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \r\n private void initComponents() {\r\n\r\n jButton2 = new javax.swing.JButton();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n jTextArea1 = new javax.swing.JTextArea();\r\n jTextField1 = new javax.swing.JTextField();\r\n jButton1 = new javax.swing.JButton();\r\n jButton3 = new javax.swing.JButton();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jButton4 = new javax.swing.JButton();\r\n\r\n jButton2.setText(\"jButton2\");\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n jTextArea1.setColumns(20);\r\n jTextArea1.setRows(5);\r\n jScrollPane1.setViewportView(jTextArea1);\r\n\r\n jButton1.setText(\"CREATE\");\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jButton3.setText(\"DELETE\");\r\n jButton3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton3ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel1.setText(\"FILE NAME\");\r\n\r\n jLabel2.setText(\"CONTENT\");\r\n\r\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n jLabel3.setText(\"CREATE A FILE\");\r\n\r\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\r\n jButton4.setText(\"BACK\");\r\n jButton4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton4ActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(129, 129, 129)\r\n .addComponent(jButton1)\r\n .addGap(43, 43, 43)\r\n .addComponent(jButton3)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jButton4)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(60, 60, 60)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel2)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel1)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)\r\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)))))\r\n .addGap(71, 71, 71))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton4))\r\n .addGap(17, 17, 17)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel1)\r\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(23, 23, 23)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel2)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(33, 33, 33)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jButton1)\r\n .addComponent(jButton3))\r\n .addContainerGap(65, Short.MAX_VALUE))\r\n );\r\n\r\n pack();\r\n }", "private JMenu fileMenu(final DrawingPanel thePanel) {\r\n myTrue = false;\r\n \r\n final JMenu fileMenu = new JMenu(\"File\");\r\n fileMenu.setMnemonic(KeyEvent.VK_F); \r\n \r\n \r\n \r\n final JMenuItem fileClear = new JMenuItem(\"Clear\");\r\n fileClear.setMnemonic(KeyEvent.VK_C);\r\n fileClear.setEnabled(thePanel.isThereShapes());\r\n \r\n fileMenu.addChangeListener((theEvent) -> {\r\n myTrue = thePanel.isThereShapes();\r\n fileClear.setEnabled(myTrue);\r\n });\r\n \r\n fileClear.addActionListener((theEvent) -> {\r\n if (fileClear.isEnabled()) {\r\n thePanel.clearShapes();\r\n thePanel.isClear();\r\n }\r\n });\r\n \r\n fileMenu.add(fileClear);\r\n fileMenu.addSeparator();\r\n final JMenuItem fileQuit = new JMenuItem(\"Quit\");\r\n fileQuit.setMnemonic(KeyEvent.VK_Q);\r\n fileQuit.addActionListener((theEvent) -> {\r\n System.exit(0);\r\n });\r\n fileMenu.add(fileQuit);\r\n \r\n return fileMenu;\r\n }", "protected JPanel createCsvSchemaConfigPanel() {\n\t\tJLabel lblSkip = new JLabel(RunnerMessages.getInstance().GenericInputSchemaEditDlg_lbl_SkipRecords + \" : \");\n\t\tSpinnerNumberModel model = new SpinnerNumberModel(0, MIN_SKIP_RECORDS, MAX_SKIP_RECORDS, 1);\n\t\t_spinSkipRecords = new JSpinner(model);\n\t\t\n\t\t// create desc textbox\n\t\tJLabel lblDesc = new JLabel(RunnerMessages.getInstance().GenericFilterEditDlg_name_Desc + \" : \");\n\t\t_txtDesc = new JTextField();\n\t\t\n\t\t// create buttons\n\t\t_btnComposeByFile = new JButton(RunnerMessages.getInstance().GenericInputSchemaEditDlg_btn_ComposeByCsv);\n\t\t_btnFieldAdd = CommonResources.createIconButton(CommonResources.ICON_ADD, RunnerMessages.getInstance().GenericInputSchemaEditDlg_btn_AddField);\n\t\t_btnFieldDelete = CommonResources.createIconButton(CommonResources.ICON_DELETE, CommonMessages.getInstance().Button_Delete);\n\t\t_btnFieldMoveLeft = CommonResources.createIconButton(CommonResources.ICON_ARROW_LEFT, CommonMessages.getInstance().Button_Left);\n\t\t_btnFieldMoveRight = CommonResources.createIconButton(CommonResources.ICON_ARROW_RIGHT, CommonMessages.getInstance().Button_Right);\n\t\t\n\t\t// create box\n\t\tBox box = Box.createHorizontalBox();\n\t\tbox.add(Box.createGlue());\n\t\tbox.add(Box.createHorizontalStrut(5));\n\t\tbox.add(_btnComposeByFile);\n\t\tbox.add(Box.createHorizontalStrut(5));\n\t\tbox.add(_btnFieldAdd);\n\t\tbox.add(Box.createHorizontalStrut(2));\n\t\tbox.add(_btnFieldDelete);\n\t\tbox.add(Box.createHorizontalStrut(2));\n\t\tbox.add(_btnFieldMoveLeft);\n\t\tbox.add(Box.createHorizontalStrut(2));\n\t\tbox.add(_btnFieldMoveRight);\n\t\t\n\t\t// cretae panel\n\t\tJPanel pnl = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 1;\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.anchor = GridBagConstraints.EAST;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.insets = new Insets(0, 0, 5, 0);\n\t\t//--- txtbox\n\t\tpnl.add(lblDesc, gbc);\n\t\tgbc.gridx++;\n\t\tgbc.gridwidth = 2;\n\t\tgbc.weightx = 1;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tpnl.add(_txtDesc, gbc);\n\t\tgbc.weightx = 0;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridy++;\n\t\tgbc.gridx = 0;\n\t\tgbc.insets = new Insets(0, 0, 0, 0);\n\t\t//--- spin\n\t\tpnl.add(lblSkip, gbc);\n\t\tgbc.gridx++;\n\t\tpnl.add(_spinSkipRecords, gbc);\n\t\tgbc.gridx++;\n\t\t//--- buttons\n\t\tgbc.weightx = 1;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tpnl.add(box, gbc);\n\t\t\n\t\treturn pnl;\n\t}", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n filechooser = new javax.swing.JFileChooser();\n javax.swing.JTextArea prompt = new javax.swing.JTextArea();\n fileButton = new EnhancedButton();\n installButton = new EnhancedButton();\n status = new javax.swing.JTextArea();\n\n filechooser.setFileFilter(fileFilter());\n\n setName(InstallPanel.class.getSimpleName());\n setLayout(new java.awt.GridBagLayout());\n\n prompt.setEditable(false);\n prompt.setFont(getFont());\n prompt.setLineWrap(true);\n prompt.setText(format(install_prompt)); // NOI18N\n prompt.setWrapStyleWord(true);\n prompt.setBorder(null);\n prompt.setName(install_prompt.name());\n prompt.setOpaque(false);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.ipady = 5;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 15, 0);\n add(prompt, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n add(fileField, gridBagConstraints);\n\n fileButton.setText(format(install_select)); // NOI18N\n fileButton.setName(install_select.name());\n fileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fileButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n add(fileButton, gridBagConstraints);\n\n installButton.setText(format(install_install)); // NOI18N\n installButton.setName(install_install.name());\n installButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n installActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);\n add(installButton, gridBagConstraints);\n\n status.setEditable(false);\n status.setFont(getFont());\n status.setBorder(null);\n status.setName(\"status\"); // NOI18N\n status.setOpaque(false);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);\n add(status, gridBagConstraints);\n }", "@Override\n\tpublic ToolStripButton getFileButton() {\n\t\treturn fileButton;\n\t}", "private FactoryViewPanel buildBasicPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n JComponent pathComponent = addField(panel, myDataSourceModel.getPath());\r\n if (pathComponent instanceof JTextComponent)\r\n {\r\n ((JTextComponent)pathComponent).setEditable(false);\r\n }\r\n addField(panel, myDataSourceModel.getSourceName());\r\n return panel;\r\n }", "public FileViewer()\n {\n // initialise instance variables\n super(\"File Viewer 1.0\");\n setSize(300,400);\n getContentPane().add(txtIsiFile);\n try{\n txtIsiFile.setText(fl1.bacaFile(\"data.txt\"));\n }catch(Exception e){e.printStackTrace();}\n setVisible(true);\n }", "private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n cclsPath = new javax.swing.JTextField();\n cclsBrowse = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n clangdPath = new javax.swing.JTextField();\n clangdBrowse = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.jLabel1.text\")); // NOI18N\n\n cclsPath.setText(org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.cclsPath.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(cclsBrowse, org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.cclsBrowse.text\")); // NOI18N\n cclsBrowse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cclsBrowseActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.jLabel2.text\")); // NOI18N\n\n clangdPath.setText(org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.clangdPath.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(clangdBrowse, org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.clangdBrowse.text\")); // NOI18N\n clangdBrowse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n clangdBrowseActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(CPPLitePanel.class, \"CPPLitePanel.jLabel3.text\")); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cclsPath)\n .addComponent(clangdPath))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(clangdBrowse)\n .addComponent(cclsBrowse)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 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 .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(cclsPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cclsBrowse))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(clangdPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(clangdBrowse))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }", "public InfoPanel()\n\t\t{\n\t\t\t//setting color and instantiating textfield and button\n\t\t\tsetBackground(bCol);\n\t\t\tnameJF = new JTextField(\"Type Your Name\", 20);\n\t\t\tFont naFont = new Font(\"Serif\", Font.PLAIN, 25);\n\t\t\tnameJF.setFont(naFont);\n\t\t\tsub = new JButton(\"Submit\");\n\t\t\tsub.addActionListener(this);\n\t\t\tsub.setFont(naFont);\n\t\t\tname = new String(\"\");\n\t\t\tadd(nameJF);\n\t\t\tadd(sub);\n\t\t}", "public ControlPanel(String propFile) {\n super(propFile);\n frame = new JFrame(\"Control Panel\");\n frame.setPreferredSize(new Dimension(900, 500));\n frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent event)\r\n\t\t{\n\t\t\tString filePath = filePathField.getText();\r\n\t\t\tif(filePath.isBlank())\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Input cannot be blank. Please enter a valid file path.\",\r\n\t\t\t\t\t\t\"Invalid Input\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Create file from given filePath and read through it using Scanner.\r\n\t\t\t\tFile file = new File(filePath);\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tString fileText = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Read contents of file and create string containing all lines of text.\r\n\t\t\t\t\tScanner scan = new Scanner(file);\r\n\t\t\t\t\twhile (scan.hasNextLine())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString line = scan.nextLine() + \"\\n\";\r\n\t\t\t\t\t\tfileText += line;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscan.close();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set the text of the text area to the string we just created.\r\n\t\t\t\t\tfilePreviewTextArea.setText(fileText);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set the cursor/caret position to the top to fix annoying bug where scroll bar is at bottom\r\n\t\t\t\t\tfilePreviewTextArea.setCaretPosition(0);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(FileNotFoundException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tfilePreviewTextArea.setText(\"Could not open file: \" + file.getPath());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public void getFile(JPanel panel) {\n listOfFile= new ArrayList();\n for(int x=0; x<listOfFiles.length;x++) {\n listOfFile.add(listOfFiles[x]);\n }\n if(FileManaging.isMac()) {\n if(listOfFile.contains(Mac_DS_Store))\n listOfFile.remove(Mac_DS_Store);\n if(listOfFile.contains(Mac_Option))\n listOfFile.remove(Mac_Option);\n //if(listOfFile.contains(Mac_Log))\n // listOfFile.remove(Mac_Log);\n }\n if(panel!=null)\n for(int x=0; x<listOfFile.size();x++) {\n buttons.put(x, new JButton(listOfFile.get(x).getName()));\n buttons.get(x).setVisible(true);\n buttons.get(x).setActionCommand(x+\"\");\n buttons.get(x).addActionListener(this);\n buttons.get(x).setBackground(Color.green);\n panel.add(buttons.get(x));\n }\n }", "@SuppressWarnings(\"deprecation\")\n\t@Override\n\tpublic void onModuleLoad() {\n\t\t/*\n\t\t * Create file interface\n\t\t */\n\t\t// Create a FormPanel and point it at a service.\n\t\tform = new FormPanel();\n\t\tform.setAction(GWT.getModuleBaseURL() + \"greet\");\n\t\tform.setEncoding(FormPanel.ENCODING_MULTIPART);\n\t\tform.setMethod(FormPanel.METHOD_POST);\n\n\t\tform.setWidget(secondPanel);\n\t\t// secondPanel.add(statusLabel);\n\t\t// fileUpload.setName(form.getTitle());\n\t\tfileUpload.setName(\"UploadFile\");\n\n\t\tsecondPanel.add(fileUpload);\n\t\tuploadedOntologies.add(loadFile);\n\t\tClickHandler load_handler = new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(final ClickEvent event) {\n\t\t\t\tform.submit();\n\t\t\t}\n\t\t};\n\t\tloadFile.addClickHandler(load_handler);\n\n\t\tontologies = new ListBox();\n\t\tontologies.setSize(\"152px\", \"18px\");\n\t\n\t\tuploadedOntologies.add(ontologies);\n\t\tuploadedOntologies.setSpacing(5);\n\t\t// secondPanel.add(uploadedOntologies);\n\n\t\t/*\n\t\t * end file creation\n\t\t */\n\t\tlogger.log(Level.SEVERE, \"Log!\");\n\t\tOnt_Table.setText(1, 0, \"Class\"); // 3 columns\n\t\tOnt_Table.setText(1, 2, \"Object Property\");\n\t\tOnt_Table.setText(1, 4, \"Data Property\");\n\t\tdouble wi = Window.getClientWidth() / 3.5;\n\t\tString tablewidth = Double.toString(wi);\n\t\ttripleTable.getColumnFormatter().setWidth(0, tablewidth);\n\t\ttripleTable.getColumnFormatter().setWidth(1, tablewidth);\n\t\ttripleTable.getColumnFormatter().setWidth(2, tablewidth);\n\t\ttripleTable.setStyleName(\"Prompt-User\");\n\t\ttripleTable.setText(0, 0, \"Subject\");\n\t\ttripleTable.setText(0, 1, \"Predicate\");\n\t\ttripleTable.setText(0, 2, \"Object\");\n\t\ttripleTable.getRowFormatter().addStyleName(0, \"Prompt-User\");\n\t\ttripleTable.getColumnFormatter().addStyleName(0, \"columnOne\");\n\t\ttripleTable.getColumnFormatter().addStyleName(1, \"columnTwo\");\n\t\ttripleTable.getColumnFormatter().addStyleName(2, \"columnThree\");\n\t\ttripleTable.addStyleName(\"tripleTable\");\n\t\trow = tripleTable.getRowCount();\n\n\t\twebBox.setText(url);\n\t\twebBox.setWidth(\"340px\");\n\t\tframeWidth = String.valueOf(Window.getClientWidth() / 3.3) + \"px\";\n\t\tqueryBox.setText(\"\\n\\n\\n\\n\\n\\t\\t\\t\\t\\tEnter Query\");\n\t\tqueryBox.setSize(\"369px\", \"332px\");\n\n\t\tqueryBox.addFocusHandler(new FocusHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onFocus(FocusEvent event) {\n\t\t\t\tqueryBox.selectAll();\n\t\t\t}\n\n\t\t});\n\t\tontology_from_disk.setText(\"/Users/markhender/ontologies/pizzas/pizza.rdf\");\n\t\tontology_from_disk.setWidth(\"340px\");\n\t\tframe = new Frame();\n\t\tframe.setUrl(url);\n\t\tframeWidth = String.valueOf(Window.getClientWidth() / 1.5) + \"px\"; // works\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cross\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// browsers\n\t\tframeHeight = String.valueOf(String.valueOf(Window.getClientHeight() / 1.3) + \"px\");\n\t\tframe.setWidth(frameWidth);\n\t\tframe.setHeight(frameHeight);\n\t\tframe.setVisible(true);\n\n\t\t/*\n\t\t * Popup Panel\n\t\t */\n\t\tpopupHolder.add(closePopup);\n\n\t\tpopup.setWidget(popupContents);\n\t\tclosePopup.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tint end_of_list = ft.getRowCount();\n\t\t\t\tint count = 1;\n\n\t\t\t\twhile (count < end_of_list) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"line\");\n\t\t\t\t\tCheckBox box = (CheckBox) ft.getWidget(count, 3);\n\t\t\t\t\tif (box.getValue()) {\n\t\t\t\t\t\t// tripleTable.setText(tripleTable.getRowCount(), 0,\n\t\t\t\t\t\t// ft.getText(count, 0));\n\t\t\t\t\t\tprintSuggestedSubject(ft.getText(count, 0));\n\t\t\t\t\t\taddPredicate(ft.getText(count, 1));\n\t\t\t\t\t\tif (ft.getText(count, 1).endsWith(\"*\"))\n\t\t\t\t\t\t\taddLitObject(ft.getText(count, 2));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\taddObject(ft.getText(count, 2));\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tlogger.log(Level.SEVERE, \"BINGO\");\n\t\t\t\tft.removeAllRows();\n\n\t\t\t\tpopup.hide();\n\t\t\t\tpopupContents.clear();\n\t\t\t\tpopupContents.add(popupHolder);\n\t\t\t}\n\t\t});\n\t\tcontent.setText(\"Search for content in webpage\");\n\t\tcontent.addFocusHandler(new FocusHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onFocus(FocusEvent event) {\n\t\t\t\tcontent.setFocus(true);\n\t\t\t\tif (content.getText().equals(\"Search for content in webpage\"))\n\t\t\t\t\tcontent.setText(\"\");\n\t\t\t\telse\n\t\t\t\t\tcontent.selectAll();\n\t\t\t}\n\t\t});\n\t\taddPanel.add(webBox);\n\n\t\tsearchPanel.add(content); // content search box\n\t\tsearchPanel.add(search); // trigger content search button\n\t\tsearch.setHeight(\"37px\");\n\t\tdBox.setText(\"Triple Report\");\n\t\tclose.setText(\"Close\");\n\t\tclose.addClickListener(new ClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(Widget sender) {\n\t\t\t\tdialogBoxContents.clear();\n\t\t\t\tdBox.hide();\n\t\t\t}\n\t\t});\n\t\tdialogBoxholder.add(close);\n\n\t\tloadOntologyInternet.add(ontology_from_internet);\n\t\tloadOntologyInternet.add(load_ontology_web_button);\n\t\tradioButtonPanel.add(radioA);\n\t\tradioButtonPanel.add(radioB);\n\t\tsearchPanel.add(radioButtonPanel);\n\t\tbottomOfScreen.add(searchPanel);\n\t\tbottomOfScreen.add(tripleTable);\n\t\ttripleTable.setSize(\"981px\", \"67px\");\n\t\t// bottomOfScreen.setSpacing(10);\n\t\tsearch.setText(\"Enter\");\n\t\tcontent.setSize(\"282px\", \"29px\");\n\t\tListBox listbox = new ListBox();\n\t\tontology_Classes = new ListBox(); // Ontology class listbox\n\t\tproperty_Resources = new ListBox(); // \" property listbox\n\t\tproperty_Literals = new ListBox(); // \" individual listbox\n\t\tontology_Classes.setWidth(\"100px\");\n\t\tproperty_Resources.setWidth(\"100px\");\n\t\tproperty_Literals.setWidth(\"100px\");\n\n\t\tlistbox.setWidth(\"100px\");\n\t\tlistbox.setHeight(\"400px\");\n\t\tsave.setText(\"Save\");\n\t\tlistbox.setVisible(false);\n\t\t/*\n\t\t * before new page\n\t\t */\n\t\tfinal PopupPanel contextpanel = new PopupPanel();\n\n\t\tfinal Button ok = new Button(\"OK\");\n\t\tfinal HorizontalPanel hori = new HorizontalPanel();\n\t\tcontextpanel.setWidget(hori);\n\t\tentercontext.setText(\"context\");\n\t\thori.add(ok);\n\t\tfinal ClickHandler download_handler = new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tgreetingService.downloadRepository(entercontext.getText(), new downloadRepository());\n\t\t\t\tif (repository_downloaded)\n\t\t\t\t\tloadPageTwo(export_fp);\n\t\t\t\trepository_downloaded = true;\n\t\t\t\tlogger.log(Level.SEVERE, \"download_handler called\");\n\t\t\t}\n\t\t};\n\t\tClickHandler newpage_handler = new ClickHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcontextpanel.center();\n\t\t\t\tok.addClickHandler(new ClickHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\tif (repository_downloaded)\n\t\t\t\t\t\t\tloadPageTwo(export_fp);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tdownload_handler.onClick(event);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontextpanel.hide();\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tlogger.log(Level.SEVERE, \"export path: \" + filepathofexport);\n\n\t\t\t}\n\n\t\t};\n\t\tnew_page.addClickHandler(newpage_handler);\n\t\tdownload_repository.addClickHandler(download_handler);\n\t\t/* Return to homepage */\n\t\thome_page.addClickHandler(new ClickHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tloadHomePage();\n\t\t\t}\n\t\t});\n\t\t/* home page */\n\n\t\t//mainPanel.add(frame); // browser\n\t\tmainPanel.add(uploadedOntologies);\n\t\tmainPanel.add(addPanel); // url for browser\n\t\t\t\taddPanel.add(webSend);\n\t\t\t\twebSend.setHeight(\"32px\");\n\t\t\n\t\t\t\twebSend.setText(\"GO\");\n\t\t\t\t\n\t\t\t\t\t\t// Listen for mouse events on webSend Button\n\t\t\t\t\t\t// to get new website\n\t\t\t\t\t\twebSend.addClickHandler(new ClickHandler() {\n\t\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tframe.setUrl(webBox.getText()); // take url from textbox\n\t\t\t\t\t\t\t\tlogger.log(Level.SEVERE, frame.getUrl());\n\t\t\t\t\t\t\t\tcontent.setFocus(true);\n\t\t\t\t\t\t\t\tcontent.selectAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tmainPanel.add(loadOntologyInternet);\n\t\tmainPanel.add(Ont_Table); // listboxes\n\t\tmainPanel.add(queryBox);\n\t\tmainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);\n\t\tmainPanel.add(queryButton);\n\t\tmainPanel.add(new_page);\n\t\tmainPanel.add(download_repository);\n\n\t\tRootPanel.get(\"stockList\").add(frame, RootPanel.get(\"stockList\").getAbsoluteLeft(), RootPanel.get(\"stockList\").getAbsoluteTop());\n\t\tRootPanel.get(\"stockList\").add(bottomOfScreen, 0, 725);\n\t\tbottomOfScreen.setSize(\"984px\", \"128px\");\n\t\tRootPanel.get(\"stockList\").add(form, frame.getOffsetWidth() + 10, frame.getAbsoluteTop());\n\t\tRootPanel.get(\"stockList\").add(mainPanel, frame.getOffsetWidth() + 10, form.getOffsetHeight() + frame.getAbsoluteTop());\n\t\t// listen for keyboard events in the textbox\n\t\twebBox.addKeyUpHandler(new KeyUpHandler() {\n\t\t\t@Override\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tif (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {\n\t\t\t\t\tframe.setUrl(webBox.getText());\n\t\t\t\t\tcontent.setFocus(true);\n\t\t\t\t\tcontent.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tframe.addLoadHandler(new LoadHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onLoad(LoadEvent event) {\n\t\t\t\t\n\t\t\t}\n\n\t\t});\n\t\tfinal AsyncCallback<ArrayList<String>> ontology_class = new AsyncCallback<ArrayList<String>>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ArrayList<String> result) {\n\t\t\t\tclasses = result;\n\t\t\t\tontology.get(ontology.size() - 1).setClasses(result);\n\t\t\t\tif (ontology.size() == 1)\n\t\t\t\t\tpopulate_ClassBox(0);\n\t\t\t}\n\t\t};\n\t\tfinal AsyncCallback<ArrayList<String>> property_resource = new AsyncCallback<ArrayList<String>>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ArrayList<String> result) {\n\t\t\t\tproperties = result;\n\t\t\t\tontology.get(ontology.size() - 1).setProperties(result);\n\t\t\t\tif (ontology.size() == 1)\n\t\t\t\t\tpopulate_PropertyBox(0);\n\t\t\t}\n\t\t};\n\t\tfinal AsyncCallback<ArrayList<String>> property_literal = new AsyncCallback<ArrayList<String>>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ArrayList<String> result) {\n\t\t\t\tliterals = result;\n\t\t\t\tontology.get(ontology.size() - 1).setLiterals(result);\n\t\t\t\tif (ontology.size() == 1)\n\t\t\t\t\tpopulate_LiteralBox(0);\n\t\t\t}\n\t\t};\n\n\t\tload_ontology_web_button.addClickHandler(new ClickHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t// TODO load ontologies from a web address\n\t\t\t}\n\n\t\t});\n\t\tfinal AsyncCallback<Integer[]> subjectIndexOfContent = new AsyncCallback<Integer[]>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(Integer[] result) {\n\t\t\t\tif (result[0] != -99 && result[1] != -99) {\n\t\t\t\t\t// word found\n\t\t\t\t\tprintSubject();\n\t\t\t\t} else\n\t\t\t\t\tWindow.alert(\"Word not found\");\n\t\t\t}\n\n\t\t};\n\n\t\tfinal AsyncCallback<String> getOntName = new AsyncCallback<String>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tontName = result;\n\t\t\t\tontology.get(ontology.size() - 1).setName(result);\n\t\t\t\tlogger.log(Level.SEVERE, (\"OntologyName = \" + ontName));\n\t\t\t}\n\n\t\t};\n\n\t\tfinal AsyncCallback<String> geturi = new AsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tbaseURI = result;\n\t\t\t\tontology.get(ontology.size() - 1).setBaseURI(result);\n\t\t\t\tlogger.log(Level.SEVERE, \"The baseURI is \" + baseURI);\n\t\t\t}\n\n\t\t};\n\t\tfinal AsyncCallback<ArrayList<String[]>> suggestedTriples = new AsyncCallback<ArrayList<String[]>>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ArrayList<String[]> result) {\n\t\t\t\tlogger.log(Level.SEVERE, \"First\");\n\t\t\t\tpopulateSuggestedTriples(result);\n\t\t\t\tWindow.alert(\"Pass\");\n\t\t\t}\n\n\t\t};\n\t\ttripleTable.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcom.google.gwt.user.client.ui.HTMLTable.Cell cell = tripleTable.getCellForEvent(event);\n\t\t\t\tint cellIndex = cell.getCellIndex();\n\t\t\t\tint rowIndex = cell.getRowIndex();\n\t\t\t\tif (cellIndex == 4 || cellIndex == 0) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Sending: \" + tripleTable.getText(rowIndex, 0));\n\t\t\t\t\tgreetingService.suggestedTriples(tripleTable.getHTML(rowIndex, 0), suggestedTriples);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tsearch.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString blah = content.getText();\n\t\t\t\tif (radioA.isChecked() || !radioB.isChecked())\n\t\t\t\t\tgreetingService.wordExists(blah, webBox.getText(), subjectIndexOfContent);\n\t\t\t\telse{\n\t\t\t\t\tprintSubject();\n\t\t\t\t}\n\t\t\t\tcontent.setFocus(true);\n\t\t\t\tcontent.selectAll();\n\t\t\t}\n\t\t});\n\n\t\tcontent.addKeyUpHandler(new KeyUpHandler() {\n\t\t\t@Override\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\n\t\t\t\tif (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {\n\t\t\t\t\tif (radioA.isChecked() || !radioB.isChecked())\n\t\t\t\t\t\tgreetingService.wordExists(content.getText(), webBox.getText(), subjectIndexOfContent);\n\t\t\t\t\telse\n\t\t\t\t\t\tprintSubject();\n\t\t\t\t\tcontent.setFocus(true);\n\t\t\t\t\tcontent.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsave.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString[] temp = new String[3];\n\t\t\t\ttemp = getTriples();\n\t\t\t\trepository_downloaded = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tOnt_Table.setWidget(0, 2, menuBar);\n\t\tmenuBar.setSize(\"100%\", \"100%\");\n\t\t\n\t\tClasses = new MenuItem(\"Classes\", false, menuBar_3);\n\t\tOntology_Contents_Holder.addItem(Classes);\n\t\tmenuBar_2.addItem(mntmObject);\n\t\tmenuBar_2.addItem(mntmData);\n\t\tOntology_Contents_Holder.addItem(Properties);\n\t\tmenuBar.addItem(Ontology_Name);\n\t\t\n\t\tOnt_Table.setWidget(2, 2, property_Resources);\n\t\tOnt_Table.setWidget(2, 4, property_Literals);\n\n\t\t/*\n\t\t * Adding Change listener to listboxes\n\t\t */\n\t\tontologies.addChangeListener(new ChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onChange(Widget sender) {\n\t\t\t\tint listIndex = ontologies.getSelectedIndex();\n\n\t\t\t\tpopulate_ClassBox(listIndex);\n\t\t\t\tpopulate_PropertyBox(listIndex);\n\t\t\t\tpopulate_LiteralBox(listIndex);\n\t\t\t}\n\t\t});\n\t\tontology_Classes.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChange(Widget sender) {\n\t\t\t\tint listIndex = ontology_Classes.getSelectedIndex();\n\t\t\t\tString uri = ontology.get(ontologies.getSelectedIndex()).getBaseURI();\n\t\t\t\tString item = uri + ontology_Classes.getItemText(listIndex);\n\t\t\t\taddObject(item);\n\t\t\t}\n\n\t\t});\n\t\tproperty_Resources.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChange(Widget sender) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint listIndex = property_Resources.getSelectedIndex();\n\t\t\t\tlogger.log(Level.SEVERE, property_Resources.getItemText(listIndex));\n\t\t\t\tif (!(property_Resources.getItemText(listIndex).equals(\"RDF.type\"))) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"not rdf.type\");\n\t\t\t\t\tString uri = ontology.get(ontologies.getSelectedIndex()).getBaseURI();\n\t\t\t\t\tString item = uri + property_Resources.getItemText(listIndex);\n\t\t\t\t\taddPredicate(item);\n\t\t\t\t} else {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"rdf.type\");\n\t\t\t\t\tString item = property_Resources.getItemText(listIndex);\n\t\t\t\t\taddPredicate(item);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\tproperty_Literals.addChangeListener(new ChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onChange(Widget sender) {\n\t\t\t\tif (property_Literals.getItemCount() == 0)\n\t\t\t\t\tWindow.alert(\"This list is empty!\");\n\t\t\t\telse {\n\t\t\t\t\tint listIndex = property_Literals.getSelectedIndex();\n\t\t\t\t\tString uri = ontology.get(ontologies.getSelectedIndex()).getBaseURI();\n\t\t\t\t\tString item = uri + property_Literals.getItemText(listIndex);\n\t\t\t\t\taddPredicate(item);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * File submit handling\n\t\t */\n\t\tform.addFormHandler(new FormHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onSubmit(FormSubmitEvent event) {\n\t\t\t\t// logger.log(Level.SEVERE, \"form title: \"+\n\t\t\t\t// fileUpload.getFilename().substring(fileUpload.getFilename().lastIndexOf('\\\\')\n\t\t\t\t// + 1));\n\t\t\t\tontName = fileUpload.getFilename().substring(fileUpload.getFilename().lastIndexOf('\\\\') + 1);\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSubmitComplete(FormSubmitCompleteEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t});\n\t\tform.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onSubmitComplete(SubmitCompleteEvent event) {\n\t\t\t\tlogger.log(Level.SEVERE, \"form title: \" + form.getTitle());\n\t\t\t\tform.reset();\n\t\t\t\tAsyncCallback<String> pathfile = new AsyncCallback<String>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tpath_of_uploaded_file = result;\n\t\t\t\t\t\tontology.get(ontology.size() - 1).setFilePath(result);\n\t\t\t\t\t\tWindow.alert(\"Pass\");\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 1, ontology_class);\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 2, property_resource);\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 3, property_literal);\n\n\t\t\t\t\t\tontologies.addItem(ontology.get(ontology.size() - 1).getName());\n\n\t\t\t\t\t\t// logger.log(Level.SEVERE, baseURI);\n\t\t\t\t\t}\n\n\t\t\t\t};\n\t\t\t\tgreetingService.filePath(pathfile);\n\t\t\t\tgreetingService.getBaseURI(geturi);\n\t\t\t\t// greetingService.getOntName(getOntName);\n\t\t\t\tontology.add(new Ontology(ontName, path_of_uploaded_file, baseURI, classes, properties, literals));\n\t\t\t\t// greetingService.getOntName(getOntName);\n\t\t\t\tif (ontology.size() == 1) {\n\t\t\t\t\t// populate_listBoxes();\n\t\t\t\t}\n\t\t\t\tlogger.log(Level.SEVERE, \"baseuri = \" + baseURI);\n\t\t\t}\n\n\t\t});\n\n\t}", "private void addFFMPEGField(I18nPanelBuilder parent) {\r\n I18nPanelBuilder builder = parent.addPanel(parent.gbcSet(0, 1, GridBagUtils.HORIZONTAL));\r\n builder.setI18nTitleBorder(\"movie.config.ffmpeg\");\r\n\r\n fileChooser = builder.add(Components.newFileChooser(), builder.gbcSet(0, 0, GridBagUtils.HORIZONTAL));\r\n fileChooser.setFilesOnly();\r\n fileChooser.setFileFilter(new SimpleFilter(\"Exe files\", \"exe\"));\r\n fileChooser.setTextKey(\"movie.config.ffmpeg.file\");\r\n }", "private void addFileUploadField() {\n FileUpload upload = new FileUpload();\n upload.setName(\"fileUpload\" + i);\n fileUploadPanel.add(upload);\n i++;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panelAddSearch = new javax.swing.JPanel();\n labelNameSearch = new javax.swing.JLabel();\n nameSearch = new javax.swing.JTextField();\n buttonAddSearch = new javax.swing.JButton();\n tabbedPaneSearch = new javax.swing.JTabbedPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"FlexibleFileFinder\");\n setName(\"FlexibleFileFinder\"); // NOI18N\n\n panelAddSearch.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\n labelNameSearch.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n labelNameSearch.setText(\"Name Search:\");\n\n nameSearch.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n\n buttonAddSearch.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n buttonAddSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/bz/filefinder/usedPictures/AddSearch.png\"))); // NOI18N\n buttonAddSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonAddSearchActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelAddSearchLayout = new javax.swing.GroupLayout(panelAddSearch);\n panelAddSearch.setLayout(panelAddSearchLayout);\n panelAddSearchLayout.setHorizontalGroup(\n panelAddSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelAddSearchLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelNameSearch)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nameSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonAddSearch)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n panelAddSearchLayout.setVerticalGroup(\n panelAddSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelAddSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(labelNameSearch)\n .addComponent(nameSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonAddSearch))\n );\n\n tabbedPaneSearch.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\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.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tabbedPaneSearch)\n .addGroup(layout.createSequentialGroup()\n .addComponent(panelAddSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 772, 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 .addComponent(panelAddSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tabbedPaneSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE))\n );\n\n pack();\n }", "private static void createAndShowGUI() {\n\t\tJFrame f = new JFrame(\" LostSale Saver\");\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n f.setPreferredSize(new Dimension(1500,800));\t\t\n\t\tf.getContentPane().setBackground(Color.white);\n\t\tf.setLayout(new FlowLayout());\n\t\t\n\t\t// Build buttons\n\t\tJButton btnSelect = new JButton(\"View Selected\");\n\t\tbtnSelect.setPreferredSize(new Dimension(50,30));\n\t\tJButton btnRemove= new JButton(\"Remove Selected\");\n\t\tbtnRemove.setPreferredSize(new Dimension(50,30));\t\t\n\t\tJButton btnAddToDB = new JButton(\"Add to SaveFile\");\n\t\tbtnAddToDB.setPreferredSize(new Dimension(50,30));\n\t\t\n\t\t// Load Directory list\n\t\tdirString = dir.list();\n\t\tdirList = new JList<String>(dirString);\n\t\tdirList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\t\n\t\tdirScroll = new JScrollPane(dirList);\n\t\tdirScroll.setPreferredSize(new Dimension(400,600));\n\t\t\n\t\t// Load Text area\n\t\ttext = new JTextArea();\n\t\ttext.setBackground(new Color(248, 213, 131));\n\t\ttextScroll = new JScrollPane(text);\n\t\ttextScroll.setPreferredSize(new Dimension(850,600));\n\t\t\n\t\t// Current label\n\t\tjlab = new JLabel(\"Current selection: none\");\n\n\t\t// Create Left Panel; add components\n\t\tJPanel lp = new JPanel();\n\t\tlp.setLayout(new BorderLayout());\n\t\tlp.add(dirScroll, BorderLayout.NORTH);\n\t\tlp.add(btnSelect);\t\n\t\tlp.add(btnAddToDB,BorderLayout.SOUTH);\n\t\t\t\t\n\t\t// Create Right Panel; add components\n\t\tJPanel rp = new JPanel();\n\t\trp.setLayout(new BorderLayout());\n\t\trp.add(textScroll, BorderLayout.NORTH);\n\t\trp.add(btnRemove, BorderLayout.SOUTH);\t\n\t\t\n\t\t// Add panels to content pane\n\t\tf.add(lp, BorderLayout.WEST);\n\t\tf.add(rp, BorderLayout.EAST);\n\t\tf.add(jlab);\n\n\t\t// Display\n\t\tf.pack();\n\t\tf.setVisible(true);\n\t\n\t\t// Directory Listener\n\t\tdirList.addListSelectionListener(new ListSelectionListener() {\n\t\t\tpublic void valueChanged(ListSelectionEvent le) {\n\t\t\t\tint idx = dirList.getSelectedIndex();\t\t\t\n\t\t\t\tif (idx != -1) {\n\t\t\t\t\tselectedFile = dirString[idx];\n\t\t\t\t\tjlab.setText(\"Current selection: \" + selectedFile);\t\n\t\t\t\t} else {\n\t\t\t\t\tselectedFile = null;\n\t\t\t\t\tjlab.setText(\"Current selection: none\");\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t});\n\t\n\t\t// View Action listener \n\t\tbtnSelect.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\ttext.setText(\"\");\n\t\t\t\t// clear \n\t\t\t\tfor (int i=0; i<lines.length; i++)\n\t\t\t\t\tlines[i]=null;\n\t\t\t\t// load records into array\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader in = new BufferedReader(new FileReader(myPath+selectedFile));\n\t\t\t\t\tString line;\n\t\t\t\t\tint i = 0;\n\t\t\t\t\twhile ( (line = in.readLine()) != null) {\n\t\t\t\t\t\tlines[i]=line;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\t\t\t\t\t\t\t\t\n\t\t\t\t} catch (Exception ex) {}\n\t\t\t\t\t// build output\n\t\t\t\t\tfor(String w: lines) {\n\t\t\t\t\t\tif (w != null) {\n\t\t\t\t\t\t\ttext.append(w + '\\n');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t});\t\n\t\n\t\t// Remove Action listener \n\t\tbtnRemove.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tFile deleteFile = new File(myPath + selectedFile);\n\t\t\t\tdeleteFile.delete();\n\t\t\t\tdirString = dir.list();\t\t\t\t\n\t\t\t\tdirList.setListData(dirString);\n\t\t\t}\n\t\t});\n\t\n\t\t// Add_to_DB Action listener \n\t\tbtnAddToDB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\n\t\t\t\t// Get selected files; \n\t\t\t\tjava.util.List<String> sval=dirList.getSelectedValuesList();\n\t\t\t\t\t\t\t \n\t\t\t\t// Process each selection\n\t\t\t\tfor(int i=0;i<sval.size();i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString fileToXML = sval.get(i);\t\t \t\t\t\n\t\t\t\t\t\t//System.out.println(fileToXML);\n\t \t\n\t\t\t\t\t\t// create lostsale.XML if not exist\n\t\t\t\t\t\tFile xmlSave = new File(myPath + \"lostsave.xml\");\n\t\t\t\t\t\txmlSave.createNewFile(); \n\t\t\t\t\t\tdirString = dir.list();\n\t\t\t\t\t\tdirList.setListData(dirString);\n\t\t\t\t\t\tFileWriter xs = new FileWriter(xmlSave, true);\t\n\t \t\t\t\n\t\t\t\t\t\t// copy records from current file to save file\n\t\t\t\t\t\tBufferedReader in = new BufferedReader(new FileReader(myPath+fileToXML));\n\t\t\t\t\t\tString line = null;\n\t\t\t\t\t\tStringBuffer xmlLine = null;\n\t\t\t\t\t\twhile ( (line = in.readLine()) != null) {\n\t\t\t\t\t\t\txmlLine = new StringBuffer(\"<save date=\\\"\");\n\t\t\t\t\t\t\tint from = line.indexOf(\"[\");\n\t\t\t\t\t\t\tint to = line.indexOf(\"]\");\n\t\t\t\t\t\t\txmlLine.append(line.substring(from+1,to) + \"\\\" partno=\\\"\");\n\t\t\t\t\t\t\tfrom = line.indexOf(\"[\", to);\n\t\t\t\t\t\t\tto = line.indexOf(\"]\", from);\n\t\t\t\t\t\t\txmlLine.append(line.substring(from+1,to) + \"\\\" customer=\\\"\");\n\t\t\t\t\t\t\tfrom = line.indexOf(\"[\", to);\n\t\t\t\t\t\t\tto = line.indexOf(\"]\", from);\n\t\t\t\t\t\t\txmlLine.append(line.substring(from+1,to) + \"\\\" comment=\\\"\");\n\t\t\t\t\t\t\txmlLine.append(line.substring(to+1) + \"\\\" \\\\>\" + \"\\n\"); \n\t\t\t\t\t\t\txs.write(xmlLine.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tin.close();\t\t\t\t\n\t\t\t\t\t\txs.close();\n\t \t\t} catch (Exception ex) {} \t \t\n\t\t\t\t} // end for\n\t\t\t}\n\t\t});\t\n\t\t\n\t}", "@Override\r\n\tpublic void createPartControl(final Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData data = new GridData(GridData.GRAB_HORIZONTAL);\r\n\t\tGridData dataBoth = new GridData(GridData.FILL_BOTH);\r\n\t\tGridLayout gridLayout = new GridLayout(); \r\n\t\tgridLayout.numColumns = 2; \r\n\t\tgridLayout.makeColumnsEqualWidth = true;\r\n\t\tcontainer.setLayout(gridLayout); \r\n\t\tcontainer.setLayoutData(dataBoth);\r\n\t\tGridLayout butLayout = new GridLayout();\r\n\t\tbutLayout.numColumns = 4;\r\n\t\tbutLayout.makeColumnsEqualWidth = true;\r\n\t\tComposite buttContainer = new Composite(container, SWT.NONE);\r\n\t\tbuttContainer.setLayout(butLayout);\r\n\t\tbuttContainer.setLayoutData(data); \r\n\t\t\r\n\t\t//Bottone per aprire un nuovo BM\r\n\t\tfinal Button buttonCreate = new Button(buttContainer, SWT.NONE);\r\n\t\tImage image = Activator.getImageDescriptor(\"icons/bmOpen.png\").createImage();\r\n\t\tif (image!=null)buttonCreate.setImage(image);\r\n\t\tbuttonCreate.setText(\"Open a BM\");\r\n\t\t\r\n\t\t//viewer per le connessioni attive\r\n\t\tfinal Table connTable = new Table(container, SWT.BORDER);\r\n\r\n\t connTable.setLayoutData(dataBoth);\r\n\t \r\n\r\n\t\tTableColumn tc1 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc2 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc4 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc5 = new TableColumn(connTable, SWT.CENTER);\r\n\t\t\t tc1.setText(\"Name\");\r\n\t\t tc2.setText(\"Path\");\r\n\t\t tc4.setText(\"BC #\");\r\n\t\t tc5.setText(\"CBC #\");\r\n\t\t\ttc1.setWidth(90);\r\n\t\t tc2.setWidth(130);\r\n\t\t tc4.setWidth(50);\r\n\t\t tc5.setWidth(50);\r\n\t\tconnTable.setHeaderVisible(true);\r\n\t\t\t\r\n\t\t\r\n\t\t//Creo un nuovo listener\r\n\t\tListener listenerCreate = new Listener() {\r\n\t\t public void handleEvent(Event event) {\r\n\t\t if (event.widget == buttonCreate) {\r\n\t\t \t\r\n\t\t \tFileDialog fileDialog = new FileDialog(new Shell());\r\n\t\t \t\t// Set the text\r\n\t\t \t\tfileDialog.setText(\"Select a Business Model\");\r\n\t\t \t\t// Set filter on .txt files\r\n\t\t \t\tfileDialog.setFilterExtensions(new String[] { \"*.bm\" });\r\n\t\t \t\t// Put in a readable name for the filter\r\n\t\t \t\tfileDialog.setFilterNames(new String[] { \"BusinessModel(*.bm)\" });\r\n\t\t \t\t// Open Dialog and save result of selection\r\n\t\t \t\tString selected = fileDialog.open();\r\n\t\t \t\t\r\n\r\n\t\t \t\t\r\n\t\t \t\ttry {\r\n\t\t \t\t\t\r\n\t\t \t\t\tString result = HunkIO.readEntireFile(selected,\r\n\t\t \t\t\t \"UTF-8\" );\r\n\t\t \t\t\tString defInfoFile = result.split(\"<DEFAULT_INFO_FILE>\")[1].split(\"</DEFAULT_INFO_FILE>\")[0];\r\n\t\t \t\t\t\r\n\t\t \t\t\tbmName = defInfoFile.split(\"#\")[0];\r\n\t\t \t\t\tbmPath = defInfoFile.split(\"#\")[1];\r\n\t\t \t\t\t\r\n\t\t \t\t\tHunkIO.writeEntireFile(HunkIO.DEFAULT_INFO_FILE, defInfoFile, \"UTF-8\");\r\n\t\t \t\t\t\r\n\t\t \t\t\t//MC: ricavo directory del progetto corrente\r\n\t\t \t\t\tURL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t String path_project = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t System.out.println(\"BMPoolsView path proj: \"+path_project);\r\n\t\t \t\t //MessageDialog.openInformation(new Shell(), \"BMPoolsView path proj\", path_project);\r\n\t\t \t\t \r\n\t\t \t\t\t//Workaround per export come RCP Application\r\n\t\t \t\t\t//String path_project = System.getProperty(\"user.dir\").replace(\"\\\\\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"BMPoolsView\", path_project);\r\n\t\t \t\t\t//URL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t\t//String file_name = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"Filename\", file_name);\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t//Ottengo la vista\r\n\t\t \t\t\topenFile(result.split(\"<bmUniverse>\\n\")[1].split(\"</bmUniverse>\")[0]);\r\n\t\t \t\t\t\r\n\t\t \t\t\t//TODO: VERIFICARE LA CORRETTEZZA DELLA POSISZIONE\r\n\t\t \t\t\t//importo IL PERSISTENCE nella cartella d'installazione\r\n\t\t \t\t\tif (!bcList.isEmpty()){\r\n\t\t \t\t\t\tClassInfo ci =bcList.get(0);\r\n\t\t \t\t\t\tFile f = new File(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\tif (!f.exists()){\r\n\t\t \t\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE IL FILE DI PERSISTENZA\");\r\n\t\t \t\t\t\t\treturn;\r\n\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\t//LO SPOSTO NELLA CARTELLA META-INF DELL'INSTALLAZIONE\r\n\t\t \t\t\t\t//f = new File(ConstantString.BMM_INSTALL_PATH+\"/META-INF/\");\r\n\t\t \t\t\t\tf = new File(path_project+\"/META-INF/\");\r\n\t\t \t\t\t\tif(!f.exists()){\r\n\t\t \t\t\t\t\tf.mkdir();\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\tString buffer = HunkIO.readEntireFile(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\t//HunkIO.writeEntireFile(ConstantString.BMM_INSTALL_PATH+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\tHunkIO.writeEntireFile(path_project+\"/META-INF/persistence.xml\", buffer);\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\t//aggiorno i dati nella tabella\r\n\t\t \t\t\tTableItem ti = new TableItem(connTable, 0);\r\n\t\t \t\t\tImage imageBM = Activator.getImageDescriptor(\"icons/bm.png\").createImage();\r\n\t\t \t\t\t\r\n\t\t \t\t\tif (imageBM!=null)ti.setImage(imageBM);\r\n\t\t \t\t\t\r\n\t\t \t\t\tti.setText( new String[]{bmName,\r\n\t\t \t\t\t\t\t\tbmPath,\"\"+bcList.size(),\"\"+cbcList.size()});\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\t} catch (IOException e) {\r\n\t\t \t\t\t\te.printStackTrace();\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t }\r\n\r\n\t\t\tprivate void openFile(String result) {\r\n\t\t\t\t\r\n\t\t\t\tString bcString = result.split(\"<bcList>\\n\")[1].split(\"</bcList>\\n\")[0];\r\n\t\t\t\tString[] bcBuffer = bcString.split(\"<bc>\\n\");\r\n\t\t\t\tString relString = result.split(\"<relList>\\n\")[1].split(\"</relList>\\n\")[0];\r\n\t\t\t\tString[] relBuffer = relString.split(\"<rel>\\n\");\r\n\t\t\t\tString cbcString = null;\r\n\t\t\t\tString[] cbcBuffer = null;\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcbcString = result.split(\"<cbcList>\\n\")[1].split(\"</cbcList>\\n\")[0];\r\n\t\t\t\t\tcbcBuffer = cbcString.split(\"<cbc>\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbcList.clear();\r\n\t\t\t\trelList.clear();\r\n\t\t\t\tcbcList.clear();\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<bcBuffer.length;k++){\r\n\t\t\t\t\tString bcPath = bcBuffer[k].split(\"<bcPath>\")[1].split(\"</bcPath>\")[0];\r\n\t\t\t\t\tClassInfo ci = new ClassInfo(bcPath, null);\r\n\t\t\t\t\tci.buildClassInfo();\r\n\t\t\t\t\tbcList.add(ci);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<relBuffer.length;k++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString c1 = relBuffer[k].split(\"<c1>\")[1].split(\"</c1>\")[0];\r\n\t\t\t\t\tString c2 = relBuffer[k].split(\"<c2>\")[1].split(\"</c2>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* PUO' SERVIRE IN FUTURO\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * \r\n\t\t\t\t\tClassInfo ci1 = null,ci2 = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c1)){\r\n\t\t\t\t\t\t\tci1 = bcList.get(i); \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c2)){\r\n\t\t\t\t\t\t\tci2 = bcList.get(i); \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t\tString type = relBuffer[k].split(\"<type>\")[1].split(\"</type>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\trelList.add(new String[]{c1,c2,type});\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\")){\r\n\t\t\t\t\tfor (int k=1;k<cbcBuffer.length;k++){\r\n\t\t\t\t\t\tString cbcPath = cbcBuffer[k].split(\"<cbcPath>\")[1].split(\"</cbcPath>\")[0];\r\n\t\t\t\t\t\tComplexClassInfo cci = new ComplexClassInfo(cbcPath, null, null, null);\r\n\t\t\t\t\t\tcci.buildClass(cbcPath);\r\n\t\t\t\t\t\tcbcList.add(cci);\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\t \r\n\t\r\n\t\r\n\t\t \r\n\t//creo e associo un listener per ogni elemento della tabella delle connessioni\r\n\tconnTable.addListener(SWT.MouseDown, new Listener () {\r\n\t\tpublic void handleEvent (Event event) {\r\n\t\t\tPoint point = new Point (event.x, event.y);\r\n\t\t\tTableItem item = connTable.getItem(point);\r\n\t\t\tif (item != null) {\r\n\t\t\t\tShell shell = parent.getShell();\r\n\t\t\t\tMenu menu = new Menu (shell, SWT.POP_UP);\r\n\t\t\t\tcreateConnMenu(menu,item);\r\n\t\t\t\tmenu.setVisible(true);\r\n\t\t\t\tshell.setMenu (menu);\r\n\t\t\t\tshell.open();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t\r\n\t//associo il Listener\r\n\tbuttonCreate.addListener(SWT.Selection, listenerCreate);\r\n\t//buttonCreate.setLayoutData(data);\r\n\t//connTable.setLayoutData(data);\r\n\t\r\n\t\r\n\t}", "protected void createParameterPanel() {\n \n Collection_Button = new KButtonPanel(0, 0, 0, 0, 1, \n KButtonPanel.HORIZONTAL_RIGHT);\n Collection_Button.addSingleButton(\"...\", \n KeyEvent.VK_C, true, true, \"CollectionButton\", this,\n \"Click this button to select the collection file.\"); \n \n SourceDirectory_Button = new KButtonPanel(0, 0, 0, 0, 1,\n KButtonPanel.HORIZONTAL_RIGHT);\n SourceDirectory_Button.addSingleButton(\"...\",\n KeyEvent.VK_R, true, true, \"SourceDirectoryButton\", this,\n \"Click this button to select the Reuters-21578 file directory.\");\n \n IncludeSubdirectories_CheckBox = new KCheckBox(\n \"Include Subdirectories\", false, true, \n \"IncludeSubdirectories\", this, KeyEvent.VK_I, \n \"If this box is checked, files will be search in subdirectories \"\n + \"of Reuters-21578 directory.\");\n\n if (CastParameter != null) {\n Collection_Text = new KTextField(CastParameter\n .getCollectionFileName(), 30);\n SourceDirectory_Text = new KTextField(CastParameter\n .getSourceDirectory(), 30);\n FileNameFilter_Text = new KTextField(CastParameter\n .getFileNameFilter(), 30);\n TopicOfCollection_Text = new KTextField(CastParameter\n .getTopicOfCollection(), 30);\n if (CastParameter.includeSubdirectories()) {\n IncludeSubdirectories_CheckBox.setSelected(true);\n }\n else {\n IncludeSubdirectories_CheckBox.setSelected(false);\n }\n }\n else {\n Collection_Text = new KTextField(DiasdemProject.getProperty(\n \"DEFAULT_COLLECTION_FILE\"), 30);\n SourceDirectory_Text = new KTextField(DiasdemProject.getProperty(\n \"DEFAULT_REUTERS_21578_FILE_DIRECTORY\"), 30);\n FileNameFilter_Text = new KTextField(\".sgm\", 30);\n TopicOfCollection_Text = new KTextField(DiasdemProject.getProperty(\n \"DEFAULT_REUTERS_21578_COLLECTION_TOPIC\"), 30);\n }\n Collection_Text.setCaretAtEnding();\n SourceDirectory_Text.setCaretAtEnding();\n FileNameFilter_Text.setCaretAtEnding();\n TopicOfCollection_Text.setCaretAtEnding();\n \n Parameter_Panel = new KGridBagPanel(0, 0, 0, 0);\n Parameter_Panel.startFocusForwarding(Collection_Text);\n \n Parameter_Panel.addLabel(\"Collection File:\", 0, 0, KeyEvent.VK_C,\n Collection_Button.getDefaultButton(), true,\n \"Task input: This collection file contains references \" +\n \"to all DIAsDEM documents.\");\n Parameter_Panel.addBlankColumn(1, 0, 12);\n Parameter_Panel.addComponent(Collection_Text, 2, 0);\n Parameter_Panel.addBlankColumn(3, 0, 12);\n Parameter_Panel.addKButtonPanel(Collection_Button, 4, 0);\n Parameter_Panel.addBlankRow(0, 1, 11, this.getPreferredSizeX());\n Parameter_Panel.addLabel(\"Reuters-21578 Directory:\", 0, 2, KeyEvent.VK_R,\n SourceDirectory_Button.getDefaultButton(), true,\n \"Task input: This directory must contain \" +\n \"original Reuters-21578 SGML files to be imported.\");\n Parameter_Panel.addComponent(SourceDirectory_Text, 2, 2);\n Parameter_Panel.addKButtonPanel(SourceDirectory_Button, 4, 2);\n Parameter_Panel.addBlankRow(0, 3, 11);\n Parameter_Panel.addComponent( IncludeSubdirectories_CheckBox, 2, 4,\n new Insets(0, 0, 0, 0), 3, 1);\n Parameter_Panel.addBlankRow(0, 5, 11);\n Parameter_Panel.addLabel(\"File Name Extension:\", 0, 6, KeyEvent.VK_N,\n FileNameFilter_Text, true,\n \"Task input: Reuters-21578 files to be imported \" +\n \"must have this file name extension.\");\n Parameter_Panel.addComponent( FileNameFilter_Text, 2, 6,\n new Insets(0, 0, 0, 0), 3, 1);\n Parameter_Panel.addBlankRow(0, 7, 11);\n Parameter_Panel.addLabel(\"Topic of Collection:\", 0, 8, KeyEvent.VK_T,\n TopicOfCollection_Text, true,\n \"Task input: Reuters-21578 news to be imported \" +\n \"must have this topic (e.g., earn).\");\n Parameter_Panel.addComponent( TopicOfCollection_Text, 2, 8,\n new Insets(0, 0, 0, 0), 3, 1);\n \n this.removeAll();\n this.validate();\n this.addNorth(Parameter_Panel);\n this.validate();\n this.setComponentStatus();\n \n }", "public JFrame createGUI() {\n\n TreeSelectionListener treeSelectionListener = tse -> {\n DefaultMutableTreeNode node =\n (DefaultMutableTreeNode)tse.getPath().getLastPathComponent();\n showDirectory(node);\n updateView((File)node.getUserObject());\n };\n\n view.getTree().addTreeSelectionListener(treeSelectionListener);\n view.getTree().setCellRenderer(new FileTreeCellRenderer());\n\n listSelectionListener = (event) -> {\n try {\n updateView(getSelectedFile());\n } catch (Exception e) {\n handleException(ERROR_SELECT_FILE, e);\n }\n };\n\n view.getTable().getSelectionModel()\n .addListSelectionListener(listSelectionListener);\n\n initFileOperationsAction();\n\n return view.getFrame();\n }", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "private JMenu createFileMenu() {\n\t\tJMenu menu = new JMenu(\"File\"); \n\t\tmenu.add(createDetectiveNotes());\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}", "private void createResultFilePart() {\n\t\t//------------------------------------------------\n\t\t// Result File Label\n\t\t//------------------------------------------------\n\t\tLabel resultFileLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tresultFileLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tresultFileLabel.setText(\"Result File:\");\n\t\t\n\t\tresultFileDeco = new ControlDecoration(resultFileLabel, SWT.LEFT | SWT.TOP);\n\t\tresultFileDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tresultFileDeco.setDescriptionText(\"Choose a file to store the compare results.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// \"Choose...\" Button\n\t\t//------------------------------------------------\n\t\tButton fileChooserButton = new Button(generalSettingsGroup, SWT.NONE);\n\t\tfileChooserButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\tfileChooserButton.setText(\"Choose...\");\n\t\t\n\t\tfileChooserButton.addSelectionListener(\n\t\t\t\tnew SelectionAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\n\t\t\t\t\t\tString filePath = fileDialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(filePath != null){\n\t\t\t\t\t\t\tsetSelectedFile(filePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t//------------------------------------------------\n\t\t// FilePath Field\n\t\t//------------------------------------------------\n\t\tresultFilepathField = new Text(generalSettingsGroup, SWT.BORDER);\n\t\tresultFilepathField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n\t\t\n\t\tNotNullStringValidator filepathValidator = new NotNullStringValidator(resultFileLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tresultFilepathField.addModifyListener(filepathValidator);\n\t\t\n\t\tfilepathValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathValidator);\n\t\t\n\t\t//------------------------------------------------\n\t\t// Create file writeable Validator\n\t\t//------------------------------------------------\n\n\t\tFileCanWriteValidator filepathWritableValidator = new FileCanWriteValidator(null, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tfilepathWritableValidator.setTag(\"PRECHECK\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathWritableValidator);\n\t}", "private void setUpPanel() {\n\n this.add(nameLabel);\n this.add(showMetadataButton);\n this.add(compressFilesButton);\n this.add(decompressFilesButton);\n this.add(compressionResultLabel);\n this.add(messageShorteningButton);\n this.add(messageShorteningResultLabel);\n }", "public void setFileConfig() {\n try {\n int col = 0, row = 0;\n fileType = new JFXComboBox();\n fileType.setPromptText(\"Select File Type\");\n fileType.setItems(getFileTypes());\n /*\n File Properties\n */\n srcSep = new JFXTextField();\n srcSep.setPromptText(\"Enter the new file seperator\");\n trgSep = new JFXTextField();\n trgSep.setPromptText(\"Enter the Old file seperator\");\n remotePath = new JFXTextField();\n remotePath.setPromptText(\"Enter the Remote path\");\n filePath = new JFXTextField();\n filePath.setPromptText(\"Select Local Path directory\");\n filePath.setDisable(true);\n loadLocalPath = new Button(\"Browse\");\n trgFileheader = new JFXTextField();\n trgFileheader.setPromptText(\"Enter the Fields Name seperated by ','\");\n srcFileheader = new JFXTextField();\n srcFileheader.setPromptText(\"Enter the Fields Name seperated by ','\");\n statusFilePath = new JFXTextField();\n statusFilePath.setText(\"Enter the Status Path\");\n statusFilePath.setDisable(true);\n statusFileLoad = new Button(\"Browse\");\n srcSep = new JFXTextField();\n srcSep.setPromptText(\"Enter the New File Separator\");\n trgSep = new JFXTextField();\n trgSep.setPromptText(\"Enter the Old File Separator\");\n\n GridPane fileGrid = new GridPane();\n fileGrid.setHgap(20);\n fileGrid.setVgap(5);\n\n fileGrid.add(new Label(\"File Type\"), col, ++row);\n fileGrid.add(fileType, col + 1, row, 2, 1);\n fileGrid.add(new Label(\"Remote File name with path\"), col, ++row);\n fileGrid.add(remotePath, col + 1, row, 2, 1);\n fileGrid.add(new Label(\"Local File Path\"), col, ++row);\n fileGrid.add(filePath, col + 1, row, 2, 1);\n fileGrid.add(loadLocalPath, col + 3, row, 2, 1);\n fileGrid.add(new Label(\"New File Header\"), col, ++row);\n fileGrid.add(srcFileheader, col + 1, row, 2, 1);\n fileGrid.add(new Label(\"Old File header\"), col, ++row);\n fileGrid.add(trgFileheader, col + 1, row, 2, 1);\n fileGrid.add(new Label(\"New File Separator\"), col, ++row);\n fileGrid.add(srcSep, col + 1, row, 2, 1);\n fileGrid.add(new Label(\"Old File Separator\"), col, ++row);\n fileGrid.add(trgSep, col + 1, row, 2, 1);\n fileGrid.add(new Label(\"Status File Path\"), col, ++row);\n fileGrid.add(statusFilePath, col + 1, row, 2, 1);\n fileGrid.add(statusFileLoad, col + 3, row, 2, 1);\n fileConf.setContent(fileGrid);\n\n loadLocalPath.setOnAction((ActionEvent event) -> {\n Stage mainstage = (Stage) mainvbox.getScene().getWindow();\n File fileName = directoryChooser.showDialog(mainstage);\n if (fileName != null) {\n filePath.setText(fileName.getAbsolutePath());\n if (!fileName.exists()) {\n fileName.mkdir();\n }\n }\n });\n statusFileLoad.setOnAction((ActionEvent event) -> {\n Stage mainstage = (Stage) mainvbox.getScene().getWindow();\n File fileName = directoryChooser.showDialog(mainstage);\n if (fileName != null) {\n statusFilePath.setText(fileName.getAbsolutePath());\n\n if (!fileName.exists()) {\n fileName.mkdir();\n }\n }\n });\n\n } catch (IOException ex) {\n Logger.getLogger(ConfigFile.class.getName()).log(Level.SEVERE, null, ex);\n new ExceptionUI(ex);\n }\n }", "public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, 120dlu:grow\", // cols //$NON-NLS-1$\n\t\t\t\t\"p, 3dlu,p,3dlu,p\"); // rows //$NON-NLS-1$\n\n\t\t// Create a builder that assists in adding components to the container.\n\t\t// Wrap the panel with a standardized border.\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tbuilder.append(Messages.getString(\"RenameDialog.CurrentName\"), oldName); //$NON-NLS-1$\n\t\tbuilder.nextLine(2);\n\t\tbuilder.append(Messages.getString(\"RenameDialog.NewName\"), newName); //$NON-NLS-1$\n\t\treturn builder.getPanel();\n\t}", "private void createComponents() {\r\n // create a title\r\n indexTitle = new JLabel(\"Indexing\");\r\n indexTitle.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\r\n dirUrl = new JTextField();\r\n dirUrl.setColumns(70);\r\n dirUrl.setEditable(false);\r\n\r\n openDir = new JButton(\"Open Dir\");\r\n fileChooser = new JFileChooser();\r\n\r\n startIndexing = new JButton(\"Start\");\r\n startIndexing.setPreferredSize(new Dimension(95, 22));\r\n\r\n indexProgress = new JProgressBar();\r\n //progressBar.setStringPainted(true);\r\n // progressBar.setString(\"Indexing State..\");\r\n\r\n addExistingCheck = new JCheckBox();\r\n }", "private void intUloadPanel(){\n \n m_UploadPanel = new JPanel();\n m_UploadPanel.setLayout(new FlowLayout());\n m_uploadLabel = new JLabel(\"Upload File\");\n m_upload = new JButton(\"Upload\");\n m_upload.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n System.err.println(file.getAbsoluteFile());\n if (!file.exists()) {\n try {\n file.createNewFile();\n \n SaveDialog s = new SaveDialog(m_db,m_TP);\n if(s.SaveFile(file)){\n\n if(CLOUD.upload(m_sid, file)!=null){\n JOptionPane.showMessageDialog(null,\n \"Uplaod Succsesful\",\n \"Upload Status\",\n JOptionPane.INFORMATION_MESSAGE);\n }else{\n JOptionPane.showMessageDialog(null,\n \"Failed to upload the file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n }else{\n JOptionPane.showMessageDialog(null,\n \"error making file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n } catch (IOException ex) {\n Logger.getLogger(\n SaveDialog.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n });\n m_UploadPanel.add(m_uploadLabel);\n\n m_UploadPanel.add(m_upload);\n \n m_UploadPanel.validate();\n m_UploadPanel.setOpaque(true);\n this.getContentPane().add(m_UploadPanel);\n }", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}", "private static void createAndShowGUI() {\n\t\tint width = 500, height = 300;\n\t\tJFrame frame = new JFrame(\"Text File Reader\");\n\t\tframe.setSize(new Dimension(width, height));\n\t\tframe.setContentPane(new MainExecutor(width, height)); /* Adds the panel to the frame */\n\n\t\t/* Centralizing the frame */\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint upperLeftCornerX = (screenSize.width - frame.getWidth()) / 2;\n\t\tint upperLeftCornerY = (screenSize.height - frame.getHeight()) / 2;\n\t\tframe.setLocation(upperLeftCornerX, upperLeftCornerY);\n\t\tframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\n\t\t/* Shows the GUI */\n\t\tframe.setVisible(true);\n\t}", "public DrawTextPanel() {\n\t\tfileChooser = new SimpleFileChooser();\n\t\tundoMenuItem = new JMenuItem(\"Remove Item\");\n\t\tundoMenuItem.setEnabled(false);\n\t\tmenuHandler = new MenuHandler();\n\t\tsetLayout(new BorderLayout(3,3));\n\t\tsetBackground(Color.BLACK);\n\t\tsetBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\n\t\tcanvas = new Canvas();\n\t\tadd(canvas, BorderLayout.CENTER);\n\t\tJPanel bottom = new JPanel();\n\t\tbottom.add(new JLabel(\"Text to add: \"));\n\t\tinput = new JTextField(\"Hello World!\", 40);\n\t\tbottom.add(input);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tJButton button = new JButton(\"Generate Random\");\n\t\tbottom.add(button);\n\t\t\n\t\tcanvas.addMouseListener( new MouseAdapter() {\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tdoMousePress( e.getX(), e.getY() ); \n\t\t\t}\n\t\t} );\n\t\t\n\t\tbutton.addActionListener(new ActionListener() { \n\t\t\tpublic void actionPerformed(ActionEvent e) { \n\t\t\t\tfor (int i = 0; i < 150; i++) { \n\t\t\t\t\tint X = new Random().nextInt(800); \n\t\t\t\t\tint Y = new Random().nextInt(600);\n\t\t\t\t\tdoMousePress(X, Y); \n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}", "private JPanel getCsvFilePanel() {\n if (csvFilePanel == null) {\n GridBagConstraints gridBagConstraints5 = new GridBagConstraints();\n gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;\n gridBagConstraints5.weightx = 1.0;\n gridBagConstraints5.gridx = 1;\n gridBagConstraints5.gridy = 1;\n GridBagConstraints gridBagConstraints4 = new GridBagConstraints();\n gridBagConstraints4.gridx = 0;\n gridBagConstraints4.gridy = 1;\n GridBagConstraints gridBagConstraints3 = new GridBagConstraints();\n gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;\n gridBagConstraints3.weightx = 1.0;\n gridBagConstraints3.gridx = 1;\n gridBagConstraints3.gridy = 0;\n GridBagConstraints gridBagConstraints2 = new GridBagConstraints();\n gridBagConstraints2.gridx = 0;\n gridBagConstraints2.gridy = 0;\n fromLabel = new JLabel();\n fromLabel.setText(\"from:\");\n toLabel = new JLabel();\n toLabel.setText(\"to:\");\n csvFilePanel = new JPanel();\n csvFilePanel.setLayout(new GridBagLayout());\n csvFilePanel.add(fromLabel, gridBagConstraints2);\n csvFilePanel.add(getFromCsvFileSelector(), gridBagConstraints3);\n csvFilePanel.add(toLabel, gridBagConstraints4);\n csvFilePanel.add(getToCsvFileSelector(), gridBagConstraints5);\n }\n return csvFilePanel;\n }", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\t\n\t\tButton button = new Button(container, SWT.NONE);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tFileDialog fd = new FileDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),SWT.NONE);//打开文件\n\t\t\t\tstr=fd.open();//获取文件路径\n\t\t\t\thz=str.substring(str.lastIndexOf('.'));\n\t\t\t\twenjianName=str.substring(str.lastIndexOf('\\\\')+1,str.lastIndexOf('.'));\n\t\t\t\t//System.out.println(wenjianName);\n\t\t\t\tBufferedImage src;\n\t\t\t\ttry {\n\t\t\t\t\tInputStream is=new FileInputStream(str);\n\t\t\t\t\tsrc = javax.imageio.ImageIO.read(is);\n\t\t\t\t\n\t\t\t\t\tsrcWidth = src.getWidth(null); //得到源图宽\n\t\t\t\t\tsrcHeight = src.getHeight(null); //得到源图长\n\t\t\t\t\t//System.out.println(srcWidth+\"*\"+srcHeight);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} //构造Image对象\n\t\t\t\tlabel.setImage(SWTResourceManager.getImage(str));\n\t\t\t}\n\t\t});\n\t\tbutton.setBounds(148, 308, 80, 27);\n\t\tbutton.setText(\"\\u9009\\u62E9\\u56FE\\u7247\");\n\t\t\n\t\tlabel = new Label(container, SWT.NONE);\n\t\tlabel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\t\n\t\t\t\tPhotoDialog ae=new PhotoDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.CLOSE|SWT.MAX|SWT.MIN|SWT.APPLICATION_MODAL);\t\n\t\t\t\tif (str!=null&&str.length()>0) {\n\t\t\t\t\tae.open(srcHeight,srcWidth,str);\n\t\t\t\t}else {\n\t\t\t\t\tMessageBox mBox=new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());\n\t\t\t\t\tmBox.setText(\"系统消息\");\n\t\t\t\t\tmBox.setMessage(\"请先选取文件!\");\n\t\t\t\t\tmBox.open();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tlabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_CYAN));\n\t\tlabel.setBounds(68, 41, 162, 249);\n\n\t\tButton button_1 = new Button(container, SWT.NONE);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tjiami();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t});\n\t\tbutton_1.setBounds(386, 308, 80, 27);\n\t\tbutton_1.setText(\"\\u52A0\\u5BC6\");\n\t\t\n\t\tlabel_1 = new Label(container, SWT.NONE);\n\t\tlabel_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_GREEN));\n\t\tlabel_1.setBounds(304, 41, 162, 249);\n\t\tlabel_2 = new Label(container, SWT.NONE);\n\t\tlabel_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tPhotoDialog ae=new PhotoDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.CLOSE|SWT.MAX|SWT.MIN|SWT.APPLICATION_MODAL);\t\n\t\t\t\tString src1=src+\"/解密后\"+wenjianName+hz;\n\t\t\t\tif (decryptData!=null&&decryptData.length>0) {\n\t\t\t\t\tae.open(srcHeight,srcWidth,src1);\t\n\t\t\t\t}else {\n\t\t\t\t\tMessageBox mBox=new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());\n\t\t\t\t\tmBox.setText(\"系统消息\");\n\t\t\t\t\tmBox.setMessage(\"请先解密文件!\");\n\t\t\t\t\tmBox.open();\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tlabel_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_MAGENTA));\n\t\tlabel_2.setBounds(540, 41, 162, 249);\n\t\t\n\t\tButton button_2 = new Button(container, SWT.NONE);\n\t\tbutton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tjiemi();\n\t\t\t\t\tlabel_2.setImage(SWTResourceManager.getImage(src+\"/解密后\"+wenjianName+hz));\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbutton_2.setText(\"\\u89E3\\u5BC6\");\n\t\tbutton_2.setBounds(622, 308, 80, 27);\n\t\t\n\t\tButton button_3 = new Button(container, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tPlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(Menu.ID);\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(370, 406, 80, 27);\n\t\tbutton_3.setText(\"\\u6253\\u5F00\\u83DC\\u5355\");\n\n\t\tcreateActions();\n\t\tinitializeToolBar();\n\t\tinitializeMenu();\n\t}", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tComposite top = new Composite(parent, SWT.NONE);\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.marginHeight = 0;\n\t\tlayout.marginWidth = 0;\n\t\ttop.setLayout(layout);\n\t\t// top banner\n\t\tbanner = new Composite(top, SWT.NONE);\n\t\tbanner.setLayoutData(new GridData(SWT.FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));\n\t\tlayout = new GridLayout();\n\t\tlayout.marginHeight = 5;\n\t\tlayout.marginWidth = 10;\n\t\tlayout.horizontalSpacing = 5;\n\t\tlayout.numColumns = 2;\n\t\tbanner.setLayout(layout);\n\t\t\n\t\tGridData gridFileUploadText =new GridData();\t\n\t\tgridFileUploadText.horizontalSpan = 2;\n\t\t\n\t\tfileUploadText = new Text (banner, SWT.BORDER);\n\t\tfileUploadText.setLayoutData(gridFileUploadText);\n\t\tfileUploadText.addListener(SWT.Resize, new Listener() {\n\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfileUploadText.setSize(fileUploadText.computeSize(200, SWT.DEFAULT));\n\t\t event.doit = true;\n\t\t\t}\n\n\t\t});\n\t\t\n\t\t\n\t\tButton uploadButton = new Button(banner, SWT.PUSH);\n\t\tuploadButton.setText(\" Upload \");\n\t\t\n\t\tfinal Button calculateButton = new Button(banner, SWT.PUSH);\n\t\tcalculateButton.setText(\"calculate!\");\n//\t\tGridData gridCalculateButton =new GridData();\t\n//\t\tgridCalculateButton.horizontalAlignment = SWT.RIGHT;\n//\t\tcalculateButton.setLayoutData(gridCalculateButton);\n\t\tcalculateButton.setEnabled(false);\n\t\t\n\t\tuploadButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tShell shell = banner.getShell();\n\t\t\t\tFile temp = null;\n\t\t\t\tString zippedFile = openDialog(shell);\n\t\t\t\tString tempDirectory = \"\";\n\t\t\t\t\n\t\t\t\tif (isExistingTempDirectory) {\n\t\t\t\t\ttemp = new File(existingTempDirectory);\n\t\t\t\t\tfileMgr.deleteFile(temp);\n\t\t\t\t\texistingTempDirectory = \"\";\n\t\t\t\t\tisExistingTempDirectory = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (zippedFile != null && !zippedFile.equals(\"\")) {\n\t\t\t\t\ttempDirectory = createTempDirectory();\n\t\t\t\t\tList<side.model.File> fileList = fileMgr.unzip(zippedFile, tempDirectory);\n\t\t\t\t\t\n\t\t\t\t\tif (fileList != null && fileList.size() > 0) {\n\t\t\t\t\t\tIViewPart fileListView = getSite().getWorkbenchWindow().getActivePage().findView(FileListView.ID);\n\t\t\t\t\t\t((FileListView)fileListView).updateView(fileList, tempDirectory);\n\t\t\t\t\t\tfileUploadText.setText(zippedFile);\n\t\t\t\t\t\tisExistingTempDirectory = true;\n\t\t\t\t\t\texistingTempDirectory = tempDirectory;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp = new File(tempDirectory);\n\t\t\t\t\t\tfileMgr.deleteFile(temp);\n\t\t\t\t\t\tfileUploadText.setText(\"\");\n\t\t\t\t\t\tMessageDialog.openError(banner.getShell(), \"Error\", \"Please check your zip file!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void initialize() {\n\t\tfrmHi = new JFrame();\n\t\tfrmHi.setTitle(\"Multiple Document Combination Software\");\n\t\tfrmHi.setBounds(100, 100, 385, 278);\n\t\tfrmHi.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tfrmHi.getContentPane().add(tabbedPane, BorderLayout.CENTER);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\ttabbedPane.addTab(\".txt\", null, panel_1, \"For text files\");\n\t\tpanel_1.setLayout(null);\n\t\t\n\t\tJLabel lblMergeTextFiles = new JLabel(\"Choose text files to combine\");\n\t\tlblMergeTextFiles.setBounds(97, 11, 265, 14);\n\t\tpanel_1.add(lblMergeTextFiles);\n\t\t\n\t\tfinal JLabel txtfilename1 = new JLabel(\"No file selected\");\n\t\ttxtfilename1.setBounds(177, 36, 172, 14);\n\t\tpanel_1.add(txtfilename1);\n\t\t\n\t\tJButton btnFirstFile = new JButton(\"First File\");\n\t\tbtnFirstFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//try{\n\t\t\t\tJFileChooser jfc = new JFileChooser();\n\t\t\t\tjfc.showDialog(null,\"Please select a text file\");\n\t\t\t\tjfc.setVisible(true);\n\t\t\t\tFile sourceFile1Path = jfc.getSelectedFile();\n\t\t\t\ttxtfilename1.setText(sourceFile1Path.getName());\n\t\t\t\tfile1 = sourceFile1Path;\n\t\t\t\t/*}catch(IOException e){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Input error\");\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnFirstFile.setBounds(63, 36, 104, 23);\n\t\tpanel_1.add(btnFirstFile);\n\t\t\n\t\tfinal JLabel txtfilename2 = new JLabel(\"No file selected\");\n\t\ttxtfilename2.setBounds(177, 70, 172, 14);\n\t\tpanel_1.add(txtfilename2);\n\t\t\n\t\tJButton btnSecondFile = new JButton(\"Second File\");\n\t\tbtnSecondFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser jfc2 = new JFileChooser();\n\t\t\t\tjfc2.showDialog(null, \"Please select a text file\");\n\t\t\t\tjfc2.setVisible(true);\n\t\t\t\tFile sourceFile2path = jfc2.getSelectedFile();\n\t\t\t\ttxtfilename2.setText(sourceFile2path.getName());\n\t\t\t\tfile2 = sourceFile2path;\n\t\t\t}\n\t\t});\n\t\tbtnSecondFile.setBounds(63, 70, 104, 23);\n\t\tpanel_1.add(btnSecondFile);\n\t\t\n\t\tfinal JLabel txtfilename3 = new JLabel(\"No file selected\");\n\t\ttxtfilename3.setBounds(177, 104, 172, 14);\n\t\tpanel_1.add(txtfilename3);\n\t\t\n\t\tJButton btnThirdFile = new JButton(\"Third File\");\n\t\tbtnThirdFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser jfc3 = new JFileChooser();\n\t\t\t\tjfc3.showDialog(null, \"Please select a text file\");\n\t\t\t\tjfc3.setVisible(true);\n\t\t\t\tFile sourceFile3path = jfc3.getSelectedFile();\n\t\t\t\ttxtfilename3.setText(sourceFile3path.getName());\n\t\t\t\tfile3 = sourceFile3path;\n\t\t\t}\n\t\t});\n\t\tbtnThirdFile.setBounds(63, 104, 104, 23);\n\t\tpanel_1.add(btnThirdFile);\n\t\t\n\t\tJButton btnCombineTxt = new JButton(\"Combine!\");\n\t\tbtnCombineTxt.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//add fancy exception handling soon, like if the user only selected 2 files (when we support 3)\n\t\t\t\tFile[] FileArray = new File[2]; //change to 3 when adding support for a third file\n\t\t\t\tFileArray[0] = file1;\n\t\t\t\tFileArray[1] = file2;\n\t\t\t\t//FileArray[3] = file3;\n\t\t\t\tFile mergedFile = new File(\"C:/Users/Patrick/Desktop/mdcs/output.txt\");\n\t\t\t\t\n\t\t\t\t FileWriter fstream = null;\n\t\t\t\t BufferedWriter out = null;\n\t\t\t\t try {\n\t\t\t\t fstream = new FileWriter(mergedFile, true);\n\t\t\t\t out = new BufferedWriter(fstream);\n\t\t\t\t } catch (IOException e1) {\n\t\t\t\t e1.printStackTrace();\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for (File f : FileArray) {\n\t\t\t\t System.out.println(\"merging: \" + f.getName());\n\t\t\t\t FileInputStream fis;\n\t\t\t\t try {\n\t\t\t\t fis = new FileInputStream(f);\n\t\t\t\t BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\t\t \n\t\t\t\t String aLine;\n\t\t\t\t while ((aLine = in.readLine()) != null) {\n\t\t\t\t out.write(aLine);\n\t\t\t\t out.newLine();\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t in.close();\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t try {\n\t\t\t\t out.close();\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\tbtnCombineTxt.setBounds(107, 141, 119, 23);\n\t\tpanel_1.add(btnCombineTxt);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\ttabbedPane.addTab(\".doc/.docx\", null, panel, \"For microsoft word documents.\");\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJLabel lblMergeMicrosoftWord = new JLabel(\"Choose Microsoft Word Documents to combine\");\n\t\tlblMergeMicrosoftWord.setBounds(61, 11, 301, 14);\n\t\tpanel.add(lblMergeMicrosoftWord);\n\t\t\n\t\tJButton btnFirstDocument = new JButton(\"First Document\");\n\t\tbtnFirstDocument.setBounds(34, 46, 160, 23);\n\t\tpanel.add(btnFirstDocument);\n\t\t\n\t\tJButton btnSecondDocument = new JButton(\"Second Document\");\n\t\tbtnSecondDocument.setBounds(34, 80, 160, 23);\n\t\tpanel.add(btnSecondDocument);\n\t\t\n\t\tJButton btnThirdDocument = new JButton(\"Third Document\");\n\t\tbtnThirdDocument.setBounds(34, 114, 160, 23);\n\t\tpanel.add(btnThirdDocument);\n\t\t\n\t\tJButton btnCombineDoc = new JButton(\"Combine!\");\n\t\tbtnCombineDoc.setBounds(130, 148, 91, 23);\n\t\tpanel.add(btnCombineDoc);\n\t}", "public DatosTextFieldPanel() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButtonSelectFile = new javax.swing.JButton();\n jTextField = new javax.swing.JTextField();\n jButtonUpload = new javax.swing.JButton();\n textArea = new java.awt.TextArea();\n jLabel3 = new javax.swing.JLabel();\n textArea1 = new java.awt.TextArea();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Berlin Sans FB\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"ANALIZADOR LÉXICO\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, -1, 40));\n\n jLabel2.setFont(new java.awt.Font(\"Tw Cen MT Condensed Extra Bold\", 1, 48)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 153));\n jLabel2.setText(\"MiniPHP\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 40, 200, 53));\n\n jButtonSelectFile.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 12)); // NOI18N\n jButtonSelectFile.setText(\"SELECCIONAR ARCHIVO\");\n jButtonSelectFile.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButtonSelectFileMouseClicked(evt);\n }\n });\n jButtonSelectFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSelectFileActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonSelectFile, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 120, 170, 40));\n\n jTextField.setEditable(false);\n getContentPane().add(jTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 120, 340, 40));\n\n jButtonUpload.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 12)); // NOI18N\n jButtonUpload.setText(\"ANALIZAR ARCHIVO\");\n jButtonUpload.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonUploadActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonUpload, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 180, 170, 40));\n\n textArea.setEditable(false);\n getContentPane().add(textArea, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 260, 290, 210));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/background/590x300.jpg\"))); // NOI18N\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 590, 260));\n\n textArea1.setEditable(false);\n getContentPane().add(textArea1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 260, 290, 210));\n\n pack();\n }", "@SuppressWarnings({ \"unused\", \"unchecked\", \"rawtypes\" })\r\n\tprivate void buildPanel() {\r\n\t\tageField = new JComboBox(ageRanges);\r\n\t\tfNameField = new JTextField(20);\r\n\t\tGhostText fNameGhost = new GhostText(fNameField, \"First Name\");\r\n\t\tlNameField = new JTextField(20);\r\n\t\tGhostText lNameGhost = new GhostText(lNameField, \"Last Name\");\r\n\t\tmInitField = new JTextField(2);\r\n\t\tGhostText mInitGhost = new GhostText(mInitField, \"M\");\r\n\t\temailField = new JTextField(20);\r\n\t\tGhostText emailGhost = new GhostText(emailField, \"Email\");\r\n\t\tphoneNumberField = new JTextField(12);\r\n\t\timage = new JLabel();\r\n\t\tGhostText phoneNoGhost = new GhostText(phoneNumberField, \"Phone Number\");\r\n\t\tJPanel namePanel = new JPanel();\r\n\t\tJPanel emailPhoneAgePanel = new JPanel();\r\n\t\tJPanel northPanel = new JPanel();\r\n\t\tJPanel centerPanel = new JPanel();\r\n\t\temailPhoneAgePanel.setLayout(new GridLayout(0, 3));\r\n\t\temailPhoneAgePanel.setSize(new Dimension(400, 25));\r\n\t\temailPhoneAgePanel.setMaximumSize(new Dimension(400, 25));\r\n\t\tregisterButton = new JButton(\"Register & Save\");\r\n\t\tregisterButton.addActionListener(new registerButtonAction());\r\n\t\tregisterButton.setEnabled(false);\r\n\t\tuploadButton = new JButton(\"Upload Photo\");\r\n\t\tuploadButton.addActionListener(new uploadListener());\r\n\t\tnamePanel.add(fNameField);\r\n\t\tnamePanel.add(lNameField);\r\n\t\tnamePanel.add(mInitField);\r\n\t\tnamePanel.setBackground(Color.BLACK);\r\n\t\tnamePanel.setLayout(new GridBagLayout());\r\n\t\temailPhoneAgePanel.add(emailField);\r\n\t\temailPhoneAgePanel.add(phoneNumberField);\r\n\t\temailPhoneAgePanel.add(ageField);\r\n\t\temailPhoneAgePanel.setBackground(Color.BLACK);\r\n\t\temailPhoneAgePanel.setLayout(new GridBagLayout());\r\n\t\tcenterPanel.add(image);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tbuttonPanel.add(uploadButton);\r\n\t\tbuttonPanel.add(registerButton);\r\n\t\tnorthPanel.add(namePanel, BorderLayout.NORTH);\r\n\t\tnorthPanel.add(emailPhoneAgePanel, BorderLayout.CENTER);\r\n\t\tnorthPanel.setBackground(Color.BLACK);\r\n\t\tcenterPanel.setBackground(Color.BLACK);\r\n\t\tthis.add(northPanel, BorderLayout.NORTH);\r\n\t\tthis.add(centerPanel, BorderLayout.CENTER);\r\n\t\tthis.add(buttonPanel, BorderLayout.SOUTH);\t\r\n\t\t}", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n nameField = new javax.swing.JTextField();\n sizeField = new javax.swing.JLabel();\n typeField = new javax.swing.JLabel();\n browser = new javax.swing.JButton();\n send = new javax.swing.JButton();\n status = new javax.swing.JLabel();\n address = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n jLabel1.setText(\"File Name\");\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n jLabel2.setText(\"File Size\");\n\n jLabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n jLabel3.setText(\"File Type\");\n\n nameField.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\n sizeField.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n sizeField.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255)));\n\n typeField.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n typeField.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255)));\n\n browser.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n browser.setText(\"Browse\");\n browser.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n browserMouseClicked(evt);\n }\n });\n\n send.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 24)); // NOI18N\n send.setText(\"Send\");\n send.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n sendMouseClicked(evt);\n }\n });\n\n status.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n status.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n status.setText(\"STATUS\");\n\n address.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 24)); // NOI18N\n address.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n address.setText(\"IP:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(sizeField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(nameField, javax.swing.GroupLayout.DEFAULT_SIZE, 242, Short.MAX_VALUE))\n .addGap(60, 60, 60)\n .addComponent(browser, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(typeField, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(status, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(50, 50, 50)\n .addComponent(send, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(89, 89, 89)\n .addComponent(address, javax.swing.GroupLayout.PREFERRED_SIZE, 475, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(557, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(76, 76, 76)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameField, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)\n .addComponent(browser, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(34, 34, 34)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)\n .addComponent(sizeField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(44, 44, 44)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)\n .addComponent(typeField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(60, 60, 60)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(send, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(status, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(73, 73, 73)\n .addComponent(address, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(90, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void txttenfileActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void showDialog()\n {\n textInputDialog = new TextInputDialog();\n textInputDialog.setTitle(\"Choose File\");\n Pane pane = new Pane();\n pane.setPrefSize(350, 130);\n\n filePath = new TextField();\n filePath.setPrefSize(250, 20);\n filePath.setPromptText(\"Path File :\");\n filePath.setLayoutX(20);\n filePath.setLayoutY(50);\n\n\n JFXButton Browse = new JFXButton(\"Browse\");\n Browse.setStyle(\" -fx-background-color :#ffffff\");\n Browse.setLayoutX(280);\n Browse.setLayoutY(50);\n\n Browse.setButtonType(JFXButton.ButtonType.RAISED);\n\n pane.getChildren().addAll(filePath, Browse);\n textInputDialog.setHeaderText(null);\n textInputDialog.getDialogPane().setContent(pane);\n Browse.setOnMouseClicked(event ->\n {\n FileChooser fileChooser = new FileChooser();\n file = fileChooser.showOpenDialog(rootAnchorPane.getScene().getWindow());\n filePath.setText(file.getAbsolutePath());\n });\n }", "public JMenu createFileMenu(){\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmenu.add(createFileResetItem());\n\t\tmenu.add(createFilePracticeItem());\t\t\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}", "public FileDB(String []str, int length, int open,String fileName){\n \n super(new BorderLayout());\n\tthis.open = open;\n\tselecStr = \"\";\n\tflag = true;\n listModel = new DefaultListModel();\n\tfor(int i=0;i<length;i++)\n\t\tlistModel.addElement(str[i]);\n list = new JList(listModel);\n list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n list.setSelectedIndex(0);\n list.addListSelectionListener(this);\n list.setVisibleRowCount(8);\n JScrollPane listScrollPane = new JScrollPane(list);\n JButton ok = new JButton(\"OK\");\n\n ok.setActionCommand(\"ok\");\n ok.addActionListener(this);\n/*\tok.setMinimumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tok.setPreferredSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tok.setMaximumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));*/\n JButton cancel = new JButton(\"Cancel\");\n cancel.setActionCommand(\"cancel\");\n cancel.addActionListener(this);\n/*\tcancel.setMinimumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tcancel.setPreferredSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tcancel.setMaximumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));*/\n JPanel buttonPane = new JPanel(); \n\tif(open==1){\n\n\t\tSystem.out.println(\"Filename is \"+fileName);\n\t\tif(fileName!=null){\n\t\t\tStringTokenizer st = new StringTokenizer(fileName,\" :\");\n\t\t\tta = new TextArea(st.nextToken());\n\t\t}\n\t\telse\n\t\t\tta = new TextArea(\"iConc\");\n\t}\n\telse if(open == 0){\n\t\n\t\tta = new TextArea(\"iConc\");\n\t}\n\tbuttonPane.add(ta);\n buttonPane.add(ok);\n buttonPane.add(cancel);\n add(listScrollPane, BorderLayout.CENTER);\n add(buttonPane, BorderLayout.PAGE_END);\n\tcreateAndShowGUI();\n }", "private void initComponents() {\n\n fileChooser\t\t\t= new javax.swing.JFileChooser();\n jScrollPane1 \t\t= new javax.swing.JScrollPane();\n editorTextArea \t\t= new javax.swing.JTextArea();\n jToolBar1 \t\t\t= new javax.swing.JToolBar();\n abrirArchivoButton \t= new javax.swing.JButton();\n SalirButton \t\t= new javax.swing.JButton();\n jMenuBar1 \t\t\t= new javax.swing.JMenuBar();\n jMenu1 \t\t\t\t= new javax.swing.JMenu();\n abrirMenuItem \t\t= new javax.swing.JMenuItem();\n salirMenuItem \t\t= new javax.swing.JMenuItem();\n\n\n fileChooser.setFileFilter(new MiFiltroArchivo());\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n editorTextArea.setColumns(20);\n editorTextArea.setRows(5);\n jScrollPane1.setViewportView(editorTextArea);\n\n jToolBar1.setRollover(true);\n\n abrirArchivoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./abrir grande.png\"))); // NOI18N\n abrirArchivoButton.setFocusable(false);\n abrirArchivoButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n abrirArchivoButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n abrirArchivoButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n abrirMenuItemActionPerformed(evt);\n }\n });\n \n jToolBar1.add(abrirArchivoButton);\n\n SalirButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./salir grande.png\"))); // NOI18N\n SalirButton.setFocusable(false);\n SalirButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n SalirButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n SalirButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salirMenuItemActionPerformed(evt);\n }\n });\n jToolBar1.add(SalirButton);\n\n jMenu1.setText(\"Archivo\");\n\n abrirMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));\n abrirMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./abrir chico.png\"))); // NOI18N\n abrirMenuItem.setText(\"Abrir\");\n abrirMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n abrirMenuItemActionPerformed(evt);\n }\n });\n jMenu1.add(abrirMenuItem);\n\n salirMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\n salirMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./salir chico.png\"))); // NOI18N\n salirMenuItem.setText(\"Salir\");\n salirMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salirMenuItemActionPerformed(evt);\n }\n });\n jMenu1.add(salirMenuItem);\n\n jMenuBar1.add(jMenu1);\n\n setJMenuBar(jMenuBar1);\n \n codeTextArea = new JTextArea();\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n layout.setHorizontalGroup(\n \tlayout.createParallelGroup(Alignment.LEADING)\n \t\t.addGroup(layout.createSequentialGroup()\n \t\t\t.addContainerGap()\n \t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n \t\t\t\t.addComponent(codeTextArea, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n \t\t\t\t.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n \t\t\t\t.addComponent(jToolBar1, GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))\n \t\t\t.addContainerGap())\n );\n layout.setVerticalGroup(\n \tlayout.createParallelGroup(Alignment.LEADING)\n \t\t.addGroup(layout.createSequentialGroup()\n \t\t\t.addComponent(jToolBar1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n \t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n \t\t\t.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 282, Short.MAX_VALUE)\n \t\t\t.addGap(18)\n \t\t\t.addComponent(codeTextArea, GroupLayout.PREFERRED_SIZE, 215, GroupLayout.PREFERRED_SIZE)\n \t\t\t.addContainerGap())\n );\n getContentPane().setLayout(layout);\n \n this.methodsList = new JList<String>();\n \n this.methodsList.addListSelectionListener(new ListSelectionListener() {\n\t\t\t\n \t// Esta funcion se va a ejecutar cada vez que se cambie el estado\n \t// de seleccion de la list.\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tint selectedIndex = methodsList.getSelectedIndex();\n\t\t\t\t\n\t\t\t\tif (selectedIndex == -1) {\n\t\t\t\t\t// Si es -1, es porque no hay nada seleccionado\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// En este caso ya sabemos que hay algo que esta \n\t\t\t\t// seleccionado, de modo que podemos obtener el metodo seleccionado!\n\t\t\t\tMethod selectedMethod = methodFinder.getMethods().get(selectedIndex);\n\t\t\t\t\n\t\t\t\tservicios = new ArrayList<CodeInspectionService>();\n\t\t\t\t\n\t\t\t\t// Agregamos todos los servicios que necesitamos para analizar el codigo.\n\t\t\t\t// Cada vez que el programa pase por una linea, la enviará\n\t\t\t\t// a todos los servicios que esten registrados.\n\t\t\t\t// Los servicios entonces van a procesar esa linea y van a registrar\n\t\t\t\t// los resultados en un objeto CodeMetric.\n\t\t\t\t\n\t\t\t\t// Con este servicio contamos las lineas de codigo.\n\t\t\t\tservicios.add(new CodeLinesNumberInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos las lineas comentadas\n\t\t\t\tservicios.add(new CommentedLinesInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos la complejidad ciclomatica\n\t\t\t\tservicios.add(new CyclomaticComplexityInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos Halstead (?) quizas esto tengamos que separarlo en \n\t\t\t\t// otros servicios mas pequeños, porque hay varias metricas de halstead\n\t\t\t\tservicios.add(new HalsteadInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos el Fan In del metodo seleccionado\n\t\t\t\t// Fan in es la cantidad de veces que ese metodo\n\t\t\t\t// es invocado desde afuera\n\t\t\t\tservicios.add(new FanInInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\t// Contamos el Fan Out del metodo seleccionado\n\t\t\t\t// Fan out es la cantidad de veces que el metodo seleccionado\n\t\t\t\t// llama a otros metodos.\n\t\t\t\tservicios.add(new FanOutInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\tIterator<String> methodLinesIterator = selectedMethod.getLines().iterator();\n\t\t\t\twhile(methodLinesIterator.hasNext()) {\n\t\t\t\t\tString line = methodLinesIterator.next();\n\t\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\t\tservicio.analyzeLine(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\tCodeMetric metrica = servicio.getMetric();\n\t\t\t\t\tsb.append(metrica.getName() + \": \" + metrica.getValue() + \"\\n\");\n\t\t\t\t}\n\t\t\t\teditorTextArea.setText(sb.toString());\n\t\t\t\t\n\t\t\t\t// Imprimimos el codigo en pantalla\n\t\t\t\t// para mostrar el metodo que estamos analizando.\n\t\t\t\tcodeTextArea.setText(selectedMethod.toString());\n\t\t\t\t\n\t\t\t}\n\t\t});\n \n jScrollPane1.setColumnHeaderView(methodsList);\n\n pack();\n }", "private void createLayout() {\n\t\t\n\t\tmenu = new JMenuBar();\n\t\tfile = new JMenu(\"Arquivo\");\n\t\tedit = new JMenu(\"Editar\");\n\t\tmenu.add(file);\n\t\tmenu.add(edit);\n\n\t\tnewfile = new JMenuItem(\"Novo\");\n\t\tnewfile.addActionListener(new NewFileListener());\n\t\tfile.add(newfile);\n\t\t\n\t\tcopy = new JMenuItem(\"Copiar\");\n\t\tcopy.addActionListener(new CopyListener());\n\t\tedit.add(copy);\n\t\t\n\t\tcut = new JMenuItem(\"Cortar\");\n\t\tcut.addActionListener(new CutListener());\n\t\tedit.add(cut);\n\t\t\n\t\tpaste = new JMenuItem(\"Colar\");\n\t\tpaste.addActionListener(new PasteListener());\n\t\tedit.add(paste);\n\n \n edit.add(undoAction);\n edit.add(redoAction);\n \n \t\topen = new JMenuItem(\"Abrir\");\n\t\topen.addActionListener(new OpenFileListener());\n\t\tfile.add(open);\n\n\t\texit = new JMenuItem(\"Sair\");\n\t\texit.addActionListener(new ExitFileListener());\n\t\tfile.add(exit);\n\t\tframe.setJMenuBar(menu);\n\t\t\n\t\tcaret = new DefaultCaret();\n\t\tarea = new JTextArea(25, 65);\n\t\tarea.setLineWrap(true);\n\t\tarea.setText(documentText);\n\t\tarea.setWrapStyleWord(true);\n\t\t\n\t\t\n\t\tarea.setCaret(caret);\n\t\tdocumentListener = new TextDocumentListener();\n\t\tarea.getDocument().addDocumentListener(documentListener); \n\t\t\n area.getDocument().addUndoableEditListener(new UndoListener());\n \n\t\tscrollpane = new JScrollPane(area);\n\t\tscrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\tsetLayout(layout);\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\n\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup()\n\t\t\t\t.addComponent(documentNameLabel)\n\t\t\t\t.addComponent(scrollpane));\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t\t.addComponent(documentNameLabel)\n\t\t\t\t.addComponent(scrollpane));\n\t}", "public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }", "public FileChooserView(Frame owner) {\n super(owner, true);\n initComponents();\n fileChooser.addActionListener(this);\n }", "private void createTextPanel() {\r\n Composite textPanel = new Composite(this, SWT.NONE);\r\n textPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n textPanel.setLayout(new GridLayout(2, true));\r\n\r\n createLabel(textPanel, \"Name\");\r\n _nameText = new Text(textPanel, SWT.BORDER | SWT.RIGHT);\r\n _nameText.setLayoutData(new GridData(SWT.FILL, SWT.HORIZONTAL, true, true));\r\n _nameText.addKeyListener(new TextKeyListener());\r\n\r\n createLabel(textPanel, \"Group\");\r\n _numberGroupText = new Text(textPanel, SWT.BORDER | SWT.RIGHT);\r\n _numberGroupText.setLayoutData(new GridData(SWT.FILL, SWT.HORIZONTAL, true, true));\r\n _numberGroupText.addKeyListener(new TextKeyListener());\r\n\r\n createCheckButtonPanel(textPanel);\r\n }", "public static void createUI (JTextField fName, JTextField lName, JTextField vDesc, JTextField cLoc,\r\n JTextField dLoc, JTextField pNum, JPanel panel) {\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n panel.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n panel.add(new JLabel(\"First Name:\"));\r\n panel.add(fName);\r\n panel.add(Box.createHorizontalStrut(15)); // a spacer\r\n panel.add(new JLabel(\"Last Name:\"));\r\n panel.add(lName);\r\n panel.add(new JLabel(\"Vehicle Description:\"));\r\n panel.add(vDesc);\r\n panel.add(new JLabel(\"Pick Up Location\"));\r\n panel.add(cLoc);\r\n panel.add(new JLabel(\"Drop Off Location\"));\r\n panel.add(dLoc);\r\n panel.add(new JLabel(\"Phone Number\"));\r\n panel.add(pNum);\r\n }", "protected void createContents() {\n\n\t\tfinal FileServeApplicationWindow appWindow = this;\n\n\t\tthis.shlFileServe = new Shell();\n\t\tthis.shlFileServe.setSize(450, 300);\n\t\tthis.shlFileServe.setText(\"File Serve - Server\");\n\t\tthis.shlFileServe.setLayout(new BorderLayout(0, 0));\n\n\t\tthis.composite = new Composite(this.shlFileServe, SWT.NONE);\n\t\tthis.composite.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tthis.composite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.composite.setLayout(new FormLayout());\n\n\t\tthis.lblServerTcpPort = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerTcpPort = new FormData();\n\t\tfd_lblServerTcpPort.top = new FormAttachment(0, 10);\n\t\tfd_lblServerTcpPort.left = new FormAttachment(0, 10);\n\t\tthis.lblServerTcpPort.setLayoutData(fd_lblServerTcpPort);\n\t\tthis.lblServerTcpPort.setText(\"Server TCP Port:\");\n\n\t\tthis.serverTCPPortField = new Text(this.composite, SWT.BORDER);\n\t\tthis.serverTCPPortField.setTextLimit(5);\n\t\tthis.serverTCPPortField.addVerifyListener(new VerifyListener() {\n\t\t\t@Override\n\t\t\tpublic void verifyText(VerifyEvent e) {\n\t\t\t\te.doit = true;\n\t\t\t\tfor(int i = 0; i < e.text.length(); i++) {\n\n\t\t\t\t\tchar c = e.text.charAt(i);\n\n\t\t\t\t\tboolean b = false;\n\n\t\t\t\t\tif(c >= '0' && c <= '9') {b = true;}\n\t\t\t\t\telse if(c == SWT.BS) {b = true;}\n\t\t\t\t\telse if(c == SWT.DEL) {b = true;}\n\n\t\t\t\t\tif(b == false) {\n\t\t\t\t\t\te.doit = false;\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\tFormData fd_serverTCPPortField = new FormData();\n\t\tfd_serverTCPPortField.top = new FormAttachment(0, 7);\n\t\tfd_serverTCPPortField.right = new FormAttachment(100, -54);\n\t\tfd_serverTCPPortField.left = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tthis.serverTCPPortField.setLayoutData(fd_serverTCPPortField);\n\n\t\tthis.btnStartServer = new Button(this.composite, SWT.NONE);\n\t\tFormData fd_btnStartServer = new FormData();\n\t\tfd_btnStartServer.bottom = new FormAttachment(100, -10);\n\t\tfd_btnStartServer.right = new FormAttachment(100, -10);\n\t\tthis.btnStartServer.setLayoutData(fd_btnStartServer);\n\t\tthis.btnStartServer.setText(\"Start Server\");\n\n\t\tthis.lblServerStatus = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerStatus = new FormData();\n\t\tfd_lblServerStatus.right = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_lblServerStatus.top = new FormAttachment(this.btnStartServer, 5, SWT.TOP);\n\t\tfd_lblServerStatus.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblServerStatus.setLayoutData(fd_lblServerStatus);\n\t\tthis.lblServerStatus.setText(\"Server Status: Stopped\");\n\n\t\tthis.text = new Text(this.composite, SWT.BORDER);\n\t\tFormData fd_text = new FormData();\n\t\tfd_text.top = new FormAttachment(this.serverTCPPortField, 6);\n\t\tthis.text.setLayoutData(fd_text);\n\n\t\tthis.lblHighestDirectory = new Label(this.composite, SWT.NONE);\n\t\tfd_text.left = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tFormData fd_lblHighestDirectory = new FormData();\n\t\tfd_lblHighestDirectory.top = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tfd_lblHighestDirectory.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblHighestDirectory.setLayoutData(fd_lblHighestDirectory);\n\t\tthis.lblHighestDirectory.setText(\"Highest Directory:\");\n\n\t\tthis.button = new Button(this.composite, SWT.NONE);\n\n\t\tfd_text.right = new FormAttachment(100, -54);\n\t\tFormData fd_button = new FormData();\n\t\tfd_button.left = new FormAttachment(this.text, 6);\n\t\tthis.button.setLayoutData(fd_button);\n\t\tthis.button.setText(\"...\");\n\n\t\tthis.grpConnectionInformation = new Group(this.composite, SWT.NONE);\n\t\tfd_button.bottom = new FormAttachment(this.grpConnectionInformation, -1);\n\t\tthis.grpConnectionInformation.setText(\"Connection Information:\");\n\t\tthis.grpConnectionInformation.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_grpConnectionInformation = new FormData();\n\t\tfd_grpConnectionInformation.bottom = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_grpConnectionInformation.right = new FormAttachment(this.btnStartServer, 0, SWT.RIGHT);\n\t\tfd_grpConnectionInformation.top = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tfd_grpConnectionInformation.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.grpConnectionInformation.setLayoutData(fd_grpConnectionInformation);\n\n\t\tthis.scrolledComposite = new ScrolledComposite(this.grpConnectionInformation, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tthis.scrolledComposite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.scrolledComposite.setExpandHorizontal(true);\n\t\tthis.scrolledComposite.setExpandVertical(true);\n\n\t\tthis.table = new Table(this.scrolledComposite, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tthis.table.setLinesVisible(true);\n\t\tthis.table.setHeaderVisible(true);\n\t\tthis.scrolledComposite.setContent(this.table);\n\t\tthis.scrolledComposite.setMinSize(this.table.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "private void initComponents() {\n\n projectNameLabel = new javax.swing.JLabel();\n projectNameTextField = new javax.swing.JTextField();\n projectLocationLabel = new javax.swing.JLabel();\n projectLocationTextField = new javax.swing.JTextField();\n browseButton = new javax.swing.JButton();\n createdFolderLabel = new javax.swing.JLabel();\n createdFolderTextField = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n librariesLabel = new javax.swing.JLabel();\n librariesLocation = new javax.swing.JTextField();\n browseLibraries = new javax.swing.JButton();\n sharableProject = new javax.swing.JCheckBox();\n jPanel1 = new javax.swing.JPanel();\n lblHint = new javax.swing.JLabel();\n\n projectNameLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_ProjectName_LabelMnemonic\").charAt(0));\n projectNameLabel.setLabelFor(projectNameTextField);\n projectNameLabel.setText(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_ProjectName_Label\")); // NOI18N\n\n projectNameTextField.setColumns(30);\n\n projectLocationLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_ProjectLocation_LabelMnemonic\").charAt(0));\n projectLocationLabel.setLabelFor(projectLocationTextField);\n projectLocationLabel.setText(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_ProjectLocation_Label\")); // NOI18N\n\n projectLocationTextField.setColumns(30);\n\n browseButton.setMnemonic(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_Browse_LabelMnemonic\").charAt(0));\n browseButton.setText(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_BrowseLocation_Button\")); // NOI18N\n browseButton.setActionCommand(\"BROWSE\");\n browseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browseLocationAction(evt);\n }\n });\n\n createdFolderLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_CreatedProjectFolder_LabelMnemonic\").charAt(0));\n createdFolderLabel.setLabelFor(createdFolderTextField);\n createdFolderLabel.setText(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"LBL_NWP1_CreatedProjectFolder_Label\")); // NOI18N\n\n createdFolderTextField.setEditable(false);\n createdFolderTextField.setColumns(30);\n\n librariesLabel.setLabelFor(librariesLocation);\n org.openide.awt.Mnemonics.setLocalizedText(librariesLabel, org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ProjectLocationPanel.librariesLabel.text\")); // NOI18N\n\n librariesLocation.setColumns(30);\n\n org.openide.awt.Mnemonics.setLocalizedText(browseLibraries, org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"PanelSharabilityVisual.browseLibraries.text\")); // NOI18N\n browseLibraries.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browseLibrariesActionPerformed(evt);\n }\n });\n\n sharableProject.setSelected(SharableLibrariesUtils.isLastProjectSharable());\n org.openide.awt.Mnemonics.setLocalizedText(sharableProject, org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ProjectLocationPanel.sharableProject.text\")); // NOI18N\n sharableProject.setMargin(new java.awt.Insets(2, 0, 2, 2));\n sharableProject.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sharableProjectActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(lblHint, org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"HINT_LibrariesFolder\")); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 501, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(librariesLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblHint, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)\n .addComponent(librariesLocation, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browseLibraries))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectLocationLabel)\n .addComponent(projectNameLabel)\n .addComponent(createdFolderLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)\n .addComponent(createdFolderTextField))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browseButton))\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(sharableProject, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectNameLabel)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectLocationLabel)\n .addComponent(browseButton)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(createdFolderLabel)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sharableProject)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(librariesLabel)\n .addComponent(browseLibraries)\n .addComponent(librariesLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblHint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n projectNameLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getBundle(ProjectLocationPanel.class).getString(\"ACSN_projectNameLabel\")); // NOI18N\n projectNameLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(ProjectLocationPanel.class).getString(\"ACSD_projectNameLabel\")); // NOI18N\n projectNameTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n projectLocationLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getBundle(ProjectLocationPanel.class).getString(\"ACSN_projectLocationLabel\")); // NOI18N\n projectLocationLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n projectLocationTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n browseButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getBundle(ProjectLocationPanel.class).getString(\"ACSN_browseButton\")); // NOI18N\n browseButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n createdFolderLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getBundle(ProjectLocationPanel.class).getString(\"ACSN_createdFolderLabel\")); // NOI18N\n createdFolderLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n createdFolderTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n jSeparator1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n jSeparator1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n librariesLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n librariesLocation.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n browseLibraries.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n sharableProject.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n jPanel1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n jPanel1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n lblHint.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n\n getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSN_PanelProjectLocationVisual\")); // NOI18N\n getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectLocationPanel.class, \"ACSD_ProjectLocationPanel_NA\")); // NOI18N\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jFileChooser1 = new javax.swing.JFileChooser();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jButton1.setText(\"Upload\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jFileChooser1.setPreferredSize(new java.awt.Dimension(1, 1));\n\n jButton3.setText(\"Browse\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3))\n .addComponent(jFileChooser1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(20, 20, 20)\n .addComponent(jButton2)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n btnIr = new javax.swing.JButton();\n txtPath = new javax.swing.JTextField();\n btnVoltar = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n scrScrollBar = new javax.swing.JScrollPane();\n panFiles = new javax.swing.JPanel();\n btnRolarDireita = new javax.swing.JButton();\n\n jButton1.setText(\"jButton1\");\n jButton1.setName(\"jButton1\"); // NOI18N\n\n btnIr.setText(\"Ir\");\n btnIr.setName(\"btnIr\"); // NOI18N\n btnIr.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnIrActionPerformed(evt);\n }\n });\n\n txtPath.setName(\"txtPath\"); // NOI18N\n\n btnVoltar.setText(\"Voltar\");\n btnVoltar.setName(\"btnVoltar\"); // NOI18N\n btnVoltar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnVoltarActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"<\");\n jButton3.setName(\"jButton3\"); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n scrScrollBar.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n scrScrollBar.setName(\"scrScrollBar\"); // NOI18N\n\n panFiles.setName(\"panFiles\"); // NOI18N\n panFiles.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\n scrScrollBar.setViewportView(panFiles);\n\n btnRolarDireita.setText(\">\");\n btnRolarDireita.setName(\"btnRolarDireita\"); // NOI18N\n btnRolarDireita.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRolarDireitaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnVoltar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtPath, javax.swing.GroupLayout.DEFAULT_SIZE, 573, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnIr))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(scrScrollBar, javax.swing.GroupLayout.DEFAULT_SIZE, 599, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnRolarDireita))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnVoltar)\n .addComponent(btnIr, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtPath, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(scrScrollBar, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)\n .addComponent(jButton3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)\n .addComponent(btnRolarDireita, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)))\n );\n }", "public void addPanelControls() {\n\t\tlist_sort = new JComboBox<>(new String[] { \"MSSV\", \"HoTen\", \"NTNS\" });\r\n\t\tbtn_sapxep = new JButton(\"Sap xep\");\r\n\t\tbtn_them = new JButton(\"Them\");\r\n\t\tbtn_xoa = new JButton(\"Xoa\");\r\n\t\tbtn_save = new JButton(\"Save\");\r\n\t\tbtn_load = new JButton(\"Load\");\r\n\r\n\t\tJPanel mControlPanel = new JPanel(new GridLayout(5, 1));\r\n\t\tmControlPanel.add(btn_them);\r\n\t\tmControlPanel.add(btn_xoa);\r\n\t\tJPanel sapxepPanel = new JPanel();\r\n\t\tsapxepPanel.add(list_sort);\r\n\t\tsapxepPanel.add(btn_sapxep);\r\n\t\tmControlPanel.add(sapxepPanel);\r\n\t\tmControlPanel.add(btn_save);\r\n\t\tmControlPanel.add(btn_load);\r\n\r\n\t\tmControlPanel.setPreferredSize(new Dimension(380, 200));\r\n\t\tmControlPanel.setBorder(new TitledBorder(\"Controls\"));\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tc.weightx = 0.5;\r\n\t\tc.gridx = 1;\r\n\t\tc.gridy = 0;\r\n\t\tpanel.add(mControlPanel,c);\r\n\t}", "public DemoFileChooser()\n\t{\n\t\tsetTitle(\"Testing Tool\");\n\t\tinitComponents();\n\t}", "public FileCreator() {\r\n initComponents();\r\n }", "@objid (\"953cfb64-2c67-4567-9275-71646d8e0187\")\r\n public FileChooserComposite(final Composite parent, final int style, final int typeSelection) {\r\n super(parent, style);\r\n setLayout(new FormLayout());\r\n this.dialog = new FileDialog((Shell) parent, typeSelection);\r\n \r\n final GridLayout gridLayout = new GridLayout();\r\n gridLayout.numColumns = 2;\r\n this.setLayout(gridLayout);\r\n this.text = new Text(this, SWT.BORDER);\r\n this.text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r\n this.text.setEnabled(true);\r\n this.searchButton = new Button(this, SWT.NONE);\r\n File file = new File(ResourcesManager.getInstance().getImage(\"directory.png\")); \r\n Image directory = new Image(Display.getDefault(), file.getAbsolutePath());\r\n this.searchButton.setImage(directory);\r\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tAllSongs allSongs = new AllSongs();\n\t\t\t\t\t// AllSongs allSongs = new AllSongs();\n\t\t\t\t\tJPanel jp = allSongs.displaySongsOnThePanel(new File(playListPath), false);\n\t\t\t\t\tjavax.swing.GroupLayout allSongsLayout = new javax.swing.GroupLayout(jp);\n\t\t\t\t\tjp.setLayout(allSongsLayout);\n\t\t\t\t\tallSongsLayout.setHorizontalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 510,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\tallSongsLayout.setVerticalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 420,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\t// JFrame frame3 = new JFrame();\n\t\t\t\t\t// frame3.setSize(500,500);\n\t\t\t\t\t// frame3.setLocation(300,200);\n\t\t\t\t\t// frame3.add(jp);\n\t\t\t\t\t// frame3.setVisible(true);\n//\t\t\t\t\tMusicPlayer.window.add(jp);\n\t\t\t\t\tMusicPlayer.window.getContentPane().add(jp);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(playListFile));\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\t * On click of crete playlist button, I should be able to\n\t\t\t\t\t * create another button and add it to the panel\n\t\t\t\t\t * ????????????\n\t\t\t\t\t */\n\n\t\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n myFileChooser = new javax.swing.JFileChooser();\n jLabel1 = new javax.swing.JLabel();\n txtCurrentEncoding = new javax.swing.JTextField();\n cmdProcessFile = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"current encoding\");\n\n txtCurrentEncoding.setText(\"jTextField1\");\n\n cmdProcessFile.setText(\"load and process File\");\n cmdProcessFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmdProcessFileActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCurrentEncoding, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(cmdProcessFile)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtCurrentEncoding, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cmdProcessFile)\n .addContainerGap(233, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "private void createTextPanel()\n\t{\t\t\n\t\ttextPanel.setLayout (new BorderLayout());\n\t\ttextPanel.add(entry, BorderLayout.CENTER);\n\t\t\n\t}", "private JPanel createSelectDocTypePanel(){\n\t\tJPanel toReturn = new JPanel(new GridBagLayout());\n\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\t\n\t\t//add document type JLabel\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\ttoReturn.add(new JLabel(translator.getTranslation(Tags.SELECT_DOCUMENT_TYPE)) , gbc);\n\t\t\t\n\t\t//add comboBox\n\t\tgbc.gridx++;\n\t\tgbc.weightx = 1;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tgbc.insets.left = 2;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoReturn.add(combBoxDocumentTypes, gbc);\n\t\t\n\t\t//action for add button\n\t\tAction addDocTypeAction = new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString docType = JOptionPane.showInputDialog(null, (Object)new JLabel(translator.getTranslation(Tags.INSERT_DOC_TYPE_LABEL)), \"\", \n\t\t\t\t\t\t JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tif(docType !=null && !docType.isEmpty()){\n\t\t\t\t\tcombBoxDocumentTypes.addItem(docType);\n\t\t\t\t\tcombBoxDocumentTypes.setSelectedItem(docType);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\taddDocumentTypeButton = new ToolbarButton(addDocTypeAction, false);\n\t\t\n\t\t// Get the image for toolbar button\n\t\tURL imageToLoad = getClass().getClassLoader().getResource(Images.ADD_ICON);\n\t\tif (imageToLoad != null) {\n\t\t\taddDocumentTypeButton.setText(\"\");\n\t\t\taddDocumentTypeButton.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t}\n\t\t\n\t\t//add the addButton\n\t\tgbc.gridx++;\n\t\tgbc.weightx = 0;\n\t\tgbc.insets.left = 0;\n\t\ttoReturn.add(addDocumentTypeButton,gbc);\n\t\t\n\t\t\n\t\t\n\t\t//action for remove button\n\t\t\tAction removeAction = new AbstractAction() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tcombBoxDocumentTypes.removeItem(combBoxDocumentTypes.getSelectedItem());\n\t\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tremoveDocumentTypeButton = new ToolbarButton(removeAction, false);\n\t\t\t\n\t\t\t// Get the image for toolbar button\n\t\t\timageToLoad = getClass().getClassLoader().getResource(Images.REMOVE_ICON);\n\t\t\tif (imageToLoad != null) {\n\t\t\t\tremoveDocumentTypeButton.setText(\"\");\n\t\t\t\tremoveDocumentTypeButton.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t\t}\n\t\t\t\n\t\t\t//add the addButton\n\t\t\tgbc.gridx++;\n\t\t\ttoReturn.add(removeDocumentTypeButton,gbc);\n\t\t\n\t\t\n\t\treturn toReturn;\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n int returnVal = fileChooser.showOpenDialog(FileChooserField.this);\n \t\t \n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fileChooser.getSelectedFile();\n destinationTextField.setText(file.getPath());\n }\n \n destinationTextField.setCaretPosition(destinationTextField.getDocument().getLength());\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n lbl_file_name = new javax.swing.JLabel();\n lbl_content = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaEditor = new javax.swing.JTextArea();\n btn_load_file = new javax.swing.JButton();\n btn_save_file = new javax.swing.JButton();\n CancelButton = new javax.swing.JButton();\n jComboBoxFile = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Edit file\");\n setResizable(false);\n\n lbl_file_name.setText(\"File: \");\n\n lbl_content.setText(\"File editor:\");\n\n jTextAreaEditor.setColumns(20);\n jTextAreaEditor.setRows(5);\n jScrollPane1.setViewportView(jTextAreaEditor);\n\n btn_load_file.setText(\"Load file\");\n btn_load_file.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_load_fileActionPerformed(evt);\n }\n });\n\n btn_save_file.setText(\"Save file\");\n btn_save_file.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_save_fileActionPerformed(evt);\n }\n });\n\n CancelButton.setText(\"Cancel\");\n CancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CancelButtonActionPerformed(evt);\n }\n });\n\n jComboBoxFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxFileActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE)\n .addComponent(btn_load_file, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(lbl_content)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(CancelButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn_save_file, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(lbl_file_name, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBoxFile, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(10, 10, 10))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lbl_file_name)\n .addComponent(jComboBoxFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btn_load_file)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lbl_content)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btn_save_file)\n .addComponent(CancelButton))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"CsvPickerPane\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n CsvPickerPane demopane = new CsvPickerPane(frame);\n frame.getContentPane().add(demopane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "private void addAdditionalFieldsTab()\n {\n\t\t// START OF ADDITIONAL FIELDS TAB ///\n\t\t// ////////////////////////\n \twAdditionalFieldsTab = new CTabItem(wTabFolder, SWT.NONE);\n \twAdditionalFieldsTab.setText(BaseMessages.getString(PKG, \"AccessInputDialog.AdditionalFieldsTab.TabTitle\"));\n\n \twAdditionalFieldsComp = new Composite(wTabFolder, SWT.NONE);\n\t\tprops.setLook(wAdditionalFieldsComp);\n\n\t\tFormLayout fieldsLayout = new FormLayout();\n\t\tfieldsLayout.marginWidth = 3;\n\t\tfieldsLayout.marginHeight = 3;\n\t\twAdditionalFieldsComp.setLayout(fieldsLayout);\n\t\t\n\t\t// ShortFileFieldName line\n\t\twlShortFileFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlShortFileFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.ShortFileFieldName.Label\"));\n\t\tprops.setLook(wlShortFileFieldName);\n\t\tfdlShortFileFieldName = new FormData();\n\t\tfdlShortFileFieldName.left = new FormAttachment(0, 0);\n\t\tfdlShortFileFieldName.top = new FormAttachment(wInclRownumField, margin);\n\t\tfdlShortFileFieldName.right = new FormAttachment(middle, -margin);\n\t\twlShortFileFieldName.setLayoutData(fdlShortFileFieldName);\n\n\t\twShortFileFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wShortFileFieldName);\n\t\twShortFileFieldName.addModifyListener(lsMod);\n\t\tfdShortFileFieldName = new FormData();\n\t\tfdShortFileFieldName.left = new FormAttachment(middle, 0);\n\t\tfdShortFileFieldName.right = new FormAttachment(100, -margin);\n\t\tfdShortFileFieldName.top = new FormAttachment(wInclRownumField, margin);\n\t\twShortFileFieldName.setLayoutData(fdShortFileFieldName);\n\t\t\n\t\t\n\t\t// ExtensionFieldName line\n\t\twlExtensionFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlExtensionFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.ExtensionFieldName.Label\"));\n\t\tprops.setLook(wlExtensionFieldName);\n\t\tfdlExtensionFieldName = new FormData();\n\t\tfdlExtensionFieldName.left = new FormAttachment(0, 0);\n\t\tfdlExtensionFieldName.top = new FormAttachment(wShortFileFieldName, margin);\n\t\tfdlExtensionFieldName.right = new FormAttachment(middle, -margin);\n\t\twlExtensionFieldName.setLayoutData(fdlExtensionFieldName);\n\n\t\twExtensionFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wExtensionFieldName);\n\t\twExtensionFieldName.addModifyListener(lsMod);\n\t\tfdExtensionFieldName = new FormData();\n\t\tfdExtensionFieldName.left = new FormAttachment(middle, 0);\n\t\tfdExtensionFieldName.right = new FormAttachment(100, -margin);\n\t\tfdExtensionFieldName.top = new FormAttachment(wShortFileFieldName, margin);\n\t\twExtensionFieldName.setLayoutData(fdExtensionFieldName);\n\t\t\n\t\t\n\t\t// PathFieldName line\n\t\twlPathFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlPathFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.PathFieldName.Label\"));\n\t\tprops.setLook(wlPathFieldName);\n\t\tfdlPathFieldName = new FormData();\n\t\tfdlPathFieldName.left = new FormAttachment(0, 0);\n\t\tfdlPathFieldName.top = new FormAttachment(wExtensionFieldName, margin);\n\t\tfdlPathFieldName.right = new FormAttachment(middle, -margin);\n\t\twlPathFieldName.setLayoutData(fdlPathFieldName);\n\n\t\twPathFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wPathFieldName);\n\t\twPathFieldName.addModifyListener(lsMod);\n\t\tfdPathFieldName = new FormData();\n\t\tfdPathFieldName.left = new FormAttachment(middle, 0);\n\t\tfdPathFieldName.right = new FormAttachment(100, -margin);\n\t\tfdPathFieldName.top = new FormAttachment(wExtensionFieldName, margin);\n\t\twPathFieldName.setLayoutData(fdPathFieldName);\n\t\t\n\n\n \t\t// SizeFieldName line\n\t\twlSizeFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlSizeFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.SizeFieldName.Label\"));\n\t\tprops.setLook(wlSizeFieldName);\n\t\tfdlSizeFieldName = new FormData();\n\t\tfdlSizeFieldName.left = new FormAttachment(0, 0);\n\t\tfdlSizeFieldName.top = new FormAttachment(wPathFieldName, margin);\n\t\tfdlSizeFieldName.right = new FormAttachment(middle, -margin);\n\t\twlSizeFieldName.setLayoutData(fdlSizeFieldName);\n\n\t\twSizeFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wSizeFieldName);\n\t\twSizeFieldName.addModifyListener(lsMod);\n\t\tfdSizeFieldName = new FormData();\n\t\tfdSizeFieldName.left = new FormAttachment(middle, 0);\n\t\tfdSizeFieldName.right = new FormAttachment(100, -margin);\n\t\tfdSizeFieldName.top = new FormAttachment(wPathFieldName, margin);\n\t\twSizeFieldName.setLayoutData(fdSizeFieldName);\n\t\t\n\t\t\n\t\t// IsHiddenName line\n\t\twlIsHiddenName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlIsHiddenName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.IsHiddenName.Label\"));\n\t\tprops.setLook(wlIsHiddenName);\n\t\tfdlIsHiddenName = new FormData();\n\t\tfdlIsHiddenName.left = new FormAttachment(0, 0);\n\t\tfdlIsHiddenName.top = new FormAttachment(wSizeFieldName, margin);\n\t\tfdlIsHiddenName.right = new FormAttachment(middle, -margin);\n\t\twlIsHiddenName.setLayoutData(fdlIsHiddenName);\n\n\t\twIsHiddenName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wIsHiddenName);\n\t\twIsHiddenName.addModifyListener(lsMod);\n\t\tfdIsHiddenName = new FormData();\n\t\tfdIsHiddenName.left = new FormAttachment(middle, 0);\n\t\tfdIsHiddenName.right = new FormAttachment(100, -margin);\n\t\tfdIsHiddenName.top = new FormAttachment(wSizeFieldName, margin);\n\t\twIsHiddenName.setLayoutData(fdIsHiddenName);\n\t\t\n\t\t// LastModificationTimeName line\n\t\twlLastModificationTimeName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlLastModificationTimeName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.LastModificationTimeName.Label\"));\n\t\tprops.setLook(wlLastModificationTimeName);\n\t\tfdlLastModificationTimeName = new FormData();\n\t\tfdlLastModificationTimeName.left = new FormAttachment(0, 0);\n\t\tfdlLastModificationTimeName.top = new FormAttachment(wIsHiddenName, margin);\n\t\tfdlLastModificationTimeName.right = new FormAttachment(middle, -margin);\n\t\twlLastModificationTimeName.setLayoutData(fdlLastModificationTimeName);\n\n\t\twLastModificationTimeName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wLastModificationTimeName);\n\t\twLastModificationTimeName.addModifyListener(lsMod);\n\t\tfdLastModificationTimeName = new FormData();\n\t\tfdLastModificationTimeName.left = new FormAttachment(middle, 0);\n\t\tfdLastModificationTimeName.right = new FormAttachment(100, -margin);\n\t\tfdLastModificationTimeName.top = new FormAttachment(wIsHiddenName, margin);\n\t\twLastModificationTimeName.setLayoutData(fdLastModificationTimeName);\n\t\t\n\t\t// UriName line\n\t\twlUriName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlUriName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.UriName.Label\"));\n\t\tprops.setLook(wlUriName);\n\t\tfdlUriName = new FormData();\n\t\tfdlUriName.left = new FormAttachment(0, 0);\n\t\tfdlUriName.top = new FormAttachment(wLastModificationTimeName, margin);\n\t\tfdlUriName.right = new FormAttachment(middle, -margin);\n\t\twlUriName.setLayoutData(fdlUriName);\n\n\t\twUriName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wUriName);\n\t\twUriName.addModifyListener(lsMod);\n\t\tfdUriName = new FormData();\n\t\tfdUriName.left = new FormAttachment(middle, 0);\n\t\tfdUriName.right = new FormAttachment(100, -margin);\n\t\tfdUriName.top = new FormAttachment(wLastModificationTimeName, margin);\n\t\twUriName.setLayoutData(fdUriName);\n\t\t\n\t\t// RootUriName line\n\t\twlRootUriName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlRootUriName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.RootUriName.Label\"));\n\t\tprops.setLook(wlRootUriName);\n\t\tfdlRootUriName = new FormData();\n\t\tfdlRootUriName.left = new FormAttachment(0, 0);\n\t\tfdlRootUriName.top = new FormAttachment(wUriName, margin);\n\t\tfdlRootUriName.right = new FormAttachment(middle, -margin);\n\t\twlRootUriName.setLayoutData(fdlRootUriName);\n\n\t\twRootUriName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wRootUriName);\n\t\twRootUriName.addModifyListener(lsMod);\n\t\tfdRootUriName = new FormData();\n\t\tfdRootUriName.left = new FormAttachment(middle, 0);\n\t\tfdRootUriName.right = new FormAttachment(100, -margin);\n\t\tfdRootUriName.top = new FormAttachment(wUriName, margin);\n\t\twRootUriName.setLayoutData(fdRootUriName);\n\t\n\n\t\tfdAdditionalFieldsComp = new FormData();\n\t\tfdAdditionalFieldsComp.left = new FormAttachment(0, 0);\n\t\tfdAdditionalFieldsComp.top = new FormAttachment(wStepname, margin);\n\t\tfdAdditionalFieldsComp.right = new FormAttachment(100, 0);\n\t\tfdAdditionalFieldsComp.bottom = new FormAttachment(100, 0);\n\t\twAdditionalFieldsComp.setLayoutData(fdAdditionalFieldsComp);\n\n\t\twAdditionalFieldsComp.layout();\n\t\twAdditionalFieldsTab.setControl(wAdditionalFieldsComp);\n\n\t\t// ///////////////////////////////////////////////////////////\n\t\t// / END OF ADDITIONAL FIELDS TAB\n\t\t// ///////////////////////////////////////////////////////////\n\n\t\t\n \t\n }", "private void initRawPanel() {\n rawPanel.setLayout(new BorderLayout());\n\n // Textarea\n textPane.setEditable(false);\n\n document = textPane.getStyledDocument();\n addStylesToDocument();\n\n try {\n document.insertString(0, \"\", document.getStyle(\"regular\"));\n } catch (BadLocationException ex) {\n LOGGER.warn(\"Problem setting style\", ex);\n\n }\n\n OverlayPanel testPanel = new OverlayPanel(textPane, Localization.lang(\"paste text here\"));\n\n testPanel.setPreferredSize(new Dimension(450, 255));\n testPanel.setMaximumSize(new Dimension(450, Integer.MAX_VALUE));\n\n // Setup fields (required to be done before setting up popup menu)\n fieldList = new JList<>(getAllFields());\n fieldList.setCellRenderer(new SimpleCellRenderer(fieldList.getFont()));\n ListSelectionModel listSelectionModel = fieldList.getSelectionModel();\n listSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n listSelectionModel.addListSelectionListener(new FieldListSelectionHandler());\n fieldList.addMouseListener(new FieldListMouseListener());\n\n // After the call to getAllFields\n initPopupMenuAndToolbar();\n\n //Add listener to components that can bring up popup menus.\n MouseListener popupListener = new PopupListener(inputMenu);\n textPane.addMouseListener(popupListener);\n testPanel.addMouseListener(popupListener);\n\n JPanel leftPanel = new JPanel(new BorderLayout());\n\n leftPanel.add(toolBar, BorderLayout.NORTH);\n leftPanel.add(testPanel, BorderLayout.CENTER);\n\n JPanel inputPanel = setUpFieldListPanel();\n\n // parse with FreeCite button\n parseWithFreeCiteButton.addActionListener(event -> {\n if (parseWithFreeCiteAndAddEntries()) {\n okPressed = false; // we do not want to have the super method to handle our entries, we do it on our own\n dispose();\n }\n });\n\n rawPanel.add(leftPanel, BorderLayout.CENTER);\n rawPanel.add(inputPanel, BorderLayout.EAST);\n\n JLabel desc = new JLabel(\"<html><h3>\" + Localization.lang(\"Plain text import\") + \"</h3><p>\"\n + Localization.lang(\"This is a simple copy and paste dialog. First load or paste some text into \"\n + \"the text input area.<br>After that, you can mark text and assign it to a BibTeX field.\")\n + \"</p></html>\");\n desc.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\n\n rawPanel.add(desc, BorderLayout.SOUTH);\n }", "void buildTabFromSelection(GralFileSelector.FavorPath info, GralPanelContent tabPanel)\n { assert(false);\n /*\n tabPanel.addGridPanel(info.tabName1, info.tabName1,1,1,10,10);\n mng.setPosition(0, 0, 0, -0, 1, 'd'); //the whole panel.\n FileSelector fileSelector = new FileSelector(\"fileSelector-\"+info.tabName1, mng);\n fileSelector.setActionOnEnterFile(main.executer.actionExecute);\n main.idxFileSelector.put(info.tabName1, fileSelector);\n fileSelector.setToPanel(mng, info.tabName1, 5, new int[]{2,20,5,10}, 'A');\n fileSelector.fillIn(new File(info.path));\n */\n }", "public HitSortFilePanel() {\n initComponents();\n String[] hitSortFileNames = null;\n\n hitSortFileNames = getHitSortFileNames();\n\n cmbSelectHitSortFile.setModel(new DefaultComboBoxModel(hitSortFileNames));\n selectedHitSortFileName_ = hitSortFileNames[0];\n /** Register to be notified when there is a change in Hit Sort Files */\n GuiGlobal.addNewHitSortFileObserver(this);\n }", "private void fileBrowserActionPerformed(ActionEvent e) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n audioCB = new javax.swing.JCheckBox();\n picturesCB = new javax.swing.JCheckBox();\n videoCB = new javax.swing.JCheckBox();\n documentsCB = new javax.swing.JCheckBox();\n GenListButton = new javax.swing.JButton();\n customExt = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n GenListAll = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n chooser = new javax.swing.JFileChooser();\n jScrollPane1 = new javax.swing.JScrollPane();\n loggerTextarea = new javax.swing.JTextArea();\n\n jButton2.setText(\"jButton2\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Pick file types\");\n setResizable(false);\n\n jLabel1.setText(\"Select the type of files you want to list\");\n\n audioCB.setText(\"Audio\");\n audioCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n audioCBActionPerformed(evt);\n }\n });\n\n picturesCB.setText(\"Pictures\");\n picturesCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n picturesCBActionPerformed(evt);\n }\n });\n\n videoCB.setText(\"Video\");\n videoCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n videoCBActionPerformed(evt);\n }\n });\n\n documentsCB.setText(\"Documents\");\n documentsCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n documentsCBActionPerformed(evt);\n }\n });\n\n GenListButton.setText(\"List Selected Types\");\n GenListButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GenListButtonActionPerformed(evt);\n }\n });\n\n customExt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n customExtActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Add further custom extensions, separated by commas (es: zip, exe)\");\n\n GenListAll.setText(\"List All Files\");\n GenListAll.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GenListAllActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(customExt, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(audioCB)\n .addGap(80, 80, 80)\n .addComponent(videoCB)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)\n .addComponent(picturesCB)\n .addGap(80, 80, 80)\n .addComponent(documentsCB)\n .addGap(30, 30, 30))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(GenListButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(GenListAll))))\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {audioCB, documentsCB, picturesCB, videoCB});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(20, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(audioCB)\n .addComponent(videoCB)\n .addComponent(documentsCB)\n .addComponent(picturesCB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(customExt, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(GenListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(GenListAll, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n jLabel2.setText(\"No selection lists all files\");\n\n chooser.setApproveButtonText(\"\");\n chooser.setApproveButtonToolTipText(\"\");\n chooser.setDialogTitle(\"Choose Source Folder\");\n chooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);\n chooser.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooserActionPerformed(evt);\n }\n });\n\n loggerTextarea.setEditable(false);\n loggerTextarea.setBackground(new java.awt.Color(0, 0, 0));\n loggerTextarea.setColumns(20);\n loggerTextarea.setForeground(new java.awt.Color(0, 255, 51));\n loggerTextarea.setRows(5);\n loggerTextarea.setDragEnabled(false);\n jScrollPane1.setViewportView(loggerTextarea);\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jLabel2)))\n .addGap(257, 257, 257))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(chooser, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)))\n .addGap(19, 19, 19))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(chooser, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(8, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n controlPnl = new javax.swing.JPanel();\n selectFolderBtn = new javax.swing.JButton();\n runTestBtn = new javax.swing.JButton();\n Pnl = new javax.swing.JPanel();\n filePnl = new javax.swing.JScrollPane();\n fileTbl = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n selectFolderBtn.setText(\"Select Folder\");\n selectFolderBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n selectFolderBtnMouseClicked(evt);\n }\n });\n\n runTestBtn.setText(\"Run Test\");\n runTestBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n runTestBtnMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout PnlLayout = new javax.swing.GroupLayout(Pnl);\n Pnl.setLayout(PnlLayout);\n PnlLayout.setHorizontalGroup(\n PnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n PnlLayout.setVerticalGroup(\n PnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout controlPnlLayout = new javax.swing.GroupLayout(controlPnl);\n controlPnl.setLayout(controlPnlLayout);\n controlPnlLayout.setHorizontalGroup(\n controlPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(controlPnlLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(controlPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Pnl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(runTestBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, controlPnlLayout.createSequentialGroup()\n .addGap(0, 1, Short.MAX_VALUE)\n .addComponent(selectFolderBtn)))\n .addContainerGap())\n );\n controlPnlLayout.setVerticalGroup(\n controlPnlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(controlPnlLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(Pnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(selectFolderBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(runTestBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32))\n );\n\n filePnl.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n filePnl.setFocusCycleRoot(true);\n\n fileTbl.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null}\n },\n new String [] {\n \"Selected\", \"Filename\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Boolean.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n true, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n fileTbl.getTableHeader().setReorderingAllowed(false);\n filePnl.setViewportView(fileTbl);\n if (fileTbl.getColumnModel().getColumnCount() > 0) {\n fileTbl.getColumnModel().getColumn(0).setResizable(false);\n fileTbl.getColumnModel().getColumn(0).setPreferredWidth(50);\n fileTbl.getColumnModel().getColumn(1).setResizable(false);\n fileTbl.getColumnModel().getColumn(1).setPreferredWidth(350);\n }\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(controlPnl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(filePnl, javax.swing.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(controlPnl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(filePnl, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "private JMenu createFileMenu() {\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic('f');\r\n\t\tfileMenu.add(createSaveHistoryMenuItem());\r\n\t\tfileMenu.add(createLoadHistoryMenuItem());\r\n\r\n\t\treturn fileMenu;\r\n\t}", "private void buildAnalyzePanel(){\n //Create the buttonPanel\n analyzePanel = new JPanel();\n\n //Create the button\n analyzeButton = new JButton(\"Analyze\");\n\n // Add an action listener to the button\n analyzeButton.addActionListener(new ButtonListener());\n\n //Add the button to the panel\n analyzePanel.add(analyzeButton);\n }", "private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n scrollPane = new javax.swing.JScrollPane();\n previewLabel = new javax.swing.JLabel();\n rbProjectImages = new javax.swing.JRadioButton();\n rbExternalImages = new javax.swing.JRadioButton();\n lblFile = new javax.swing.JLabel();\n lblUrl = new javax.swing.JLabel();\n cbFile = new javax.swing.JComboBox();\n rbNoImage = new javax.swing.JRadioButton();\n txtUrl = new javax.swing.JTextField();\n btnBrowseImage = new javax.swing.JButton();\n\n previewLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n scrollPane.setViewportView(previewLabel);\n\n buttonGroup1.add(rbProjectImages);\n rbProjectImages.setText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.rbProjectImages.text\")); // NOI18N\n rbProjectImages.setToolTipText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.rbProjectImages.toolTipText\")); // NOI18N\n rbProjectImages.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n rbProjectImages.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbProjectImagesActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(rbExternalImages);\n rbExternalImages.setText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.rbExternalImages.text\")); // NOI18N\n rbExternalImages.setToolTipText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.rbExternalImages.toolTipText\")); // NOI18N\n rbExternalImages.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n rbExternalImages.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbExternalImagesActionPerformed(evt);\n }\n });\n\n lblFile.setText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.lblFile.text\")); // NOI18N\n\n lblUrl.setText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.lblUrl.text\")); // NOI18N\n\n cbFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbFileActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(rbNoImage);\n rbNoImage.setText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.rbNoImage.text\")); // NOI18N\n rbNoImage.setToolTipText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.rbNoImage.toolTipText\")); // NOI18N\n rbNoImage.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n rbNoImage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbNoImageActionPerformed(evt);\n }\n });\n\n txtUrl.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtUrlActionPerformed(evt);\n }\n });\n\n btnBrowseImage.setText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.btnBrowseImage.text\")); // NOI18N\n btnBrowseImage.setToolTipText(org.openide.util.NbBundle.getMessage(CustomIconEditor.class, \"CustomIconEditor.btnBrowseImage.toolTipText\")); // NOI18N\n btnBrowseImage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBrowseImageActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(scrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 453, Short.MAX_VALUE)\n .addComponent(rbProjectImages, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rbExternalImages, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblFile)\n .addComponent(lblUrl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(txtUrl, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE)\n .addGap(46, 46, 46))\n .addGroup(layout.createSequentialGroup()\n .addComponent(cbFile, 0, 357, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnBrowseImage))))\n .addComponent(rbNoImage, javax.swing.GroupLayout.Alignment.LEADING))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(rbProjectImages)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblFile)\n .addComponent(cbFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBrowseImage))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(rbExternalImages)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblUrl)\n .addComponent(txtUrl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(rbNoImage)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(600, 600));\n getContentPane().setLayout(null);\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField1);\n jTextField1.setBounds(220, 180, 222, 20);\n getContentPane().add(jTextField2);\n jTextField2.setBounds(220, 320, 222, 20);\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Select a file:\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(60, 180, 90, 14);\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Enter the 16 (byte) key:\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(60, 320, 148, 17);\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/browse.png\"))); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1);\n jButton1.setBounds(270, 240, 90, 30);\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/cipher.png\"))); // NOI18N\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(270, 380, 100, 30);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fileretrieve.png\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 630, 600);\n\n pack();\n }", "private JPanel getGridMapFilePanel() {\n if (gridMapFilePanel == null) {\n GridBagConstraints gridBagConstraints3 = new GridBagConstraints();\n gridBagConstraints3.gridx = 0;\n gridBagConstraints3.gridwidth = 3;\n gridBagConstraints3.insets = new java.awt.Insets(2, 2, 2, 2);\n gridBagConstraints3.gridy = 1;\n jLabel1 = new JLabel();\n jLabel1.setText(\"(File will be created if it does not exist)\");\n jLabel1.setForeground(PortalLookAndFeel.getPanelLabelColor());\n\n jLabel1.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.ITALIC, 12));\n GridBagConstraints gridBagConstraints2 = new GridBagConstraints();\n gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints2.gridx = 1;\n gridBagConstraints2.gridy = 0;\n gridBagConstraints2.weightx = 1.0;\n gridBagConstraints2.insets = new java.awt.Insets(2, 2, 2, 2);\n GridBagConstraints gridBagConstraints1 = new GridBagConstraints();\n gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2);\n gridBagConstraints1.gridy = 0;\n gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints1.gridx = 0;\n jLabel = new JLabel();\n jLabel.setText(\"Grid Map File Location\");\n gridMapFilePanel = new JPanel();\n gridMapFilePanel.setLayout(new GridBagLayout());\n gridMapFilePanel.add(jLabel, gridBagConstraints1);\n gridMapFilePanel.add(jLabel1, gridBagConstraints3);\n gridMapFilePanel.add(getGridmapLocation(), gridBagConstraints2);\n gridMapFilePanel.add(getBrowseButton(), new GridBagConstraints());\n }\n return gridMapFilePanel;\n }", "void createComponent() {\n\t\t//Initialize all components\n\t\tsetLayout(new BorderLayout());\n\t\ttextEditor = new JTextArea();\n\t\terrorTextArea = new JTextArea();\n\t\topenButton = new JButton(\"Open\");\n\t\tsaveButton = new JButton(\"Save\");\n\t\tfindButton = new JButton(\"Find\");\n\t\treplaceButton = new JButton(\"Replace\");\n\t\tcompileButton = new JButton(\"Compile\");\n\t\trunButton = new JButton(\"Run\");\n\t\tfindField = new JTextField();\n\t\treplaceField = new JTextField();\n\t\tfontSizeItems = new Integer[17];\n\t\tfontStyle = new JComboBox<>(fontStyleItems);\n\t\tfinder = new ArrayList<>();\n\t\t\n\t\t//Assigns values to components\n\t\ttextEditor.setTabSize(2);\n\t\tint index = 0;\n\t\tfor(int i=8;i<=40;i+=2) {\n\t\t\tfontSizeItems[index] = i;\n\t\t\tindex++;\n\t\t}\n\t\tfontSize = new JComboBox<>(fontSizeItems);\n\t\tfontSize.setSelectedIndex(2);\n\t\terrorTextArea.setText(\"Error outputs here...\");\n\t\terrorTextArea.setEditable(false);\n\t\terrorTextArea.setFont(new Font(null, 0, 17));\n\t\terrorTextArea.setLineWrap(true);\n\t\terrorTextArea.setWrapStyleWord(true);\n\t\t\n\t\topenButton.setPreferredSize(optionSize);\n\t\tsaveButton.setPreferredSize(optionSize);\n\t\tfindButton.setPreferredSize(optionSize);\n\t\treplaceButton.setPreferredSize(optionSize);\n\t\t\n\t\thighlighter = textEditor.getHighlighter();\n\t\t\n\t\t//Add all components to panels\n\t\tJScrollPane scrollPane = new JScrollPane(textEditor);\n\t\tJPanel navigationPanel = new JPanel(new BorderLayout());\n\t\tJPanel optionsPanel = new JPanel(new GridLayout(2,5,5,5));\n\t\tJPanel executePanel = new JPanel(new GridLayout(2,1));\n\t\tJPanel errorPanel = new JPanel(new BorderLayout());\n\t\t\n\t\toptionsPanel.add(openButton);\n\t\toptionsPanel.add(fontSize);\n\t\toptionsPanel.add(findField);\n\t\toptionsPanel.add(findButton);\n\t\t\n\t\toptionsPanel.add(saveButton);\n\t\toptionsPanel.add(fontStyle);\n\t\toptionsPanel.add(replaceField);\n\t\toptionsPanel.add(replaceButton);\n\t\t\n\t\texecutePanel.add(compileButton);\n\t\texecutePanel.add(runButton);\n\t\t\n\t\terrorPanel.add(errorTextArea);\n\t\t\n\t\tnavigationPanel.add(optionsPanel,BorderLayout.CENTER);\n\t\tnavigationPanel.add(errorPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Add panels to the main frame\n\t\tthis.add(scrollPane,BorderLayout.CENTER);\n\t\tthis.add(navigationPanel, BorderLayout.SOUTH);\n\t\tthis.add(executePanel, BorderLayout.EAST);\n\t}", "public FileMenu(ChatWindow parentWindow) {\r\n\r\n super(Messages.getI18NString(\"file\").getText());\r\n\r\n this.parentWindow = parentWindow;\r\n\r\n this.setForeground(new Color(\r\n ColorProperties.getColor(\"chatMenuForeground\")));\r\n\r\n this.add(saveMenuItem);\r\n this.add(printMenuItem);\r\n\r\n this.addSeparator();\r\n\r\n this.add(closeMenuItem);\r\n\r\n this.saveMenuItem.setName(\"save\");\r\n this.printMenuItem.setName(\"print\");\r\n this.closeMenuItem.setName(\"close\");\r\n\r\n this.saveMenuItem.addActionListener(this);\r\n this.printMenuItem.addActionListener(this);\r\n this.closeMenuItem.addActionListener(this);\r\n\r\n this.setMnemonic(Messages.getI18NString(\"file\").getMnemonic());\r\n this.saveMenuItem.setMnemonic(saveString.getMnemonic());\r\n this.printMenuItem.setMnemonic(printString.getMnemonic());\r\n this.closeMenuItem.setMnemonic(closeString.getMnemonic());\r\n \r\n this.saveMenuItem.setAccelerator(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n KeyEvent.CTRL_MASK));\r\n \r\n this.printMenuItem.setAccelerator(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_R,\r\n KeyEvent.CTRL_MASK));\r\n \r\n // Disable all menu items that do nothing.\r\n this.saveMenuItem.setEnabled(false);\r\n this.printMenuItem.setEnabled(false);\r\n }", "private JComponent getButtonPanel() {\n JPanel buttonPanel = new JPanel();\n // Open\n OpenAction openAction = new OpenAction();\n buttonPanel.add(new JButton(openAction));\n // Save\n SaveAction saveAction = new SaveAction();\n buttonPanel.add(new JButton(saveAction));\n // Save as\n SaveAsAction saveAsAction = new SaveAsAction(saveAction);\n buttonPanel.add(new JButton(saveAsAction));\n return buttonPanel;\n }", "private void openItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openItemActionPerformed\n if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n File file = fileChooser.getSelectedFile();\n String t = \"\";\n if (file.isFile()) {\n if ((file.getName().toLowerCase().endsWith(\".jpg\")\n || file.getName().toLowerCase().endsWith(\".png\"))) {\n files.add(file.getAbsolutePath());\n flist.add(file);\n } else if (file.getName().toLowerCase().endsWith(\".pdf\")) {\n parsePDF(file.getAbsolutePath());\n flist.add(file);\n }\n t += file.getAbsolutePath() + \"\\n\";\n } else {\n for (File f : file.listFiles()) {\n if (f.isFile() && (f.getName().toLowerCase().endsWith(\".jpg\")\n || f.getName().toLowerCase().endsWith(\".png\"))) {\n files.add(f.getAbsolutePath());\n flist.add(f);\n t += f.getAbsolutePath() + \"\\n\";\n } else if (f.isFile() && f.getName().toLowerCase().endsWith(\".pdf\")) {\n parsePDF(f.getAbsolutePath());\n flist.add(f);\n t += f.getAbsolutePath() + \"\\n\";\n }\n }\n }\n textArea.setText(t);\n } else {\n System.out.println(\"File access cancelled.\");\n }\n }", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n OpenFile = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtArea = new javax.swing.JTextArea();\n SubmitTextArea = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n OpenFile.setText(\"jButton1\");\n OpenFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n OpenFileActionPerformed(evt);\n }\n });\n\n txtArea.setColumns(20);\n txtArea.setRows(5);\n txtArea.setWrapStyleWord(true);\n jScrollPane1.setViewportView(txtArea);\n\n SubmitTextArea.setText(\"jButton2\");\n SubmitTextArea.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SubmitTextAreaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(OpenFile)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 65, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(58, 58, 58))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(SubmitTextArea)\n .addGap(31, 31, 31))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addComponent(OpenFile))\n .addGroup(layout.createSequentialGroup()\n .addGap(96, 96, 96)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addComponent(SubmitTextArea)\n .addContainerGap(67, Short.MAX_VALUE))\n );\n\n pack();\n }" ]
[ "0.71765137", "0.71140504", "0.70294", "0.7007062", "0.682879", "0.67758423", "0.6649112", "0.6627506", "0.6562504", "0.65104634", "0.6491197", "0.6450527", "0.6447129", "0.63889277", "0.63786745", "0.63771915", "0.63547933", "0.63378584", "0.6334065", "0.63152647", "0.6301229", "0.6293914", "0.6280892", "0.62560517", "0.625477", "0.62358916", "0.62263036", "0.6203865", "0.61946285", "0.6188253", "0.61687595", "0.6156858", "0.6150814", "0.6124026", "0.6121074", "0.6112844", "0.6112745", "0.6111535", "0.6109081", "0.6091999", "0.60872525", "0.608668", "0.6066741", "0.60521567", "0.6050304", "0.6046281", "0.60402834", "0.6038794", "0.60360384", "0.60155", "0.6005347", "0.6004985", "0.59880084", "0.5983708", "0.5978399", "0.5978282", "0.59644985", "0.59489876", "0.5938665", "0.5933398", "0.5932134", "0.5931352", "0.5923192", "0.5916308", "0.5916061", "0.59147274", "0.59041506", "0.5900936", "0.58999497", "0.58991075", "0.5896594", "0.58947146", "0.58940667", "0.5887127", "0.58827215", "0.587846", "0.58722234", "0.5868403", "0.5867046", "0.5862883", "0.58619237", "0.5859032", "0.58581555", "0.5855659", "0.5846631", "0.58452743", "0.58452296", "0.5844869", "0.5831281", "0.5824478", "0.58217585", "0.58210075", "0.58199173", "0.581721", "0.5815416", "0.58151156", "0.58123565", "0.5812347", "0.581081", "0.58077645" ]
0.78413063
0
Create the ok and cancel button pane and its components.
JPanel createButtonPane() { // create the Ok button _okButton = new JButton("OK"); _okButton.addActionListener(this); _panel.add(_okButton); // create the Cancel button _cancelButton = new JButton("Cancel"); _cancelButton.addActionListener(this); _panel.add(_cancelButton); // make ok button size same as cancel size _okButton.setPreferredSize(_cancelButton.getPreferredSize()); /* * Use a BoxLayout for the Ok/Cancel button panel. How to use BoxLayout: * https://docs.oracle.com/javase/tutorial/uiswing/layout/box.html */ JPanel tButtonPane = new JPanel(); tButtonPane.setLayout(new BoxLayout(tButtonPane, BoxLayout.LINE_AXIS)); tButtonPane.add(Box.createHorizontalGlue()); tButtonPane.add(_okButton); tButtonPane.add(Box.createRigidArea(new Dimension(25, 0))); tButtonPane.add(_cancelButton); tButtonPane.add(Box.createHorizontalGlue()); /* * To enlarge the button pane height, add a rigid area with extra height * but zero width. * Note that we could have just modified the height of the rigid area * between the ok and cancel buttons accordingly, instead of adding the * zero width rigid area here. */ Dimension tDim = _okButton.getPreferredSize(); tDim.width = 0; tDim.height += 20; tButtonPane.add(Box.createRigidArea(tDim)); return tButtonPane; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createButtonComp() {\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n Composite okBtnComp = new Composite(shell, SWT.NONE);\n GridLayout okBtnCompLayout = new GridLayout(2, true);\n okBtnComp.setLayout(okBtnCompLayout);\n okBtnComp.setLayoutData(gd);\n\n GridData bd = new GridData(110, 30);\n okBtn = new Button(okBtnComp, SWT.PUSH);\n okBtn.setText(\"OK\");\n okBtn.setLayoutData(bd);\n okBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n calculateDuration();\n shell.dispose();\n }\n });\n\n bd = new GridData(110, 30);\n cancelBtn = new Button(okBtnComp, SWT.PUSH);\n cancelBtn.setText(\"Close\");\n cancelBtn.setLayoutData(bd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n\n /*\n * (non-Javadoc)\n * \n * @see\n * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse\n * .swt.events.SelectionEvent)\n */\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(-1);\n close();\n }\n });\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "private ButtonPane()\r\n\t\t\t{ super(new String[]{\"OK\",\"Cancel\"},1,2); }", "private JPanel createConfirmButtonsPanel() {\n JPanel p = new JPanel(new FlowLayout());\n p.add(createConfirmButton());\n p.add(createCancelButton());\n \n return p;\n }", "private void createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "private void initComponents() {\n\t\t\n\t\tsetBounds(800, 250, 320, 250);\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\t{\n\t\t\tbuttonPane = new JPanel();\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\t\t{\n\t\t\t\tbtnOK = new JButton(\"OK\");\n\t\t\t\tbtnOK.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\t\t\tbtnOK.setIcon(null);\n\t\t\t\tbtnOK.setActionCommand(\"OK\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbuttonPane.add(btnOK);\n\t\t\t\tgetRootPane().setDefaultButton(btnOK);\n\t\t\t}\n\t\t\t{\n\t\t\t\tbtnCancel = new JButton(\"Cancel\");\n\t\t\t\tbtnCancel.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\t\t\tbtnCancel.setActionCommand(\"Cancel\");\n\t\t\t\tbuttonPane.add(btnCancel);\n\t\t\t}\n\t\t}\n\t\tGroupLayout groupLayout = new GroupLayout(getContentPane());\n\t\tgroupLayout.setHorizontalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(contentPanel, GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(buttonPane, GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE))\n\t\t\t\t\t.addGap(76))\n\t\t);\n\t\tgroupLayout.setVerticalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addComponent(contentPanel, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 39, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(buttonPane, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t);\n\t\tlblXCoordinate = new JLabel(\"X coordinate (ULP):\");\n\t\tlblXCoordinate.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblYCoordinate = new JLabel(\"Y coordinate (ULP):\");\n\t\tlblYCoordinate.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblHeight = new JLabel(\"Height:\");\n\t\tlblHeight.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblWidth = new JLabel(\"Width:\");\n\t\tlblWidth.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\t\n\t\ttxtXC = new JTextField();\n\t\ttxtXC.setEnabled(false);\n\t\ttxtXC.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtXC.setColumns(10);\n\t\t\n\t\ttxtYC = new JTextField();\n\t\ttxtYC.setEnabled(false);\n\t\ttxtYC.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtYC.setColumns(10);\n\t\t\n\t\ttxtHeight = new JTextField();\n\t\ttxtHeight.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtHeight.setColumns(10);\n\t\t\n\t\ttxtWidth = new JTextField();\n\t\ttxtWidth.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\ttxtWidth.setColumns(10);\n\t\t\n\t\ttxtColor = new JTextField();\n\t\ttxtColor.setMaximumSize(new Dimension(6, 22));\n\t\ttxtColor.setEnabled(false);\n\t\ttxtColor.setVisible(false);\n\t\ttxtColor.setColumns(10);\n\t\t\n\t\ttxtFill = new JTextField();\n\t\ttxtFill.setMaximumSize(new Dimension(6, 22));\n\t\ttxtFill.setVisible(false);\n\t\ttxtFill.setEnabled(false);\n\t\ttxtFill.setColumns(10);\n\t\t\n\t\t\n\t\tGroupLayout gl_contentPanel = new GroupLayout(contentPanel);\n\t\tgl_contentPanel.setHorizontalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(lblXCoordinate, GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(lblYCoordinate)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(txtColor, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t.addComponent(txtFill, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(lblHeight, Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(lblWidth, Alignment.TRAILING))))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(txtHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(txtWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t.addComponent(txtYC, Alignment.LEADING, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(txtXC, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_contentPanel.setVerticalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(lblXCoordinate)\n\t\t\t\t\t\t.addComponent(txtXC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(lblYCoordinate)\n\t\t\t\t\t\t.addComponent(txtYC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t.addComponent(txtColor, GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(txtFill, GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE))\n\t\t\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblHeight)\n\t\t\t\t\t\t\t\t.addComponent(txtHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblWidth)\n\t\t\t\t\t\t\t\t.addComponent(txtWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t.addGap(29))\n\t\t);\n\t\tcontentPanel.setLayout(gl_contentPanel);\n\t\tgetContentPane().setLayout(groupLayout);\n\t}", "private void initComponents() {\n okButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setLocationByPlatform(true);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n closeDialog(evt);\n }\n });\n\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"MS UI Gothic\", 1, 14));\n jLabel1.setForeground(java.awt.Color.blue);\n jLabel1.setText(\"\\u524a\\u9664\\u3057\\u3066\\u3082\\u826f\\u3044\\u3067\\u3059\\u304b\\uff1f\");\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(okButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 67, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(cancelButton)\n .addContainerGap(186, Short.MAX_VALUE))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap(114, Short.MAX_VALUE)\n .add(jLabel1)\n .add(97, 97, 97))\n );\n\n layout.linkSize(new java.awt.Component[] {cancelButton, okButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap(56, Short.MAX_VALUE)\n .add(jLabel1)\n .add(42, 42, 42)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(okButton)\n .add(cancelButton))\n .addContainerGap())\n );\n pack();\n }", "private JButton getOkButton() {\n if (okButton == null) {\n okButton = new JButton();\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n canceled = false;\n dispose();\n }\n });\n }\n return okButton;\n }", "private JPanel createConfirmationButtons() {\r\n JPanel buttonPanel = new JPanel();\r\n buttonPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n buttonPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));\r\n JButton confirmButton = new JButton(\"Confirm\");\r\n confirmButton.addActionListener(event -> onConfirmButtonPressed());\r\n JButton cancelButton = new JButton(\"Cancel\");\r\n cancelButton.addActionListener(event -> onCancelButtonPressed());\r\n buttonPanel.add(confirmButton);\r\n buttonPanel.add(cancelButton);\r\n return buttonPanel;\r\n }", "private JButton addOKButton(){\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.addActionListener(arg0 -> {\n\t\t\tinfo = new ChannelInfo(nameT.getText(), passwordT.getText(), null);\n\t\t\tsetVisible(false);\n\t\t});\n\t\treturn okButton;\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "private JPanel createConfirmButtons() {\n JPanel panel = new JPanel(new FlowLayout(FlowLayout.TRAILING));\n panel.add(createConfirmButton());\n panel.add(createCancelButton());\n\n return panel;\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t\tvalidate();\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(\"关闭\");\n\t}", "private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setBounds(new Rectangle(40, 215, 90, 30));\r\n\t\t\tjButtonOK.setText(\"确定\");\r\n\t\t\tjButtonOK.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\tjColorChooser.setVisible(false);\r\n\t\t\t\t\tchooserColor = color;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "private JButton getJButtonOK() {\n\t\tif (jButtonOK == null) {\n\t\t\tjButtonOK = new JButton();\n\t\t\tjButtonOK.setLocation(new Point(100, 200));\n\t\t\tjButtonOK.setText(\"OK\");\n\t\t\tjButtonOK.addActionListener( new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tcloseFrameSobre();\n\t\t\t\t}\n\t\t\t});\n\t\t\tjButtonOK.setSize(new Dimension(100, 30));\n\t\t}\n\t\treturn jButtonOK;\n\t}", "private JPanel initButtonPanel() {\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new FlowLayout(SwingUtilities.HORIZONTAL));\n\n completeButton = new JButton(new AbstractAction(\"Complete\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n task.setStatus(TaskStatus.COMPLETED);\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(completeButton);\n\n closeButton = new JButton(new AbstractAction(\"Close\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(closeButton);\n\n return buttonPanel;\n }", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n this.$$$loadButtonText$$$(buttonCancel, ResourceBundle.getBundle(\"strings\").getString(\"cancel\"));\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"strings\").getString(\"resource-name\"));\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n nameField = new JTextField();\n panel3.add(nameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label2 = new JLabel();\n this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle(\"strings\").getString(\"resource-availability\"));\n panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel3.add(scrollPane1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(availabilitiesList);\n label1.setLabelFor(nameField);\n }", "private BButton getBtnOK() {\r\n\t\tif (btnOK == null) {\r\n\t\t\tbtnOK = new BButton();\r\n\t\t\tbtnOK.setText(\"OK\");\r\n\t\t\tbtnOK.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnOK;\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "private JButton getBtnOK() {\n if (btnOK == null) {\n btnOK = new JButton();\n btnOK.setText(\" OK \");\n btnOK.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = true;\n setVisible(false);\n }\n });\n getRootPane().setDefaultButton(btnOK);\n }\n return btnOK;\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1 = new JPanel();\n pan1.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(pan1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Название номера\");\n pan1.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Дата регистрации\");\n pan1.add(label2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Дата истечения\");\n pan1.add(label3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n pan1.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(0, 25), new Dimension(0, 25), new Dimension(0, 25), 0, false));\n number = new JTextField();\n pan1.add(number, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n pan1.add(creationDatePanel, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1.add(expirationDatePanel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tm_bindingContext = initDataBindings();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panel_clientArea = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n bn_okay = new javax.swing.JButton();\n bn_cancel = new javax.swing.JButton();\n\n setLayout(new java.awt.BorderLayout());\n\n panel_clientArea.setLayout(new java.awt.BorderLayout());\n add(panel_clientArea, java.awt.BorderLayout.CENTER);\n\n bn_okay.setText(\"OK\");\n bn_okay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bn_okayActionPerformed(evt);\n }\n });\n\n bn_cancel.setText(\"Cancel\");\n bn_cancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bn_cancelActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(bn_okay)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(bn_cancel)\n .addContainerGap(125, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(bn_okay)\n .addComponent(bn_cancel))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n add(jPanel1, java.awt.BorderLayout.SOUTH);\n }", "private void initComponents() {\n\n javax.swing.JPanel topPanel = new javax.swing.JPanel();\n titleLabel = new javax.swing.JLabel();\n centerPanel = new javax.swing.JPanel();\n javax.swing.JPanel bottomPanel = new javax.swing.JPanel();\n javax.swing.JButton okBtn = new javax.swing.JButton();\n javax.swing.JButton cancelBtn = new javax.swing.JButton();\n\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n closeDialog(evt);\n }\n });\n\n titleLabel.setFont(new java.awt.Font(\"Dialog\", 1, 18));\n titleLabel.setText(\"Dialog Title\");\n topPanel.add(titleLabel);\n\n getContentPane().add(topPanel, java.awt.BorderLayout.NORTH);\n\n centerPanel.setLayout(new java.awt.GridBagLayout());\n getContentPane().add(centerPanel, java.awt.BorderLayout.CENTER);\n\n okBtn.setText(\"OK\");\n okBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okBtnActionPerformed(evt);\n }\n });\n bottomPanel.add(okBtn);\n\n cancelBtn.setText(\"Cancel\");\n cancelBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelBtnActionPerformed(evt);\n }\n });\n bottomPanel.add(cancelBtn);\n\n getContentPane().add(bottomPanel, java.awt.BorderLayout.SOUTH);\n\n pack();\n }", "private JButton getJButtonOk() {\n\t\tif (jButtonOk == null) {\n\t\t\tjButtonOk = new JButton();\n\t\t\tjButtonOk.setText(\"I agree\");\n\t\t\tjButtonOk.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = true;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonOk;\n\t}", "private JButton getOkButton() {\n\t\tif (okButton == null) {\n\t\t\tokButton = new JButton();\n\t\t\tokButton.setText(\"OK\");\n\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tdoOK();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okButton;\n\t}", "private JButton getOkButton() {\r\n\t\tif (okButton == null) {\r\n\t\t\ttry {\r\n\t\t\t\tokButton = new JButton();\r\n\t\t\t\tokButton.setText(\"OK\");\r\n\t\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn okButton;\r\n\t}", "private JPanel createButtonPanel() {\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n gbc.gridwidth = GridBagConstraints.REMAINDER;\n gbc.anchor = GridBagConstraints.NORTH;\n gbc.anchor = GridBagConstraints.CENTER;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n\t\t\n\t\tJButton okBtn = new JButton(\"Close\");\n\t\t\n\t\tokBtn.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent event) {\n \tsetVisible(false);\n }\n });\n\t\t\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n buttons.add(okBtn, gbc);\n \n gbc.weighty = 1;\n\t\tbuttonPanel.add(buttons, gbc);\n\t\tbuttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\n\t\treturn buttonPanel;\n\t}", "private javax.swing.JButton getBtnOK() {\r\n\tif (ivjBtnOK == null) {\r\n\t\ttry {\r\n\t\t\tivjBtnOK = new javax.swing.JButton();\r\n\t\t\tivjBtnOK.setName(\"BtnOK\");\r\n\t\t\tivjBtnOK.setText(\"OK\");\r\n\t\t\t// user code begin {1}\r\n\t\t\t// user code end\r\n\t\t} catch (java.lang.Throwable ivjExc) {\r\n\t\t\t// user code begin {2}\r\n\t\t\t// user code end\r\n\t\t\thandleException(ivjExc);\r\n\t\t}\r\n\t}\r\n\treturn ivjBtnOK;\r\n}", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "private JButton addOKButton(String actionCommand) {\n JButton button = new JButton(\"OK\");\n button.setActionCommand(\"OK \" + actionCommand);\n return button;\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}", "private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setName(\"okButton\");\n }\n return okButton;\n }", "private JPanel createButtonPanel()\n\t{\n\t\tfinal String OK_COMMAND = \"Ok\";\n\t\tfinal String CANCEL_COMMAND = \"Cancel\";\n\t\tfinal String APPLY_COMMAND = \"Apply\";\n\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tActionListener buttonListener = new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (e.getActionCommand().equals(OK_COMMAND))\n\t\t\t\t{\n\t\t\t\t\tStyleEditorFrame.this.setVisible(false);\n\n\t\t\t\t\tguiController.displayProgressWhileRebuilding(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStyleEditorFrame.this.applyCurrentStyle();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tStyleEditorFrame.this.getCurrentStyleTree().updateTree();\n\t\t\t\t}\n\t\t\t\telse if (e.getActionCommand().equals(CANCEL_COMMAND))\n\t\t\t\t{\n\t\t\t\t\tStyleEditorFrame.this.setVisible(false);\n\t\t\t\t\tStyleEditorFrame.this.getCurrentStyleTree().updateTree();\n\t\t\t\t}\n\t\t\t\telse if (e.getActionCommand().equals(APPLY_COMMAND))\n\t\t\t\t{\n\t\t\t\t\tguiController.displayProgressWhileRebuilding(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStyleEditorFrame.this.applyCurrentStyle();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tStyleEditorFrame.this.getCurrentStyleTree().updateTree();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t{\n\t\t\tJButton applyButton = new JButton(\"Apply\");\n\t\t\tapplyButton.setActionCommand(APPLY_COMMAND);\n\t\t\tbuttonPanel.add(applyButton);\n\t\t\tapplyButton.addActionListener(buttonListener);\n\t\t}\n\t\t{\n\t\t\tJButton okButton = new JButton(\"Ok\");\n\t\t\tokButton.setActionCommand(OK_COMMAND);\n\t\t\tbuttonPanel.add(okButton);\n\t\t\tokButton.addActionListener(buttonListener);\n\t\t}\n\t\t{\n\t\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\t\tcancelButton.setActionCommand(CANCEL_COMMAND);\n\t\t\tbuttonPanel.add(cancelButton);\n\t\t\tcancelButton.addActionListener(buttonListener);\n\t\t}\n\n\t\treturn buttonPanel;\n\t}", "private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.CANCEL_ID, Messages.BaselineShowDialog_8, false);\n }", "private void setButtonPanelComponents(){\n\t\tJPanel buttonPane = new JPanel();\n\t\tbuttonPane.setPreferredSize(new Dimension(-1,32));\n\t\tbuttonPane.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\n\t\tsaveButton = Utilities.getInstance().initializeNewButton(\n\t\t\t-1, -1, -1, -1,\n\t\t\tImages.getInstance().saveBtnDialogImg,\n\t\t\tImages.getInstance().saveBtnDialogImgHover\n\t\t);\n\t\tbuttonPane.add(saveButton);\n\t\n\n\t\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "protected GuiTestObject okbutton() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"));\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "private JButton addOKButtonTopic(){\n\t\tJButton okButton = new JButton(\"OK\");\n\n\t\tokButton.addActionListener(arg0 -> {\n\t\t\tSystem.out.println(\"hello\"+ passwordT.getText()+\"hello\");\n\t\t\tinfo = new ChannelInfo(nameT.getText(), passwordT.getText(), topicT\n\t\t\t\t\t.getText());\n\t\t\tsetVisible(false);\n\t\t});\n\t\treturn okButton;\n\t}", "private JPanel makeButtonPanel()\n {\n // Create the containing panel\n JPanel buttonPanel = new JPanel();\n buttonPanel.setBackground(_backColor);\n\n // Create the CANCEL button\n JButton cancelButton = new JButton(\"CANCEL\");\n // Clear editFlag and data, then return back to main action panel if Cancel is pressed\n // TODO Remove this lambda expressionl; it produces a Javadoc error\n cancelButton.addActionListener((a) -> _hdCiv.back());\n\n // Create the SUBMIT button\n JButton submitButton = new JButton(\"SUBMIT\");\n\n // Display error message if received from submit button, or new Hero if OK\n submitButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event)\n {\n // Call the Civ to validate the attributes. If no errors, Hero\n // is created and displayed\n EnumMap<PersonKeys, String> input = submit();\n if ((input != null) && (input.size() > 0)) {\n // Create the new Hero and display it\n Hero hero = _nhCiv.createHero(input);\n _hdCiv.displayHero(hero, true); // initial Hero needs true\n }\n }\n });\n\n // Create a little space between buttons\n JLabel space = new JLabel(SPACER);\n // Add the two buttons to the panel\n buttonPanel.add(submitButton);\n buttonPanel.add(space);\n buttonPanel.add(cancelButton);\n return buttonPanel;\n }", "private void initPanelButtons() {\r\n\t\tthis.panelButtons = new JPanel(new GridBagLayout());\r\n\t\tthis.panelButtons.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));\r\n\t\tthis.panelButtons.setOpaque(false);\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tgbc.gridwidth = 1;\r\n\t\tgbc.gridheight = 1;\r\n\t\tgbc.weightx = 1;\r\n\t\tgbc.weighty = 1;\r\n\t\tthis.returnButton.setBackground(ConstantView.COLOR_BUTTON_LOGIN);\r\n\t\tthis.returnButton.setForeground(Color.WHITE);\r\n\t\tthis.returnButton.setFocusable(false);\r\n\t\tthis.returnButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tthis.returnButton.setFont(ConstantView.FONT_PRINCIPAL_LABELS);\r\n\t\tthis.panelButtons.add(returnButton, gbc);\r\n\r\n\t\tgbc.gridx = 7;\r\n\t\tthis.okButton.setBackground(ConstantView.COLOR_BUTTON_LOGIN);\r\n\t\tthis.okButton.setForeground(Color.WHITE);\r\n\t\tthis.okButton.setFocusable(false);\r\n\t\tthis.okButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tthis.okButton.setFont(ConstantView.FONT_PRINCIPAL_LABELS);\r\n\t\tthis.okButton.addActionListener(ControlClient.getInstance());\r\n\t\tthis.okButton.setActionCommand(ClientCommands.OK_SIGN_IN.toString());\r\n\t\tthis.panelButtons.add(okButton, gbc);\r\n\t}", "private void initSubmitBtn() throws IOException{\n\t\tBufferedImage submitBtnImage = ImageLoader.getBufferedImage(SUBMIT_BTN_IMAGE_PATH);\n\t\tsubmitBtn = new ContentPane(submitBtnImage, true, false);\n\t\tsubmitBtn.setName(SUBMIT_BTN_NAME);\n\t\t\n\t\tint windowCenter = (int)(mainWindow.getPreferredSize().getWidth() / 2);\n\t\tint submitBtnCenter = (int)(submitBtn.getPreferredSize().getWidth() / 2);\n\t\tsubmitBtnX = windowCenter - submitBtnCenter;\n\t\tint yOffset = mainWindow.getInsets().top + 10;\n\t\tsubmitBtnY = (int)(mainWindow.getPreferredSize().getHeight()\n\t\t\t\t\t\t\t\t- submitBtn.getPreferredSize().getHeight()) - yOffset;\n\t\t\n\t\tmainWindow.addLayer(submitBtn, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t\tsubmitBtn.registerObserver(this);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(DialogStrings.RemoveUserDialog_RemoveButton);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}", "private JButton getOkButton() {\r\n\t\tif (okButton == null) {\r\n\t\t\tokButton = new JButton();\r\n\t\t\tokButton.setText(\"OK\");\r\n\t\t\tokButton.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\ttry {\r\n\t\t\t\t\t\tdouble minValue = Double.parseDouble(minTextField.getText());\r\n\t\t\t\t\t\tdouble maxValue = Double.parseDouble(maxTextField.getText());\r\n\t\t\t\t\t\tif (minValue <= maxValue) {\r\n\t\t\t\t\t\t\tif (mode == RULES_BASIS_SUPPORT_MODE) {\r\n\t\t\t\t\t\t\t\tif (minValue >= rulesBasis.getMinSupport() && maxValue <= rulesBasis.getMaxSupport()) {\r\n\t\t\t\t\t\t\t\t\tnew TableVisualization(\r\n\t\t\t\t\t\t\t\t\t\t\trulesBasis.filterRulesBySupport(minValue, maxValue), relCtxEd);\r\n\t\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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\telse if (mode == RULES_BASIS_CONFIDENCE_MODE) {\r\n\t\t\t\t\t\t\t\tif (minValue >= rulesBasis.getMinConfidence() && maxValue <= rulesBasis.getMaxConfidence()) {\r\n\t\t\t\t\t\t\t\t\tnew TableVisualization(\r\n\t\t\t\t\t\t\t\t\t\t\trulesBasis.filterRulesByConfidence(minValue, maxValue), relCtxEd);\r\n\t\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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\telse if (mode == INTENTS_BASIS_SUPPORT_MODE) {\r\n\t\t\t\t\t\t\t\tif (minValue >= intentsBasis.getMinSupport() && maxValue <= intentsBasis.getMaxSupport()) {\r\n\t\t\t\t\t\t\t\t\tnew IntentsTableVisualization(\r\n\t\t\t\t\t\t\t\t\t\t\tintentsBasis.filterIntentsBySupport(minValue, maxValue), relCtxEd);\r\n\t\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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 {\r\n\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (NumberFormatException ex) {\r\n\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn okButton;\r\n\t}", "private void initComponents() {\r\n\t\tthis.setLocation(420, 300);\r\n\t\tokButton = new javax.swing.JButton();\r\n\t\tcancelButton = new javax.swing.JButton();\r\n\t\tjButton1 = new javax.swing.JButton();\r\n\t\tjScrollPane1 = new javax.swing.JScrollPane();\r\n\t\tjPanel1 = new javax.swing.JPanel();\r\n\t\tjLabel1 = new javax.swing.JLabel();\r\n\t\tjScrollPane2 = new javax.swing.JScrollPane();\r\n\t\tjEditorPane1 = new javax.swing.JEditorPane();\r\n\t\tjLabel2 = new javax.swing.JLabel();\r\n\t\tjLabel3 = new javax.swing.JLabel();\r\n\t\tjLabel4 = new javax.swing.JLabel();\r\n\t\tjLabel5 = new javax.swing.JLabel();\r\n\r\n\t\tsetTitle(\"等待您的选择\");\r\n\t\tsetIconImage(null);\r\n\t\taddWindowListener(new java.awt.event.WindowAdapter() {\r\n\t\t\tpublic void windowClosing(java.awt.event.WindowEvent evt) {\r\n\t\t\t\tcloseDialog(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tokButton.setText(\"是\");\r\n\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tokButtonActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcancelButton.setText(\"取消\");\r\n\t\tcancelButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tcancelButtonActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjButton1.setText(\"否\");\r\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tjButton1ActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjScrollPane1\r\n\t\t\t\t.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\r\n\t\tjScrollPane1\r\n\t\t\t\t.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\r\n\r\n\t\tjPanel1.setBackground(new java.awt.Color(251, 251, 251));\r\n\r\n\t\tjLabel1.setFont(new java.awt.Font(\"楷体_GB2312\", 0, 18));\r\n\t\tjLabel1\r\n\t\t\t\t.setText(\"选择是否重新建表\");\r\n\r\n\t\tjScrollPane2.setBorder(null);\r\n\r\n\t\tjEditorPane1.setBackground(new java.awt.Color(251, 251, 251));\r\n\t\tjEditorPane1.setEditable(false);\r\n\t\tjEditorPane1\r\n\t\t\t\t.setText(\" 您选择的\" + elementstring + \"要素表已经存在,是否选择删除要素表!\");\r\n\t\tjScrollPane2.setViewportView(jEditorPane1);\r\n\r\n\t\tjavax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(\r\n\t\t\t\tjPanel1);\r\n\t\tjPanel1.setLayout(jPanel1Layout);\r\n\t\tjPanel1Layout\r\n\t\t\t\t.setHorizontalGroup(jPanel1Layout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tjPanel1Layout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjPanel1Layout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanel1Layout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t23,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t23,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t23)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel1))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanel1Layout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t43,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t43,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t43)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t470,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(406, Short.MAX_VALUE)));\r\n\t\tjPanel1Layout\r\n\t\t\t\t.setVerticalGroup(jPanel1Layout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tjPanel1Layout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel1)\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane2,\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t70,\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(32, Short.MAX_VALUE)));\r\n\r\n\t\tjScrollPane1.setViewportView(jPanel1);\r\n\r\n\t\tjLabel2\r\n\t\t\t\t.setText(\"点击‘是’将重复的表删除并重建\");\r\n\r\n\t\tjLabel3\r\n\t\t\t\t.setText(\"点击‘否’将把数据导入到已存在的表中\");\r\n\r\n\t\tjLabel4.setFont(new java.awt.Font(\"宋体\", 0, 14));\r\n\t\tjLabel4.setText(\"说明:\");\r\n\r\n\t\tjLabel5\r\n\t\t\t\t.setText(\"点击‘取消’将取消此次导入\");\r\n\r\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(\r\n\t\t\t\tgetContentPane());\r\n\t\tgetContentPane().setLayout(layout);\r\n\t\tlayout\r\n\t\t\t\t.setHorizontalGroup(layout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(jScrollPane1,\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE, 540,\r\n\t\t\t\t\t\t\t\tShort.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel4)\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjLabel5)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjLabel3))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t30,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tokButton,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t67,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t66,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcancelButton,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t79,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t12,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t12,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t12))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap()))));\r\n\t\tlayout\r\n\t\t\t\t.setVerticalGroup(layout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane1,\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t126,\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel4)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel2))\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t16,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t16,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t16)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjButton1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tokButton)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tcancelButton)))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t8,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t8,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t8)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5)))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(12, Short.MAX_VALUE)));\r\n\t\tthis.setIconImage(Toolkit.getDefaultToolkit().createImage(this.getClass().getResource(\"/load1/apple.JPG\")));\r\n\t\tpack();\r\n\t}", "protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tfinal Button bOk = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\n\t\tbOk.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (selection != null && !selection.equals(initialFloorName)) {\n\t\t\t\t\tProjectModel.getInstance().acceptDeviceCoordinates(\n\t\t\t\t\t\t\tparentFloor, selection);\n\t\t\t\t} else {\n\t\t\t\t\tProjectModel.getInstance().setAdjustDeviceCoordinates(\n\t\t\t\t\t\t\tparentFloor, selection, false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tbCancel = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\n\t\tbCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (initialFloorName != null) {\n\t\t\t\t\tProjectModel.getInstance().setAdjustDeviceCoordinates(\n\t\t\t\t\t\t\tparentFloor, selection, false);\n\n\t\t\t\t\tdoChangeToFloorImage(initialFloorName);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void createComponents()\n {\n VBox col = new VBox(SPACING);\n\n Label lblStatus = new Label(\"Machine Status\");\n lblStatus.getStyleClass().add(\"bordered-titled-title\");\n\n lblCurrFile = new Label(\"No File Currently Loaded\");\n lblConnection = new Label(\"Not Connected\");\n\n btnConnect = new Button(\"Connect to Machine\");\n btnConnect.setOnAction(new ConnectEventHandler());\n //btnConnect.getStyleClass().add(\"glass-grey\");\n\n ivConnection = new ImageView(\n new Image(getClass().getResourceAsStream(\"/Resources/Not Connected.png\")));\n\n lblMachineStatus = new Label(\"Status: Good\");\n HBox r1 = new HBox(SPACING);\n r1.getChildren().addAll(lblConnection, ivConnection);\n\n col.getChildren().addAll(btnConnect, r1, lblCurrFile, lblMachineStatus);\n getChildren().addAll(lblStatus, col);\n\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "public JButton getOkButton(){\n\t\treturn okButton;\n\t}", "public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tbutton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\t//button.setEnabled(false);\r\n\t\t\r\n\t\tFile dir=new File(combo.getText());\r\n\t\tbutton.setEnabled(dir.isDirectory());\r\n\t\t\r\n\t\t\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "private void initComponents() {\r\n jPanel1 = new javax.swing.JPanel();\r\n jPanel5 = new javax.swing.JPanel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jPanel2 = new javax.swing.JPanel();\r\n jPanel3 = new javax.swing.JPanel();\r\n jButton1 = new javax.swing.JButton();\r\n jSeparator1 = new javax.swing.JSeparator();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n jPanel1.setLayout(new java.awt.BorderLayout());\r\n\r\n jPanel5.setLayout(null);\r\n\r\n jLabel2.setFont(new java.awt.Font(\"Arial\", 0, 22));\r\n jPanel5.add(jLabel2);\r\n jLabel2.setBounds(80, 10, 280, 30);\r\n\r\n jLabel3.setText(\"CopyRight (C) 2002-2004 Odysys inc.\");\r\n jPanel5.add(jLabel3);\r\n jLabel3.setBounds(80, 70, 280, 18);\r\n\r\n jLabel4.setText(\"Version 1.0.0\");\r\n jPanel5.add(jLabel4);\r\n jLabel4.setBounds(80, 50, 270, 18);\r\n\r\n jPanel5.add(jLabel1);\r\n jLabel1.setBounds(10, 10, 70, 90);\r\n\r\n jPanel1.add(jPanel5, java.awt.BorderLayout.CENTER);\r\n\r\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\r\n\r\n jPanel2.setLayout(new java.awt.BorderLayout());\r\n\r\n jButton1.setText(\"OK\");\r\n jButton1.setName(\"okButton\");\r\n jButton1.setPreferredSize(new java.awt.Dimension(79, 27));\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPanel3.add(jButton1);\r\n\r\n jPanel2.add(jPanel3, java.awt.BorderLayout.CENTER);\r\n\r\n jPanel2.add(jSeparator1, java.awt.BorderLayout.NORTH);\r\n\r\n getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);\r\n\r\n pack();\r\n }", "private void initComponents() {\n jLabelLogotipo = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButtonOk = new javax.swing.JButton();\n\n setBackground(java.awt.Color.white);\n\n jTextArea1.setColumns(20);\n jTextArea1.setEditable(false);\n jTextArea1.setRows(5);\n jTextArea1.setText(\"C\\u00f3digo Certo\\nSistemas e Consultoria em Inform\\u00e1tica Ltda.\\n\\ncontato@codigocerto.com.br\\nhttp://www.codigocerto.com.br\\n(54)3028.1967\\n(54)9149.8401\\n\\n\");\n jScrollPane1.setViewportView(jTextArea1);\n\n jButtonOk.setText(\"OK\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)\n .addComponent(jLabelLogotipo)\n .addComponent(jButtonOk, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelLogotipo)\n .addGap(22, 22, 22)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonOk)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }", "public ConfigureDialog(java.awt.Frame frame) {\n\t\tsuper(frame);\n\t\tattributes=new Hashtable();\n\t\tattributesStructure=new Structure();\n\t\tchangedAttributes = new Hashtable();\n\t\teditors = new Vector();\n\t\t\n\t\tJComponent contentPane = (JComponent)getContentPane();\n\t\t((BorderLayout)contentPane.getLayout()).setHgap(30);\n\t\tcontentPane.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\t\n\t\tcenterPane = null;\n\t\n buttonPane = new JPanel();\n buttonPane.setBorder(new EmptyBorder(5, 0, 0, 0));\n\t\tconstraints = new GridBagConstraints();\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tconstraints.insets = new Insets(2, 0, 2, 0);\n\t\tbuttonsLayout = new GridBagLayout();\n\t\tcontentPane.add(buttonPane, BorderLayout.SOUTH);\n\t\n\t\tok = new JButton(i18n.getString(\"OKButton\"));\n\t\tapply = new JButton(i18n.getString(\"ApplyButton\"));\n\t\tcancel = new JButton(i18n.getString(\"CancelButton\"));\n\n\t\tbuttonPane.add(ok);\t\n\t\tbuttonPane.add(apply); \n\t\tbuttonPane.add(cancel);\n\t\tresizeButtons();\n\t\t\n\t\tgetRootPane().setDefaultButton(ok);\n\t\tok.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed (ActionEvent e) {\n\t\t\t\tif (applyDialog())\n\t\t\t\t\tcancelDialog();\n\t\t\t}\n\t\t});\n\t\tapply.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed (ActionEvent e) {applyDialog();}\n\t\t});\n\t\tcancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed (ActionEvent e) {cancelDialog();}\n\t\t});\n }", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "private JPanel initBtnPanel() {\n\t\tconvBtn = new JButton();\n\t\tconvBtn.addActionListener(new ConversionBtnListener());\n\t\tconvBtn.setFont(new AppFont());\n\n\t\t// A button to switch the input and output scales\n\t\tswitchBtn = new JButton();\n\t\tswitchBtn.addActionListener(new SwitchListener());\n\t\tswitchBtn.setFont(new AppFont());\n\n\t\t// The panel that displays the buttons\n\t\tJPanel btnPanel = new JPanel();\n\t\tbtnPanel.setLayout(new FlowLayout());\n\t\tbtnPanel.add(convBtn);\n\t\tbtnPanel.add(switchBtn);\n\n\t\treturn btnPanel;\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setText(BOTONCREAR);\r\n\t\t\tjButtonOK.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\tcambiarPass();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}", "private void $$$setupUI$$$ ()\n {\n contentPane = new JPanel();\n contentPane.setLayout(new BorderLayout(0, 0));\n contentPane.setBackground(new Color(-16777216));\n contentPane.setPreferredSize(new Dimension(300, 100));\n contentPane.setRequestFocusEnabled(false);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n panel1.setBackground(new Color(-16777216));\n panel1.setPreferredSize(new Dimension(200, 50));\n contentPane.add(panel1, BorderLayout.SOUTH);\n buttonOK = new JButton();\n buttonOK.setPreferredSize(new Dimension(100, 31));\n buttonOK.setText(\"OK\");\n panel1.add(buttonOK);\n final JLabel label1 = new JLabel();\n label1.setPreferredSize(new Dimension(30, 10));\n label1.setText(\"\");\n panel1.add(label1);\n buttonCancel = new JButton();\n buttonCancel.setPreferredSize(new Dimension(100, 31));\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel);\n textField1 = new JTextField();\n textField1.setBackground(new Color(-15987184));\n Font textField1Font = Tools.getFont(\"Arial\", -1, 20, textField1.getFont());\n if (textField1Font != null)\n {\n textField1.setFont(textField1Font);\n }\n textField1.setForeground(new Color(-1));\n textField1.setHorizontalAlignment(0);\n textField1.setOpaque(false);\n textField1.setPreferredSize(new Dimension(300, 50));\n contentPane.add(textField1, BorderLayout.CENTER);\n final JLabel label2 = new JLabel();\n label2.setPreferredSize(new Dimension(11, 11));\n label2.setText(\" \");\n contentPane.add(label2, BorderLayout.WEST);\n final JLabel label3 = new JLabel();\n label3.setPreferredSize(new Dimension(11, 11));\n label3.setText(\" \");\n contentPane.add(label3, BorderLayout.EAST);\n final JLabel label4 = new JLabel();\n label4.setPreferredSize(new Dimension(11, 11));\n label4.setText(\"\");\n contentPane.add(label4, BorderLayout.NORTH);\n }", "private void initComponents() {\n\n jSeparator1 = new javax.swing.JToolBar.Separator();\n buttonGroup1 = new javax.swing.ButtonGroup();\n btnPin = new javax.swing.JToggleButton();\n toolbar = new javax.swing.JToolBar();\n toolbar2 = new javax.swing.JToolBar();\n\n btnPin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/piraso/ui/api/icons/pin_small.png\"))); // NOI18N\n org.openide.awt.Mnemonics.setLocalizedText(btnPin, org.openide.util.NbBundle.getMessage(BaseEntryViewTopComponent.class, \"BaseEntryViewTopComponent.btnPin.text\")); // NOI18N\n btnPin.setToolTipText(org.openide.util.NbBundle.getMessage(BaseEntryViewTopComponent.class, \"BaseEntryViewTopComponent.btnPin.toolTipText\")); // NOI18N\n btnPin.setFocusable(false);\n btnPin.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnPin.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnPin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPinActionPerformed(evt);\n }\n });\n\n setLayout(new java.awt.BorderLayout());\n\n toolbar.setBackground(new java.awt.Color(226, 226, 226));\n toolbar.setFloatable(false);\n toolbar.setRollover(true);\n add(toolbar, java.awt.BorderLayout.NORTH);\n\n toolbar2.setBackground(new java.awt.Color(226, 226, 226));\n toolbar2.setFloatable(false);\n toolbar2.setOrientation(1);\n toolbar2.setRollover(true);\n toolbar2.setVisible(false);\n add(toolbar2, java.awt.BorderLayout.WEST);\n }", "public Box getButtonPanel() {\n\t\tBox buttonsPanel = new Box(BoxLayout.Y_AXIS);\n\t\tbuttonsPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\t\tBox treeBox = new Box(BoxLayout.Y_AXIS);\n\t\ttreeBox.setBorder(new TitledBorder(\"Schema\"));\n\n\t\tBox associationBox = new Box(BoxLayout.Y_AXIS);\n\t\tassociationBox.setBorder(new TitledBorder(\"Association\"));\n\n\t\tBox outputBox = new Box(BoxLayout.Y_AXIS);\n\t\toutputBox.setBorder(new TitledBorder(\"Output\"));\n\n\t\tBox numerotationBox = new Box(BoxLayout.X_AXIS);\n\t\tnumerotationBox.setBorder(new TitledBorder(\"Numerotation\"));\n\t\t/* add a button for loading a XML Schema */\n\t\tJButton loadFileb = new JButton(\"Open schema\");\n\t\tUtils.setDefaultSize(loadFileb);\n\t\tloadFileb.addActionListener(new LoadSchemaListener());\n\n\t\t/*\n\t\t * add a button for associating the content of a node to a line in the\n\t\t * flat file\n\t\t */\n\t\tJButton selectLineNodeb = new JButton(\"Main node\");\n\t\tUtils.setDefaultSize(selectLineNodeb);\n\t\tselectLineNodeb.addActionListener(new SelectLineNodeListener());\n\n\t\tJButton selectNodeb = new JButton(\"Select\");\n\t\tUtils.setDefaultSize(selectNodeb);\n\t\tselectNodeb.addActionListener(new SelectNodeListener());\n\n\t\tJButton unselectNodeb = new JButton(\"Unselect\");\n\t\tUtils.setDefaultSize(unselectNodeb);\n\t\tunselectNodeb.addActionListener(new UnselectNodeListener());\n\n\t\tJButton nameb = new JButton(\"Name\");\n\t\tUtils.setDefaultSize(nameb);\n\t\tnameb.addActionListener(new associateNameListener());\n\n\t\tJButton filterb = new JButton(\"Filter\");\n\t\tUtils.setDefaultSize(filterb);\n\t\tfilterb.addActionListener(new AssociateFilterListener());\n\n\t\tJButton infosb = new JButton(\"About\");\n\t\tUtils.setDefaultSize(infosb);\n\t\tinfosb.addActionListener(new InfosListener());\n\n\t\tassociationBox.add(selectNodeb);\n\t\tassociationBox.add(unselectNodeb);\n\t\tassociationBox.add(nameb);\n\t\tassociationBox.add(filterb);\n\t\tfilter = new JLabel(\"no filter\");\n\t\tassociationBox.add(filter);\n\n\t\ttreeBox.add(loadFileb);\n\n\t\tassociationBox.add(infosb);\n\n\t\tJButton loadXmlFileb = new JButton(\"Open document (XML)\");\n\t\tUtils.setDefaultSize(loadXmlFileb);\n\t\tloadXmlFileb.addActionListener(new LoadDocumentListener());\n\n\t\tJButton setSeparatorb = new JButton(\"Separator\");\n\t\tUtils.setDefaultSize(setSeparatorb);\n\t\tsetSeparatorb.addActionListener(new SetSeparatorListener());\n\n\t\tJButton printTabFileb = new JButton(\"Print\");\n\t\tUtils.setDefaultSize(printTabFileb);\n\t\tprintTabFileb.addActionListener(new PrintFlatFileListener());\n\n\t\ttreeBox.add(loadXmlFileb);\n\t\ttreeBox.add(selectLineNodeb);\n\n\t\toutputBox.add(setSeparatorb);\n\t\toutputBox.add(printTabFileb);\n\n\t\tnumerotationButtons = new ButtonGroup();\n\n\t\tnumericb = new JRadioButton(\"1\");\n\t\thighAlphabeticb = new JRadioButton(\"A\");\n\t\tlowAlphabeticb = new JRadioButton(\"a\");\n\t\tnoneb = new JRadioButton(\"none\");\n\n\t\tnumericb.addActionListener(new NumerotationListener());\n\t\thighAlphabeticb.addActionListener(new NumerotationListener());\n\t\tlowAlphabeticb.addActionListener(new NumerotationListener());\n\t\tnumerotationBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tnumerotationButtons.add(numericb);\n\t\tnumerotationButtons.add(highAlphabeticb);\n\t\tnumerotationButtons.add(lowAlphabeticb);\n\t\tnumerotationButtons.add(noneb);\n\n\t\tswitch (((XsdTreeStructImpl) xsdTree).numerotation_type) {\n\t\tcase XsdTreeStructImpl.HIGH_ALPHABETIC_NUMEROTATION:\n\t\t\thighAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.LOW_ALPHABETIC_NUMEROTATION:\n\t\t\tlowAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.NUMERIC_NUMEROTATION:\n\t\t\tnumericb.setSelected(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnoneb.setSelected(true);\n\t\t\tbreak;\n\t\t}\n\n\t\tnumerotationBox.add(numericb);\n\t\tnumerotationBox.add(highAlphabeticb);\n\t\tnumerotationBox.add(lowAlphabeticb);\n\t\tnumerotationBox.add(noneb);\n\n\t\tbuttonsPanel.add(treeBox);\n\t\tbuttonsPanel.add(associationBox);\n\t\tbuttonsPanel.add(outputBox);\n\t\tbuttonsPanel.add(numerotationBox);\n\n\t\tdisplayExample = new JCheckBox(\"preview\");\n\t\tbuttonsPanel.add(displayExample);\n\t\tdisplayExample.addActionListener(new PreviewListener());\n\t\t\n\t\treturn buttonsPanel;\n\t}", "public JButton getOkButton() {\n return okButton;\n }", "public About() {\n\t\tsetTitle(\"About\");\n\t\tsetBounds(100, 100, 450, 300);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setLayout(new FlowLayout());\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\t{\n\t\t\tJSplitPane splitPane = new JSplitPane();\n\t\t\tsplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);\n\t\t\tcontentPanel.add(splitPane);\n\t\t\t{\n\t\t\t\tJLabel lblcEmperorOf = new JLabel(\"(C) Emperor of The Sea aka Lord Voldemort Tyrannus Farquad\");\n\t\t\t\tsplitPane.setLeftComponent(lblcEmperorOf);\n\t\t\t}\n\t\t\t{\n\t\t\t\tJTextPane text = new JTextPane();\n\t\t\t\ttext.setEditable(false);\n\t\t\t\ttext.setText(\"XORCrypter a digression into XORness by Lord Voldemort Tyrannus Farquad aka Noah\\r\\n\\r\\nXORCrypter is like a qubit, it can decrypt and encrypt with one operation.\\r\\nXOR Encryption is a type of encryption that uses the logical XOR\\r\\non a string along with a key. For example: string XOR key, this\\r\\n then produces the ciphertext.\\r\\nThe interesting thing about this form of encryption is that it is\\r\\n reversible; simply perform the same operation with the ciphertext.\\r\\n Hope you enjoy the program.\");\n\t\t\t\tsplitPane.setRightComponent(text);\n\t\t\t}\n\t\t}\n\t\t{\n\t\t\tJPanel buttonPane = new JPanel();\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\t{\n\t\t\t\tJButton okButton = new JButton(\"OK\");\n\t\t\t\tokButton.addActionListener(new ActionListener() {\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tDialog.getWindows()[1].dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tokButton.setActionCommand(\"OK\");\n\t\t\t\tbuttonPane.add(okButton);\n\t\t\t\tgetRootPane().setDefaultButton(okButton);\n\t\t\t}\n\t\t}\n\t}", "private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n\n setLayout(new java.awt.BorderLayout());\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(CallGraphTopComponent.class, \"NO_VIEW_AVAILABLE\")); // NOI18N\n jButton1.setEnabled(false);\n jButton1.setFocusable(false);\n add(jButton1, java.awt.BorderLayout.CENTER);\n }", "private void configureComponents() {\n save.setStyleName(ValoTheme.BUTTON_PRIMARY);\n save.setClickShortcut(ShortcutAction.KeyCode.ENTER);\n setVisible(false);\n }", "private JButton getJButtonCancel() {\n\t\tif (jButtonCancel == null) {\n\t\t\tjButtonCancel = new JButton();\n\t\t\tjButtonCancel.setText(\"I disagree\");\n\t\t\tjButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = false;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonCancel;\n\t}", "private void createComponentForButtons(Composite section)\n {\n createRowForNewStyleButton(section);\n createRowForNewRegexButton(section);\n createRowForNewColumnButton(section);\n createRowForDeleteButton(section);\n createRowForDeleteAllButton(section);\n }", "public ButtonsPane(final LambdacModel model) {\n super();\n this.model = model;\n\n setLayout(new FlowLayout(FlowLayout.LEADING));\n\n final JButton open = new JButton(\"Open...\");\n final JButton save = new JButton(\"Save\");\n final JButton saveAs = new JButton(\"Save As...\");\n final JButton run = new JButton(\"Run\");\n final JButton help = new JButton(\"Help\");\n add(open);\n add(save);\n add(saveAs);\n add(run);\n add(help);\n\n open.addActionListener(ev -> open());\n save.addActionListener(ev -> save());\n saveAs.addActionListener(ev -> saveAs());\n run.addActionListener(ev -> run());\n help.addActionListener(ev -> help());\n }", "private JButton addCancelButton(){\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\n\t\tcancelButton.addActionListener(arg0 -> setVisible(false));\n\t\treturn cancelButton;\n\t}", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "private void initComponents() {\r\n java.awt.GridBagConstraints gridBagConstraints;\r\n\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n pnlMainValidationCheck = new javax.swing.JPanel();\r\n btnPrint = new javax.swing.JButton();\r\n btnOk = new javax.swing.JButton();\r\n\r\n setLayout(new java.awt.GridBagLayout());\r\n\r\n jScrollPane1.setMinimumSize(new java.awt.Dimension(500, 400));\r\n jScrollPane1.setPreferredSize(new java.awt.Dimension(500, 400));\r\n pnlMainValidationCheck.setLayout(new javax.swing.BoxLayout(pnlMainValidationCheck, javax.swing.BoxLayout.Y_AXIS));\r\n\r\n pnlMainValidationCheck.setBackground(new java.awt.Color(255, 255, 255));\r\n jScrollPane1.setViewportView(pnlMainValidationCheck);\r\n\r\n gridBagConstraints = new java.awt.GridBagConstraints();\r\n gridBagConstraints.gridx = 0;\r\n gridBagConstraints.gridy = 0;\r\n gridBagConstraints.gridwidth = 17;\r\n gridBagConstraints.gridheight = 2;\r\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\r\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\r\n add(jScrollPane1, gridBagConstraints);\r\n\r\n btnPrint.setFont(CoeusFontFactory.getLabelFont());\r\n btnPrint.setMnemonic('P');\r\n btnPrint.setText(\"Print\");\r\n btnPrint.setMinimumSize(new java.awt.Dimension(75, 26));\r\n btnPrint.setPreferredSize(new java.awt.Dimension(75, 26));\r\n gridBagConstraints = new java.awt.GridBagConstraints();\r\n gridBagConstraints.gridx = 17;\r\n gridBagConstraints.gridy = 1;\r\n gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;\r\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 8, 4);\r\n add(btnPrint, gridBagConstraints);\r\n\r\n btnOk.setFont(CoeusFontFactory.getLabelFont());\r\n btnOk.setMnemonic('O');\r\n btnOk.setText(\"OK\");\r\n btnOk.setMaximumSize(new java.awt.Dimension(85, 23));\r\n btnOk.setMinimumSize(new java.awt.Dimension(85, 23));\r\n btnOk.setPreferredSize(new java.awt.Dimension(85, 23));\r\n gridBagConstraints = new java.awt.GridBagConstraints();\r\n gridBagConstraints.gridx = 17;\r\n gridBagConstraints.gridy = 0;\r\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\r\n gridBagConstraints.weighty = 1.0;\r\n gridBagConstraints.insets = new java.awt.Insets(3, 5, 7, 4);\r\n add(btnOk, gridBagConstraints);\r\n\r\n }", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }", "protected GuiTestObject okbutton(TestObject anchor, long flags) \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"), anchor, flags);\n\t}", "private void addControls() {\n\t\tAjaxButton button = new AjaxButton(\"submitButton\", ResourceUtils.getModel(\"button.save\")) {\n\t\t\t@Override\n protected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n onSubmitAction(strWrapper, target, form);\n target.add(form);\n }\n\n\t\t\t@Override\n\t\t\tprotected void onError(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tsuper.onError(target, form);\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tform.add(button);\n\n\t\tbutton = new AjaxButton(\"cancelButton\", ResourceUtils.getModel(\"button.cancel\")) {\n\t\t\t@Override\n\t\t\tprotected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tonCancelAction(strWrapper, target, form);\n\t\t\t\tform.clearInput();\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tbutton.setDefaultFormProcessing(false);\n\t\tform.add(button);\n\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "private void createActionsPanel() {\n DefaultActionGroup group = new DefaultActionGroup();\n group.add(new CloseAction());\n ActionManager actionManager = ActionManager.getInstance();\n JComponent actionsToolbar = actionManager\n .createActionToolbar(ActionPlaces.CODE_INSPECTION, group, false)\n .getComponent();\n JPanel actionsPanel = new JPanel(new BorderLayout());\n actionsPanel.add(actionsToolbar, BorderLayout.WEST);\n add(actionsPanel, BorderLayout.WEST);\n }", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "private void createComponents() {\n\t\tbuttons = new Button[9];\r\n\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\tbuttons[i] = new Button();\r\n\t\t}\r\n\r\n\t\t// Initialize components\r\n\t\tplayAgainButton = new Button(\"Play Again\");\r\n\t\tquitButton = new Button(\"Quit\");\r\n\r\n\t\t// Initialize layouts\r\n\t\tgameButtonGrid = new GridPane();\r\n\t\tgameButtonGrid.setStyle(\"-fx-background-color:Aquamarine;\");\r\n\t\tbottomButtonsHBox = new HBox();\r\n\t\tbottomButtonsHBox.setStyle(\"-fx-background-color:LightSlateGray;\");\r\n\t\tsceneVBox = new VBox();\r\n\t\t\r\n\t\t//Game components\r\n\t\tgameInfo = new GameInfo();\r\n\t}", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroupChoice = new javax.swing.ButtonGroup();\n jGTILabelCaption = new de.unisiegen.gtitool.ui.swing.JGTILabel();\n jGTIPanelChoice = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIRadioButtonRegularGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIRadioButtonContextFreeGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIPanelColumn0 = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIPanelButtons = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIButtonPrevious = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonNext = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonCancel = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n\n setLayout(new java.awt.GridBagLayout());\n\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\"); // NOI18N\n jGTILabelCaption.setText(bundle.getString(\"NewDialog.ChooseGrammar\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 16, 5, 16);\n add(jGTILabelCaption, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonRegularGrammar);\n jGTIRadioButtonRegularGrammar.setSelected(true);\n jGTIRadioButtonRegularGrammar.setText(bundle.getString(\"NewDialog.RG\")); // NOI18N\n jGTIRadioButtonRegularGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonRegularGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);\n jGTIPanelChoice.add(jGTIRadioButtonRegularGrammar, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonContextFreeGrammar);\n jGTIRadioButtonContextFreeGrammar.setText(bundle.getString(\"NewDialog.CFG\")); // NOI18N\n jGTIRadioButtonContextFreeGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonContextFreeGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);\n jGTIPanelChoice.add(jGTIRadioButtonContextFreeGrammar, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelChoice, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelColumn0, gridBagConstraints);\n\n jGTIButtonPrevious.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.PreviousMnemonic\").charAt(0));\n jGTIButtonPrevious.setText(bundle.getString(\"NewDialog.Previous\")); // NOI18N\n jGTIButtonPrevious.setToolTipText(bundle.getString(\"NewDialog.PreviousToolTip\")); // NOI18N\n jGTIButtonPrevious.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonPreviousActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jGTIPanelButtons.add(jGTIButtonPrevious, gridBagConstraints);\n\n jGTIButtonNext.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.NextMnemonic\").charAt(0));\n jGTIButtonNext.setText(bundle.getString(\"NewDialog.Next\")); // NOI18N\n jGTIButtonNext.setToolTipText(bundle.getString(\"NewDialog.NextToolTip\")); // NOI18N\n jGTIButtonNext.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonNextActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jGTIPanelButtons.add(jGTIButtonNext, gridBagConstraints);\n\n jGTIButtonCancel.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.CancelMnemonic\").charAt(0));\n jGTIButtonCancel.setText(bundle.getString(\"NewDialog.Cancel\")); // NOI18N\n jGTIButtonCancel.setToolTipText(bundle.getString(\"NewDialog.CancelToolTip\")); // NOI18N\n jGTIButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonCancelActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jGTIPanelButtons.add(jGTIButtonCancel, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 16, 16);\n add(jGTIPanelButtons, gridBagConstraints);\n }" ]
[ "0.74646294", "0.74280345", "0.73233294", "0.7206081", "0.71816146", "0.70963234", "0.6939852", "0.69265854", "0.6919402", "0.69190973", "0.6901791", "0.6828874", "0.68193734", "0.6801293", "0.67978084", "0.67920965", "0.6791196", "0.67900896", "0.67767537", "0.67753935", "0.6758494", "0.6757222", "0.6746591", "0.6736003", "0.6722853", "0.6722853", "0.6722853", "0.6722853", "0.67201173", "0.6670194", "0.6640323", "0.6624387", "0.6619537", "0.66154593", "0.65890664", "0.6584639", "0.6570025", "0.6557492", "0.6555113", "0.6548312", "0.6529926", "0.6525908", "0.6520669", "0.6508054", "0.65003055", "0.648558", "0.64833623", "0.6475962", "0.6475962", "0.6474172", "0.64630365", "0.64602584", "0.6456816", "0.6429219", "0.6407522", "0.6390287", "0.63869256", "0.63634115", "0.63629705", "0.635273", "0.6341963", "0.6314449", "0.6311106", "0.6301157", "0.6300798", "0.6297471", "0.629438", "0.6274324", "0.62599325", "0.62497586", "0.62417305", "0.6238166", "0.6231202", "0.62253785", "0.6224071", "0.6223659", "0.62176096", "0.6204897", "0.6198991", "0.61744314", "0.6167671", "0.61664325", "0.61590344", "0.6148837", "0.61326", "0.61299664", "0.6119521", "0.61112857", "0.6085279", "0.6083119", "0.60829824", "0.60773265", "0.60754156", "0.6070208", "0.6059078", "0.60586214", "0.60540104", "0.60522914", "0.60421073", "0.60417944" ]
0.7781102
0
talvez criar um objeto para encapsular deliveryAddress, costumerName, costumerTelephone talvez criar um objeto para os dados da compra: encapsular orderTotalPrice, comment, date, description
public Order(String deliveryAddress, String customerName, double orderTotalPrice, String id, String description, String customerTelephone, String comment, String pharmacyId, Date date, String userToken) { this.deliveryAddress = deliveryAddress; this.customerName = customerName; this.orderStatus = OrderStatus.WAITING_ORDER; this.orderTotalPrice = orderTotalPrice; this.description = description; this.id = id; this.customerTelephone = customerTelephone; this.pharmacyId = pharmacyId; this.comment = comment; this.date = new Date(date.getTime()); this.userToken = userToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ServiceOrder(String carVIN, String serviceDesc, String serviceDate, String partsUsed, int techID, int dealershipID, double partsCost, double totalCost, double laborHours){\n serviceNumber++;\n this.serviceDate = serviceDate;\n this.carVIN = carVIN;\n this.serviceDesc = serviceDesc;\n this.partsUsed = partsUsed;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.partsCost = partsCost;\n this.totalCost = totalCost;\n this.laborHours = laborHours;\n }", "protected Order(String custFName, String custLName, String custEmail, int orderID,\n Timestamp creationDate, double totalDue, String status, String salesFName,\n String salesLName,\n String salesEmail) {\n this.custFName = custFName;\n this.custLName = custLName;\n this.custEmail = custEmail;\n this.orderID = orderID;\n this.creationDate = creationDate;\n this.totalDue = totalDue;\n this.status = status;\n this.salesFName = salesFName;\n this.salesLName = salesLName;\n this.salesEmail = salesEmail;\n products = new ArrayList<>();\n }", "public Order()\r\n\t{\r\n\t\tnew BigDecimal(\"0.0\");\r\n\t\tsubtotal = new BigDecimal(\"0.0\");\r\n\t\tarraySize = 5;\r\n\t\torderSize = 0;\r\n\t\torder = new Drink[arraySize];\r\n\t\tSystem.out.println(\"New Order started!\");\r\n\t}", "ServiceOrder(String carVIN, int techID, int dealershipID, String serviceDate){\n serviceNumber++;\n this.carVIN = carVIN;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.serviceDate = serviceDate;\n this.serviceDesc = \"None\";\n this.partsUsed = \"None\";\n this.partsCost = 0;\n this.totalCost = 0;\n this.laborHours = 0;\n }", "public Receipt(Purchase p) {\r\n this.purch=p;\r\n totalPurch=0;\r\n totalDisc=0;\r\n \r\n db= new FakeDataBase();\r\n c= new Customer(db.getCustomerDbItem(purch.getCustIdx()));\r\n //System.out.println(c.toString());\r\n lineItem = new LineItem[0];\r\n generateLineItems();\r\n }", "public Order() {\n orderID = \"\";\n customerID = \"\";\n status = \"\";\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public OrderLine() {\n products = new ArrayList<>();\n price = new BigDecimal(0);\n }", "public Delivery(String recieverFirstname,String recieverLastname, String recieverPhonenumber,\n String recieverEmail, String building, String unit, String deliveryStreet, String deliveryCity, \n String deliveryPostalCode, String deliveryProvince, String deliveryNote, String deliveryMethod)\n {\n this.recieverFirstname = recieverFirstname;\n this.recieverLastname = recieverLastname;\n this.recieverEmail = recieverEmail;\n this.building = building;\n this.unit = unit;\n this.deliveryStreet = deliveryStreet;\n this.deliveryCity = deliveryCity;\n this.deliveryPostalCode = deliveryPostalCode;\n this.deliveryProvince = deliveryProvince;\n this.deliveryNote = deliveryNote;\n this.deliveryMethod = deliveryMethod;\n }", "public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}", "public Order(String name, double order_discount, String desc, Product... products) {\n\n this.order_no = this.generateOrderNumber();\n this.order_name = name;\n this.order_discount = order_discount;\n this.order_desc = desc;\n this.orderProducts = Stream.of(products).collect(Collectors.toSet());\n // TODO: check lambda\n this.orderProducts.forEach(x -> x.setOrderProduct(this));\n this.totalOrderPrice = countTotalOrderPrice(this);\n this.totalOrderPriceDiscount = countTotalOrderPriceDiscount(this);\n }", "public LogisticsInputVO(String sender_name, String sender_address, String sender_organization,\n\t\t\tString sender_telephone, String sender_mobilephone,\n\t\t String recipient_name, String recipient_address, String recipient_organization,\n\t\t \tString recipient_telephone, String recipient_mobilephone,\n\t\t String bar_code, int original_number, double weight, double size, String internal_name,\n\t\t LogisticsType type, PackingCharge pack, double total_cost, String starting, String destination,\n\t\t Date send_date, Date receive_date, String courier) {\n\t\t\n\t\tthis.sender_name = sender_name;\n\t\tthis.sender_address = sender_address;\n\t\tthis.sender_organization = sender_organization;\n\t\tthis.sender_telephone = sender_telephone;\n\t\tthis.sender_mobilephone = sender_mobilephone;\n\t\t\n\t\tthis.recipient_name = recipient_name;\n\t\tthis.recipient_address = recipient_address;\n\t\tthis.recipient_organization = recipient_address;\n\t\tthis.recipient_telephone = recipient_telephone;\n\t\tthis.recipient_mobilephone = recipient_mobilephone;\n\t\t\n\t\tthis.bar_code = bar_code;\n\t\tthis.original_number = original_number;\n\t\tthis.weight = weight;\n\t\tthis.size = size;\n\t\tthis.internal_name = internal_name;\n\t\tthis.type = type;\n\t\tthis.pack = pack;\n\t\tthis.total_cost = total_cost;\n\t\tthis.starting = starting;\n\t\tthis.destination = destination;\n\t\tthis.send_date = send_date;\n\t\tthis.receive_date = receive_date;\n\t\tthis.courier = courier;\n\t}", "private static DeliveryWrapper createDeliveryWrapper(SupportOrder supportOrder){\r\n\t\tDeliveryWrapper deliveryWrapper = new DeliveryWrapper();\r\n\t\t\r\n\t\tDelivery delivery = new Delivery();\r\n\t\tCustomer customer = new Customer();\r\n\t\tcustomer.setRegistry(supportOrder.getTarget().getRegistry());\r\n\t\tdelivery.setCustomer(customer);\r\n\t\tdelivery.setIssueTime(supportOrder.getStartDate());\r\n\t\tdelivery.setSeries(null);\r\n\t\tdelivery.setNumber(0);\r\n\t\tdelivery.setSecurityLevel(SecurityLevel.OFFICIAL);\r\n\t\tdelivery.setStatus(DeliveryStatus.PENDING);\r\n\t\t\r\n\t\tdeliveryWrapper.setDelivery(delivery);\r\n\t\t\r\n\t\treturn deliveryWrapper;\r\n\t}", "public RecieptDTO (String storeNameIn, String storeAdressIn, ArrayList itemListIn, double runningTotalIn, double totalVATPriceIn, LocalDate dateIn, LocalTime timeIn, double cashIn, double changeIn, double discountIn) {\n\t\t\n\t\tstoreName = storeNameIn;\n\t\tstoreAdress = storeAdressIn;\n\t\titemList = itemListIn;\n\t\ttotalPrice = runningTotalIn;\n\t\ttotalVATPrice = totalVATPriceIn;\n\t\tdate = dateIn;\n\t\ttime = timeIn;\n\t\tcash = cashIn;\n\t\tchange = changeIn;\n\t\tdiscount = discountIn;\n\t}", "public ServiceOrderRecord(Integer orderId, Integer storeId, String orderSn, Integer userId, Byte orderStatus, String orderStatusName, String subscriber, String mobile, Integer serviceId, Integer technicianId, String technicianName, String serviceDate, String servicePeriod, String addMessage, String adminMessage, String verifyCode, String verifyAdmin, String payCode, String payName, String paySn, BigDecimal moneyPaid, BigDecimal discount, Integer couponId, BigDecimal orderAmount, Timestamp payTime, Timestamp cancelledTime, Timestamp finishedTime, String prepayId, Byte delFlag, Byte verifyType, String cancelReason, Byte type, Byte verifyPay, String aliTradeNo, Timestamp createTime, Timestamp updateTime, String memberCardNo, BigDecimal memberCardBalance, BigDecimal useAccount) {\n super(ServiceOrder.SERVICE_ORDER);\n\n set(0, orderId);\n set(1, storeId);\n set(2, orderSn);\n set(3, userId);\n set(4, orderStatus);\n set(5, orderStatusName);\n set(6, subscriber);\n set(7, mobile);\n set(8, serviceId);\n set(9, technicianId);\n set(10, technicianName);\n set(11, serviceDate);\n set(12, servicePeriod);\n set(13, addMessage);\n set(14, adminMessage);\n set(15, verifyCode);\n set(16, verifyAdmin);\n set(17, payCode);\n set(18, payName);\n set(19, paySn);\n set(20, moneyPaid);\n set(21, discount);\n set(22, couponId);\n set(23, orderAmount);\n set(24, payTime);\n set(25, cancelledTime);\n set(26, finishedTime);\n set(27, prepayId);\n set(28, delFlag);\n set(29, verifyType);\n set(30, cancelReason);\n set(31, type);\n set(32, verifyPay);\n set(33, aliTradeNo);\n set(34, createTime);\n set(35, updateTime);\n set(36, memberCardNo);\n set(37, memberCardBalance);\n set(38, useAccount);\n }", "public Order(Builder builder) {\r\n this.id = builder.id;\r\n this.orderDate = builder.orderDate;\r\n //this.orderLine = builder.orderLine;\r\n }", "@Test\n public void testPopulateNewOrderInfo() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order order4 = service.populateNewOrderInfo(order3);\n\n assertEquals(\"Paul\", order4.getCustomerName());\n }", "public ProveedorInfo() {\n\t\tnombre = EMPTY_STRING;\n\t\tdescripcion = EMPTY_STRING;\n\t\tcaHash = new Hashtable<String, String>();\n\t\tservidores = new Vector<ServidorOcsp>();\n\n\t}", "@Override\n\tpublic Nota buildObject() {\n\t\treturn new Nota(emitente, destinatario, chave, numero, serie, emissao, total, isIncomplete);\n\t}", "Product(String name, int quantity, double price, double totalCost) {\n this.name = name;\n this.quantity = quantity;\n this.price = price;\n this.totalCost = totalCost;\n }", "private static DeliveryWrapper createDeliveryWrapper(TasOffer tasOffer)throws ManagerBeanException{\r\n\t\tOffer offer = tasOffer.getOffer();\r\n\t\tList<ITransferObject> offerLines = getOfferLines(offer);\r\n\t\t\r\n\t\tDeliveryWrapper deliveryWrapper = new DeliveryWrapper();\r\n\t\t\r\n\t\tDelivery delivery = new Delivery();\r\n\t\tCustomer customer = new Customer();\r\n\t\tcustomer.setRegistry(offer.getTarget().getRegistry());\r\n\t\tdelivery.setCustomer(customer);\r\n\t\tdelivery.setIssueTime(offer.getIssueDate());\r\n\t\tdelivery.setSeries(offer.getSeries());\r\n\t\tdelivery.setNumber(offer.getNumber());\r\n\t\tdelivery.setSecurityLevel(SecurityLevel.OFFICIAL);\r\n\t\tdelivery.setStatus(DeliveryStatus.PENDING);\r\n\t\t\r\n\t\tdeliveryWrapper.setDelivery(delivery);\r\n\t\t\r\n\t\tList<DeliveryDetail> lines = new ArrayList<DeliveryDetail>();\r\n\t\tIterator iter = offerLines.iterator();\r\n\t\tDeliveryController deliveryController = (DeliveryController)AonUtil.getController(DELIVERY_CONTROLLER_NAME);\r\n\t\twhile (iter.hasNext()){\r\n\t\t\tOfferDetail offerDetail = (OfferDetail)iter.next();\r\n\t\t\t\r\n\t\t\tDeliveryDetail deliveryDetail = new DeliveryDetail();\r\n\t\t\tdeliveryDetail.setDelivery(delivery);\r\n\t\t\tdeliveryDetail.setDiscountExpression(offerDetail.getDiscountExpression());\r\n\t\t\tdeliveryDetail.setItem(offerDetail.getItem());\r\n\t\t\tdeliveryDetail.setDescription(offerDetail.getDescription());\r\n\t\t\tdeliveryDetail.setPrice(offerDetail.getPrice());\r\n\t\t\tdeliveryDetail.setQuantity(offerDetail.getQuantity());\r\n\t\t\tdeliveryDetail.setWarehouse(new Warehouse());\r\n\t\t\tdeliveryDetail.getWarehouse().setId(deliveryController.getWarehouseId());\r\n\t\t\t\r\n\t\t\tlines.add(deliveryDetail);\r\n\t\t}\r\n\t\tdeliveryWrapper.setLines(lines);\r\n\r\n\t\treturn deliveryWrapper;\r\n\t}", "public Pedido(LocalDate fecha, String mesa, Mesero mesero, String cuenta, String cliente, Double total) {\n this.fecha = new SimpleObjectProperty<>(this,\"fecha\",fecha);\n this.mesa = new SimpleStringProperty(mesa);\n this.mesero = new SimpleObjectProperty<>(this,\"mesero\",mesero);\n this.cliente = new SimpleStringProperty(cliente);\n this.cuenta = new SimpleStringProperty(cuenta);\n this.total = new SimpleDoubleProperty(total);\n }", "public Order(Integer id, Travel travel, double price, Hotel hotel, Transport transport, Date startDate, Date endDate) {\n this.id = id;\n this.travel = travel;\n this.price = price;\n this.hotel = hotel;\n this.transport = transport;\n this.startDate = startDate;\n this.endDate = endDate;\n }", "public Order(Integer orderNum, String bartenderName, String customerName, Date date, boolean paid, String payType, ArrayList<String> drinkList, ArrayList<Integer>quantities, InventoryDB idb)\n {\n df = new DrinkFactory();\n inventoryDB = idb;\n this.orderNum = orderNum;\n this.bartenderName = bartenderName;\n this.customerName = customerName;\n this.date = date;\n drinksAndQuantities = new ArrayList();\n pourDrinks(drinkList, quantities);\n totalPrice = getTotalPrice();\n this.paid = paid;\n paymentType = payType;\n }", "public ClienteDTO(int idTipoCliente, String nomCliente,\r\n\t\t\tString apePatCliente, String apeMatCliente, String fecNacCliente,\r\n\t\t\tString sexoCliente, String telefonoCliente, String celularCliente,\r\n\t\t\tString correoCliente, String numDocumento, String razSocCliente,\r\n\t\t\tString ciiuCliente, String cargoContacCliente) {\r\n\t\tsuper();\r\n\t\tthis.idTipoCliente = idTipoCliente;\r\n\t\tthis.nomCliente = nomCliente;\r\n\t\tthis.apePatCliente = apePatCliente;\r\n\t\tthis.apeMatCliente = apeMatCliente;\r\n\t\tthis.fecNacCliente = fecNacCliente;\r\n\t\tthis.sexoCliente = sexoCliente;\r\n\t\tthis.telefonoCliente = telefonoCliente;\r\n\t\tthis.celularCliente = celularCliente;\r\n\t\tthis.correoCliente = correoCliente;\r\n\t\tthis.numDocumento = numDocumento;\r\n\t\tthis.razSocCliente = razSocCliente;\r\n\t\tthis.ciiuCliente = ciiuCliente;\r\n\t\tthis.cargoContacCliente = cargoContacCliente;\r\n\t}", "public OrderLine() {\n }", "public Order(int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = 0;\r\n\t\torderTotal = 0;\r\n\t}", "private CustomerDetails initCustomerDetails() {\n CustomerDetails mCustomerDetails = new CustomerDetails();\n mCustomerDetails.setPhone(\"085310102020\");\n mCustomerDetails.setFirstName(\"user fullname\");\n mCustomerDetails.setEmail(\"mail@mail.com\");\n return mCustomerDetails;\n }", "public SupplyOrder(String newCustomerID, String newProductID, LocalDate newOrderDate, double newAmount){\n this.orderID=SupplyOrder.nextOrderID;\n nextOrderID++;\n\n //populating class fields using class methods\n this.setCustomerID(newCustomerID);\n this.setProductID(newProductID);\n this.setOrderDate(newOrderDate);\n this.setAmount(newAmount);\n }", "public SupplyOrder(SupplyOrder otherOrder){\n if(otherOrder!=null){\n this.orderID=otherOrder.getOrderID();\n this.setCustomerID(otherOrder.getCustomerID());\n this.setProductID(otherOrder.getProductID());\n this.setOrderDate(otherOrder.getOrderDate());\n this.setAmount(otherOrder.getAmount());\n }\n else{\n this.orderID=0;\n this.setCustomerID(\"\");\n this.setProductID(\"\");\n this.setOrderDate(new LocalDate());\n this.setAmount(0.0);\n }\n }", "private Productos(int codigo, String descripcion, double precio) {\n this.codigo = codigo;\n this.descripcion = descripcion;\n this.precio = precio;\n }", "private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }", "public Order(Integer orderNum, String bartenderName, String customerName, Date date, ArrayList<String> drinkList, ArrayList<Integer>quantities, InventoryDB idb)\n {\n df = new DrinkFactory();\n inventoryDB = idb;\n this.orderNum = orderNum;\n this.bartenderName = bartenderName;\n this.customerName = customerName;\n this.date = date;\n drinksAndQuantities = new ArrayList();\n pourDrinks(drinkList, quantities);\n totalPrice = getTotalPrice();\n paid = false;\n }", "public Customer() {\r\n\t\tthis.name = \"\";\r\n\t\tthis.parcelID = \"\";\r\n\t\tthis.seqNo = 0;\r\n\t}", "public ClienteDTO(int idTipoCliente, String nomCliente,\r\n\t\t\tString apePatCliente, String apeMatCliente, String fecNacCliente,\r\n\t\t\tString sexoCliente, String telefonoCliente, String celularCliente,\r\n\t\t\tString correoCliente, String numDocumento) {\r\n\t\tsuper();\r\n\t\tthis.idTipoCliente = idTipoCliente;\r\n\t\tthis.nomCliente = nomCliente;\r\n\t\tthis.apePatCliente = apePatCliente;\r\n\t\tthis.apeMatCliente = apeMatCliente;\r\n\t\tthis.fecNacCliente = fecNacCliente;\r\n\t\tthis.sexoCliente = sexoCliente;\r\n\t\tthis.telefonoCliente = telefonoCliente;\r\n\t\tthis.celularCliente = celularCliente;\r\n\t\tthis.correoCliente = correoCliente;\r\n\t\tthis.numDocumento = numDocumento;\r\n\t}", "public Ticket(String destination, int price)\n {\n this.destination = destination;\n this.price = price;\n issueDateTime = new Date();\n \n }", "public static JSONObject placeOrder(Map<String, String> orderDetails) {\n JSONObject responseJson = new JSONObject();\n\n System.out.println(\"building json\");\n\n try {\n JSONObject orderJson = new JSONObject();\n\n /* \n required attributes: \n 1. retailer\n 2. products\n 3. shipping_address\n 4. shipping_method\n 5. billing_address\n 6. payment_method\n 7. retailer_credentials\n \n /* other attributes we will use:\n 8. max_price \n \n */\n // 1.\n // put the retailer attribute in\n orderJson.put(\"retailer\", \"amazon\");\n\n // 2.\n // create the products array\n JSONArray products = new JSONArray();\n JSONObject product = createProductObject(orderDetails);\n // put product in array\n products.put(product);\n // put the products array in orderJson\n orderJson.put(\"products\", products);\n\n // 3. \n // create shipping address object\n JSONObject shipAddress = createShipAddressObject(orderDetails);\n orderJson.put(\"shipping_address\", shipAddress);\n\n // 4. \n // insert shipping method attribute\n orderJson.put(\"shipping_method\", \"cheapest\");\n\n // 5.\n // create billing address object\n JSONObject billAddress = createBillAddressObject(orderDetails);\n orderJson.put(\"billing_address\", billAddress);\n\n // 6. \n // create payment method object\n JSONObject paymentMethod = createPaymentMethod(orderDetails);\n orderJson.put(\"payment_method\", paymentMethod);\n\n // 7. \n // create retailer credentials object\n JSONObject retailerCredentials = createRetailerCredentialsObject();\n orderJson.put(\"retailer_credentials\", retailerCredentials);\n\n // 8.\n // put max_price in orderJson\n // NOTE: this is the last thing that will prevent an order from \n // actually going through. use 0 for testing purposes, change to \n // maxPrice to actually put the order through\n orderJson.put(\"max_price\", 0); // replace with: orderDetails.get(\"maxPrice\")\n\n //===--- finally: send the json to the api ---===//\n responseJson = sendRequest(orderJson);\n //===-----------------------------------------===//\n\n } catch (JSONException ex) {\n Logger.getLogger(ZincUtils.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return responseJson;\n }", "@Test\n public void testCreateOrderCalculations() throws Exception {\n\n service.loadFiles();\n \n\n Order newOrder = new Order();\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.calculateNewOrderDataInput(newOrder);\n\n Assert.assertEquals(newOrder.getMaterialCostTotal(), (new BigDecimal(\"1199.95\")));\n Assert.assertEquals(newOrder.getLaborCost(), (new BigDecimal(\"1106.75\")));\n Assert.assertEquals(newOrder.getTax(), (new BigDecimal(\"144.17\")));\n Assert.assertEquals(newOrder.getTotal(), (new BigDecimal(\"2450.87\")));\n\n }", "public Order() {\n\t\tthis.orderID = DataHolder.getInstance().getLastOrderId() + 1;\n\t\tthis.dateOrdered = new Date();\n\t\tthis.dateFilled = null;\n\t\tthis.projectedDate = addDays(dateOrdered,1);\n\t}", "public Commercial()\n {\n super();\n payload = 0;\n }", "public Order() {\n\t}", "public creditPayment(String nm,String expdate,long no,double paymentAmount)\n{\nname=nm;\nexdate=expdate;\ncardnumber=no;\namount = paymentAmount;\n}", "public Venta(Producto producto,Cliente comprador,Cliente vendedor){\n this.fechaCompra=fechaCompra.now();\n this.comprador=comprador;\n this.vendedor=vendedor;\n this.producto=producto;\n \n }", "public TExpressOrderRecord(Integer id, Integer userId, String expressNumber, String expressCompanyName, ExpressCompanyType expressCompany, String phone, String address, String studentName, LocalDateTime accessDay, String accessNumber, OrderType orderType, String orderTypeName, String remark, LocalDateTime createTime, Integer createUser, String createUserName, LocalDateTime updateTime, Integer updateUser, String updateUserName, LocalDateTime deleteTime, Integer deleteUser, String deleteUserName, Byte enabled, LocalDateTime dataVersion) {\n super(TExpressOrder.T_EXPRESS_ORDER);\n\n set(0, id);\n set(1, userId);\n set(2, expressNumber);\n set(3, expressCompanyName);\n set(4, expressCompany);\n set(5, phone);\n set(6, address);\n set(7, studentName);\n set(8, accessDay);\n set(9, accessNumber);\n set(10, orderType);\n set(11, orderTypeName);\n set(12, remark);\n set(13, createTime);\n set(14, createUser);\n set(15, createUserName);\n set(16, updateTime);\n set(17, updateUser);\n set(18, updateUserName);\n set(19, deleteTime);\n set(20, deleteUser);\n set(21, deleteUserName);\n set(22, enabled);\n set(23, dataVersion);\n }", "public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}", "static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }", "public InspectionPartDTO(String name, double cost) {\n this.name = name;\n this.cost = cost;\n\n }", "public CreateOrderRequest(CreateOrderRequest source) {\n if (source.ChannelCode != null) {\n this.ChannelCode = new String(source.ChannelCode);\n }\n if (source.MerchantAppId != null) {\n this.MerchantAppId = new String(source.MerchantAppId);\n }\n if (source.Amount != null) {\n this.Amount = new String(source.Amount);\n }\n if (source.TraceNo != null) {\n this.TraceNo = new String(source.TraceNo);\n }\n if (source.NotifyUrl != null) {\n this.NotifyUrl = new String(source.NotifyUrl);\n }\n if (source.ReturnUrl != null) {\n this.ReturnUrl = new String(source.ReturnUrl);\n }\n }", "public Invoice(){\r\n this.userName = \"\";\r\n this.InvoiceCode = \"\";\r\n this.items = new ArrayList<>();\r\n this.amount = 0.0;\r\n \r\n }", "public Refueling(int orderID, String ownerID, String carNumber, String gasStation, String address, String gasType,\r\n\t\t\tString rateForLiter, String qunatity, String price, String date, String pumpNumber, String service,\r\n\t\t\tString time, String saleID) {\r\n\t\tsuper();\r\n\t\tOrderID = orderID;\r\n\t\tthis.ownerID = ownerID;\r\n\t\tCarNumber = carNumber;\r\n\t\tGasStation = gasStation;\r\n\t\tthis.address = address;\r\n\t\tGasType = gasType;\r\n\t\tRateForLiter = rateForLiter;\r\n\t\tQunatity = qunatity;\r\n\t\tPrice = price;\r\n\t\tDate = date;\r\n\t\tthis.pumpNumber = pumpNumber;\r\n\t\tthis.service = service;\r\n\t\tthis.time = time;\r\n\t\tthis.saleID = saleID;\r\n\t}", "protected abstract Order createOrder(Cuisine cuisine);", "public datosTaller() {\n this.cedulaCliente = new int[100]; //Atributo de la clase\n this.nombreCliente = new String[100]; //Atributo de la clase\n this.compraRealizada = new String[100]; //Atributo de la clase\n this.valorCompra = new float[100]; //Atributo de la clase\n this.posicionActual = 0; //Inicializacion de la posicion en la que se almacenan datos\n }", "public Car(String description)\r\n {\r\n this.description = description;\r\n customersName = \"\";\r\n }", "public Cliente(String nombre, String email, String calle, Geo coordenadas){\n this.setNombreUsuario(nombre);\n this.setEmail(email);\n //this.setApp(app);\n this.setCalle(calle);\n this.setListaDeCompras(null);\n this.setMontoGastado(0);\n this.setMontoDeCompra(0);\n this.setHistorialDeCompras(new ArrayList<ListaDeCompras>());\n this.setCoordenadas(coordenadas);\n }", "public ManagementCompany() {\r\n\t\tthis.name = \"\";\r\n\t\tthis.taxID = \"\";\r\n\t\tthis.mgmFeePer = 0;\r\n\t\tthis.plot.setX(0);\r\n\t\tthis.plot = new Plot();\r\n\t\tproperties = new Property[MAX_PROPERTY];\r\n\t}", "public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }", "@Override\n \tpublic String toString(){\n\t\treturn \n\t\t\t\"pojos.DeliveryDetails{\" +\n\t\t\t\"phone = '\" + phone + '\\'' + \n\t\t\t\",name = '\" + name + '\\'' + \n\t\t\t\",deliverTo = '\" + deliverTo + '\\'' + \n\t\t\t\"}\";\n\t\t}", "public Order() {\n }", "public Customer(String name, String surname, String address, String email, long tel) {\n this.name = name;\n this.surname = surname;\n this.address = address;\n this.email = email;\n this.tel = tel;\n }", "public OrderItem() {}", "private static void cadastroProduto() {\n\n\t\tString nome = Entrada(\"PRODUTO\");\n\t\tdouble PrecoComprado = Double.parseDouble(Entrada(\"VALOR COMPRA\"));\n\t\tdouble precoVenda = Double.parseDouble(Entrada(\"VALOR VENDA\"));\n String informacaoProduto = Entrada(\"INFORMAÇÃO DO PRODUTO\");\n String informacaoTecnicas = Entrada(\"INFORMAÇÕES TÉCNICAS\");\n\n\t\tProduto produto = new Produto(nome, PrecoComprado, precoVenda, informacaoProduto,informacaoTecnicas);\n\n\t\tListaDProduto.add(produto);\n\n\t}", "public Package(){\n\t\ttrackingNumber = \"Default tracking number\";\n\t\tweight = 0.0;\n\t\tshippingCost = 0.0;\n\t}", "void create(Order order);", "Delivery createDelivery();", "public CustomerObj(String user_first_name, String user_last_name, String user_email) {\n \n this.user_first_name = user_first_name;\n this.user_last_name = user_last_name;\n this.user_email = user_email;\n \n }", "private QuotationDetailsDTO createQuotationDetail(QuotationDetailsDTO detail) throws Exception {\n\t\tString temp = null;\n\n\t\t//Article Name\n\t\tif (txtArticleName.getEnabled()) {\n\t\t\ttemp = txtArticleName.getText();\n\t\t\tif (temp.length() > 0)\n\t\t\t\tdetail.setArticleName(temp);\n\t\t}\n\n\t\t//Charged Weight\n\t\tif (txtCW.getEnabled()) {\n\t\t\ttemp = txtCW.getText();\n\t\t\tif (temp.length() > 0) {\n\t\t\t\tdetail.setChargedWeight(Float.parseFloat(temp));\n\t\t\t} else {\n\t\t\t\tdetail.setChargedWeight(0);\n\t\t\t}\n\t\t}\n\n\t\t//CC Charge Type\n\t\tdetail.setCcchargeType(getCCChargeIndex());\n\n\t\t//CC Charge Value\n\n\t\ttemp = txtCCCValue.getText();\n\t\tif (temp.length() > 0) {\n\t\t\tdetail.setCcchargeValue(Float.parseFloat(temp));\n\t\t} else {\n\t\t\tdetail.setCcchargeValue(0);\n\t\t}\n\n\t\t//DC Charge Type\n\t\tdetail.setDcchargeType(getDCChargeType());\n\n\t\t//DC Charge Value\t\t\n\t\ttemp = txtDCCValue.getText();\n\t\tif (temp.length() > 0) {\n\t\t\tdetail.setDcchargeValue(Float.parseFloat(temp));\n\t\t} else {\n\t\t\tdetail.setDcchargeValue(0);\n\t\t}\n\n\t\t//DD Charge Type\n\t\tdetail.setDdchargeType(getDDChargeType());\n\n\t\t//DD Charge per article\n\n\t\ttemp = txtDDC_chargeArticle.getText();\n\t\tif (temp.length() > 0) {\n\t\t\tdetail.setDdchargeArticle(Float.parseFloat(temp));\n\t\t} else {\n\t\t\tdetail.setDdchargeArticle(0);\n\t\t}\n\n\t\t//Minimum DD Charge value\n\n\t\ttemp = txtDDC_minPerLR.getText();\n\t\tif (temp.length() > 0) {\n\t\t\tdetail.setMinDdchargeValue(Float.parseFloat(temp));\n\t\t} else {\n\t\t\tdetail.setMinDdchargeValue(0);\n\t\t}\n\n\t\t//IE Charge Type\n\t\tdetail.setIechargeType(getIEChargeType());\n\n\t\t//IE Charge Value\n\t\t//if(txtIEC_article.getEnabled()) {\n\t\ttemp = txtIEC_article.getText();\n\t\tif (temp.length() > 0) {\n\t\t\tdetail.setIechargeValue(Float.parseFloat(temp));\n\t\t} else {\n\t\t\tdetail.setIechargeValue(0);\n\t\t}\n\t\t//}\n\n\t\t//LC Charge Type\n\t\tdetail.setLcchargeType(getLCChargeType());\n\n\t\t//LC Charge Value\n\t\t//if(txtLC_article.getEnabled()) {\n\t\ttemp = txtLC_article.getText();\n\t\tif (temp.length() > 0) {\n\t\t\tdetail.setLcchargeValue(Float.parseFloat(temp));\n\t\t} else {\n\t\t\tdetail.setLcchargeValue(0);\n\t\t}\n\t\t//}\n\n\t\treturn detail;\n\t}", "public Invoice(String partNo, String partDesc, double price, int quantity){\n\t\t\n\t\t// initialize the instance variable partNo (i.e. this.partNo) with the value of the parameter partNo\n\t\tthis.partNo = partNo;\n\t\t// initialize the instance variable partDesc (i.e. this.partDesc) with the value of the parameter partDesc\n\t\tthis.partDesc = partDesc;\n\t\t// initialize the instance variable price (i.e. this.price) with the value of the parameter price\n\t\tthis.price = price;\n\t\t// initialize the instance variable quantity (i.e. this.quantity) with the value of the parameter quantity\n\t\tthis.quantity = quantity;\n\t}", "public ServiceOrderRecord() {\n super(ServiceOrder.SERVICE_ORDER);\n }", "public ClienteDTO(String idCliente, String nomCliente,\r\n\t\t\tString apePatCliente, String apeMatCliente, String fecNacCliente,\r\n\t\t\tString sexoCliente, String telefonoCliente, String celularCliente,\r\n\t\t\tString correoCliente, String numDocumento, String idEstado,\r\n\t\t\tString razSocCliente, String ciiuCliente, String cargoContacCliente) {\r\n\t\tsuper();\r\n\t\tthis.idCliente = idCliente;\r\n\t\tthis.nomCliente = nomCliente;\r\n\t\tthis.apePatCliente = apePatCliente;\r\n\t\tthis.apeMatCliente = apeMatCliente;\r\n\t\tthis.fecNacCliente = fecNacCliente;\r\n\t\tthis.sexoCliente = sexoCliente;\r\n\t\tthis.telefonoCliente = telefonoCliente;\r\n\t\tthis.celularCliente = celularCliente;\r\n\t\tthis.correoCliente = correoCliente;\r\n\t\tthis.numDocumento = numDocumento;\r\n\t\tthis.idEstado = idEstado;\r\n\t\tthis.razSocCliente = razSocCliente;\r\n\t\tthis.ciiuCliente = ciiuCliente;\r\n\t\tthis.cargoContacCliente = cargoContacCliente;\r\n\t}", "public Order(String pRecipientName, int pFinalPrice, Timestamp pPickupTime, Pizza[] PizzaArray) {\n this.recipientName = pRecipientName;\n this.finalPrice = pFinalPrice;\n this.pickupTime = pPickupTime;\n this.pizzaArray = PizzaArray;\n }", "private static LineOfCredit createLineOfCreditObjectForPost() {\n\n\t\tLineOfCredit lineOfCredit = new LineOfCredit();\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\tString notes = \"Line of credit note created via API \" + now.getTime();\n\t\tlineOfCredit.setId(\"LOC\" + now.getTimeInMillis());\n\t\tlineOfCredit.setStartDate(now.getTime());\n\t\tnow.add(Calendar.MONTH, 6);\n\t\tlineOfCredit.setExpiryDate(now.getTime());\n\t\tlineOfCredit.setNotes(notes);\n\t\tlineOfCredit.setAmount(new Money(100000));\n\n\t\treturn lineOfCredit;\n\t}", "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 CallForService(Date resolveDate, String resolutionDescrip, double feeCharged, double feeChargedWithExtra){\n this.resolveDate = resolveDate;\n this.resolutionDescrip = resolutionDescrip;\n this.feeCharged = feeCharged;\n this.feeChargedWithExtra = feeChargedWithExtra;\n}", "public BillDetail(BillDetail source) {\n if (source.BusinessCodeName != null) {\n this.BusinessCodeName = new String(source.BusinessCodeName);\n }\n if (source.ProductCodeName != null) {\n this.ProductCodeName = new String(source.ProductCodeName);\n }\n if (source.PayModeName != null) {\n this.PayModeName = new String(source.PayModeName);\n }\n if (source.ProjectName != null) {\n this.ProjectName = new String(source.ProjectName);\n }\n if (source.RegionName != null) {\n this.RegionName = new String(source.RegionName);\n }\n if (source.ZoneName != null) {\n this.ZoneName = new String(source.ZoneName);\n }\n if (source.ResourceId != null) {\n this.ResourceId = new String(source.ResourceId);\n }\n if (source.ResourceName != null) {\n this.ResourceName = new String(source.ResourceName);\n }\n if (source.ActionTypeName != null) {\n this.ActionTypeName = new String(source.ActionTypeName);\n }\n if (source.OrderId != null) {\n this.OrderId = new String(source.OrderId);\n }\n if (source.BillId != null) {\n this.BillId = new String(source.BillId);\n }\n if (source.PayTime != null) {\n this.PayTime = new String(source.PayTime);\n }\n if (source.FeeBeginTime != null) {\n this.FeeBeginTime = new String(source.FeeBeginTime);\n }\n if (source.FeeEndTime != null) {\n this.FeeEndTime = new String(source.FeeEndTime);\n }\n if (source.ComponentSet != null) {\n this.ComponentSet = new BillDetailComponent[source.ComponentSet.length];\n for (int i = 0; i < source.ComponentSet.length; i++) {\n this.ComponentSet[i] = new BillDetailComponent(source.ComponentSet[i]);\n }\n }\n if (source.PayerUin != null) {\n this.PayerUin = new String(source.PayerUin);\n }\n if (source.OwnerUin != null) {\n this.OwnerUin = new String(source.OwnerUin);\n }\n if (source.OperateUin != null) {\n this.OperateUin = new String(source.OperateUin);\n }\n if (source.Tags != null) {\n this.Tags = new BillTagInfo[source.Tags.length];\n for (int i = 0; i < source.Tags.length; i++) {\n this.Tags[i] = new BillTagInfo(source.Tags[i]);\n }\n }\n if (source.BusinessCode != null) {\n this.BusinessCode = new String(source.BusinessCode);\n }\n if (source.ProductCode != null) {\n this.ProductCode = new String(source.ProductCode);\n }\n if (source.ActionType != null) {\n this.ActionType = new String(source.ActionType);\n }\n if (source.RegionId != null) {\n this.RegionId = new String(source.RegionId);\n }\n if (source.ProjectId != null) {\n this.ProjectId = new Long(source.ProjectId);\n }\n if (source.PriceInfo != null) {\n this.PriceInfo = new String[source.PriceInfo.length];\n for (int i = 0; i < source.PriceInfo.length; i++) {\n this.PriceInfo[i] = new String(source.PriceInfo[i]);\n }\n }\n if (source.AssociatedOrder != null) {\n this.AssociatedOrder = new BillDetailAssociatedOrder(source.AssociatedOrder);\n }\n if (source.Formula != null) {\n this.Formula = new String(source.Formula);\n }\n if (source.FormulaUrl != null) {\n this.FormulaUrl = new String(source.FormulaUrl);\n }\n }", "public HLCPaymentDetails() { }", "public PaymentDetails(Reservation res) {\n\t\tthis.value = res.getTotalPrice();\n\t\tthis.reference = MockPayment.generateMockReference ();\n\t\tthis.entity = MockPayment.generateMockEntity ();\n\t}", "OrderDTO create(OrderDTO orderDTO);", "public Order(long price, long quantity, long seqNo) {\n this.price = price;\n this.quantity = quantity;\n this.seqNo = seqNo;\n }", "public CashInvoice(int id, ArrayList<Food> foods, int totalCashInvoice, Customer customer, int deliveryFee) {\n super(id, foods, totalCashInvoice, customer);\n this.deliveryFee = deliveryFee;\n //setTotalPrice();\n }", "public ClienteDTO(String idCliente, String descTipoCliente, String nomCliente,\r\n\t\t\tString apePatCliente, String apeMatCliente, String telefonoCliente,\r\n\t\t\tString celularCliente, String correoCliente, String descEstado) \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.idCliente = idCliente;\r\n\t\tthis.nomCliente = nomCliente;\r\n\t\tthis.apePatCliente = apePatCliente;\r\n\t\tthis.apeMatCliente = apeMatCliente;\r\n\t\tthis.telefonoCliente = telefonoCliente;\r\n\t\tthis.celularCliente = celularCliente;\r\n\t\tthis.correoCliente = correoCliente;\r\n\t\tthis.descEstado = descEstado;\r\n\t\tthis.descTipoCliente = descTipoCliente;\r\n\t}", "public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }", "public Orders(int ordersId, Movies movie, String type,String code, Integer typeId, Date date, Integer userId, Double price) {\r\n this.ordersId = ordersId;\r\n this.movie = movie;\r\n this.type = type;\r\n this.code = code;\r\n this.typeId = typeId;\r\n this.date = date;\r\n this.userId = userId;\r\n this.price = price;\r\n }", "public Invoice createInvoice(Order order);", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public FlightOrder(Flight flight, Order order) {\n\t\tsuper();\n\t\tthis.flight = flight;\n\t\tthis.order = order;\n\t\tthis.tickets = new HashSet<FlightTicket>();\n\t}", "private void addOrder() {\r\n // Variables\r\n String date = null, cust_email = null, cust_location = null, product_id = null;\r\n int quantity = 0;\r\n\r\n // Date-Time Format \"YYYY-MM-DD\"\r\n DateTimeFormatter dateFormatter = DateTimeFormatter.ISO_LOCAL_DATE;\r\n boolean date_Valid = false;\r\n\r\n // Separator for user readability\r\n String s = \"----------------------------------------\"; // separator\r\n\r\n boolean user_confirmed = false;\r\n while (!user_confirmed) {\r\n\r\n // module header\r\n System.out.println(s);\r\n System.out.println(\"Adding Order: \");\r\n System.out.println(s);\r\n\r\n // Getting the user date for entry\r\n System.out.print(\"Enter Date(YYYY-MM-DD): \");\r\n date = console.next();\r\n //This while loop will check if the date is valid\r\n while (!date_Valid) {\r\n try {\r\n LocalDate.parse(date, dateFormatter);\r\n System.out.println(\"Validated Date\");\r\n date_Valid = true;\r\n } catch (DateTimeParseException e) {\r\n date_Valid = false;\r\n System.out.println(\"Invalid Date\");\r\n System.out.print(\"Enter valid date(YYYY-MM-DD):\");\r\n date = console.next();\r\n }\r\n }\r\n\r\n // Getting user email\r\n System.out.print(\"Enter customer email: \");\r\n cust_email = console.next();\r\n boolean flag = false;\r\n int countr = 0, countd = 0;\r\n while(!flag) {\r\n //This loop will check if the email is valid\r\n for (int i = 0; i < cust_email.length(); i++) {\r\n if (cust_email.charAt(i) == '@') {\r\n countr++;\r\n if (countr > 1) {\r\n flag = false;\r\n break;\r\n }\r\n if (i >= 1) flag = true;\r\n else {\r\n flag = false;\r\n break;\r\n }\r\n\r\n }\r\n if (cust_email.charAt(i) == '.') {\r\n countd++;\r\n if (countd > 1) {\r\n flag = false;\r\n break;\r\n }\r\n if (i >= 3) flag = true;\r\n else {\r\n flag = false;\r\n break;\r\n }\r\n }\r\n if (cust_email.indexOf(\".\") - cust_email.indexOf(\"@\") >= 2) {\r\n flag = true;\r\n }\r\n if (!flag) break;\r\n }\r\n if (flag && cust_email.length() >= 5) {\r\n System.out.println(\"Validated Email\");\r\n break;\r\n } else {\r\n System.out.println(\"Invalid Email\");\r\n }\r\n }\r\n\r\n //Validate the customer ZIP code\r\n System.out.print(\"Enter ZIP Code: \");\r\n cust_location = console.next();\r\n while((cust_location.length()) != 5){\r\n System.out.println(\"ZIP Code must be 5 characters long\");\r\n System.out.print(\"Enter ZIP Code: \");\r\n cust_location = console.next();\r\n }\r\n\r\n // Validate product id\r\n System.out.print(\"Enter Product ID: \");\r\n product_id = console.next();\r\n while ((product_id.length()) != 12) {\r\n System.out.println(\"Product ID must be 12 characters long!\");\r\n System.out.print(\"Enter Product ID: \");\r\n product_id = console.next();\r\n }\r\n\r\n // Validate quantity\r\n System.out.print(\"Enter Quantity: \");\r\n while (!console.hasNextInt()) {\r\n System.out.println(\"Quantity must be a whole number!\");\r\n System.out.print(\"Enter Quantity: \");\r\n console.next();\r\n }\r\n quantity = console.nextInt();\r\n\r\n //Confirming Entries\r\n System.out.println(s);\r\n System.out.println(\"You entered the following values:\");\r\n System.out.println(s);\r\n System.out.printf(\"%-11s %-20s %-20s %-18s %-11s\\n\", \"|DATE:|\", \"|CUSTOMER EMAIL:|\", \"|CUSTOMER LOCATION:|\", \"|PRODUCT ID:|\", \"|QUANTITY:|\");\r\n System.out.printf(\"%-11s %-20s %-20s %-18s %11s\\n\", date, cust_email, cust_location, product_id, quantity);\r\n System.out.println(s);\r\n System.out.println(\"Is this correct?\");\r\n System.out.print(\"Type 'yes' to add this record, type 'no' to start over: \");\r\n String inp = console.next();\r\n boolean validated = false;\r\n while (validated == false) {\r\n if (inp.toLowerCase().equals(\"yes\")) {\r\n validated = true;\r\n user_confirmed = true;\r\n }\r\n else if (inp.toLowerCase().equals(\"no\")) {\r\n validated = true;\r\n\r\n }\r\n else {\r\n System.out.print(\"Invalid response. Please type 'yes' or 'no': \");\r\n inp = console.next();\r\n }\r\n }\r\n }\r\n OrderItem newItem = new OrderItem(date, cust_email, cust_location, product_id, quantity);\r\n orderInfo.add(newItem);\r\n\r\n // alert user and get next step\r\n System.out.println(s);\r\n System.out.println(\"Entry added to Data Base!\");\r\n System.out.println(s);\r\n System.out.println(\"Do you want to add another entry?\");\r\n System.out.print(\"Type 'yes' to add another entry, or 'no' to exit to main menu: \");\r\n String inp = console.next();\r\n boolean valid = false;\r\n while (valid == false) {\r\n if (inp.toLowerCase().equals(\"yes\")) {\r\n valid = true;\r\n addOrder();\r\n } else if (inp.toLowerCase().equals(\"no\")) {\r\n valid = true; // possibly direct to main menu later\r\n } else {\r\n System.out.print(\"Invalid response. Please type 'yes' or 'no': \");\r\n inp = console.next();\r\n }\r\n }\r\n }", "public Venda(int idProduto, double valorUnitarioProduto, int quantidadeUnitarioProduto, double valorTotalProduto, int idEndereco, double valorFrete, int idPagamento) {\r\n this.idProduto = idProduto;\r\n this.valorUnitarioProduto = valorUnitarioProduto;\r\n this.quantidadeUnitarioProduto = quantidadeUnitarioProduto;\r\n this.valorTotalProduto = valorTotalProduto;\r\n this.idEndereco = idEndereco;\r\n this.valorFrete = valorFrete;\r\n this.idPagamento = idPagamento;\r\n }", "public Invoice(int id, ArrayList<Food> foods, Customer customer)\n {\n this.id = id;\n this.foods = foods;\n // this.date = date;\n this.customer = customer;\n this.date = new GregorianCalendar();\n this.invoiceStatus = InvoiceStatus.Ongoing;\n }", "public BillDto(Date date,float totalCost,Long id){\n this.date=date;\n this.totalCost=totalCost;\n this.id=id;\n }", "public DetailPrice(DetailPrice source) {\n if (source.PriceTitle != null) {\n this.PriceTitle = new String(source.PriceTitle);\n }\n if (source.PriceName != null) {\n this.PriceName = new String(source.PriceName);\n }\n if (source.OriginalPrice != null) {\n this.OriginalPrice = new Float(source.OriginalPrice);\n }\n if (source.DiscountPrice != null) {\n this.DiscountPrice = new Float(source.DiscountPrice);\n }\n if (source.UnitPrice != null) {\n this.UnitPrice = new Float(source.UnitPrice);\n }\n if (source.UnitPriceDiscount != null) {\n this.UnitPriceDiscount = new Float(source.UnitPriceDiscount);\n }\n if (source.ChargeUnit != null) {\n this.ChargeUnit = new String(source.ChargeUnit);\n }\n if (source.OriginalPriceHigh != null) {\n this.OriginalPriceHigh = new String(source.OriginalPriceHigh);\n }\n if (source.DiscountPriceHigh != null) {\n this.DiscountPriceHigh = new String(source.DiscountPriceHigh);\n }\n if (source.UnitPriceHigh != null) {\n this.UnitPriceHigh = new String(source.UnitPriceHigh);\n }\n if (source.UnitPriceDiscountHigh != null) {\n this.UnitPriceDiscountHigh = new String(source.UnitPriceDiscountHigh);\n }\n }", "public PedidoRecord(Integer idPedido, Integer cliente, Date fecha, Boolean iva, String observaciones, Double total) {\n super(Pedido.PEDIDO);\n\n set(0, idPedido);\n set(1, cliente);\n set(2, fecha);\n set(3, iva);\n set(4, observaciones);\n set(5, total);\n }", "public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"brian@gmail.com\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"roger@gmail.com\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"john@gmail.com\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"paul@gmail.com\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }", "public ServiceCompany(String name, String nit, String representativeName, String address, String phone, int employeeQuantity, double assetsValue, int creationDay, int creationMonth, int creationYear, int floors, String type){\n\n\t\tsuper(name, nit, representativeName, address, phone, employeeQuantity, assetsValue, creationDay, creationMonth, creationYear, floors, type);\n\n\t\tthis.surveys=new Survey[50];\n\n\t}", "public ProductoDTO(){\r\n\t\t\r\n\t}", "public Produto(String nome, String descricao, double preco, String tipo, double precoTotal) {\n\t\tthis.nome = nome;\n\t\tthis.descricao = descricao;\n\t\tthis.preco = preco;\n\t\tthis.tipo = tipo;\n\t\tthis.precoTotal = precoTotal;\n\t}", "public TExpressOrderRecord() {\n super(TExpressOrder.T_EXPRESS_ORDER);\n }", "public Order() {\n\t\tsuper();\n\t\titems = new HashMap<>();\n\t}", "ShipmentCostEstimate createShipmentCostEstimate();", "public AccountToPayDetailVo(\n\t\t\tshort payerCompany,\n\t\t\tshort serviceCompany,\n\t\t\tString payerCompanyName,\n\t\t\tString serviceCompanyName,\n\t\t\tint sellerUser,\n\t\t\tint agentUser,\n\t\t\tString sellerUserName,\n\t\t\tint accountToPay,\n\t\t\tfloat amount ,\n\t\t\tString date,\n\t\t\tint ePos, \n\t\t\tString account_type){\n\t\t this.payerCompany=payerCompany;\n\t\t this.serviceCompany=serviceCompany;\n\t\t this.payerCompanyName=payerCompanyName;\n\t\t this.serviceCompanyName=serviceCompanyName;\n\t\t this.sellerUser=sellerUser;\n\t\t this.agentUser=agentUser;\n\t\t this.sellerUserName=sellerUserName;\n\t\t this.accountToPay=accountToPay;\n\t\t this.amount=amount;\n\t\t this.date=date;\n\t\t this.ePos=ePos;\n\t\t super.setValue(accountToPay+\",\"+payerCompany+\",\"+agentUser+\",\"+ePos+\",\"+amount+\",\"+date);\n\t\t if (account_type.equals(\"VI\"))\n\t\t\tsuper.setLabel(\"Compañía de servicio: \"+serviceCompanyName+\" | Cadena comercial: \"+payerCompanyName + \" | Bs. \" + amount + \" | Fecha: \" + date);\n\t\t else if (account_type.equals(\"CC\"))\n\t\t\tsuper.setLabel(\"Compañía de servicio: \"+serviceCompanyName+\" | Cadena comercial: \"+payerCompanyName + \" | Usuario:\" + sellerUserName + \" | POS: \" + ePos + \" | Bs. \" + amount + \" | Fecha: \" + date);\n\t}", "public Order(int orderID, int userID, String orderDate, String orderTitle) {\n this.order_id = orderID;\n this.user_id = userID;\n this.order_date = orderDate;\n this.order_title = orderTitle;\n }" ]
[ "0.6753157", "0.6514058", "0.6296654", "0.62355524", "0.61515653", "0.6011335", "0.6009176", "0.59862393", "0.5972224", "0.59567815", "0.59061235", "0.58913887", "0.5887139", "0.58687985", "0.58486634", "0.5815721", "0.5803898", "0.5803784", "0.5786369", "0.5766638", "0.5725876", "0.5722071", "0.57192475", "0.5712714", "0.5702895", "0.5697689", "0.5691084", "0.5669415", "0.56610346", "0.5657022", "0.5654327", "0.5650333", "0.5645422", "0.56390667", "0.56380475", "0.563564", "0.56201893", "0.5619524", "0.5613845", "0.56043166", "0.56042916", "0.56019884", "0.55967677", "0.5592714", "0.55908597", "0.5575707", "0.5575664", "0.5555469", "0.55536485", "0.55523485", "0.55466765", "0.55390877", "0.5536884", "0.5536609", "0.5532816", "0.5527412", "0.55234414", "0.55234075", "0.5512824", "0.55096847", "0.5506279", "0.5502609", "0.55022705", "0.5497697", "0.5493686", "0.54871356", "0.54835683", "0.5480688", "0.54800457", "0.54764014", "0.54743737", "0.547262", "0.54708046", "0.5462566", "0.544524", "0.5442936", "0.5442615", "0.54416525", "0.5440735", "0.54395", "0.54382956", "0.54359466", "0.54323155", "0.5429978", "0.54218984", "0.54170275", "0.54158854", "0.5412829", "0.5398224", "0.5393025", "0.5391794", "0.5390179", "0.53894514", "0.53864956", "0.53862405", "0.538118", "0.53771186", "0.5374604", "0.5374584", "0.53676176" ]
0.6250711
3
Intentional: Reverse order for this demo
public int compare(ListNode o1, ListNode o2) { return o1.val-o2.val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "public void _reverse() {\n\n var prev = first;\n var current = first.next;\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = prev;\n prev = current;\n current = next;\n\n }\n first = prev;\n\n }", "@Override\r\n\tpublic boolean reverseAccrualIt() {\n\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "void reverseDirection();", "@Override\n\tpublic boolean reverseAccrualIt() {\n\t\treturn false;\n\t}", "public void reverse() {\n var previous = first;\n var current = first.next;\n\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = previous;\n previous = current;\n current = next;\n\n }\n first = previous;\n\n }", "void reverse();", "void reverse();", "public void reverse() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n newSeq.add(seq.get(seq.size() - 1 - i));\n }\n seq = newSeq;\n }", "@Override\n public void backward() {\n }", "public void startReverse() {\n startHelper(f_startDirection.getOppositeDirection(), \"startReverse()\");\n }", "public void mo2476b() {\n Collections.reverse(mo2625k());\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "@Override\n public int getOrder() {\n return 0;\n }", "@Test\n public void testReverse() {\n System.out.println(\"reverse\");\n al.add(1);\n al.add(2);\n al.add(3);\n ArrayList<Integer> rl = new ArrayList<>();\n rl.add(3);\n rl.add(2);\n rl.add(1);\n al.reverse();\n assertEquals(rl.get(0), al.get(0));\n assertEquals(rl.get(1), al.get(1));\n assertEquals(rl.get(2), al.get(2));\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public DoubleLinkedSeq reverse(){\r\n\t DoubleLinkedSeq rev = new DoubleLinkedSeq();\r\n\t for(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\t rev.addBefore(this.getCurrent());\r\n\t }\r\n\t \r\n\t return rev; \r\n }", "public static void main(String[] args) {\n Integer arr[] = {10, 20, 30, 40, 50}; \n \n System.out.println(\"Original Array : \" + \n Arrays.toString(arr)); \n \n // Please refer below post for details of asList() \n \n Collections.reverse(Arrays.asList(arr)); \n \n System.out.println(\"Modified Array : \" + \n Arrays.toString(arr)); \n\t\t\n\t\t\n\t\t\n\t}", "void reverse()\n\t{\n\t\tint a;\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\telse\n\t\t{\t\n\t\t\ta = dequeue();\n\t\t\treverse(); \n\t\t\tenqueue(a);\n\t\t}\n\t}", "public static void main(String[] args) {\n int a=10;\r\n int b=20;\r\n a=a+b;\r\n b=a-b;\r\n a=a-b;\r\n System.out.println(\"reverse_no_is a= \"+a);\r\n System.out.println(\"reverse_no_is b= \"+b);\r\n\t\t\t\t\r\n\t}", "public static void main (String[] args)\r\n {\r\n List<String> list = Arrays.asList(\"C\", \"C++\", \"Java\");\r\n \r\n // use ListIterator to iterate List in reverse order\r\n ListIterator<String> itr = list.listIterator(list.size());\r\n \r\n // hasPrevious() returns true if the list has previous element\r\n while (itr.hasPrevious()) {\r\n System.out.println(itr.previous());\r\n }\r\n }", "public static void main(String[] args) {\n\n\t System.out.println(Sample.name);\n\n\t\t\n\t\t\n\t\tint num=153,rev=0, value;\n\t\t\t\twhile(num!=0)\n\t\t\t\t{\n\t\t\t\t\tvalue=num%10;\n\t\t\t\t\trev=rev*10+value;\n\t\t\t\t\tnum=num/10;\n\t\t\t\t\tSystem.out.println(\"reverse value is \"+ rev);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tString string = \"sushma\";\n\t\t\t String reverse = new StringBuffer(string).reverse().toString();\n\t\t\t System.out.println(\"\\nString before reverse: \"+string);\n\t\t\t System.out.println(\"String after reverse: \"+reverse);\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t String name=\"siva\";\n\t\t\t int size=name.length();\n\t\t\t System.out.println(size);\n\t\t\t for(int i=size;i>0;--i)\n\t\t\t \t \n\t\t\t {\n\t\t\t \t System.out.print(name.charAt(i-1)); \n\t\t\t \t \n\n\t\t\t }\n\t\t\t \n\t\t\n\t\t\n\t}", "public void reverse() {\n\t\tNode previous = first;\n\t\tNode current = first.next;\n\n\t\twhile (current != null) {\n\t\t\tNode next = current.next;\n\t\t\tcurrent.next = previous;\n\n\t\t\tprevious = current;\n\t\t\tcurrent = next;\n\t\t}\n\t\tlast = first;\n\t\tlast.next = null;\n\t\tfirst = previous;\n\t}", "public static void main(String[] args) {\n \n LinkedList<Integer> l = new LinkedList<Integer>();\n l.add(1);\n l.add(2);\n l.add(3);\n l.add(4);\n ReverseCollection rev = new ReverseCollection();\n rev.reverse(l);\n System.out.println(Arrays.toString(l.toArray()));\n\n }", "Digraph reverse() {\n return null;\n }", "public static void main(String[] args) {\n\t\tint [] a= {1,2,3,4,5,6,7};\n\t\trev(a,0,a.length-1);\t\n\t}", "@Override\r\n\tpublic int getOrder() {\n\t\treturn 0;\r\n\t}", "protected abstract List<LayoutHelper> reverse();", "public void reverseFrame() {\r\n if (reversedImage) {\r\n reversedImage = false;\r\n } else {\r\n reversedImage = true;\r\n }\r\n }", "public void backDown(){\n backSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public void reverse() {\n\t\tif (!this.isEmpty()) {\n\t\t\tT x = this.peek();\n\t\t\tthis.pop();\n\t\t\treverse();\n\t\t\tinsert_at_bottom(x);\n\t\t} else\n\t\t\treturn;\n\t}", "public void reverse()\n\t{\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\tSinglyLinkedListNode prevPrevNode = null;\n\t\twhile(head != null)\n\t\t{\n\t\t\tprevPrevNode = prevNode;\n\t\t\tprevNode = nextNode;\n\t\t\tnextNode = prevNode.getNext();\n\t\t\tprevNode.setNext(prevPrevNode);\n\t\t\tif(nextNode == null)\n\t\t\t{\n\t\t\t\thead = prevNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void reverse() {\n throw new UnsupportedOperationException();\n }", "public static void main(String[] args) {\n\t\tNode head=GroupReverse.createList();\n\t\thead=GroupReverse.reverseK2(head, 3);\n\t\tint count=0;\n\t\twhile(head!=null)\n\t\t{\n\t\t\tSystem.out.print(head.value+\" \");\n\t\t\thead=head.next;\n\t\t}\n\t\t\n\t}", "public void frontDown(){\n frontSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "@Override\n public int getOrder() {\n return 4;\n }", "private static Node reverseList(Node start) {\n Node runner = start;\n // initialize the return value\n Node rev = null;\n // set the runner to the last item in the list\n while (runner != null) {\n Node next = new Node(runner.value);\n next.next = rev;\n rev = next;\n runner = runner.next;\n }\n return rev;\n }", "@Override\n\tpublic void postorder() {\n\n\t}", "private static void iterateLinkedListInReverseOrder() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tCollections.reverse(list);\n\t\tSystem.out.println(\"Reverse the LinkedList is : \" + list);\n\t}", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "@Test\n public void testReverseRow(){\n ROW.getReverseRow(ROW.getIndex());\n }", "private void reverse(ListNode startNode, ListNode endNode) {\n endNode.next = null;\n ListNode pre = startNode, cur = startNode.next, newEnd = pre;\n while (cur != null) {\n ListNode nextNode = cur.next;\n cur.next = pre;\n pre = cur;\n cur = nextNode;\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(reverse(\"foo\"));\n\t\tSystem.out.println(reverse(\"student\"));\n\t\t\n\t}", "public static void main(String[] args) {\n List list = new ArrayList<>();\n list.add(10);\n list.add(50);\n list.add(30);\n list.add(60);\n list.add(20);\n list.add(90);\n list.add(20);\n \n// Iterator i = list.iterator();\n System.out.println(\"Printing Given Array..\");\n// while(i.hasNext())\n// {\n// \t System.out.println(i.next());\n// }\n for(int j=0;j<list.size();j++)\n {\n \t System.out.println(list.get(j));\n }\n \n Comparator cmp = Collections.reverseOrder();\n Collections.sort(list, cmp);\n System.out.println(\"printing list in descending order..\");\n Iterator i2 = list.iterator();\n while(i2.hasNext())\n {\n \t System.out.println(i2.next());\n }\n\t}", "public static void main(String[] args) {\n\t\tList<Integer> integerList=new ArrayList<Integer>();\n\t\tintegerList.add(1);\n\t\tintegerList.add(2);\n\t\tintegerList.add(3);\n\t\tSystem.out.println(integerList);\n\t\tSystem.out.println(reverseElements(integerList));\n\t}", "public void reverse(boolean ascending) {\n\t\tif (!ascending)\n\t\t\tCollections.reverse(FlightData.ITEMS);\n\t}", "public static void main(String[] args) {\n\t// write your code here\n System.out.println(\"Welcome to Frontline Electronics :\");\n admin();\n customer();\n /* for (int i =0; i<ll.size();i++) {\n System.out.println(ll.get(i));\n }*/\n // System.out.println(ll.getLast());\n Iterator it = pal.iterator();//.descendingIterator();\n while (it.hasNext())\n {\n System.out.println(it.next());\n }\n\n }", "public void reverseDi() {\n int hi = size - 1;\n int lo = 0;\n\n while (lo < hi) {\n Node left = getNodeAt(lo);\n Node right = getNodeAt(hi);\n\n Object temp = left.data;\n left.data = right.data;\n right.data = temp;\n\n lo++;\n hi--;\n }\n }", "public static void displayReverse(ArrayList<String> list){\r\n //Loop through the list\r\n for(int i = list.size()-1; i >= 0; i--){\r\n System.out.print(list.get(i) + \" \"); \r\n }\r\n System.out.println();\r\n }", "public static void main(String[] args) {\n List myList = new List();\n myList.append(3);\n myList.append(4);\n myList.append(5);\n myList.prepend(2);\n myList.prepend(1);\n System.out.println(\"Print the list forward:\");\n myList.printForward();\n System.out.println();\n System.out.println(\"Print the list backward:\");\n myList.printReverse();\n System.out.println();\n System.out.println(\"Remove and print the first element:\");\n System.out.println(myList.popFront());\n System.out.println(\"Remove and print the last element:\");\n System.out.println(myList.popBack());\n System.out.println();\n System.out.println(\"Print the list forward:\");\n myList.printForward();\n System.out.println();\n System.out.println(\"Print the list backward:\");\n myList.printReverse(); \n }", "public boolean reverseAnimate() {\n\t\treturn reverse;\n\t}", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "public NodeRandom reverse(NodeRandom start)\n\t{\n\t\tNodeRandom curr=start;\n\t\t\n\t\tNodeRandom temp;\n\t\tNodeRandom prev2=null;\n\t\twhile(curr!=null)\n\t\t{\t\t\t\n\t\t\ttemp=curr.next;\t\t\t\n\t\t\tcurr.next=prev2;\n\t\t\tprev2=curr;\n\t\t\tcurr=temp;\n\t\t}\t\t\n\t\tNodeRandom newstart=prev2;\t\t\t\t\n\t\tSystem.out.println(\"reverse a list\");\n\t\tdisplay(newstart);\n\t\treturn newstart;\n\t}", "public void reverse() {\n\t\t// write you code for reverse using the specifications above\t\t\n\t\tNode nodeRef = head;\n\t\thead = null;\n\t\t\n\t\twhile(nodeRef != null) {\n\t\t\tNode tmp = nodeRef;\n\t\t\tnodeRef = nodeRef.next;\n\t\t\ttmp.next = head;\n\t\t\thead = tmp;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint a[]=new int[]{-2,-1,0,1,2,3,4,5,6,7,8,9},temp=0;\r\n\t\tSystem.out.println(\"Array before reversing and after reversing\");\r\n\t\tSystem.out.println(Arrays.toString(a));\r\n\t\tfor(int i=0,j=(a.length/2)-1;i<a.length/2/2;i++,j--)\r\n\t\t{\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\t\r\n\t\tfor(int i=a.length/2,j=a.length-1;i<(a.length*3)/4;i++,j--)\r\n\t\t{\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\r\n\t\tSystem.out.println(Arrays.toString(a));\r\n\t}", "public void reverse() {\n\t\tNode<E> temp = null;\n\t\tNode<E> n = root;\n\n\t\twhile (n != null) {\n\t\t\ttemp = n.getBefore();\n\t\t\tn.setBefore(n.getNext());\n\t\t\tn.setNext(temp);\n\t\t\tn = n.getBefore();\n\t\t}\n\n\t\ttemp = root;\n\t\troot = tail;\n\t\ttail = temp;\n\t}", "public void revise()\n {\n \n super.revise();\n }", "private void printHistoryReverse()\r\n\t{\r\n\t\tStack temp = new Stack(SIZE);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nBrowsing History (Most Recent to Oldest):\");\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(chronological.peek());\t\t//print out value currently at the top of stack\r\n\t\t\ttemp.push(chronological.pop());\t\t\t\t\t//pop the top of stack and push to another stack\r\n\t\t}\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t\tchronological.push(temp.pop());\t\t\t\t\t//push all elements of temp back to the original stack\r\n\t}", "public void reverseLastTranslation() {\r\n this.translate(-lastDx,-lastDy);\r\n }", "public static void main(String args[]) {\n LinkedList ll = new LinkedList();\n ll.add(new Integer(-8));\n ll.add(new Integer(20));\n ll.add(new Integer(-20));\n ll.add(new Integer(8));\n\n // Create a reverse order comparator\n Comparator r = Collections.reverseOrder();\n\n // Sort list by using the comparato\n Collections.sort(ll, r);\n\n // Get iterator\n Iterator li = ll.iterator();\n System.out.print(\"List soreted in reverse: \");\n\n while(li.hasNext()) {\n System.out.print(li.next() + \" \");\n }\n System.out.println();\n Collections.shuffle(ll);\n\n // display randomized list\n li = ll.iterator();\n System.out.print(\"List shffled: \");\n\n while(li.hasNext()) {\n System.out.print(li.next() + \" \");\n }\n \n System.out.println();\n System.out.println(\"Minimum: \" + Collections.min(ll));\n System.out.println(\"Maximum: \" + Collections.max(ll));\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n dialog.setPadding(new Insets(0,0,0,7));\n }", "public static void main (String[] args) {\r\n int arr[] = {1, 2, 3, 4, 5, 6};\r\n printArray(arr, 6);\r\n rvereseArray(arr, 0, arr.length-1);\r\n System.out.println(\"Reversed array is \");\r\n printArray(arr, 6);\r\n }", "public void reverseY()\r\n {\r\n\t if(moveY < 0)\r\n\t\t moveY = moveY * (-1);\r\n\t else if(moveY > 0)\r\n\t\t moveY = moveY * (-1);\r\n }", "protected void reversePath() {\n\t\t\n\t\tif(_reverse) {\n\t\t\t\n\t\t\tif(_nextMove + 1 > movingPattern.size() - 1)\n\t\t\t\t_nextMove = 0;\n\t\t\telse\n\t\t\t\t_nextMove++;\n\t\t\t\n\t\t\t_reverse = false;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(_nextMove - 1 < 0)\n\t\t\t\t_nextMove = movingPattern.size() - 1;\n\t\t\telse\n\t\t\t\t_nextMove--;\n\t\t\t\n\t\t\t_reverse = true;\n\t\t}\n\t}", "public void reverse() {\n\t\tif(isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tNodo <T> pri_n= fin;\n\t\t\n\t\tint cont= tamanio-1;\n\t\tNodo<T> nodo_act= pri_n;\n\t\twhile(cont >0) {\n\t\t\tNodo <T> aux= getNode(cont-1);\n\t\t\tnodo_act.setSiguiente(aux);\n\t\t\tnodo_act= aux;\n\t\t\tcont--;\n\t\t}\n\t\tinicio = pri_n;\n\t\tfin= nodo_act;\n\t\tfin.setSiguiente(null);\n\t}", "public static void main(String[] args) {\n// reverse(queue);\n// System.out.println(queue);\n\n Stack<Integer> stack=new Stack<>();\n stack.push(1);\n stack.push(2);\n stack.push(3);\n stack.push(4);\n System.out.println(stack);\n stack=reverse(stack);\n System.out.println(stack);\n\n\n\n\n }", "public static void main(String[] args) \n\t{\n\t\t\n\t\tStringBuilder builder = new StringBuilder(\"citi 1\");\n\t\tSystem.out.println(\"initial value : \" +builder);\n\t\tbuilder.append(\", EON\");\n\t\tSystem.out.println(\"new value :\" +builder);\n\t\t\n\t\tSystem.out.println(\"reverse value :\"+builder.reverse());\n\t}", "private static void printList() {\n\tNode n=head;\n\tint size=0;\n\twhile(n!=null)\n\t{\n\t\tSystem.out.print(n.data+\" \");\n\t\tn=n.next;\n\t\tsize++;\n\t}\n\tn=head;\n\tfor(int i=0;i<size-1;i++)\n\t\tn=n.next;\n\tSystem.out.println(\"\\nreverse direction\");\n\twhile(n!=null)\n\t{\n\t\t\n\t\tSystem.out.print(n.data+\" \");\n\t\tn=n.prev;\n\t}\n\t\n}", "public void decrementOrder() {\n mOrder--;\n }", "public ListNode reverse(ListNode prev, ListNode start, ListNode end) {\n\t\tListNode current = start.next;\n\t\tListNode preCurrent = start;\n\t\twhile(current != end){\n\t\t\tListNode temp = current.next;\n\t\t\tcurrent.next = preCurrent;\n\t\t\tpreCurrent = current;\n\t\t\tcurrent = temp;\n\t\t}\n\t\tstart.next = end.next;\n\t\tend.next = preCurrent;\n\t\tprev.next = end;\n\t\treturn start;\n\t}", "public void reversePrint()\n {\n reversePrint(size-1);\n }", "public void reverseSpeeds() {\n\t\txSpeed = -xSpeed;\n\t\tySpeed = -ySpeed;\n\t}", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public void displayBckwrd() {\n\t\tSystem.out.print(\"Displaying in backward direction [last-->first] : \");\n\t\tNode tempDisplay = last; // start at the end of linkedList\n\t\twhile (tempDisplay != null) {// Executes until we don't find start of\n\t\t\t\t\t\t\t\t\t\t// list.\n\t\t\ttempDisplay.displayNode();\n\t\t\ttempDisplay = tempDisplay.previous; // move to previous Node\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "public void reverse() {\n\n\t\tif (head == null) {\n\t\t\tSystem.out.println(\"List is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tint nodes = nodeCounter();\n\t\tDLNode t = tail.prev;\n\t\thead = tail;\n\t\tfor (int i = 0; i < nodes - 1; i++) {\n\n\t\t\tif (t.list == null && t.val != Integer.MIN_VALUE) {\n\t\t\t\tthis.reverseHelperVal(t.val);\n\t\t\t\tt = t.prev;\n\t\t\t} else {\n\t\t\t\tthis.reverseHelperList(t.list);\n\t\t\t\tt = t.prev;\n\t\t\t}\n\t\t}\n\t\ttail.next = null;\n\t\thead.prev = null;\n\n\t}", "public Reversal() {\n\t\tsuper();\n\t}", "public void reverseX()\r\n {\r\n\t if(moveX < 0)\r\n\t\t moveX = moveX * (-1);\r\n\t else if(moveX > 0)\r\n\t\t moveX = moveX * (-1);\r\n }", "private void reverse(int[] nums, int start, int end) {\n\t\twhile(start<end)\n\t\t{\n\t\t\tswap(nums,start++,end--);\n\t\t}\n\t}", "private static void reverse(int[] arr) {\n\t\t\r\n\t\tfor(int i=arr.length-1;i >=0;i--)\r\n\t\t{\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testPopBack2() {\n\t\tcircularlist.pushBack(4);\n\t\tcircularlist.pushBack(12);\n\t\tcircularlist.pushBack(7);\n\t\tcircularlist.pushBack(9);\n\t\t\n\t\tcircularlist.popBack();\n\t\tcircularlist.popBack();\n\t\t\n\t\tSystem.setOut(new PrintStream(Actualout));\n\t\t\n\t\tcircularlist.display();\n\t\t\n\t\tassertEquals(\"List : 4 12\\r\\n\", Actualout.toString());\n\t}", "public void printListRev(){\n System.out.println(\"My current doubly linked list in reverse:\");\n if (head.next != tail || tail.prev != head){\n MyDoubleNode<T> counter = tail;\n while (counter.prev != head){\n counter = counter.prev;\n if (counter.prev != head){\n System.out.print(counter.data + \", \");\n }\n else {\n System.out.print(counter.data + \"\\n\");\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tListAll myList = new ListAll();\n\t\tListNode head = myList.create(10);\n\t\tListNode cur = head;\n\t\twhile(cur != null){\n\t\t\tSystem.out.print(cur.val);\n\t\t\tcur = cur.next;\n\t\t}\n\t\tSystem.out.println();\n\t\tListNode reverseHead = myList.change(head);\n\t\twhile(reverseHead != null){\n\t\t\tSystem.out.print(reverseHead.val);\n\t\t\treverseHead = reverseHead.next;\n\t\t}\n\t}", "@Override\r\n\tprotected String doBackward(List<Emotion> b) {\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\nString str=\"Welcome To Coding Ninja\";\n\nSystem.out.println(reverse_each(str));\n\t\t\n\t}", "private void reverseAfter(int i) {\n int start = i + 1;\n int end = n - 1;\n while (start < end) {\n swap(index, start, end);\n start++;\n end--;\n }\n }", "@Test\n public void revertBackTest() {\n stack.revertBack(stack2);\n assertEquals(stack2.toString(), stack.toString());\n\n ResourceStack stack3 = new ResourceStack(99,99,99,99);\n stack2.revertBack(stack3);\n assertEquals(stack3.toString(), stack2.toString());\n }", "public static void main(String[] args) {\n\n\n Node head = MyList.getList();\n MyList.printList(head);\n\n System.out.println(\"After Reverse\");\n head = reverseAlternateKNodes(head, 3);\n System.out.println(\"Reversed\");\n MyList.printList(head);\n\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tint a[]= {10,30,50,70,89,76,67,43,90};\r\n\t\tint temp;\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"ORIGNAL ARRAY\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\nfor (int i = 0; i < a.length; i++) {\r\n\t\t\t\r\n\t\tfor (int j = i+1; j < a.length; j++) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttemp=a[i];\r\n\t\t\ta[i]=a[j];\r\n\t\t\ta[j]=temp;\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nREVERSE ARRAY\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\t}", "private Code genArgsInReverse(ExpNode.ArgumentsNode args) {\n beginGen(\"ArgsInReverse\");\n List<ExpNode> argList = args.getArgs();\n Code code = new Code();\n for(int i = argList.size()-1; 0 <= i; i--) {\n code.append(argList.get(i).genCode(this));\n }\n endGen(\"ArgsInReverse\");\n return code;\n }", "private void reverseCompSpeed() {\n this.compSpeed = -this.compSpeed;\n }", "public static void main(String[] args) {\n ListNode l0 = new ListNode(1);\n ListNode l1 = new ListNode(2);\n ListNode l2 = new ListNode(3);\n ListNode l3 = new ListNode(4);\n l0.next = l1;\n l1.next = l2;\n l2.next = l3;\n\n System.out.println(l0);\n reverseList(l0);\n System.out.println(l3);\n }", "public static void main(String[] args) {\n int[] array = {1,2,3,4,5,6,7,8,9,10};\n System.out.println(\"The original array is:\"+Arrays.toString(array));\n reverse(array);\n }", "void reverseList(){\n\n Node prev = null;\n Node next = null;\n Node iter = this.head;\n\n while(iter != null)\n {\n next = iter.next;\n iter.next = prev;\n prev = iter;\n iter = next;\n\n }\n\n //prev is the link to the head of the new list\n this.head = prev;\n\n }", "public static void main (String[] args) {\r\n\t int arr[] = {1, 2, 3, 4, 5, 6};\r\n\t printArray(arr, 6);\r\n\t reverseArray(arr, 0, 5);\r\n\t System.out.println(\"Reversed array is \");\r\n\t printArray(arr, 6);\r\n\t }", "private ArrayList<String> postOrder()\n\t{\n\t\tArrayList<String> rlist = new ArrayList<String>();\n\t\tpostOrder(this,rlist);\n\t\treturn rlist;\n\t}" ]
[ "0.6943052", "0.68969387", "0.6564606", "0.65421724", "0.6513824", "0.64713055", "0.6468579", "0.63565874", "0.63565874", "0.6299703", "0.6227866", "0.61979365", "0.6166751", "0.6156179", "0.6156179", "0.6156179", "0.6139207", "0.6132773", "0.6073625", "0.60542756", "0.6053401", "0.6005552", "0.6002145", "0.598074", "0.59526634", "0.59373355", "0.59313816", "0.59143", "0.5910978", "0.5889808", "0.5889774", "0.5881982", "0.58778524", "0.58743167", "0.5873165", "0.58725196", "0.5866871", "0.584799", "0.5846626", "0.5844859", "0.5841259", "0.58355814", "0.5822872", "0.5803418", "0.5798986", "0.5798267", "0.5792847", "0.57864714", "0.5781616", "0.5780174", "0.57766116", "0.577476", "0.57688797", "0.575954", "0.57560927", "0.5752233", "0.5748423", "0.5747269", "0.5746633", "0.5743405", "0.5732301", "0.57247734", "0.57212234", "0.57187", "0.5715807", "0.57136565", "0.571296", "0.5710433", "0.570151", "0.5700583", "0.5691486", "0.5686892", "0.56856704", "0.56596184", "0.5658797", "0.5655964", "0.5651177", "0.56459814", "0.56459814", "0.5632675", "0.5632611", "0.5631382", "0.563125", "0.56294525", "0.5623227", "0.5619022", "0.55979806", "0.55810666", "0.55797064", "0.5569016", "0.5565377", "0.5562687", "0.5561809", "0.5561754", "0.5553885", "0.55464166", "0.5542107", "0.55410236", "0.5536495", "0.55363595", "0.5529731" ]
0.0
-1
Constructing game screen, creates world and sets camera.
public GameScreen(Cyra game, float difficulty) { super(game); float width = Gdx.graphics.getWidth()/45; float height = Gdx.graphics.getHeight()/45; ParallaxCamera cam = new ParallaxCamera(width, height); world = new World(game, level, difficulty, cam); render = new WorldRenderer(world, cam); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 create() {\n\t\trandomUtil = new RandomUtil();\n\t\t// create the camera using the passed in viewport values\n\t\tcamera = new OrthographicCamera(viewPortWidth, viewPortHeight);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tdebugRender = new Box2DDebugRenderer(true, false, false, false, false, true);\n\t\ttestWorld = new TestWorld(assetManager.blockManager(), new Vector2(0, 0f));\n\t\ttestWorld.genWorld(debugUtil);\n\t\ttestWorld.setCamera(getCamera());\n\t\tplayer.createBody(testWorld.getWorld(), BodyType.DynamicBody);\n\t\ttestWorld.getPlayers().add(player);\n\t\tworldParser = new WorldParser(testWorld, \"Test World\");\n\t\tworldParser = new WorldParser(testWorld, \"Test Write\");\n\t\tworldParser.parseWorld();\n\t\twriter = new WorldWriter(\"Test Write\", testWorld);\n\t}", "public GameScreen() {\n\n\t\tint midPointY = (int) (Const.GAME_HEIGHT / 2);\n\n\t\tworld = new GameWorld(midPointY);\n\t\trenderer = new GameRenderer(world);\n\n\t\tGdx.input.setInputProcessor(new InputHandler(world.getVentilatorUp(), world.getVentilatorDown()));\n\t\t// Gdx.input.setInputProcessor(new\n\t\t// InputHandler(world.getVentilatorTwo()));\n\t}", "public WinScreen()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(1500, 500, 1); \r\n\r\n prepare();\r\n }", "@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}", "private void init()\n {\n batch = new SpriteBatch();\n \n camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT);\n camera.position.set(0, 0, 0);\n camera.update();\n \n cameraGui = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraGui.position.set(0, 0, 0);\n cameraGui.setToOrtho(true); // flip y-axis\n cameraGui.update();\n \n cameraBg = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraBg.position.set(0, 0, 0);\n //cameraBg.setToOrtho(true);\n cameraBg.update();\n \n b2Debug = new Box2DDebugRenderer();\n }", "private void init () \n\t{ \n\t\tbatch = new SpriteBatch();\n\t\tcamera = new OrthographicCamera(Constants.VIEWPORT_WIDTH,\n\t\t\tConstants.VIEWPORT_HEIGHT);\n\t\tcamera.position.set(0, 0, 0);\n\t\tcamera.update();\n\t\tcameraGUI = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH,\n\t\t\t\tConstants.VIEWPORT_GUI_HEIGHT);\n\t\tcameraGUI.position.set(0, 0, 0);\n\t\tcameraGUI.setToOrtho(true); // flip y-axis\n\t\tcameraGUI.update();\n\t\t\n\t\tb2debugRenderer = new Box2DDebugRenderer();\n\t}", "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 }", "private void initGL() {\n\t\ttry {\n\t\t\tDisplay.setDisplayMode(new DisplayMode(displayWidth, displayHeight));\n\t\t\tDisplay.setVSyncEnabled(true);\n\t\t\tDisplay.setTitle(\"Shooter\");\n\t\t\tDisplay.create();\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t// init OpenGL\n\t\tglEnable(GL_TEXTURE_2D);\n\t\t\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\n\t\t// enable alpha blending\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tglViewport(0, 0, displayWidth, displayHeight);\n\t\t\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\t\tglOrtho(0, displayWidth, displayHeight, 0, 1, -1);\n\t\tglMatrixMode(GL_MODELVIEW);\n\t}", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public StartScreen()\n { \n // Create a new world with 1111x602 cells with a cell size of 1x1 pixels.\n super(1111, 602, 1); \n prepare();\n background.playLoop();\n }", "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}", "@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}", "public UIMainWorld()\n { \n super(600, 400, 1); \n startScreen();\n }", "private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}", "public Game(){\n\t\tDimension size = new Dimension(width * scale, height * scale);\n\t\tsetPreferredSize(size);\n\t\t\n\t\tscreen = new Screen(width, height);//instantiated the new screen\n\t\t\n\t\tframe = new JFrame();\n\t\t\n\t}", "private Camera() {\n viewport = new Rectangle();\n dirtyAreas = new ArrayList<Rectangle>();\n renderedAreas = new ArrayList<Rectangle>();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }", "public RobotWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n prepare();\n }", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "public static void create(){\n\t\tstage = new Stage(new StretchViewport(1680, 1050)); \n\t\tCamera camera = stage.getCamera();\n\t\tcamera.update();\n\n\t\t//Instantiate the Managers\n\t\tGdx.input.setInputProcessor(getStage());\t\n\t\tstage.getActors().clear();\n\t\t\n\t\tmapManager = new Game_Map_Manager();\n\t\tmapManager.create(getStage());\n\t\t\n\t\tGame_CardHand cardHand = new Game_CardHand();\n\t\tcardHand.create(getStage());\n\n\t\tGameScreenUI actorManager = new GameScreenUI();\n\t\tactorManager.create(getStage());\n\n\t\tTrainDepotUI trainDepot = new TrainDepotUI();\n\t\ttrainDepot.create(getStage());\n\n\t\tGoalMenu goalScreenManager = new GoalMenu();\n\t\tgoalScreenManager.create(getStage());\n\t\t\n\t\tPlayerGoals ticketManager = new PlayerGoals();\n\t\tticketManager.create(getStage());\t\n\t\t\n\t\tGame_StartingSequence startgameManager = new Game_StartingSequence(replayMode);\n\t\tstartgameManager.create(getStage());\n\t\t\n\t\tGame_Shop shop = new Game_Shop();\n\t\tshop.create(getStage());\n\t\t\n\t\tGame_PauseMenu pauseMenu= new Game_PauseMenu();\n\t\tpauseMenu.create(getStage());\n\t\t\n\t\tWarningMessage warningMessage = new WarningMessage();\n\t\twarningMessage.create(getStage());\n\t\t\n\t\tif (replayMode){\n\t\t\tReplayModeUI replayUI = new ReplayModeUI();\n\t\t\treplayUI.create(getStage());\n\t\t\t\n\t\t\tif (Game_StartingSequence.inProgress){\n\t\t\t\tWorldMap replayMap = WorldMap.getInstance();\n\t\t\t\tGame_StartingSequence.player1 = false;\n\t\t\t\t\n\t\t\t\tStation p1station = replayMap.stationsList.get(0);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player1\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp1station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tStation p2station = replayMap.stationsList.get(1);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player2\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp2station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcreateCoreGame(p1station, p2station);\n\t\t\t\tGame_StartingSequence.startGame();\n\t\t\t\tGameScreenUI.refreshResources();\n\t\t\t\tGame_StartingSequence.inProgress = false;\n\t\t\t}\n\t\t}\n\t}", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "@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}", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}", "public static void createDisplay() {\n ContextAttribs attribs = new ContextAttribs(3, 2).withForwardCompatible(true)\n .withProfileCore(true);\n\n try {\n if (!goFullscreen) {\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\n } else {\n Display.setFullscreen(true);\n }\n Display.create(new PixelFormat(), attribs);\n Display.setVSyncEnabled(true);\n Display.setTitle(\"Our First Display!\");\n GL11.glEnable(GL13.GL_MULTISAMPLE);\n } catch (LWJGLException e) {\n e.printStackTrace();\n }\n\n GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());\n lastFrameTime = getCurrentTime();\n }", "public WorldScene makeScene() {\n // WorldCanvas c = new WorldCanvas(300, 300);\n WorldScene s = new WorldScene(this.width, this.height);\n s.placeImageXY(newImg, this.width / 2, this.height / 2);\n return s;\n }", "protected WorldController() {\n\t\tthis(new Rectangle(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT), \n\t\t\t\tnew Vector2(0,DEFAULT_GRAVITY));\n\t}", "public void setupCamera() {\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}", "public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }", "@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "public Game(){\n new Window(800, 800, \"Survival Game\", this);\n handler = new Handler();\n camera = new Camera(0,0);\n this.addKeyListener(new KeyInput(handler));\n\n //create the map\n map = new Map(handler);\n map.generateMap();\n map.drawWorld();\n\n player = new Player(100, 100, ID.Player, handler);\n handler.addObject(player);\n handler.addObject(new Bear(600, 600, ID.Bear, player));\n handler.addObject(new Deer(400, 400, ID.Deer, player));\n\n start();\n }", "public SceneManager(GameScreen screen, Camera2D camera)\r\n\t{\r\n\t\tinitialize(screen, camera);\r\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.playScreen = new PlayScreen<EntityUnknownGame>(this);\n\t\tsetScreen(this.playScreen);\n\t\t\n\t\t//this.shadowMapTest = new ShadowMappingTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.shadowMapTest);\n\t\t\n\t\t//this.StillModelTest = new StillModelTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.StillModelTest);\n\t\t\n//\t\tthis.keyframedModelTest = new KeyframedModelTest<EntityUnknownGame>(this);\n//\t\tsetScreen(this.keyframedModelTest);\n\t}", "private void createGameMode() {\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n Rectangle fullScreenBounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\n boolean fs = ge.getDefaultScreenDevice().isFullScreenSupported();\n \n setTitle(gameName);\n setName(gameName);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n \n map = new UAVMap(this, UAVModes.GAME, fs);\n \n if (fs) {\n fullScreen = new Window(this);\n fullScreen.add(map.getCanvas());\n ge.getDefaultScreenDevice().setFullScreenWindow(fullScreen);\n } else {\n this.setSize((int)(.9 * fullScreenBounds.width), (int)(.9 * fullScreenBounds.height));\n this.setLocation(fullScreenBounds.x + (int) (.05 * fullScreenBounds.width), \n fullScreenBounds.y + (int) (.05 * fullScreenBounds.height));\n Container content = getContentPane();\n content.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 1;\n content.add(map.getCanvas(), c);\n setVisible(true);\n }\n map.initializeGame();\n map.startTimer(); \n }", "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 MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "public MainScreen(Game game) {\n\t\tthis.game = game;\n\t\tcreate();\n\t}", "static private Screen createScreen() {\n Screen test = new Screen();\n //These values below, don't change\n test.addWindow(1,1,64, 12);\n test.addWindow(66,1,64,12);\n test.addWindow(1,14,129,12);\n test.setWidthAndHeight();\n test.makeBoarders();\n test.setWindowsType();\n test.draw();\n return test;\n }", "public MyWorld()\n { \n super(1200, 600, 1); \n prepare();\n bienvenida();\n instrucciones();\n sonido();\n }", "@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}", "public Game(){\n\t\tDimension dimension = new Dimension(Game.WIDTH, Game.HEIGHT); //Create dimensions for window size\n\t\tsetPreferredSize(dimension); //Set the start size\n\t\tsetMinimumSize(dimension); //Set the min size\n\t\tsetMaximumSize(dimension); //Set the max size, this locks the window size.\n\t\taddKeyListener(this); //Add the key listener to the game object\n\t\tlevel1(); //Load level 1\n\t\twinScreen = new WinScreen(); //Create win object\n\t\tdeadScreen = new DeadScreen(); //Create dead object\n\t\tstartScreen = new StartScreen(); //Create startScreen object\n\t\tpauseScreen = new PauseScreen(); //Create pauseScreen object\n\t\tspriteSheet = new SpriteSheet(\"img/sprites.png\"); //Create SpriteSheet object\n\t\tnew Texture(); //Initialize texture object\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "public MyWorld()\n {\n super(600, 400, 1);\n }", "public Game()\n\t{\n\t\tsetSize(Main.FRAMEWIDTH, Main.FRAMEHEIGHT);\n\t\taddMouseListener(mouse);\n\t\taddMouseMotionListener(mouse);\n\t\taddKeyListener(key);\n\t\taddMouseWheelListener(mouse);\n\t\tsetFocusable(true);\n\t\t//setVisible(false);\n\t\t\n\t\tengine.start();\n\t}", "public LoadingScreen2()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n tracker = new Tracker();\n }", "@Override\n public void create(GameContainer gc) {\n this.gc = gc;\n addKeys();\n\n AssetManager.background.setSize(gc.getWidth(), gc.getHeight());\n AssetManager.background.addToRender();\n\n player = new Player(gc.getWidth() / 2,\n gc.getHeight() / 2, 100, 100);\n updateCamera((int) player.getX(), (int) player.getY());\n\n player2 = new Player(gc.getWidth() / 2 + player.getWidth(),\n gc.getHeight() / 2 + player.getHeight(), 100, 100);\n }", "private void initDisplay() throws LWJGLException {\n\n\t\tDisplay.setDisplayMode(Display.getDesktopDisplayMode());\n\t\tDisplay.setFullscreen(true);\n\t\twidth = Display.getDisplayMode().getWidth();\n\t\theight = Display.getDisplayMode().getHeight();\n\t\tDisplay.create();\n\t\tDisplay.setVSyncEnabled(true);\n\t}", "public WorldScene makeScene() {\r\n WorldScene scene = this.getEmptyScene();\r\n //make the image to draw \\/ \\/\r\n WorldImage cell = new EmptyImage();\r\n\r\n if (this.allCellsFlooded()) {\r\n cell = this.drawWin();\r\n }\r\n else if (this.currTurn >= this.maxTurn) {\r\n cell = this.drawLose();\r\n }\r\n else {\r\n cell = this.drawBoard();\r\n }\r\n\r\n //place the image on the scene \\/ \\/\r\n scene.placeImageXY(cell, 100, 200);\r\n\r\n return scene;\r\n }", "public static void main(String[] args) {\n// Vector v1 = new Vector(new double[]{0, 0, 1});\n// Vector v2 = new Vector(new double[]{1, 0, 0});\n// System.out.println(v1.dot(v2));\n System.setProperty(\"sun.java2d.opengl\", \"true\");\n \n // Make World\n //WorldSpace world = new StreetWorldSpace();\n WorldSpace world = new TestWorldSpace();\n //WorldSpace world = new BigAssPolygonSpace();\n \n // Make Frame\n JFrame frame = new JFrame();\n \n // Get effective screen size\n Dimension screenSize = getScreenDimension(frame);\n\n // Set Camera View dimensions\n int width = 730;\n int height = width;\n \n // Make Camera\n Polygon[] polygons = world.getPolygons();\n Camera camera = new Camera(polygons, width, height, frame.getGraphicsConfiguration());\n image = camera.observe();\n \n // Make Camera Control Panel\n// int controlPanelHeight = 100;\n// CameraControlPanel cameraControlPanel = new CameraControlPanel(camera);\n// cameraControlPanel.setPreferredSize(new Dimension(width, controlPanelHeight));\n// cameraControlPanel.setBorder(BorderFactory.createCompoundBorder(new LineBorder(Color.BLACK, 2, false), new EmptyBorder(10, 10, 10, 10)));\n \n // Make Camera View Component\n CameraViewComponent cameraViewComponent = new CameraViewComponent(camera);\n cameraViewComponent.updateImage(image);\n cameraViewComponent.updateData(camera.getData());\n cameraViewComponent.setPreferredSize(new Dimension(width, height));\n\n // Make Camera Panel\n JPanel cameraPanel = new JPanel();\n cameraPanel.setLayout(new BoxLayout(cameraPanel, BoxLayout.Y_AXIS));\n cameraPanel.setPreferredSize(new Dimension(width, height));// + controlPanelHeight));\n cameraPanel.add(cameraViewComponent);\n //cameraPanel.add(cameraControlPanel);\n\n // Make Camera Data Panel\n //CameraDataPanel cameraDataPanel = new CameraDataPanel(camera);\n \n // Make Master Panel\n JPanel masterPanel = new JPanel();\n masterPanel.add(cameraPanel);\n //masterPanel.add(cameraDataPanel);\n \n frame.add(masterPanel);\n frame.pack();\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n\n // Make keyboard listener\n KeyListener kl = new KeyListener();\n \n // Time\n int lastTenthOfASecond = 0;\n double lastMilliSecond = 0;\n double currentMilliSecond = System.currentTimeMillis();\n double averageFrameRate = 0;\n double currentFrameRate = 0;\n long totalTime = 0;\n long totalFrames = 0;\n \n // Redraw camera view upon keyboard input\n while(true) { \n int currentTenthOfASecond = (int)((currentMilliSecond%1000)/100);\n if (currentMilliSecond/100 > lastMilliSecond/100) {\n boolean cameraMoved = false;\n if (kl.isWPressed()) {\n camera.move(FORWARD); \n cameraMoved = true;\n }\n if (kl.isSPressed()) {\n camera.move(BACKWARD); \n cameraMoved = true;\n }\n if (kl.isAPressed()) {\n camera.move(LEFT); \n cameraMoved = true;\n }\n if (kl.isDPressed()) {\n camera.move(RIGHT); \n cameraMoved = true;\n }\n if (kl.isSpacePressed()) {\n camera.move(UP); \n cameraMoved = true;\n }\n if (kl.isShiftPressed()) {\n camera.move(DOWN); \n cameraMoved = true;\n }\n if (cameraViewComponent.wasUpdated()) {\n cameraMoved = true;\n }\n// if (cameraControlPanel.getWasCameraChanged() || cameraViewComponent.wasUpdated()) {\n// cameraMoved = true;\n// }\n if (cameraMoved) {\n image = camera.observe();\n cameraViewComponent.updateImage(image);\n //cameraDataPanel.update();\n //cameraControlPanel.update(); \n totalFrames++;\n totalTime += currentMilliSecond-lastMilliSecond + 1;\n averageFrameRate = (totalFrames)/(totalTime/1000.0); \n currentFrameRate = (1000.0/(currentMilliSecond-lastMilliSecond));\n \n }\n }\n if (currentTenthOfASecond > lastTenthOfASecond) {\n \n String[] cameraData = camera.getData();\n String[] frameData = {\n \"Average Framerate: \" + String.format(\"%.2f\", averageFrameRate), \n \"Current Framerate: \" + String.format(\"%.2f\",currentFrameRate)\n };\n String[] data = new String[cameraData.length + frameData.length ];\n System.arraycopy(cameraData, 0, data, 0, cameraData.length);\n System.arraycopy(frameData, 0, data, cameraData.length, frameData.length);\n cameraViewComponent.updateData(data);\n } \n lastTenthOfASecond = currentTenthOfASecond;\n lastMilliSecond = currentMilliSecond;\n currentMilliSecond = System.currentTimeMillis(); \n }\n }", "@Override\n\tpublic void prepareScreen() {\n\t\tgl.glColor3d(0.0, 0.0, 0.0);\n\t\tgl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\t}", "public WorldRenderer(WorldController worldController)\n {\n this.worldController = worldController;\n init();\n }", "private void init() {\n\t\tGLFWErrorCallback.createPrint(System.err).set();\n\n\t\t// Initialize GLFW. Most GLFW functions will not work before doing this.\n\t\tif ( !glfwInit() )\n\t\t\tthrow new IllegalStateException(\"Unable to initialize GLFW\");\n\n\t\t// Configure GLFW\n\t\tglfwDefaultWindowHints(); // optional, the current window hints are already the default\n\t\tglfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation\n\t\tglfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable\n\n\t\t// Create the window\n\t\twindow = glfwCreateWindow(width, height, Game.TITLE, NULL, NULL);\n\t\tif ( window == NULL )\n\t\t\tthrow new RuntimeException(\"Failed to create the GLFW window\");\n\n\t\t// Setup a key callback. It will be called every time a key is pressed, repeated or released.\n\t\tglfwSetKeyCallback(window, new Input());\n\n\t\t// Get the thread stack and push a new frame\n\t\ttry ( MemoryStack stack = stackPush() ) {\n\t\t\tIntBuffer pWidth = stack.mallocInt(1); // int*\n\t\t\tIntBuffer pHeight = stack.mallocInt(1); // int*\n\n\t\t\t// Get the window size passed to glfwCreateWindow\n\t\t\tglfwGetWindowSize(window, pWidth, pHeight);\n\n\t\t\t// Get the resolution of the primary monitor\n\t\t\tGLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());\n\n\t\t\t// Center the window\n\t\t\tglfwSetWindowPos(\n\t\t\t\twindow,\n\t\t\t\t(vidmode.width() - pWidth.get(0)) / 2,\n\t\t\t\t(vidmode.height() - pHeight.get(0)) / 2\n\t\t\t);\n\t\t} // the stack frame is popped automatically\n\n\t\t// Make the OpenGL context current\n\t\tglfwMakeContextCurrent(window);\n\t\t// Enable v-sync\n\t\tglfwSwapInterval(1);\n\n\t\t// Make the window visible\n\t\tglfwShowWindow(window);\n\t\t\n\t\tGL.createCapabilities();\n\t\t//Load All Shaders\n\t\tShader.loadAll();\n\t\tglActiveTexture(GL_TEXTURE0);\n\t\tmap = new Map();\n\t\tglActiveTexture(GL_TEXTURE1);\n\t\tplayer = new Player();\n\t\t\n\t\tmat_pr = new Matrix4f().setOrtho(-15.0f, 15.0f, -15.0f * 9.0f /16.0f, 15.0f * 9.0f /16.0f, -1.0f, 1.0f);\n\t\tmat_vw = new Matrix4f().identity();\n\t\t\n\t\tShader.background.bind();\n\t\tShader.background.setUniformMat4f(\"mat_pr\", mat_pr.mul(mat_vw));\n\t\tShader.background.setUniform1i(\"u_Texture\", 0);\n\t\tShader.background.unbind();\n\t\tShader.player.bind();\n\t\tShader.player.setUniformMat4f(\"mat_vw\", mat_vw);\n\t\tShader.player.setUniformMat4f(\"mat_pr\", mat_pr);\n\t\tShader.player.setUniform1i(\"u_Texture\", 1);\n\t\tShader.player.unbind();\n\t\t\n\t\t\n\t}", "private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }", "public void renderLoop() {\n\t\tplayer.move(calculateVectorDirectionBetweenEyeAndCenter());\n\t\tcamera.move();\n\t\tm.setLookAt(camera.getPosition().x,\n\t\t\t\tcamera.getPosition().y + 10,\n\t\t\t\tcamera.getPosition().z,\n\t\t\t\tplayer.getPosition().x,\n\t\t\t\tplayer.getPosition().y + 10,\n\t\t\t\tplayer.getPosition().z,\n\t\t\t\tcalculateUpVectorOfCameraPosition(secondOrthogonalVector).x,\n\t\t\t\tcalculateUpVectorOfCameraPosition(secondOrthogonalVector).y,\n\t\t\t\tcalculateUpVectorOfCameraPosition(secondOrthogonalVector).z);\n\t\tm.get(fb);\n\n\t\tglLoadMatrixf(fb);\n\t\t\n\t\tglPushMatrix();\n\t\t\tupdateSpotLight();\n\t\t\tupdatePointLight();\n\t\tglPopMatrix();\n\t\t\n\t\tglPushMatrix();\n\t\t\tglPolygonMode(GL_BACK, GL_FILL);\n\t\t\tglPolygonMode(GL_FRONT, GL_POINT);\n\t\t\tterrain.generateCave();\n\t\tglPopMatrix();\n\t\t\n\t\tglPushMatrix();\n\t\t\tglPolygonMode(GL_FRONT, GL_FILL);\n\t\t\tterrain.generateGround();\n\t\tglPopMatrix();\n\n\t\tglPushMatrix();\n\t\t\tterrain.drawEnd();\n\t\tglPopMatrix();\n\t\t\n\t\tglPushMatrix();\n\t\t\tglTranslatef(player.getPosition().x, player.getPosition().y, player.getPosition().z);\n\t\t\tglRotatef(player.getRotY(), 0, 1, 0);\n\t\t\tplayer.getModel().draw(player.getMoveAngle());\n\t\tglPopMatrix();\n\t}", "private void GameInitialize()\r\n { \r\n // set to fullscreen to use the entire \r\n // display or false to only use\r\n // the area inbetween the two bars on the display\r\n setFullScreenMode(true);\r\n\r\n // setup 3D\r\n try\r\n {\r\n Object3D[] buffer = Loader.load(\"/RaptorWalk.m3g\");\r\n\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n // get our world node\r\n mWorld = (World)buffer[i];\r\n mEnemy = (SkinnedMesh)mWorld.find(56);\r\n mEnemyTimer = 0;\r\n break;\r\n }\r\n }\r\n }\r\n catch(Exception e) \r\n { System.out.println(\"Loading error!\" + e.getMessage()); }\r\n\r\n // create a game font\r\n mGameFont = Font.getFont(Font.FACE_MONOSPACE, \r\n Font.STYLE_PLAIN, Font.SIZE_SMALL);\r\n\r\n // Get the active camera from the world\r\n mCam = mWorld.getActiveCamera();\r\n mCam.translate(0, 1.0f, 0);\r\n\r\n // Create an ambient light and add it to the world node\r\n Light light = new Light();\r\n light.setMode(Light.AMBIENT);\r\n light.setIntensity(3);\r\n mWorld.addChild(light);\r\n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \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 VolcanoWorld() {\n this(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n }", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "public MapScreen() {\n\t\tthis(DEFAULT_WIDTH, DEFAULT_HEIGHT); // default size for map screen.\n\t}", "public GameView() {\n initComponents();\n gameView(30, 30);\n }", "public GameWorld(){\r\n\t\t\r\n\t}", "public GameGUI( RiskGameEngine gameEngine )\n\t{\t\n\t\t//this.setPreferredSize( new java.awt.Dimension( 1000, 800 ) );\n\t\tthis.gameEngine = gameEngine;\n\t\t// START SCREEN INIT\n\t\tthis.startScreenHandler = new StartScreenHandler( gameEngine );\n\t\tthis.startScreen = new StartScreenPanel( startScreenHandler );\n\n\t\t// CREATE PLAYERS SCREEN INIT\n\t\tthis.createPlayersScreenHandler = new CreatePlayersScreenHandler(\n\t\t\t\tthis.gameEngine );\n\t\tthis.createPlayersScreen = new CreatePlayersScreenPanel(\n\t\t\t\tthis.createPlayersScreenHandler );\n\t\t\n\t\t//MAIN MAP SCREEN \n\t\tmapScreenHandler = new MapScreenHandler( gameEngine );\n\t\tmapScreen = new MapScreenPanelTest( mapScreenHandler );\n\t\t\n\t\t/* all panels below are internal frames to the main map screen */\n\t\t//CARD SCREEN \n\t\tcardHandler = new CardScreenHandler( gameEngine );\n\t\tcardScreen = new CardScreenPanel( cardHandler );\n\t\tmapScreen.setCardScreenPanel( cardScreen );\n\t\t\n\t\t//ATTACK SCREEN \n\t\tattackHandler = new AttackScreenHandler( gameEngine );\n\t\tattackScreen = new AttackScreenPanel( attackHandler );\n\t\tmapScreen.setAttackScreenPanel( attackScreen );\n\t\t\n\t\t//FORTIFY SCREEN \n\t\tmoveTroopsHandler = new MoveTroopsScreenHandler( gameEngine );\n\t\tmoveTroopsScreen = new MoveTroopsScreenPanel( moveTroopsHandler );\n\t\tmapScreen.setMoveTroopsScreenPanel( moveTroopsScreen );\n\t\t\n\t\tthis.currentPanel = this.startScreen;\t\n\t\tthis.getContentPane().add( currentPanel );\n\t\tthis.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n\t\t\n\t}", "public Game() {\n\t\tsuper();\n\t\tgameModel = new GameModel();\n\t\tview = new GamePane(gameModel);\n\t\t\n\t\tadd(view);\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 800, 1); \n GreenfootImage bg = new GreenfootImage(\"background.jpg\");\n bg.scale(getWidth(), getHeight());\n setBackground(bg);\n initialize();\n \n }", "@Override\n\tpublic Engine onLoadEngine() {\n\t\tToast.makeText(this, \"You move my sprite right round, right round...\", Toast.LENGTH_LONG).show();\n\t\tthis.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\treturn new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));\n\t}", "public void display_game_screen() {\n\n myScreen.screenMode = myScreen.DISPLAY_GAME_SCREEN;\n\n pushMatrix();\n\n calc_screen_translation();\n\n imageMode(CORNER);\n image(backgroundImage, 0, 0);\n\n // draw_grid();\n\n draw_game_assets();\n\n pacman.update(isPacmanUp, isPacmanDown, isPacmanLeft, isPacmanRight);\n ghost.update(isGhostUp, isGhostDown, isGhostLeft, isGhostRight);\n\n pacman.display();\n ghost.display();\n\n score.run(pacman.xTile, pacman.yTile, ghost.xTile, ghost.yTile);\n\n popMatrix();\n }", "public GameBoard() {\n\t\t\n\t\t// Initiate LoginScreen\n\t\tloginScreen();\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}", "@Override\n\t\tpublic Engine onLoadEngine() {\n\t\t\tToast.makeText(this, \"Touch the screen to add objects.\", Toast.LENGTH_LONG).show();\n\t\t\tfinal Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\t\tfinal EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);\n\t\t\tengineOptions.getTouchOptions().setRunOnUpdateThread(true);\n\t\t\treturn new Engine(engineOptions);\n\t\t}", "public void setupOpenGL() {\n try {\n PixelFormat pixelFormat = new PixelFormat();\n ContextAttribs contextAtrributes = new ContextAttribs(3, 2)\n .withForwardCompatible(true)\n .withProfileCore(true);\n\n DisplayMode displayMode = new DisplayMode(WIDTH, HEIGHT);\n Display.setDisplayMode(displayMode);\n Display.setTitle(WINDOW_TITLE);\n Display.create(pixelFormat, contextAtrributes);\n\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n } catch (LWJGLException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n // Setup an XNA like background color\n GL11.glClearColor(0.4f, 0.6f, 0.9f, 0f);\n\n // Map the internal OpenGL coordinate system to the entire screen\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n\n this.exitOnGLError(\"Error in setupOpenGL\");\n }", "public void render()\n\t{\n\t\t// Get or create the BufferStrategy to plan rendering\n\t\tBufferStrategy bs = getBufferStrategy();\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Get the graphics that can be drawn to\n\t\tg = bs.getDrawGraphics();\n\t\t\n\t\t// Set the Graphics2D\n\t\tg2d = (Graphics2D)g;\n\t\t\n\t\t// Create a black rectangle to fill the canvas as a base background\n\t\tg.setColor(Color.black);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\n\t\tif (screenLoaded)\n\t\t{\n\t\t\t// Draw the static background\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawStaticBackground(g);\n\t\t\t\n\t\t\t// Translate the screen based on the Camera\n\t\t\tif (game.getCamera() != null && game.usesCamera())\n\t\t\t\tg2d.translate(game.getCamera().getxPos(), \n\t\t\t\t\t\t \t game.getCamera().getyPos());\n\t\t\t\n\t\t\t// Draw the background layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawBackground(g);\n\t\t\t\n\t\t\t// Render all of the Tiles\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null && game.usesWorld())\n\t\t\t\tgame.getWorldHandler().renderTiles(g);\n\t\t\t\n\t\t\t// Render all of the GameObjects\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null && game.usesGameObjects())\n\t\t\t\tgame.getObjectHandler().renderGameObjects(g);\n\t\t\t\n\t\t\t// Draw the foreground layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawForeground(g);\n\t\t\t\n\t\t\t// Draw the lighting\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null && game.usesLighting())\n\t\t\tg.drawImage(game.getLightHandler().getLightmap(), -1500, -3100, null);\n\t\t\t\n\t\t\t// Translate the screen based on the Camera\n\t\t\tif (game.getCamera() != null && game.usesCamera())\n\t\t\t\tg2d.translate(-game.getCamera().getxPos(), \n\t\t\t\t\t\t \t -game.getCamera().getyPos());\n\t\t\t\n\t\t\t// Draw the gui layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null)\n\t\t\t\tgame.getScreenHandler().getCurrentScreen().drawGui(g);\n\t\t\t\n\t\t\t// Draw the debug layer\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null\n\t\t\t\t&& game.getDebugScreen() != null\n\t\t\t\t&& game.isDebugShown())\n\t\t\t\tgame.getDebugScreen().showDebug(g);\n\t\t\t\n\t\t\t// Draw the loading \"curtain\" if the screen is still loading\n\t\t\tif (game.getScreenHandler().getCurrentScreen() != null &&\n\t\t\t\t!screenLoaded)\n\t\t\t{\n\t\t\t\tif (timeCount < game.getFps() / 4)\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t\telse if (timeCount < (game.getFps() / 4) * 2)\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t\telse if (timeCount < (game.getFps() / 4) * 3)\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tif (loadingFont == null)\n\t\t\t\t\t\tg.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\t\telse\n\t\t\t\t\t\tg.setFont(loadingFont);\n\t\t\t\t\tg.drawString(\"Loading . . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Dispose of all graphics\n\t\t\tg.dispose();\n\t\t\t// Show all graphics prepared on the BufferStrategy\n\t\t\tbs.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tGraphics2D g2 = (Graphics2D)g;\n\t\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\t\n\t\t\tif (timeCount < game.getFps() / 4)\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t\telse if (timeCount < (game.getFps() / 4) * 2)\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t\telse if (timeCount < (game.getFps() / 4) * 3)\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tg.setColor(Color.black);\n\t\t\t\tg.fillRect(0, 0, game.getWindow().getWidth(), \n\t\t\t\t\t\tgame.getWindow().getHeight());\n\t\t\t\tg2.setColor(Color.white);\n\t\t\t\tif (loadingFont == null)\n\t\t\t\t\tg2.setFont(new Font(\"Verdana\", Font.PLAIN, 32));\n\t\t\t\telse\n\t\t\t\t\tg2.setFont(loadingFont);\n\t\t\t\tg2.drawString(\"Loading . . . \", (game.getWindow().getWidth() / 2) - 80, \n\t\t\t\t\t\t(game.getWindow().getHeight() / 2) - 80);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Dispose of all graphics\n\t\tg.dispose();\n\t\t// Show all graphics prepared on the BufferStrategy\n\t\tbs.show();\n\t}", "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}", "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 lv3()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n //super(950, 600, 1); \n //prepare();\n prepare();\n stopped();\n started();\n }", "public void run() {\n\n\t\ttry {\n\t\t\tDisplay.setDisplayMode(new DisplayMode(windowWidth, windowHeight));\n\t\t\tDisplay.setTitle(TITLE);\n\t\t\tDisplay.create();\n\t\t} catch (LWJGLException e) {\n\t\t\tSystem.err.println(\"Error: Failed to create display\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t/*\n\t\t * Initialize LWJGL and OpenGL\n\t\t */\n\t\t{\n\t\t\tGL11.glViewport(0, 0, windowWidth, windowHeight);\n\t\t\tGL11.glEnable(GL11.GL_DEPTH_TEST);\n\t\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\t\tGL11.glShadeModel(GL11.GL_SMOOTH);\n\t\t\tGL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n\t\t\tGL11.glEnable(GL11.GL_BLEND);\n\t\t\tGL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);\n\t\t\t// GL11.glEnable(GL11.GL_ALPHA_TEST);\n\t\t\tGL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);\n\t\t\tGL11.glClearColor(0.0f, 0.0f, 0.0f, 1f);\n\t\t}\n\n\t\ttry {\n\t\t\twhile (!(Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_Q))) {\n\t\t\t\t// Don't eat everything!!!\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(16);\n\t\t\t\t} catch (InterruptedException 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\n\t\t\t\tsetCamera();\n\n\t\t\t\t/*\n\t\t\t\t * Draw Code\n\t\t\t\t */\n\n\t\t\t\tsynchronized (model.drawableObjects) {\n\t\t\t\t\tfor (Drawable drawable : model.drawableObjects)\n\t\t\t\t\t\tdrawable.draw();\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * End draw code\n\t\t\t\t */\n\n\t\t\t\tDisplay.update();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Uncaught exception in View main loop: \" + e.getMessage()\n\t\t\t\t\t+ \"\\nCleaning up and exiting.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t/*\n\t\t * Clean up\n\t\t */\n\n\t\tmodel.endGame();\n\t\tcontroller.endGame();\n\t\tDisplay.destroy();\n\t}", "public void init(int width, int height) {\n try {\n Display.setDisplayMode(new DisplayMode(width, height));\n Display.create();\n } catch (LWJGLException ex) {\n System.exit(0);\n }\n\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE);\n GL11.glMatrixMode(GL11.GL_PROJECTION);\n GL11.glLoadIdentity();\n GL11.glOrtho(0, GameConstants.WINDOW_WIDTH, 0, GameConstants.WINDOW_HEIGHT, 1, -1);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n }", "public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }", "public Game() {\n thread = new Thread(this);\n image = new BufferedImage(1280, 720, BufferedImage.TYPE_INT_ARGB);\n pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();\n textures = new ArrayList<Texture>();\n textures.add(Texture.metal);\n textures.add(Texture.window);\n textures.add(Texture.console);\n textures.add(Texture.vent);\n textures.add(Texture.alienGrunt);\n camera = new Camera(4.5, 4.5, 1, 0, 0, -.90);\n screen = new Screen(map, mapWidth, mapHeight, textures, 1280, 720);\n addKeyListener(camera);\n setSize(1280, 720);\n setResizable(false);\n setTitle(\"Java 3D Engine\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setBackground(Color.black);\n setLocationRelativeTo(null);\n setVisible(true);\n // loads blaster sprites\n try {\n img = ImageIO.read(new File(\"textures/gun-basic.png\"));\n img1 = ImageIO.read(new File(\"textures/gun-shoot.png\"));\n } catch (IOException e) {\n }\n\n start();\n }", "public SideScrollingWorld()\n { \n // Create a new world with 640x480 cells with a cell size of 1x1 pixels.\n // Final argument of 'false' means that actors in the world are not restricted to the world boundary.\n // See: https://www.greenfoot.org/files/javadoc/greenfoot/World.html#World-int-int-int-boolean-\n super(VISIBLE_WIDTH, VISIBLE_HEIGHT, 1, false);\n\n // Set up the starting scene\n setup();\n\n // Game on\n isGameOver = false;\n\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}", "public World()\n\t{\n\t\tinitWorld();\t\n\t}", "private void createCamera() {\n camera = getCameraInstance();\n // Setting the right parameters in the camera\n SetCameraParameters();\n // Create our Preview view and set it as the content of our activity.\n camera_preview = new CameraPreview(this, camera);\n // Adding the camera preview after the FrameLayout and before the mainact_btn_InOutAct\n // as a separated element.\n InOut_cameraLayout.addView(camera_preview, 0);\n }", "public void setupWorld()\r\n\t{\r\n\t\t//build walls\r\n\t\twall1.add(new PointD(-500, 500));\r\n\t\twall1.add(new PointD(-490, 500));\r\n\t\twall1.add(new PointD(-490, -500));\r\n\t\twall1.add(new PointD(-500, -500));\r\n\r\n\t\twall2.add(new PointD(-500, 500));\r\n\t\twall2.add(new PointD(2000, 500));\r\n\t\twall2.add(new PointD(2000, 490));\r\n\t\twall2.add(new PointD(-500, 490));\r\n\t\t\r\n\t\twall3.add(new PointD(2000, 500));\r\n\t\twall3.add(new PointD(1990, 500));\r\n\t\twall3.add(new PointD(1990, -500));\r\n\t\twall3.add(new PointD(2000, -500));\r\n\r\n\t\twall4.add(new PointD(-500, -500));\r\n\t\twall4.add(new PointD(2000, -500));\r\n\t\twall4.add(new PointD(2000, -490));\r\n\t\twall4.add(new PointD(-500, -490));\r\n\r\n\t\tobjects.add(wall1);\r\n\t\tobjects.add(wall2);\r\n\t\tobjects.add(wall3);\r\n\t\tobjects.add(wall4);\r\n\t\t\r\n\t\t\r\n\t\t//add people\r\n\t\tGameVars.people = people;\r\n\t\tGameVars.aSquare = aSquare;\r\n\t\t\r\n\t\tobjects.add(grandson.boundary);\r\n\t\tpeople.add(grandson);\r\n\t\t\r\n\t\tobjects.add(son.boundary);\r\n\t\tpeople.add(son);\r\n\t\t\r\n\t\tobjects.add(triangle.boundary);\r\n\t\tpeople.add(triangle);\r\n\r\n\t\tobjects.add(wife.boundary);\r\n\t\tpeople.add(wife);\r\n\r\n\t\tobjects.add(runaway.boundary);\r\n\t\tpeople.add(runaway);\r\n\t\t\r\n\t\t\r\n\t\t//set aSquare's position\r\n\t\taSquare.rotate(220);\r\n\t\t\r\n\t}", "public MyWorld()\n { \n // Create a new world with 600x550 cells with a cell size of 1x1 pixels.\n super(600, 550, 1);\n // Set the order in which Actors are drawn on the screen in this World\n setPaintOrder ( Counter.class, HighScore.class, Fader.class);\n // Counter\n counter = new Counter (\"Score: \");\n addObject (counter, 50, 30);\n // Initialize the player\n player = new Player ();\n addObject (player, 300, 530); \n platforms = new Platform[10]; \n startingPlatform = new Platform();\n addObject (startingPlatform, 300, 550);\n // Loop through as many Meteors as there are on this level\n for (int i = 0; i < platforms.length; i++)\n {\n // Initialize a new Platform object for each spot in the array\n platforms[i] = new Platform ();\n // Add each platform at a random position anywhere on the X axis and at intervals of 15 on the Y axis\n addObject (platforms[i], Greenfoot.getRandomNumber(600), platformCounter);\n platformCounter = platformCounter - 55;\n }\n }", "public RenderEngine() {\n\t\twindow = Window.getInstance();\n\t\t\n\t\ttestEntity = new Entity(\"skull/skull.obj\", \"./res/models/skull/skull.png\", new Vector3f(0,0,0), new Vector3f(0,0,0));\n\t\ttestEntity.getWorldTransform().setScaling(new Vector3f(0.01f,0.01f,0.01f));\n\t\t\n\t\ttestEntity2 = new Entity(\"dummy/dummy.obj\", \"./res/models/dummy/dummy.jpg\", new Vector3f(0,8,0), new Vector3f(0,0,0));\n\t\ttestEntity2.getWorldTransform().setScaling(new Vector3f(0.05f,0.05f,0.05f));\n\t\t\n\t\ttestLight = new Light(new Vector3f(-5,5,-5), new Vector3f(1,1,1));\n\t\ttestLight.getWorldTransform().setScaling(new Vector3f(0.1f,0.1f,0.1f));\n\t\t\n\t\tsky = new SkyDome();\n\t\t\n\t}", "public Camera(CenteredRectangle rect, ScreenManager screenManager) throws SlickException\r\n {\r\n this.screenManager = screenManager;\r\n update(rect);\r\n this.setZoom(1);\r\n }", "protected WorldWindow createWorldWindow() {\n\t\treturn new WorldWindowGLJPanel();\r\n\t\t//return new WorldWindow();\r\n\t}", "public static void create() {\r\n render();\r\n }", "public OverworldScreen(Game game) {\n super(\"OverworldScreen\", game);\n\n mScreenViewport = new ScreenViewport(0, 0, mGame.getScreenWidth(),\n mGame.getScreenHeight());\n if (mScreenViewport.width > mScreenViewport.height)\n mLayerViewport = new LayerViewport(240.0f, 240.0f\n * mScreenViewport.height / mScreenViewport.width, 240,\n 240.0f * mScreenViewport.height / mScreenViewport.width);\n else\n mLayerViewport = new LayerViewport(240.0f * mScreenViewport.height\n / mScreenViewport.width, 240.0f, 240.0f\n * mScreenViewport.height / mScreenViewport.width, 240);\n\n // Load in the bitmaps used on the main menu screen\n AssetStore assetManager = mGame.getAssetManager();\n\n\n assetManager.loadAndAddBitmap(\"LocationArrow\", \"img/LocationArrow.png\");\n assetManager.loadAndAddBitmap(\"OverworldMap\", \"img/OverworldMap.png\");\n\n // Define the spacing that will be used to position the buttons\n int spacingX = game.getScreenWidth() / 5;\n int spacingY = game.getScreenHeight() / 3;\n\n mOverworldMap = new GameObject(LEVEL_WIDTH / 2.0f,\n LEVEL_HEIGHT / 2.0f, LEVEL_WIDTH, LEVEL_HEIGHT, getGame()\n .getAssetManager().getBitmap(\"OverworldMap\"), this);\n\n // Create the trigger buttons\n mLocationButton = new PushButton(\n spacingX * 1.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton1 = new PushButton(\n spacingX * 2.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton2 = new PushButton(\n spacingX * 3.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton3 = new PushButton(\n spacingX * 4.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n mLocationButton4 = new PushButton(\n spacingX * 5.0f, spacingY * 1.5f, spacingX*.16f, spacingY*0.1f, \"LocationArrow\", this);\n\n\n }", "public GameFrame(final World world) {\n this.world = world;\n }", "@Override\n public void create() {\n gameCamera = new OrthographicCamera();\n gameViewport = new ScreenViewport(gameCamera);\n gameViewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n gameViewport.apply();\n spriteBatch = new SpriteBatch();\n entities = new Array<Entity>();\n TextureAtlas textureAtlas = new TextureAtlas(Gdx.files.internal(\"Dialog Example.atlas\"));\n TextureRegion textureRegion = textureAtlas.findRegion(\"player\");\n entities.add(new PlayerEntity(textureRegion));\n \n //initialize UI related variables\n gamePaused = false;\n errorCount = 0;\n core = this;\n InputManager inputManager = new InputManager();\n \n skin = new Skin(Gdx.files.internal(\"Dialog Example.json\"));\n stage = new Stage(new ScreenViewport());\n Gdx.input.setInputProcessor(new InputMultiplexer(stage, inputManager));\n \n Table root = new Table();\n root.setFillParent(true);\n stage.addActor(root);\n \n Label label = new Label(\"Press R to login\", skin, \"red\");\n root.add(label).expand().top().left().pad(20.0f);\n }" ]
[ "0.76128536", "0.7235135", "0.71315", "0.69765204", "0.6964", "0.69638705", "0.68237406", "0.681198", "0.6784508", "0.6739683", "0.6692846", "0.6668073", "0.66468817", "0.66291517", "0.6626481", "0.6579421", "0.6520707", "0.6503499", "0.65008444", "0.6472235", "0.6471657", "0.6467042", "0.64324456", "0.6432235", "0.64232445", "0.6421828", "0.641986", "0.64027506", "0.6397836", "0.6372066", "0.6366816", "0.63457096", "0.6331803", "0.6306611", "0.630214", "0.6264596", "0.62599164", "0.62547684", "0.62514776", "0.62460417", "0.6242376", "0.6230697", "0.6222552", "0.62200403", "0.6214724", "0.61895823", "0.6170961", "0.61649615", "0.61633486", "0.6145214", "0.6133874", "0.6133475", "0.61177754", "0.61101025", "0.6108616", "0.6106035", "0.6095462", "0.6093735", "0.60902834", "0.6086814", "0.6081879", "0.60768425", "0.6061011", "0.60585165", "0.60537577", "0.6052595", "0.6043843", "0.60415447", "0.6031818", "0.6029159", "0.60249865", "0.60237455", "0.60235727", "0.60167307", "0.6010304", "0.6009336", "0.6006749", "0.6004929", "0.60029525", "0.59974915", "0.59848017", "0.5980502", "0.59801733", "0.5972476", "0.5971607", "0.5971515", "0.59712994", "0.59670514", "0.59653896", "0.59647125", "0.5960119", "0.59587294", "0.5953135", "0.59447813", "0.5938978", "0.59375453", "0.59345305", "0.5934344", "0.5934117", "0.5929735" ]
0.63469887
31
The main game loop.
public void render(float delta) { super.render(delta); world.update(); render.render(); /*if (firstUpdate) { render.resetCamera(); firstUpdate = false; }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mainLoop() {\r\n while (isRunning()) {\r\n update();\r\n }\r\n }", "public void run() {\n \twhile(true) {\n \t \tsetupGame();\n \tplayGame();\n \t}\n }", "public void run() \r\n {\r\n // get the instance of the graphics object\r\n Graphics g = getGraphics();\r\n\r\n // The main game loop\r\n while(true) \r\n {\r\n GameUpdate(); // update game\r\n GameDraw(g); // draw game\r\n } \r\n }", "public void run() {\n\t\tprepareVariables(true);\n\t\t\n\t\t// Prepares Map Tables for Song and Key Info.\n\t\tprepareTables();\n\t\t\n\t\t// Selects a Random Song.\n\t\tchooseSong(rgen.nextInt(0, songlist.size()-1));\n\t\t\n\t\t// Generates layout.\n\t\tgenerateLabels();\n\t\tgenerateLines();\n\t\t\n\t\t// Listeners\n\t\taddMouseListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t// Game Starts\n\t\tplayGame();\n\t}", "public void run() {\n addMouseListeners();\n playGame();\n }", "public void run()\n\t{\n\t\ttry \n\t\t{\n\t\t\twhile (lost != true)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t\twhile (view.getInGamePanel().getGameStart() == true)\n\t\t\t\t{\n\t\t\t\t\tloop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) \n\t\t{\n\t\t}\n\t}", "protected void gameLoop() {\r\n init();\r\n recalculateViewport();\r\n\r\n long lastTime, lastFPS;\r\n lastTime = lastFPS = System.nanoTime();\r\n currentFramesPerSecond = 0;\r\n\r\n while(!Display.isCloseRequested()) {\r\n long deltaTime = System.nanoTime() - lastTime;\r\n lastTime += deltaTime;\r\n\r\n if(Display.wasResized())\r\n recalculateViewport();\r\n EventManager.getEventManager().processEventQueue();\r\n InputManager.getInputManager().update();\r\n update(deltaTime / 1e9);\r\n\r\n render();\r\n Display.update();\r\n\r\n currentFramesPerSecond++;\r\n if(System.nanoTime() - lastFPS >= 1e9) {\r\n lastFPS += 1e9;\r\n if(displayFPS){\r\n System.out.println(currentFramesPerSecond);\r\n }\r\n context.fps = currentFramesPerSecond;\r\n currentFramesPerSecond = 0;\r\n }//End if\r\n Display.sync(fps);\r\n }//End while\r\n System.exit(0);\r\n }", "@Override\n /**\n * Runs the game loop\n */\n public final void run() {\n initialize();\n\n // Timing variables\n long accumulator = 0L;\n long lastTime = System.nanoTime();\n long startTime;\n\n // Main game loop\n while(isRunning) {\n // Get times\n startTime = System.nanoTime();\n accumulator += startTime - lastTime;\n lastTime = startTime;\n\n // Update while the elapsed time is greater than the time interval\n while(accumulator >= NS_PER_UPDATE) {\n accumulator -= NS_PER_UPDATE;\n updateGame();\n }\n\n // Render to the screen\n renderer.beginRender();\n renderGame();\n renderer.endRender();\n }\n\n // Clean up the game components here\n terminate();\n }", "public void run() {\n gameLogic = new GameLogic(drawManager.getGameFrame());\n long lastLoopTime = System.nanoTime();\n final int TARGET_FPS = 60;\n final long OPTIMAL_TIME = 1000000000 / TARGET_FPS;\n loop(lastLoopTime, OPTIMAL_TIME);\n }", "public void start() {\n\t\t// initialize stuff\n\t\tinitGL();\n\t\tinit();\n\t\t\n\t\t// main game loop\n\t\twhile (true) {\n\t\t\t// display the title screen\n\t\t\tshowTitleScreen();\n\t\t\t\n\t\t\twhile (!gameOver) {\n\t\t\t\tupdateDelta();\n\t\t\t\trender();\n\t\t\t\tpollInput();\n\t\t\t\tupdate();\n\t\t\t\tupdateDisplay();\n\t\t\t}\n\t\t\t// Game Over\n\t\t\ttry {\n\t\t\t\tThread.sleep(2500);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n initialize();\n float currentTime = System.nanoTime();\n float previousTime = currentTime;\n float dt = 0.0f;\n while (!exit) {\n currentTime = System.nanoTime();\n dt = Math.max((currentTime - previousTime) / 1000000.0f, 20.0f);\n input(win.getInputHandler(), dt);\n update(dt);\n render(dt);\n waitFPS();\n previousTime = currentTime;\n postOperation();\n }\n dispose();\n }", "@Override\n public void run() {\n try {\n init();\n gameLoop();\n } catch (LWJGLException lwjgle) {\n lwjgle.printStackTrace();\n } finally {\n cleanup();\n }\n\n System.exit(0);\n }", "public void run() { //this is the running method\n\t\twhile (running) {\n\t\t\t//System.out.println(\"Running...\"); //this is to show in the console that the game is running\n\t\t\t/**\n\t\t\t * use tick(); or update(); this just \n\t\t\t */\n\t\t\t\n\t\t\tupdate();\n\t\t\trender();\n\t\t}\n\t}", "public void run() {\n\t\t\n\t\t//* Initializing starting variables ** //\n\t\t\n\t\tturns = NTURNS;\n\t\tstartturn = true; \n\t\tgameover = false;\n\t\t\t\t\n\t\t//* setup game board** //\n\t\t\n\t\tturns--;\n\t\tsetupBricks();\n\t\tsetupPaddle();\n\t\tsetupScoreboard();\n\n\t\t\n\t\n\t\t//* play game** //\n\t\t\t\t\n\t\t\n\t\twhile (turns >= 0) {\n\t\t\t\n\t\t\tif (startturn == true) {\n\t\t\t\t// starttext = new GLabel(\"Click mouse to start turn\", WIDTH / 2, HEIGHT / 2);\n\t\t\t\t// add(starttext);\n\t\t\t\tupdateScoreboard();\n\t\t\t\tplayBall();\n\t\t\t\twaitForClick();\n\t\t\t\tstartturn = false;\n\t\t\t}\n\t\t\t\n\t\t\tcheckWalls();\n\t\t\tcheckCollision();\n\t\t\tmoveBall();\n\t\t\tcheckWin();\n\n\t\t}\n\t\tshowLose();\n\t\t\n\t}", "@Override\n public void run()\n {\n while (playing)\n {\n // Get the user inputs and update the game data\n update();\n // Draw it to the screen\n draw();\n // control the FPS\n control();\n\n }\n }", "public void run() {\n\t\t// Set the window to a nice size for our game\n\t\tsetSize(APPLICATION_WIDTH, APPLICATION_HEIGHT);\n\t\tdrawWall();\n\t\tGRect paddle = addPaddle();\n\t\tGOval ball = makeBall();\n\t\t//pause(500);\n\t\tbounceBall(ball);\n\t\tGObject collider = checkCollision(ball);\n\t\tif (collider == null) {\n\t\t\t//continue;\n\t\t}\n\t\telse if (collider == paddle) {\n\t\t\t\n\t\t}\n\t\telse if (collider == brick) {\n\t\t\tremove(brick);\n\t\t}\n\t\t\n\t}", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "private void loop() {\n\t\tFrameBuffer fb = new FrameBuffer();//TODO:\n\t\t\n\t\tif(active_console){\n\t\t\tconsole = new Console();\n\t\t\tThread c = new Thread(console);\n\t\t\tc.start();\n\t\t}\n\n\t\twhile ( !glfwWindowShouldClose(window) ) {\n\t\t\tglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer\n\t\t\t\n\t\t\tcam.update();\n\t\t\t\n\t\t\tfb.bind();//TODO:\n\t\t\tdraw();\n\t\t\tfb.rebind();//TODO:\n\t\t\t\n\t\t\tfb.render();//TODO:\n\t\t\t\n\t\t\tglfwSwapBuffers(window); // swap the color buffers\n\t\t\t\n\t\t\t// Poll for window events. The key callback above will only be\n\t\t\t// invoked during this call.\n\t\t\tglfwPollEvents();\n\t\t}\n\n\t\t//phisics.phisicsStop();\n\t\tif(active_console){\n\t\tconsole.consoleStop();\n\t\t}\n\t}", "public final void start() {\n logger.info(\"Application started.\");\n try {\n getAttributes();\n\n initSystem();\n\n assertDisplayCreated();\n\n timer = Timer.getTimer();\n \n initGame();\n\n //main loop\n while (!finished && !display.isClosing()) {\n //determine time elapsed since last frame\n updateTime();\n\n //handle input events prior to updating the scene\n // - some applications may want to put this into update of the game state\n InputSystem.update();\n\n //update game state, pass amount of elapsed time\n update(frametime);\n\n //render, do not use interpolation parameter\n render(-1.0f);\n\n //swap buffers\n display.getRenderer().displayBackBuffer();\n\n Thread.yield();\n }\n } catch (Throwable t) {\n logger.logp(Level.SEVERE, this.getClass().toString(), \"start()\", \"Exception in game loop\", t);\n } finally {\n cleanup();\n }\n logger.info(\"Application ending.\");\n\n if (display != null) {\n display.reset();\n }\n quit();\n }", "public void run() {\n\t\tlong lastLoopTime = System.nanoTime();\n\t\tfinal int TARGET_FPS = 60;\n\t\tfinal long OPTIMAL_TIME = 1000000000 / TARGET_FPS;\n\n\t\t// keep looping round til the game ends\n\t\twhile (true) {\n\t\t\t// work out how long its been since the last update, this\n\t\t\t// will be used to calculate how far the entities should\n\t\t\t// move this loop\n\t\t\tlong now = System.nanoTime();\n\t\t\tlong updateLength = now - lastLoopTime;\n\t\t\tlastLoopTime = now;\n\n\t\t\t// update the frame counter\n\t\t\tlastFpsTime += updateLength;\n\t\t\tfps++;\n\n\t\t\t// update our FPS counter if a second has passed since\n\t\t\t// we last recorded\n\t\t\tif (lastFpsTime >= 1000000000) {\n\t\t\t\tSystem.out.println(\"(FPS: \" + fps + \")\");\n\t\t\t\tlastFpsTime = 0;\n\t\t\t\tfps = 0;\n\t\t\t}\n\n\t\t\t// update the game logic\n\t\t\ttick();\n\n\t\t\t// render\n\t\t\tglWindow.display();\n\n\t\t\t// sleep the current thread for the appropriate amount of time\n\t\t\ttry {\n\t\t\t\tThread.sleep(Math.max(0, (lastLoopTime - System.nanoTime() + OPTIMAL_TIME) / 1000000));\n\t\t\t}\n\t\t\tcatch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }", "@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }", "public void start(){\n isRunning = true;\n\n // This is where the magic happens\n Thread loop = new Thread(){\n\t\t\tpublic void run(){\n\t\t final double targetHertz = 30; // target updates per second\n\t\t final double updateTime = 1e9 / targetHertz; // target time between updates\n\t\t final int maxUpdates = 5; // max updates before a render is forced\n\t\t \n\t\t final double targetFps = 60; // target frames per second (fps)\n\t\t final double renderTime = 1e9 / targetFps; // target time between renders\n\t\t \n\t\t double lastUpdate = System.nanoTime();\n\t\t double lastRender = System.nanoTime();\n\n\t\t while (isRunning){\n\t\t \tdouble now = System.nanoTime();\n\t\t \t\n\t\t \tint updates = 0;\n\t\t \twhile (now - lastUpdate > updateTime && updates < maxUpdates){ // Update the game as much as possible before drawing\n\t\t \t\tgamePanel.update();\n\t\t \t\tlastUpdate += updateTime;\n\t\t \t\tupdates++;\n\t\t \t}\n\t\t \t\n\t\t \tif (now - lastUpdate > updateTime){ // Compensate for really long updates\n\t\t \t\tlastUpdate = now - updateTime;\n\t\t \t}\n\t\t \t\n\t\t \t// Draw the game\n\t\t \tgamePanel.repaint();\n\t\t \tlastRender = now;\n\t\t \t\n\t\t \t// kill some time until next draw\n\t\t \t\n\t\t \twhile (now - lastRender < renderTime && now - lastUpdate < updateTime){\n\t\t \t\tThread.yield();\n\t\t \t\t\n\t\t \t\ttry { Thread.sleep(1);} catch (Exception e) { }\n\t\t \t\t\n\t\t \t\tnow = System.nanoTime();\n\t\t \t}\n\t\t }\n\t\t\t}\n\t\t};\n\t\tloop.start();\n }", "@Override\n\tpublic void run() {\n\t\tgameImpl.render();\n\t\tgameImpl.update();\n\t}", "private void loop() {\r\n\t\tfloat elapsed;\r\n\t\tfloat accumulated = 0f;\r\n\t\tfloat interval = 1f / TARGET_UPS;\r\n\t\tdouble time;\r\n\t\tdouble lastCall = System.nanoTime();\r\n\t\t\r\n\t\trunning = true;\r\n\t\t//loop while running and the window hasn't received a close command\r\n\t\twhile (running) {\r\n\t\t\ttime = System.nanoTime();\r\n\t\t\t\r\n\t\t\telapsed = (float) ((time-lastCall) / 1e9);\r\n\t\t\tlastCall = time;\r\n\t\t\t\r\n\t\t\taccumulated += elapsed;\r\n\t\t\t\r\n\t\t\twhile (accumulated >= interval) {\r\n\t\t\t\tupdate();\r\n\t\t\t\taccumulated -= interval;\r\n\t\t\t}\r\n\t\t\t//render once per loop, then wait until the render time slot is over before restarting\r\n\t\t\tgame.render();\r\n\t\t\tsync(lastCall/1e9);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n //Runs the game. Contains the overall game loop\n public void run() {\n Pool.initializePool();\n //Initialize the game\n initializeGame();\n \n //Main game loop\n while (true) {\n //Sequence of evaluating for each bird its coordinate as well as the\n //next tube's, updates the game by detecting collisions and if the bird\n //should flap, and learns by determining the fitness of the best bird. \n eval();\n update();\n learn();\n\n //Redraws the game\n repaint();\n \n //Adjusts the speed of the game by reducing the sleeptime. Adjusted if \n //user clicks mouse button\n try {\n if(!speedUp)\n Thread.sleep(20L);\n else\n Thread.sleep(2L);\n } catch (final InterruptedException e) {\n }\n }\n }", "public void runGame()\r\n\t{\r\n\t\tmainFrame.runGame();\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\tif (mGame == null) {\r\n\t\t\tmGame = new GameOfLife();\r\n\t\t\tmGame.createGame();\r\n\t\t}\r\n\r\n\t\t// Constantly loop the game.\r\n\t\twhile (true) {\r\n\t\t\tmGame.repaint();\r\n\t\t\t// Sleep method to artificially slow down the games looping.\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(mDelayTime);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// Update game.\r\n\t\t\tmGame.update();\r\n\t\t}\r\n\r\n\t}", "public void run(){\n\t\twhile(game_running){\n\t\t\tif(singleplayer){\n\t\t\t\tcomputeDelta(); //Zeit für vorausgehenden Schleifendurchlauf wird errechnet\n\t\t\t\t//Erst Methoden abarbeiten, wenn Spiel gestartet ist\n\t\t\t\tif(isStarted()){\n\t\t\t\t\t\n\t\t\t\t\tcheckKeys(); //Tastaturabfrage\n\t\t\t\t\tdoLogic(); //Ausführung der Logik\n\t\t\t\t\tmoveObjects(); //Bewegen von Objekten\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\trepaint();\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tif(System.nanoTime()-last < 16666666){\n\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000); //Zum flüssigen Spiellauf und stabiler FPS-Rate\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}catch (InterruptedException e){}\n\t\t\t} else{\n\t\t\t\tif(serverMode){\n\t\t\t\t\t //Zeit für vorausgehenden Schleifendurchlauf wird errechnet\n\t\t\t\t\t//Erst Methoden abarbeiten, wenn Spiel gestartet ist\n\t\t\t\t\tcomputeDelta();\n\t\t\t\t\tif(isStarted()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckKeys(); //Tastaturabfrage\n\t\t\t\t\t\tdoLogic(); //Ausführung der Logik\n\t\t\t\t\t\tmoveObjects(); //Bewegen von Objekten\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\trepaint();\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(System.nanoTime() - last);\n\t\t\t\t\ttry{\n\t\t\t\t\t\tif(!isStarted()){\n\t\t\t\t\t\t\tThread.sleep(20);\n\t\t\t\t\t\t}else if(System.nanoTime()-last < 16666666){\n\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tif(System.nanoTime()-last < 16666666){\n//\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000); //Zum flüssigen Spiellauf und stabiler FPS-Rate\n//\t\t\t\t\t\t}\n\t\t\t\t\t}catch (InterruptedException e){}\n\t\t\t\t}else if(clientMode){\n\t\t\t\t\tcomputeDelta();\n\t\t\t\t\tif(isStarted()){\n\t\t\t\t\t\tcheckKeys();\n\t\t\t\t\t\tdoLogic();\n\t\t\t\t\t\tmoveObjects();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\trepaint();\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(System.nanoTime() - last);\n\t\t\t\t\ttry{\n\t\t\t\t\t\t//Thread.sleep(20);\n\t\t\t\t\t\tif(!isStarted()){\n\t\t\t\t\t\t\tThread.sleep(20);\n\t\t\t\t\t\t}else if(System.nanoTime()-last < 16666666){\n\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tif(System.nanoTime()-last < 16666666){\n//\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000); //Zum flüssigen Spiellauf und stabiler FPS-Rate\n//\t\t\t\t\t\t}\n\t\t\t\t\t}catch (InterruptedException e){}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\n\t}", "public static void main(String[] args) {\n // TODO code application logic here\n //play();//This method will start the 20 minute battle scene music\n gameplay = true;\n while(gameplay) {\n /*#extra credit made a separate class and music selector below:*/\n Luong_7_audioclass pl = new Luong_7_audioclass();//this is how to use classes, pl._ to start the methods\n pl.soundsystem_commands();//this is the object used to call upon the public method sound system\n intro();//starts the game \n } \n }", "public static void main(String[] args) {\n\t\tJFrame frame = new JFrame(\"TDGame\"); //Create a JFrame Object and set its options\n\t\tframe.setSize(960, 640);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\t\n\t\tlong curTime = System.currentTimeMillis();\n\t\t\n\t\tGameComponent game = new GameComponent(curTime);\n\t\t\n\t\tframe.addMouseListener(game);\n\t\tframe.add(game);\n\t\tframe.setVisible(true);\n\t\t\n\t\twhile(true) {\n\t\t\tcurTime = System.currentTimeMillis();\n\t\t\tgame.update(curTime);\n\t\t\t\n\t\t\tframe.repaint();\n\t\t\ttry {\n\t\t\t\tThread.sleep((long) DELAY);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void mainGameLoop(GraphicsContext gc, Scene scene) {\n if (isGameOver()) {\n resetGame();\n initGame();\n return;\n }\n renderGame(gc, scene);\n renderGameScore(gc);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\twhile(true){\n\t\t\t\t\t\n\t\t\t\t\tlong time = System.currentTimeMillis();\n\t\t\t\t\tgameLoop();\n\t\t\t\t\t\n\t\t\t\t\tlong waitTime = 100 - time;\n\t\t\t\t\t\n\t\t\t\t\tif(waitTime < 10){\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitTime = 10;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(waitTime);\n\t\t\t\t\t} catch (InterruptedException 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}", "private void loop() {\n\t\tGL.createCapabilities();\n\n\t\t// Run the rendering loop until the user has attempted to close\n\t\t// the window or has pressed the ESCAPE key.\n\t\tlong lastTime = System.nanoTime();\n\t\tdouble delta = 0.0f;\n\t\tdouble ns = 1000000000.0 / 60;\n\t\tlong timer = System.currentTimeMillis();\n\t\tint updates = 0;\n\t\tint frames = 0;\n\t\twhile ( !glfwWindowShouldClose(window) ) {\n\t\t\tlong now = System.nanoTime();\n\t\t\tdelta += (now - lastTime)/ns;\n\t\t\tlastTime = now;\n\t\t\tif(delta >= 1.0) {\n\t\t\tupdate();\n\t\t\tupdates++;\n\t\t\t\n\t\t\t}\n\t\t\trender();\n\t\t\tframes++;\n\t\t\tif(System.currentTimeMillis()-timer > 1000) {\n\t\t\t\ttimer += 1000;\n\t\t\t\tSystem.out.println(updates + \"ups, \" + frames + \" fps\");\n\t\t\t\tupdates =0;\n\t\t\t\tframes=0;\n\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\ttry {\n\t\t\tplayTheGame();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exiting the game Due to Error\" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void gameLoop() {\n Gdx.gl.glClearColor(Constants.BACKGROUND_COLOR_R,\n Constants.BACKGROUND_COLOR_G,\n Constants.BACKGROUND_COLOR_B,\n 1.0f);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n this.moveToken();\n\n this.mStage.draw();\n }", "private void gameLoop() {\n float elapsedTime;\n float accumulator = 0f;\n float interval = 1.0f/TARGET_UPS;\n\n while(!window.shouldClose()) {\n elapsedTime = Math.min(0.25f, updateTimer.getElapsedTimeAndUpdate());\n accumulator += elapsedTime;\n\n //Get any input\n\n //Calculate updates in the scene\n while(accumulator >= interval) {\n update();\n accumulator -= interval;\n }\n\n interpolationFactor = accumulator/interval;\n render();\n\n if (!window.optionIsTurnedOn(Window.Options.ENABLE_VSYNC)) {\n sync();\n }\n }\n }", "@Override\n\tpublic void gameLoop() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tLabyrinthMap map = getLabyrinthMap();\n\t\tDirection d;\n\t\twhile (!map.isDone()) {\n\t\t\trenderManager.render(map);\n\t\t\td = readDirectionFromKeyboard(scanner);\n\t\t\tmap.updateMap(d);\n\t\t}\n\t\tSystem.out.println(\"Labirinto Finalizado!\");\n\t}", "public void run() {\r\n\t\twhile (true) {\r\n\t\t\t// check if no menu is loaded\r\n\t\t\tif (menu == null) {\r\n\t\t\t\tif (!player.checkIfAlive()) { // if player is dead\r\n\t\t\t\t\tplayer.onDeath();\r\n\t\t\t\t}\r\n\t\t\t\tif (!level.isLoading) // prevent update while rendering\r\n\t\t\t\t\tupdate(); // only update level after loading finishes\r\n\t\t\t\trender();\r\n\t\t\t\tdraw();\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(CosmosConstants.period);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Loading screen default sleep time\r\n\t\t\t\tif (level.isLoading) {\r\n\t\t\t\t\tif (level.isOnLoadFinished) {\r\n\t\t\t\t\t\tlevel.isLoading = false;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * Wait a minimum of 2 seconds before displaying the\r\n\t\t\t\t\t\t\t * level\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else { // when menu is loaded\r\n\t\t\t\tif (level != null)\r\n\t\t\t\t\tlevel.bg_sound.stopSound();\r\n\t\t\t\tlevel = null;\r\n\t\t\t\trender();\r\n\t\t\t\tdraw();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(CosmosConstants.period);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n init();\n\n //take input from the players before starting the game\n input();\n\n //the gameplay begins from here\n System.out.println();\n System.out.println();\n System.out.println(\"***** Game starts *****\");\n play();\n }", "public void run() { \n while(true) {\n if(!isFirst && health > 0 && state == STATE.GAME) {\n \tmanager.physic(); // Calculates the targeting and shooting of towers\n \tenemyCreator(); // Creates enemies\n \tfor(int i= 0; i < enemies.length; i++) {\n \t\tif(enemies[i].isAlive) {\n \t\t\tenemies[i].move(); // Moves the enemies if alive\n \t\t}\n \t}\n }\n else if(health < 1) { // If the user lost\n \tfor(int i = 0; i < enemies.length; i++)\n \t\tenemies[i].deleteEnemy(); // Deletes all enemies on the screen\n \t\n \tif(isFirstAfterLoss){\n \t\tCheckScore();// Checks if there is a high score\n \t\tisFirstAfterLoss = false;\n \t\tsave.writeHighScore(); // Writes high score info to text file\n \t}\n \tstate = STATE.POSTGAME; // Sets the state to postgame \t\n }\n \t\n \n repaint();// Calls the paint method\n \n try {\n Thread.sleep(1);// Delay\n } \n catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }\n }", "public void loop() {\n\t\tloop(1.0f, 1.0f);\n\t}", "@Override\n\tpublic void run() {\n\t\ttry{\n\t\t\tThread.sleep(100);\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\t\n\t\t}\n\t\t\n\t\t//run the game loop\n\t\twhile(true){\n\t\t\t//allows for smooth motion of the game\n\t\t\ttry{\n\t\t\t\tThread.sleep(8);\n\t\t\t}\n\t\t\tcatch(InterruptedException e){\n\t\t\t\t\n\t\t\t}\n\t\t\tmoveBall();\n\t\t\tmovePlayer(1);\n\t\t\tmovePlayer(2);\n\t\t}\n\t}", "public void run (){\n\t\t\t\t\t\t\t\t\tgame.setScreen(game.ui);\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\n\t\t\t\t\t\t\t\t}", "public void run()\n {\n \t\n //Create and set up the window.\n frame = new JFrame(\"Boggle\");\n //Have the program exit when the user clicks [X]\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create the GUI components\n guiSetup(frame.getContentPane());\n \n //Create the timer for the game\n t = new GameTimer();\n\n //Display the window.\n frame.setVisible( true );\n frame.setSize( 800, 600 );\n frame.setResizable( false );\n \n //Start the game timer\n t.setTime();\n }", "public static void main(String[] args) throws InterruptedException {\n runGame();\n System.out.println(\"Game has finished\");\n\n }", "@Override\n public void run() {\n Platform.runLater(() -> {\n game().tick();\n });\n }", "public void run()\n\t{\n\t\tfloat oneFrame = 1000000000.0f / gameFPS;\n\t\t//same but for animation frames\n\t\tfloat oneAnimFrame = 1000000000.0f / animFPS;\n\t\t//current time in nanoseconds\n\t\tlong now = 0;\n\t\t//holds time of last iteration of game loop\n\t\tlong last = System.nanoTime();\n\t\t//how many frames have passed (can be a fraction)\n\t\tfloat delta = 0;\n\t\t//same but for anim frames\n\t\tfloat animDelta = 0;\n\t\t\n\t\t//for counting and displaying only \n\t\tint countFrames = 0;\n\t\tlong lastMilli = System.currentTimeMillis();\n\t\t\n\t\trequestFocus();\n\t\t//game loop\n\t\twhile (playing)\n\t\t{\n\t\t\t\n\t\t\tnow = System.nanoTime();\n\t\t\t//(now - last) time elapsed, divided by oneFrame gives\n\t\t\t//what fraction of a frame has passed\n\t\t\tdelta += (now - last) / oneFrame;\n\t\t\tanimDelta += (now - last) / oneAnimFrame;\n\t\t\tlast = now;\n\t\t\t//keep calling tick for as many frames have passed\n\t\t\t//if it's at least 1\n\t\t\tif (delta >= 1.0f)\n\t\t\t{\n\t\t\t\tcountFrames++;\n\t\t\t\twhile (delta >= 1.0f)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\ttick();\n\t\t\t\t\tdelta--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (animDelta >= 1.0f)\n\t\t\t{\n\t\t\t\twhile (animDelta >= 1.0f)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tanimTick();\n\t\t\t\t\tanimDelta--;\n\t\t\t\t}\n\t\t\t}\n\t\t\trender();\n\t\t\tcountFrames++;\n\t\t\tif (Math.abs(System.currentTimeMillis() - lastMilli) >= 1000)\n\t\t\t{\n\t\t\t\tFPS = countFrames;\n\t\t\t\tcountFrames = 0;\n\t\t\t\tlastMilli = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\t}", "public void mainloop(){\n\t\t\twhile(!lost){\r\n\t\t\t\t//Pacman will only turn at closest opening\r\n\t\t\t\tif(nextTurn.equals(\"up\")){\r\n\t\t\t\t\tTurn(\"up\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(nextTurn.equals(\"down\")){\r\n\t\t\t\t\tTurn(\"down\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(nextTurn.equals(\"right\")){\r\n\t\t\t\t\tTurn(\"right\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(nextTurn.equals(\"left\")){\r\n\t\t\t\t\tTurn(\"left\");\r\n\t\t\t\t}\r\n\t\t\t\t//if no walls in front of pacman\r\n\t\t\t\tif(!checkWallCollision()){\r\n\t\t\t\t\tpacman.move();\r\n\t\t\t\t\tcheckGame();\r\n\t\t\t\t\tchangeIcon();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcheckGame();\r\n\t\t\t\tg1.move();\r\n\t\t\t\tg2.move();\r\n\t\t\t\tg3.move();\r\n\t\t\t\tg1.sprite.setLocation(g1.xpos, g1.ypos);\r\n\t\t\t\tg2.sprite.setLocation(g2.xpos, g2.ypos);\r\n\t\t\t\tg3.sprite.setLocation(g3.xpos, g3.ypos);\r\n\t\t\t\t\r\n\t\t\t\tcheckFoodCollision();\r\n\t\t\t\tpacmansprite.setLocation(pacman.xpos, pacman.ypos);\r\n\t\t\t\t\r\n\t\t\t\t//System.out.println(\"x:\"+pacman.xpos+\" y:\"+pacman.ypos);\r\n\t\t\t\t//pause the game for 0.01 seconds so pacman moves smoothly \r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(10);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tcheckwarp();\r\n\t\t\t}\r\n\t}", "@Override public void loop() {\n }", "public void run() {\r\n this.createBallsOnTopOfPaddle();\r\n this.running = true;\r\n this.runner.run(new CountdownAnimation(2, 3, sprites));\r\n this.runner.run(this);\r\n }", "private void loop() {\n GLCapabilities capabilities = GL.createCapabilities();\n\n // Set the clear color\n screen.setWindow(this);\n screen.init();\n\n // Run the rendering loop until the user has attempted to close\n // the window or has pressed the ESCAPE key.\n long before = System.currentTimeMillis() - 1;\n while (glfwWindowShouldClose(windowID) != GL11.GL_TRUE) {\n float secs = (System.currentTimeMillis() - before) / 1000f;\n before = System.currentTimeMillis() - 1;\n screen.update(secs);\n screen.draw();\n\n keyboard.update();\n mouse.update();\n\n glfwSwapBuffers(windowID);\n glfwPollEvents();\n }\n\n screen.close();\n }", "public static void main(String[] args){\n GameFrame frame = new GameFrame(1);\n frame.run();\n }", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new Game());\n }", "private void gameLoop() {\n\n looping = true;\n long lastTime = System.currentTimeMillis();\n while (looping) {\n long delta = System.currentTimeMillis() - lastTime;\n if (delta >= 1000/60d) {\n view.render();\n game.update(delta);\n lastTime = System.currentTimeMillis();\n }\n }\n }", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\t// program loop\n\t\t\trender();\n\t\t\tif (tim.shouldCallHome()) {\n\t\t\t\t// check in with server and reset the timer so that it doesn't\n\t\t\t\t// check in until we need to\n\t\t\t\tnew Thread(Main.checkinRunnable).start();\n\t\t\t\ttim.resetCallHome();\n\t\t\t}\n\t\t\t// System.out.println(tim.getTime());\n\t\t}\n\n\t}", "@Override\n public void run() {\n long previousTime = System.currentTimeMillis();\n long timeSinceLastTick = 0L;\n long timeSinceLastDisplayFrame = 0L;\n\n final double millisecondsPerDisplayFrame = 1000.0 / DISPLAY_FPS;\n\n while (this.game.isRunning() && !this.game.isGameOver()) {\n long currentTime = System.currentTimeMillis();\n long elapsedTime = currentTime - previousTime;\n timeSinceLastTick += elapsedTime;\n timeSinceLastDisplayFrame += elapsedTime;\n\n if (timeSinceLastTick >= MILLISECONDS_PER_TICK) { // Check if enough time has passed to update the physics.\n this.updatePhysics(); // Perform one 'step' in the game.\n timeSinceLastTick = 0L;\n }\n if (timeSinceLastDisplayFrame >= millisecondsPerDisplayFrame) { // Check if enough time has passed to refresh the display.\n this.game.notifyListeners(timeSinceLastTick); // Tell the asteroids panel that it should refresh.\n timeSinceLastDisplayFrame = 0L;\n }\n\n previousTime = currentTime;\n }\n }", "public void game(){\n gameMusic.loop(pitch, volume);\n }", "public void loop(){\n\t\t\n\t}", "public static void main(String[] args) {\n game();\n }", "public static void main(String[] args) {\n Model model = new Model();\n View view = new View(model);\n Controller controller = new Controller(model, view);\n\n /*main program (each loop):\n -player token gets set\n -game status gets shown visually and user input gets requested\n -game grid gets updated\n -if the game is determined: messages gets shown and a system exit gets called*/\n while (model.turnCounter < 10) {\n model.setToken();\n view.IO();\n controller.update();\n if (controller.checker()){\n System.out.println(\"player \" + model.playerToken + \" won!\");\n System.exit(1);\n }\n System.out.println(\"draw\");\n }\n }", "public static void main(String[] args) {\n MainGameClass mg=new MainGameClass();\n mg.start();\n \n \n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void run() {\n\t\tball1 = new Ball(getWidth(), getHeight());\n\t\tball2 = new Ball(getWidth(), getHeight());\n\t\tball3 = new Ball(getWidth(), getHeight());\n\t\twhile (true)\t{\t\n\t\t\tball1.heartbeat(getWidth(), getHeight());\n\t\t\tball2.heartbeat(getWidth(), getHeight());\n\t\t\tball3.heartbeat(getWidth(), getHeight());\n\t\t\tpause(DELAY);\n\t\t}\t\t\n\t}", "@Override\n public void loop()\n {\n }", "public void run(){\n resetGame();\n this.addMouseListener(this);\n this.addMouseMotionListener(this);\n\n waitForClick();\n runOneGame();\n waitForClick();\n runOneGame();\n waitForClick();\n runOneGame();\n\n if(brickManager.getNumberOfBricks() > 0){\n System.out.println(\"You lost :(\");\n }\n\n else if(brickManager.getNumberOfBricks() == 0){\n System.out.println(\"You won!\");\n }\n\n getWindowFrame().dispose();\n\n }", "@Override\r\n\tpublic void run() {\n\t\twhile (running) {\r\n\t\t\ttry {\r\n\t\t\tThread.sleep(INTERVAL);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\tLog.e(\"Jogo\", \"GameLoop Finalizado!\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t\t}\r\n\t\t\r\n\t}", "public static void main(String args[]) {\n (new Game()).play();\n }", "public static void main(String[] args){\n Executor game = new Executor();\n\n System.out.println();\n System.out.println();\n game.introduction();\n\n while (! game.gameOver){\n game.day();\n\n if (! game.gameOver){\n wait(2000);\n game.endOfDay();\n }\n\n }\n\n }", "public void loop(){\n\t}", "public ConsoleGame() {\n\t\tSystem.out.println(\"Welcome to Quoridor!\");\n\t\twhile (!setUp());\n\t}", "private void gameLoop() {\n\n\t\tlong elapsedTime = 0;\n\t\tlong newTime;\n\t\tlong oldTime = System.nanoTime();\n\t\tlong expectedTime = 1000000000 / 60;\n\t\tdouble delta;\n\n\t\tint frames = 0;\n\t\tlong frameTimer = 0;\n\n\t\twhile (!Display.isCloseRequested() && !gameOver) {\n\n\t\t\t// get new time, find elapsed time, determine delta\n\t\t\tnewTime = System.nanoTime();\n\t\t\telapsedTime = newTime - oldTime;\n\t\t\tdelta = (double)elapsedTime / (double)expectedTime;\n\t\t\toldTime = newTime;\n\n\t\t\t// update frame count\n\t\t\tframes++;\n\t\t\tframeTimer += elapsedTime;\n\n\t\t\t// if a second has passed, print the fps\n\t\t\tif (frameTimer >= 1000000000) {\n\t\t\t\tSystem.out.println(\"FPS: \" + frames);\n\t\t\t\tSystem.out.println(delta);\n\t\t\t\tframeTimer = Math.max(0, frameTimer - 1000000000);\n\t\t\t\tframes = 0;\n\t\t\t}\n\n\t\t\t// update game state\n\t\t\tsoundManager.update();\n\t\t\tstateManager.update(delta);\n\t\t\tstateManager.render();\n\t\t\tgui.update();\n\t\t\tDisplay.update();\t\n\n\t\t\t// sleep until 1/60 of a second has passed\n\t\t\tif (newTime - oldTime < expectedTime) {\n\n\t\t\t\twhile (newTime - oldTime < expectedTime) {\n\n\t\t\t\t\tnewTime = System.nanoTime();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(0);\n\t\t\t\t\t} catch (InterruptedException e) { } \n\n\t\t\t\t} \n\t\t\t}\n\t\t\telse {\n\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(0);\n\t\t\t\t} catch (InterruptedException e) { }\n\t\t\t}\n\n\t\t}\n\t}", "public void gameLoop() {\r\n // make the whites of the eyes move from side to side\r\n if (whiteRight == 210){\r\n whiteRight += 20;\r\n }\r\n else if (whiteRight == 230){\r\n whiteRight -= 30;\r\n }\r\n else if (whiteRight == 200){\r\n whiteRight += 10;\r\n }\r\n if (whiteLeft == 350){\r\n whiteLeft += 20;\r\n }\r\n else if (whiteLeft == 370){\r\n whiteLeft -= 30;\r\n }\r\n else if (whiteLeft == 340){\r\n whiteLeft += 10;\r\n }\r\n // make the eyebrows move up and down\r\n if (eyebrowMove == 150){\r\n eyebrowMove -= 100;\r\n }\r\n else if (eyebrowMove == 50){\r\n eyebrowMove += 100;\r\n }\r\n // make the mustache move up and down\r\n if (mustache == 590){\r\n mustache +=20;\r\n }\r\n else if (mustache == 610){\r\n mustache -=40;\r\n }\r\n else if (mustache == 570){\r\n mustache +=20;\r\n }\r\n // make the tongue move up and down\r\n if (tongue == 700){\r\n tongue += 15;\r\n }\r\n else if (tongue == 715){\r\n tongue -= 15;\r\n }\r\n }", "public void loop(){\n \n \n }", "@Override\n public void loop() {\n\n }", "@Override\n public void loop() {\n\n }", "public static void run()\r\n\t{\r\n\t\tlong lastTime = System.nanoTime();\r\n\t\tdouble nsPerTick = 1000000000D / 30D;\r\n\t\t\r\n\t\tlong lastTimer = System.currentTimeMillis();\r\n\t\tdouble delta = 0; \r\n\r\n\t\twhile(isRunning)\r\n\t\t{\r\n\t\t\tlong now = System.nanoTime();\r\n\t\t\tdelta += (now - lastTime) / nsPerTick;\r\n\t\t\tlastTime = now;\r\n\t\t\t\r\n\t\t\twhile(delta >= 1)\r\n\t\t\t{\r\n\t\t\t\tdisplay.update();\r\n\t\t\t\tdisplay.render();\r\n\t\t\t\tdelta -= 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(System.currentTimeMillis() - lastTimer > 1000)\r\n\t\t\t{\r\n\t\t\t\tlastTimer += 1000;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override public void loop () {\n }", "public GameLoop()\n\t{\n\t\t/*\n\t\t * System.out.println(\"created game loop\");\n\t\t \n\t\t\n\t\tthis.setBackground(backGroundColor);\n\t\tthis.setVisible(true);\n\t\tthis.setOpaque(true);\n\t\tthis.setSize(new Dimension(1283,1038));\n\t}\n\t\n\tpublic void paintComponent(Graphics g)\n\t{\n\t\tSystem.out.println(\"drawing game area\");\n\t\t\n\t\tg.setColor(backGroundColor);\n\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\n\t\t\n\t\tg.setColor(textColor);\n\t\t\n\t\tg.drawLine(25, 50, 25, 550);\n\t\tg.drawLine(400, 50, 400, 550);\n\t\tg.drawLine(775, 50, 775, 550);\n\t\t\n\t\tg.drawLine(25, 50, 775, 50);\n\t\tg.drawLine(25, 550, 775, 550);\n\t\t\n\t\t//g.drawLine(0, 0, 800, 600);\n\t\t\n\t\t\n\t\t\n\t}\n\n\t@Override\n\tpublic void run() \n\t{\n\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\n\t\t\n\t\twhile(true)\n\t\t{\n\t\t\n\t\t\ttry\n\t\t {\n\t\t Thread.sleep (sleepTime);\n\t\t }\n\t\t catch (InterruptedException ex){}\n\t\t\t\n\t\t\tThread.currentThread().setPriority(Thread.MAX_PRIORITY);\n\t\t}\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}\n\t*/\n\t\t\n\t\t\n\t\t//This Code is currently not in use!!!\n}", "public void run() {\n // Create a drawing canvas.\n Canvas canvas = new Canvas(width, height);\n\n // Create a KeyboardObserver object and start it.\n KeyboardObserver keyboardObserver = new KeyboardObserver();\n keyboardObserver.start();\n\n // The game continues as long as the ship is alive\n while (ship.isAlive()) {\n // Does the observer have any key events?\n if (keyboardObserver.hasKeyEvents()) {\n KeyEvent event = keyboardObserver.getEventFromTop();\n // If \"left arrow\", then move the game piece to the left\n System.out.print(event.getKeyCode());\n if (event.getKeyCode() == KeyEvent.VK_LEFT)\n ship.moveLeft();\n // If \"right arrow\", then move the game piece to the right\n else if (event.getKeyCode() == KeyEvent.VK_RIGHT)\n ship.moveRight();\n // If \"space\", then launch a ball\n else if (event.getKeyCode() == KeyEvent.VK_SPACE)\n ship.fire();\n }\n\n // Move all of the objects in the game\n moveAllItems();\n\n // Detect collisions\n checkBombs();\n checkRockets();\n // Remove dead objects from the list\n removeDead();\n\n // Create a UFO (once in every 10 calls)\n createUfo();\n\n // Draw all the objects on the canvas and display the canvas on the screen\n canvas.clear();\n draw(canvas);\n canvas.print();\n\n // Pause 300 milliseconds\n Space.sleep(300);\n }\n\n // Display \"Game Over\"\n System.out.println(\"Game Over!\");\n }", "public void run() {\n // Used to keep track of time used to draw and update the game\n // This is used to limit the framerate later on\n long startTime;\n long deltaTime;\n\n preSetup();\n\n // the main game loop section\n // game will end if you set done = false;\n boolean done = false;\n while (!done) {\n // determines when we started so we can keep a framerate\n startTime = System.currentTimeMillis();\n\n // all your game rules and move is done in here\n // GAME LOGIC STARTS HERE\n \n // PLAYER 1 CONTROLS\n if(right1){\n maxDX = 3;\n }else if(left1){\n maxDX = -3;\n }else{\n maxDX = 0;\n }\n \n if(up1){\n maxDY = 3;\n }else if(down1){\n maxDY = -3;\n }else{\n maxDY = 0;\n }\n \n // PLAYER 2 CONTROLS\n if(right2){\n tobyDX = 3;\n }else if(left2){\n tobyDX = -3;\n }else{\n tobyDX = 0;\n }\n \n if(up2){\n tobyDY = 3;\n }else if(down2){\n tobyDY = -3;\n }else{\n tobyDY = 0;\n }\n \n \n \n // jump\n //if(onGround && jump){\n // do something about jumping\n // big negative to start moving\n // playerDY = -15;\n // not on ground anymore \n // onGround = false;\n // }\n \n // apply gravity\n //playerDY = playerDY + gravity;\n \n // update the player 1\n max.x = max.x + maxDX;\n max.y = max.y + maxDY;\n \n // update the player 2\n toby.x = toby.x + tobyDX;\n toby.y = toby.y + tobyDY;\n \n // assume not standing on anything\n //onGround = false;\n // check for collisions\n // go through every block and check with loop\n \n // Player 1 Collision\n for(int i = 0; i < blocks.length; i++){\n //did the player hit a block?\n if(max.intersects(blocks[i])){\n int cHeight = Math.min(blocks[i].y + blocks[i].height, max.y + max.height) - Math.max(blocks[i].y, max.y);\n int cWidth = Math.min(blocks[i].x + blocks[i].width, max.x + max.width) - Math.max(blocks[i].x, max.x);\n \n // determine the smaller one to find\n if(cWidth < cHeight){\n // fix the width\n // player on left side\n if(max.x < blocks[i].x){\n max.x = max.x - cWidth;\n }else{\n max.x = max.x + cWidth;\n }\n // stop the player moving sideways\n maxDX = 0;\n }else{\n // above the block\n if(max.y < blocks[i].y){\n max.y = max.y - cHeight;\n \n // moving up or down?\n if(maxDY >= 0){\n // stop the down motion\n maxDY = 0;\n // standing on ground\n //onGround = true;\n }\n \n }else{\n // below the block\n max.y = max.y + cHeight;\n }\n }\n }\n }\n \n // Player 1 flag collision\n for(int i = 0; i < flag.length; i++){\n //did the player hit a block?\n if(max.intersects(flag[i])){\n maxScore++;\n flag[0] = new Rectangle((int)(Math.random()*((WIDTH - 40) - 40 + 1)) + 40, (int)(Math.random()*((HEIGHT - 40) - 40 + 1)) + 40, 35, 26);\n flagPole[0] = new Rectangle(flag[0].x, flag[0].y, 4, 45);\n flagLogo[0] = new Rectangle(flag[0].x + 15, flag[0].y + (13/2), 20, 15);\n }\n }\n \n \n // Player 2 collison\n for(int i = 0; i < blocks.length; i++){\n //did the player hit a block?\n if(toby.intersects(blocks[i])){\n int cHeight = Math.min(blocks[i].y + blocks[i].height, toby.y + toby.height) - Math.max(blocks[i].y, toby.y);\n int cWidth = Math.min(blocks[i].x + blocks[i].width, toby.x + toby.width) - Math.max(blocks[i].x, toby.x);\n \n // determine the smaller one to find\n if(cWidth < cHeight){\n // fix the width\n // player on left side\n if(toby.x < blocks[i].x){\n toby.x = toby.x - cWidth;\n }else{\n toby.x = toby.x + cWidth;\n }\n // stop the player moving sideways\n tobyDX = 0;\n }else{\n // above the block\n if(toby.y < blocks[i].y){\n toby.y = toby.y - cHeight;\n \n // moving up or down?\n if(tobyDY >= 0){\n // stop the down motion\n tobyDY = 0;\n // standing on ground\n //onGround = true;\n }\n \n }else{\n // below the block\n toby.y = toby.y + cHeight;\n }\n }\n }\n }\n \n // Player 2 flag collision\n for(int i = 0; i < flag.length; i++){\n //did the player hit a block?\n if(toby.intersects(flag[i])){\n tobyScore++;\n flag[0] = new Rectangle((int)(Math.random()*((WIDTH - 40) - 40 + 1)) + 40, (int)(Math.random()*((HEIGHT - 40) - 40 + 1)) + 40, 35, 26);\n flagPole[0] = new Rectangle(flag[0].x, flag[0].y, 4, 45);\n flagLogo[0] = new Rectangle(flag[0].x + 15, flag[0].y + (13/2), 20, 15);\n }\n }\n \n if(maxScore == 20){\n done = true;\n maxWin = true;\n }\n if(tobyScore == 20 ){\n done = true;\n tobyWin = true;\n }\n \n // GAME LOGIC ENDS HERE \n // update the drawing (calls paintComponent)\n repaint();\n\n // SLOWS DOWN THE GAME BASED ON THE FRAMERATE ABOVE\n // USING SOME SIMPLE MATH\n deltaTime = System.currentTimeMillis() - startTime;\n try {\n if (deltaTime > desiredTime) {\n //took too much time, don't wait\n Thread.sleep(1);\n } else {\n // sleep to make up the extra time\n Thread.sleep(desiredTime - deltaTime);\n }\n } catch (Exception e) {\n };\n }\n }", "public static void main(String[] args)\n {\n //Create an instance of the game\n game Game = new game(PAGE_HEIGHT,PAGE_WIDTH,PAGE_TITLE);\n \n //Start the game loop\n Game.start();\n }", "public void run() {\r\n\t\t// Set robot colors\r\n\t\tsetColors(green, black, blue);\r\n\r\n\t\t// Seesaw forever\r\n\t\twhile (true) {\r\n\t\t\tahead(100); // Move ahead 100\r\n\t\t\tturnGunRight(360); // Spin gun around\r\n\t\t\tback(100); // Move back 100\r\n\t\t\tturnGunRight(360); // Spin gun around\r\n\t\t}\r\n\t}", "public static void main(String args[]) {\n (new Game()).start();\n }", "@Override\n public void run() {\n while (playing) {\n //update the frame\n update();\n //increment every frame\n Constants.FRAME_COUNT++;\n //draw objects on the frame\n draw();\n //control\n control();\n }\n }", "public void run() {\n board = new Board();\n\n // Initialiseer de game board and\n // print this with empty content\n initGame();\n board.paint();\n\n //speel één maal (spelers spelen om de beurt)\n do {\n playerTurn(currentPlayer);\n board.paint();\n updateGame(currentPlayer);\n\n // game-over ? print een message\n if (currentState == GameState.CROSS_WON) {\n System.out.println(\"'X' won! thanks for playing!\");\n } else if (currentState == GameState.NOUGHT_WON) {\n System.out.println(\"'O' won! thanks for playing!\");\n } else if (currentState == GameState.DRAW) {\n System.out.println(\"It's Draw! thanks for playing!\");\n }\n // andere speler's beurt\n currentPlayer = (currentPlayer == Mark.CROSS) ? Mark.NOUGHT : Mark.CROSS;\n }\n // repeat tot game-over\n while (currentState == GameState.PLAYING);\n\n }", "@Override\n\tpublic void run() {\n\t\trequestFocus(); //So window is selected when it opens\n\t\tfps = 0; //Counts current fps\n\t\ttimer = System.currentTimeMillis(); //Keep track of current time in milliseconds, used to display FPS\n\t\tlastTime = System.nanoTime(); //Keep track of the last time the method was called\n\t\ttargetTick = FPS; //Set desired FPS\n\t\td = 0; //Varible used to keep track if it is running at desired FPS/used to compensate\n\t\tinterval = 1000000000/targetTick; //Interval between ticks\n\n\t\twhile(isRunning) {\n\t\t\tnow = System.nanoTime(); //Capture the time now\n\t\t\td += (now - lastTime)/interval; //Calculate d\n\t\t\tlastTime = now; //Update lastTime\n\n\t\t\t//If d is >= 1 we need to render to stay on fps target\n\t\t\twhile(d >= 1) {\n\t\t\t\ttick(); //Call tick method\n\t\t\t\trender(); //Call render method\n\t\t\t\tfps++; //Increment fps\n\t\t\t\td--; //Decrement d\n\t\t\t}\n\n\t\t\t//If the difference between the current system time is greater than 1 second than last time check, print the fps, reset fps to 0, and increase timer by 1 second\n\t\t\tif(System.currentTimeMillis() - timer >= 1000) {\n\t\t\t\tfps = 0; //Set fps to 0\n\t\t\t\ttimer+=1000; //Increase timer by 1 second\n\t\t\t}\n\t\t}\n\t\tstop(); //Stop the game\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twhile(true){\r\n\t\t\t\t\tdraw();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n new Window(new Game()).setVisible(true);\n }\n });\n }", "@Override\n\t public void run() {\n\t \tSnakeGame game = new SnakeGame();\n\t }", "public void run() {\r\n\t\tint frames = 0;\r\n\t\tdouble unprocessedSeconds = 0;\r\n\t\tlong previousTime = System.nanoTime();\r\n\t\tdouble secondsPerTick = 1 / 60.0;\r\n\t\tint tickCount = 0;\r\n\t\tboolean ticked = false;\r\n\t\t\r\n\t\twhile (running) {\r\n\t\t\tlong currentTime = System.nanoTime();\r\n\t\t\tlong passedTime = currentTime - previousTime;\r\n\t\t\tpreviousTime = currentTime;\r\n\t\t\tunprocessedSeconds += passedTime / 1000000000.0;\r\n\t\t\trequestFocus();//has the window selected when program is lanched\r\n\r\n\t\t\twhile (unprocessedSeconds > secondsPerTick) {\r\n\t\t\t\tunprocessedSeconds -= secondsPerTick;\r\n\t\t\t\tticked = true;\r\n\t\t\t\ttickCount++;\r\n\t\t\t\tif (tickCount % 3 == 0) {//calls on tick 20x/second\r\n\t\t\t\t\ttick();\r\n\t\t\t\t\tnumberOfTicks++;\r\n\t\t\t\t}\r\n\t\t\t\tif (tickCount % 60 == 0) {\r\n\t\t\t\t\t//System.out.println(frames + \"fps\");\r\n\t\t\t\t\tfps = frames;\r\n\t\t\t\t\tpreviousTime += 1000;\r\n\t\t\t\t\tframes = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trender();\r\n\t\t\tframes++;\r\n\t\t}\r\n\t}", "public abstract void loop();", "public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}", "public static void main(String[] args) {\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twindow = new Window(750, 700);\r\n\t\t\t\tgame = new Game(window);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tGameLauncher gameLauncher = new GameLauncher();\n\t\t\t}", "public void run()\r\n\t{\r\n\t\ttry {\r\n\t\t\twhile(true) {\r\n\t\t\t\tgl.use();\r\n\t\t\t\tspinDisplay();\r\n\t\t\t\tThread.sleep(10);\r\n\t\t\t}\r\n\t\t}\r\n catch (InterruptedException e){\r\n // the user sent an interupt,\r\n // So lets exit...\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t// System.out.println(Tile.class.getName());\n\t\tAppGameContainer app = null;\n\t\ttry {\n\t\t\tapp = new AppGameContainer(new GameStart());\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\t// app.setMinimumLogicUpdateInterval(TICK_TIME);\n\t\t\t// app.setMaximumLogicUpdateInterval(TICK_TIME);\n\t\t\tapp.setDisplayMode(WINDOW_WIDTH, WINDOW_HEIGHT, false);\n\t\t\tapp.start();\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args){\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGameLauncher gameLauncher = new GameLauncher();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}", "public static void main(String[] args) \r\n {\r\n // creates ball object\r\n // this ball object is passed around by reference, as is the default in java\r\n // this means the same exact object is being passes, not copies\r\n // equivalent to &Ball in C++\r\n Ball mainBall = new Ball(BALLPIXELRADIUS);\r\n // adds the initial ball with initial coordinates to the panel\r\n // and draws the first frame of the game\r\n drawPanel panel = new drawPanel(mainBall, WIDTH, HEIGHT);\r\n \r\n // creates object of MyFrame class, which is an extended JFrame\r\n myFrame frame = new myFrame(panel, WIDTH, HEIGHT);\r\n // creates object of moveBallClass, which has functions to move the ball\r\n moveBallClass move = new moveBallClass(mainBall, WIDTH, HEIGHT);\r\n \r\n // main game loop\r\n while(true)\r\n {\r\n \r\n // updates the coordinates of the ball by moving it\r\n move.moveBall();\r\n // adds the balls new coordinates to the drawPanel class, with a \r\n // function I created. This is then drawn on screen\r\n panel.addNewBall(mainBall);\r\n // repaints the panel with updated ball information\r\n panel.repaint();\r\n pause(18);\r\n }\r\n\r\n \r\n \r\n }", "@Override\n\tprotected void loop() {\n\t\tcolidiuParede(bola, paddle);\n\t\tcolidiuPaddle(bola, paddle);\n\t\tcolidiuBloco(linhaUm);\n\t\tcolidiuBloco(linhaDois);\n\t\tcolidiuBloco(linhaTres);\n\t\tcolidiuBloco(linhaQuatro);\n\t\tcolidiuBloco(linhaCinco);\n\t\tcolidiuBloco(linhaSeis);\n\t\ttrocaFase();\n\t\tcarImg();\n\t\t\n\t\tif (move) {\n\t\t\tbola.move();\n\t\t}\n\n\t\tif (recorde < score) {\n\t\t\trecorde = score;\n\t\t}\n\t\t\n\t\tif(score == ganhaVida){\n\t\t\tvida++;\n\t\t\tganhaVida += ganhaVida;\n\t\t}\n\n\t\tredraw();\n\t}", "public static void main(String[] args){\n\t\t EventQueue.invokeLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t // create our game and set it to visible\n\t \tSnakeGame game = new SnakeGame();\n\t }\n\t });\n\t}" ]
[ "0.8094568", "0.80341506", "0.77803767", "0.76638687", "0.76372105", "0.7628386", "0.76215106", "0.7618162", "0.75892144", "0.7513893", "0.749717", "0.74942654", "0.746959", "0.74414", "0.743943", "0.7425642", "0.7375211", "0.73727137", "0.7350845", "0.73390764", "0.73326045", "0.73326045", "0.7322183", "0.73183", "0.7311997", "0.73053116", "0.72881997", "0.727005", "0.72487336", "0.71935654", "0.7161774", "0.7118384", "0.7113038", "0.7109431", "0.70954704", "0.7078935", "0.70787257", "0.7075443", "0.7070763", "0.70160365", "0.7007037", "0.70034426", "0.6986735", "0.6978579", "0.6968477", "0.6968176", "0.6930712", "0.69297856", "0.68891287", "0.6873087", "0.6870236", "0.6858686", "0.68577194", "0.68546516", "0.6843656", "0.6839501", "0.68328756", "0.68076473", "0.68075883", "0.6801002", "0.6800078", "0.67810714", "0.6777307", "0.6770113", "0.6766898", "0.6763848", "0.67622674", "0.67616457", "0.6757633", "0.67561245", "0.6755634", "0.6748227", "0.6744705", "0.67408204", "0.67406", "0.67406", "0.67337835", "0.6732407", "0.67265403", "0.67197853", "0.670172", "0.67016226", "0.6692092", "0.6691475", "0.6691158", "0.66876423", "0.6680294", "0.6672413", "0.6666482", "0.66660833", "0.6664361", "0.665901", "0.6652165", "0.6649982", "0.6647427", "0.6636058", "0.6635384", "0.66324806", "0.6632342", "0.6627026", "0.66244996" ]
0.0
-1
Creates new form student
public student() { this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH); initComponents(); jLabel6.setVisible(false); jLabel7.setVisible(false); jLabel8.setVisible(false); jButton2.setVisible(false); jLabel9.setVisible(false); jComboBox2.removeAllItems(); jComboBox4.removeAllItems(); jComboBox1.removeAllItems(); jComboBox3.removeAllItems(); jComboBox2.addItem("Engineering"); jComboBox2.setSelectedItem("Engineering"); jComboBox2.addItem("MCA"); jComboBox1.addItem("Mechanical"); jComboBox1.setSelectedItem("Mechanical"); jComboBox1.addItem("Computer"); //jComboBox1.addItem("Computer"); jComboBox3.addItem("FE"); jComboBox3.setSelectedItem("FE"); jComboBox3.addItem("SE"); jComboBox3.addItem("TE"); jComboBox3.addItem("BE"); jComboBox4.addItem("A"); jComboBox4.setSelectedItem("A"); jComboBox4.addItem("B"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}", "public void createStudent(String name, String ID){}", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "Student createStudent();", "@FXML\n private void newStudent() {\n System.out.println(\"trying to insert new student to database\");\n DBhandler db = new DBhandler();\n Student s = new Student(\n txfID.getText(),\n txfFirstName.getText(),\n txfLastName.getText(),\n txfAddress.getText(),\n txfZIP.getText(),\n txfZIPloc.getText(),\n txfEmail.getText(),\n txfPhone.getText()\n );\n System.out.println(s.toString());\n db.insertStudent(s);\n Cancel(new ActionEvent());\n }", "@RequestMapping(value = \"/new\", method = RequestMethod.POST)\n public String saveStudent(ModelMap view, Student student) {\n if(studentService.save(student)) {\n view.addAttribute(\"message\", new String(\"All good!\"));\n }\n else {\n view.addAttribute(\"message\", new String(\"All wrong!\"));\n }\n view.addAttribute(\"listurl\", listurl);\n return(\"newstudent\");\n }", "public static void creaStudente(Student stud) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CREATE_USER;\n\t\t\trp.userType = UserType.STUDENT;\n\t\t\trp.parameters = new Object[] { stud };\n\t\t\tsend(rp);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "@Override\n\tpublic void saveStudent(StudentForm student) {\n\t\t\n\t}", "@PostMapping(\"student-create\")\n\tpublic String createStudentDetails(@RequestBody Student student) throws SQLException {\n\n\t\treturn studentSerivce.createStudentDetails(student);\n\t}", "void create(Student entity);", "private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }", "private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }", "private void saveStudent(){\n StudentGroupThrift group = mainWindow.getStudentClient().getStudentGroupByName\n (this.group.getSelectedItem().toString());\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n String birthDate = format.format(jDateChooser.getDate());\n StudentThrift studentThrift = new StudentThrift(\n id,\n getTextID(FIRST_NAME),\n getTextID(LAST_NAME),\n getTextID(MIDDLE_NAME),\n birthDate,\n getTextID(ADDRESS),\n group\n );\n mainWindow.getStudentClient().saveStudent(studentThrift);\n closeDialog();\n }", "@Override\n\tpublic void create(Student student) {\n\t\tString query=\"insert into student values('\"+student.getId()+\"','\"+student.getName()+\"','\"+student.getAge()+\"')\";\n\t//\tjdbcTemplate.update(query);\n\t\tint result=jdbcTemplate.update(query);\n\t\tSystem.out.println(result+\"Record Inserted\");\n\t}", "public void newStudentButtonPushed() {\r\n String firstName = firstNameTextField.getText();\r\n String lastName = lastNameTextField.getText();\r\n LocalDate birthdayDate = birthdayDatePicker.getValue();\r\n \r\n // Firts Name Validation\r\n if (firstName != null && (firstName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"First Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Last Name Validation\r\n if (lastName != null && (lastName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Last Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Date Validation\r\n if (birthdayDate == null || birthdayDate.isAfter(\r\n LocalDate.now().minusYears(MIN_YEARS_OLD))) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Date is not correct \"\r\n + \"(empty date or student < 17 years old)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Construct new student\r\n Student newStudent = new Student(firstName, lastName, birthdayDate);\r\n \r\n try {\r\n newStudent = covidMngrService.addStudent(newStudent);\r\n \r\n // Get all the items from the table as a list, then add the \r\n // new student to the list\r\n tableView.getItems().add(newStudent);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(StudentMainCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }", "public static void createRecord() throws IOException {\r\n\t\tstudRecs.add(new Student());\r\n\t\tint i = studRecs.size() - 1;\r\n\t\tStudent tempRecord = studRecs.get(i);\r\n\t\tSystem.out.println(\"Creating Student \" + i + \" (\" + tempRecord.getStudentID() + \")\");\r\n\t\ttempRecord.setFirstName(StudentInput.firstName());\r\n\t\ttempRecord.setLastName(StudentInput.lastName());\r\n\t\ttempRecord.setStreetAddress(StudentInput.streetAddress());\r\n\t\ttempRecord.setCity(StudentInput.city());\r\n\t\ttempRecord.setProvince(StudentInput.province());\r\n\t\ttempRecord.setPostalCode(StudentInput.postalCode());\r\n\t\ttempRecord.setPhoneNumber(StudentInput.phoneNumber());\r\n\t\ttempRecord.setBirthDate(StudentInput.birthDate());\r\n\t\tSystem.out.println(\"Student \" + i + \" (\" + tempRecord.getStudentID() + \")\" + \" Created!\");\r\n\t}", "public void newRecord() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tdateTxt.setText(dateFormat.format(new Date()));\n\t\t//mark all students enrolled as attendant\n\t\tif (courseTable.getSelectedRow() != -1) {\n\t\t\tsetWarningMsg(\"\");\n\t\t\tupdateStudent(currentCourse);\n\t\t\tfor (int i = 0; i < studentTable.getRowCount(); i++) {\n\t\t\t\tstudentTable.setValueAt(new Boolean(true), i, 0);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse {\n\t\t\t//show message: choose course first\n\t\t\tsetWarningMsg(\"please select course first\");\n\t\t}\n\t}", "@ModelAttribute(\"student\")\n public Student_gra_84 setupAddForm() {\n return new Student_gra_84();\n }", "@GetMapping(\"/add\")\n\tpublic List<Students> addStudent() {\n\t\tStudents student = new Students();\n\t\tstudent.setRollno(04);\n\t\tstudent.setSname(\"Cyborg\");\n\t\tstudent.setStudent_role(\"Graduate\");\n\t\tstudentMapper.insert(student);\n\t\treturn studentMapper.findAll(); \n\t}", "@RequestMapping(\"/new\")\n public String newStudent(ModelMap view) {\n Student student = new Student();\n view.addAttribute(\"student\", student);\n view.addAttribute(\"listurl\", listurl);\n return(\"newstudent\");\n }", "public void actionPerformed(ActionEvent e){\n \t\t \tstudentsController.addStudent();\n \t\t }", "@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}", "@POST\n\t@Path(\"add\")\n\tpublic String addStudent(Representation entity) {\n\t\tForm form = new Form(entity);\n\t\tString name = form.getFirstValue(\"name\");\n\t\tint grade = Integer.parseInt(form.getFirstValue(\"grade\"));\n\t\tint sex = Integer.parseInt(form.getFirstValue(\"sex\"));\n\t\tint age = Integer.parseInt(form.getFirstValue(\"age\"));\n\n\t\tStudent student = new Student();\n\t\tstudent.setGrade(grade);\n\t\tstudent.setName(name);\n\t\tstudent.setSex(sex);\n\t\tstudent.setAge(age);\n\n\t\tint id = StorageOperator.studentID + 1;\n\t\tstudent.setId(id);\n\t\treturn String.valueOf(StorageOperator.addStudent(student));\n\t}", "public Student insertStudent() {\n\t\tSystem.out.print(\"\\n--- 학생 정보 등록 ---\\n\");\n\t\tSystem.out.print(\"학생 이름 입력 \");\n\t\tString name = sc.next();\n\t\tSystem.out.print(\"학생 나이 입력 \");\n\t\tint age = sc.nextInt();\n\t\tSystem.out.print(\"학생 주소 입력 \");\n\t\tString addr= sc.next();\n\t\tStudent st = new Student(name, age, addr);\n\t\treturn st;\n\t}", "@RequestMapping(value = \"/staff/studentcreate\")\n\tpublic String redirectToStudentCreate(Model model) {\n\t\tStudent studentUser = new Student();\n\t\tmodel.addAttribute(\"studentUser\", studentUser);\n\t\treturn \"staff/studentcreate\";\n\t}", "public void submit(ActionEvent actionEvent) {\n if(checkFields()) {\n try {\n newStudent = new Student(firstName.getText(), lastName.getText(),birthday.getValue(),selectImage.getImage());\n activities();\n System.out.println(\"new student: \" + newStudent);\n studentList.add(newStudent);\n viewStudent(actionEvent);\n } catch (IllegalArgumentException | IOException e){\n errorDisplay.setText(e.getMessage());\n }\n }\n }", "public void addStudent(Student student) {\n\t\t\r\n\t}", "@RequestMapping(\"processForm\")\n\tpublic String processStudentForm(@ModelAttribute(\"student\") Student theStudent ) {\n\t\t\n\t\t//log input data to console\n\t\t//System.out.println(\"Last Name : \"+ theStudent.getFirstName());\n\t\t\n\t\treturn \"student-confirmation\";\n\t}", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public static void addStudent(Student student) throws SQLException {\r\n\t String sql = \" INSERT INTO Studentspring VALUES (?,?,?,?,?)\";\r\n\t PreparedStatement pStmt = con.prepareStatement(sql);\r\n\r\n\t String Name=student.getName();\r\n\t int Age=student.getAge();\r\n\t String Course=student.getCourse();\r\n\t int Year=student.getYear();\r\n\t String Section=student.getSection();\r\n\t \r\n\t pStmt.setString(1, Name);\r\n\t pStmt.setInt(2,Age);\r\n\t pStmt.setString(3,Course);\r\n\t pStmt.setInt(4,Year );\r\n\t pStmt.setString(5,Section);\r\n\r\n\t pStmt.executeUpdate();\r\n\t \r\n\t }", "private void addStudentButtonActionPerformed(java.awt.event.ActionEvent evt) {\n if(lastName.getText().length()==0 && firstName.getText().length()==0) {\n JOptionPane.showMessageDialog(this, \"Some of the fields are empty!\");\n } else if(isInteger(levelOfStudy.getText())) {\n JOptionPane.showMessageDialog(this, \"Valid infomation, adding student (may take a minute)\");\n controller.addStudent(firstName.getText(),lastName.getText(),degreeName.getSelectedItem().toString(),tutor.getText(),levelOfStudy.getText());\n scrollTable.showStudents();\n JOptionPane.showMessageDialog(this, \"Created with password of '123'\");\n } else {\n JOptionPane.showMessageDialog(this, \"Period of study must be a vaild year!\");\n }\n \n \n }", "public void addStudents(Student student) {\r\n System.out.println(\"conectado con model ---> metodo addStudents\");\r\n //TODO\r\n }", "public Student_ADD() {\n initComponents();\n }", "@GetMapping(\"/save\")\n\tpublic @ResponseBody String addNewStudent(@RequestParam int rollno, @RequestParam String name, @RequestParam String role) {\n\t\tStudents student = new Students();\n\t\tstudent.setRollno(rollno);\n\t\tstudent.setSname(name);\n\t\tstudent.setStudent_role(role);\n\t\tstudentMapper.insert(student);\n\t\treturn \"Saved New User\";\n\t}", "private static int addNewStudent(){\n\t\tSystem.out.println(\"===Add New Student To Database===\");\n\t\tScanner string_input = new Scanner(System.in); //gets String input from the user\n\t\tScanner integer_input = new Scanner(System.in); //get integer input from the user\n\t\tStudentDetails new_student = new StudentDetails();\n\t\t\n\t\tString firstname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's first name: \");\n\t\t\tfirstname = string_input.next();\n\t\t}while(!new_student.setFirstName(firstname)); //loop until name input is valid\n\t\t\n\t\tString middlename;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's middle name (Type 'null' if author has no middle name): \");\n\t\t\tmiddlename = string_input.next();\n\t\t}while(!new_student.setMiddleName(middlename)); //loop until name input is valid\n\t\t\n\t\tString lastname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's last name: \");\n\t\t\tlastname = string_input.next();\n\t\t}while(!new_student.setLastName(lastname)); //loop until name input is valid\n\t\t\n\t\tint grade;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter new student's grade (9 - 12): \");\n\t\t\tgrade = integer_input.nextInt();\n\t\t}while(!new_student.setGrade(grade)); //loop until name input is valid\n\t\t\n\t\tALL_STUDENTS.add(new_student);\n\t\tint new_studentId = ALL_STUDENTS.size() - 1; //since student was the most recently added element to the ALL_STUDENTS ArrayList, its index should be ALL_STUDENTS.size() - 1. Student's index in this ArrayList should be the new student's Id.\n\t\tnew_student.setId(new_studentId); //set the new student's Id\n\t\t\n\t\treturn new_student.getId();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if(nameTextField.getText().isEmpty() || surnameTexField.getText().isEmpty() ||\n genderTextField.getText().isEmpty() || programmeTextField.getText().isEmpty() ||\n nationalityTextField.getText().isEmpty() || courseTextField.getText().isEmpty() ||\n pathwayTextField.getText().isEmpty()) {\n JOptionPane.showMessageDialog(null, \"One or more fields are empty. Each field should be filled!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return;\n }\n else {\n try {\n Student st = new Student(nameTextField.getText(), surnameTexField.getText(), genderTextField.getText(),\n nationalityTextField.getText(), programmeTextField.getText(), courseTextField.getText(), pathwayTextField.getText(), 60.0);\n college.addStudent(st);\n JOptionPane.showMessageDialog(null, \"The student \" + nameTextField.getText() + \" \" + surnameTexField.getText() + \" has been\" +\n \" successfully added to the College!\");\n // clear all the fields\n nameTextField.setText(\"\");\n surnameTexField.setText(\"\");\n genderTextField.setText(\"\");\n nationalityTextField.setText(\"\");\n programmeTextField.setText(\"\");\n courseTextField.setText(\"\");\n pathwayTextField.setText(\"\");\n }\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Oops! Something went wrong...\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return;\n }\n }\n }", "private void addStudent() throws FileNotFoundException, ValidatorException {\n //Lesen wir die Daten\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Read student information\");\n System.out.print(\"ID: \");\n long studentId = sc.nextLong();\n System.out.print(\"First name: \");\n String firstName = sc.next();\n System.out.print(\"Last Name: \");\n String lastName = sc.next();\n\n //Wir rufen die addStudent Funktion vom dem Controller mit den gelesenen Daten auf\n if (ctrl.addStudent(studentId, firstName, lastName)) {\n System.out.println(\"Please add the courses later from the Registration System menu!\");\n System.out.println(\"Student saved with success!\");\n } else\n System.out.println(\"Student with this ID already exists!\");\n }", "@Override\n\tpublic void createStudent(Student student) {\n\t\tem.persist(student);\n\t}", "@RequestMapping(value = \"/student\")\r\n\tpublic String addstudent(Student student) {\r\n\t\tStudentdaoimpl impl = new Studentdaoimpl();\r\n\t\timpl.addstudent(student);\r\n\t\treturn \"redirect:/findallstudent\";\r\n\r\n\t}", "private static Student newUser(ArrayList<Student> students){\n\t\tStudent newStudent = new Student();\n\t\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter first name:\");\n\t\t\t\tnewStudent.setFirstName(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getFirstName() == null);\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter last name:\");\n\t\t\t\tnewStudent.setLastName(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getLastName() == null);\n\t\t\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter age:\");\n\t\t\t\tnewStudent.setAge(Integer.parseInt(input.nextLine()));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getAge() == -1);\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter gender(M/F):\");\n\t\t\t\tnewStudent.setGender(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getGender() == null);\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter SSN:\");\n\t\t\t\tnewStudent.setSSN(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getSSN() == null);\n\t\t \n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter address:\");\n\t\t\t\tnewStudent.setAddress(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getAddress() == null);\n\t\t\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter city:\");\n\t\t\t\tnewStudent.setCity(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getCity() == null);\t\t\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter state(two character abbreviation):\");\n\t\t\t\tnewStudent.setState(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getState() == null);\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter zip:\");\n\t\t\t\tnewStudent.setZip(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getZip() == null);\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter email:\");\n\t\t\t\tnewStudent.setEmail(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getEmail() == null);\n\t\t\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter phone:\");\n\t\t\t\tString temp = input.nextLine();\n\t\t\t\t// remove all non-numeric characters\n\t\t\t\ttemp = temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t\t\t\tnewStudent.setPhone(temp);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getPhone() == null);\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter ID (Numeric):\");\n\t\t\t\tnewStudent.setID(Integer.parseInt(input.nextLine()));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getID() == -1);\n\t\t\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter college:\");\n\t\t\t\tnewStudent.setCollege(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getCollege() == null);\n\n\t\tString usr = null;\n\t\tboolean failUsrCheck = false;\n\t\t\n\t\tdo{\n\n\t\t\tSystem.out.println(\"Enter user name:\");\n\t\t\tusr = input.nextLine(); \n\t\t\tfor(Student studentI : students) {\n\t\t\t\tif(usr.equals(studentI.getUsername().replace(\"\\r\",\"\"))){\n\t\t\t\t\tfailUsrCheck = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(failUsrCheck){\n\t\t\t\tSystem.out.println(\"User name already used.\");\n\t\t\t}\n\t\t}while (failUsrCheck);\n\t\tnewStudent.setUsername(usr);\n\n\t\t// Display the block of text with the password requirements\n\t\tSystem.out.println(newStudent.PASSWORD_REQUIREMENTS);\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Enter password:\");\n\t\t\t\tnewStudent.setPassword(input.nextLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} while(newStudent.getPassword() == null);\n\t\t\n\t\treturn newStudent;\n\t}", "public void addStudent(Student student);", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "public boolean addStudent(Student student) throws DocumentException, IOException {\n String name = student.getName();\n if(getUser(name)==null){//hasn't got a user called the same name\n String password = student.getPassword();\n Student.Speciality speciality = student.getSpeciality();\n String mail = student.getMail();\n root = document.getRootElement();\n Element root2 = root.addElement(\"student\");\n int nb = root.elements().size()-1;\n root2.addAttribute(\"id\", String.valueOf(nb));\n Element usernameElement = root2.addElement(\"username\");\n Element passwordElement = root2.addElement(\"password\");\n Element mailElement = root2.addElement(\"mail\");\n Element specialityElement = root2.addElement(\"speciality\");\n usernameElement.setText(name);\n passwordElement.setText(password);\n mailElement.setText(mail);\n specialityElement.setText(speciality.name());\n writeXML();\n return true;\n }\n else{//the same name already in the list\n return false;\n }\n }", "@Override\n public StudentDTO createNewStudent(StudentDTO studentDTO) {\n studentRepository.save(studentMapper.studentDTOToStudent(studentDTO));\n log.info(\"Student with id: \" + studentDTO.getId() + \" successfully saved\");\n return studentDTO;\n }", "private void addStudent(Student student) {\n\t\tSystem.out.println(\"Add Student\");\n\t\tsmb.saveStudent(student);\n\t}", "public Student() {\n \n }", "private void handleCreateStudentBTN(ActionEvent actionEvent){\n String fName = this.firstNameTF.getText();\n String lName = this.lastNameTF.getText();\n String stuNum = this.stuNumTF.getText();\n\n //Try to construct the new instance of Student\n try{\n Student student = new Student(fName, lName, stuNum);\n\n\n //Create the controller with reference to the new student\n ViewStudentController viewStudentController = new ViewStudentController(student);\n\n //Load and display the view\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/FXML/viewStudentView.fxml\"));\n loader.setController(viewStudentController);\n Parent parent = loader.load();\n\n Scene scene = new Scene(parent, 275, 200);\n Stage stage = new Stage(StageStyle.DECORATED);\n stage.setScene(scene);\n stage.showAndWait();\n\n\n }\n catch(Exception e){\n //couldn't create a new student, show an alert\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"JavaFX Example - Error\");\n alert.setContentText(\"An error occurred when trying to create, or display, a student!!!\");\n alert.showAndWait();\n\n e.printStackTrace();\n\n }\n\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "public Student() \r\n {\r\n studentId = 0;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "NominatedStudentDto create(NominatedStudentDto nominatedStudent, int userId, String userRole);", "private Student createStudent(Element studentNode) {\n String serialNumber = studentNode.getAttribute(\"serialNumber\");\n Student b = new Student();\n b.setSerialNumber(serialNumber);\n\n b.setName(getTextFromTagName(studentNode, \"name\"));\n b.setGroup(Integer.valueOf(getTextFromTagName(studentNode, \"group\")));\n b.setId(Long.valueOf(getTextFromTagName(studentNode, \"id\")));\n\n return b;\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic void createStudent(Bookmodel s1) {\n\t\tdao.createStudent(s1);\r\n\t}", "@RequestMapping(\"/processForm\")\n\tpublic String processForm(@ModelAttribute(\"student\") final Student student)\n\t{\n\t\tSystem.out.println(\"Student: \"\n\t\t + student.getFirstName()\n\t\t + \", \"\n\t\t + student.getLastName()\n\t\t + \", \"\n\t\t + student.getCountry()\n\t\t + \", \"\n\t\t + student.getFavoriteLanguage()\n\t\t + \", \"\n\t\t + Arrays.toString(student.getOperatingSystem()));\n\n\t\treturn \"student-confirmation\";\n\t}", "public static void create() {\n Application.currentUserCan( 1 );\n \n String author = session.get(\"userEmail\");\n String title = params.get( \"course[title]\", String.class );\n String content = params.get( \"course[content]\", String.class );\n \n if( title.length() > 0 && content.length() > 0 ) {\n Course course = new Course(title, content, author);\n course.save();\n }\n \n index();\n }", "@RequestMapping(value = \"insert\", method = RequestMethod.POST)\r\n\tpublic String insert(HttpServletRequest request) {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\tString name = request.getParameter(\"name\");\r\n\t\tint marks = Integer.parseInt(request.getParameter(\"marks\"));\r\n\t\t// Create the student\r\n\t\tStudent student = new Student(id, name,marks);\r\n\t\tSystem.out.println(student);\r\n\t\t// insert student to db\r\n\r\n\t\tString res = studentService.insert(student);\r\n\r\n\t\tif (res.equals(\"SUCCESS\"))\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Inserted\");\r\n\t\telse\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Not Inserted\");\r\n\t\treturn \"insert\";\r\n\t}", "public void addStudent(User user) {\n\t\t\r\n\t}", "public void addStudents(Student theStudent) {\n\t\tConnection myConn=null;\n\t\tPreparedStatement myStmt=null;\n\t\ttry\n\t\t{\n\t\t//get db connection\n\t\tmyConn=dataSource.getConnection();\n\t\t\n\t\t// create sql for insert\n\t\tString sql=\"insert into student \"+\"(first_name, last_name, email) \"+\"values(?,?,?)\";\n\t\tmyStmt=myConn.prepareStatement(sql);\n\t\t\n\t\t//set the param values for the student\n\t\tmyStmt.setString(1, theStudent.getFirstName());\n\t\tmyStmt.setString(2, theStudent.getLastName());\n\t\tmyStmt.setString(3, theStudent.getEmail());\n\t\t\n\t\t//execute sql insert\n\t\tmyStmt.execute();\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose(myConn,myStmt,null);\n\t\t}\n\t}", "private void saveNewStudentToFirebaseDatabase(String studentId) {\n // Extract Student information from the edit text views\n String studentName = mStudentNameEditText.getText().toString().toLowerCase().trim();\n int studentSex = mStudentSex;\n long studentBirthdate = mStudentBirthdate;\n int studentGrade = Integer.parseInt(mStudentGradeEditText.getText().toString());\n\n if (mViewModel.studentPicBitmap != null) {\n // Save photo to Firebase Storage using AsyncTask\n saveStudentPhotoToFirebaseStorage(studentId);\n } else {\n Student newStudent = new Student(studentName, studentSex, studentBirthdate, studentGrade,\n mChosenClassesList, null, studentId);\n\n mStudentsDatabaseReference.child(studentId).setValue(newStudent);\n }\n\n // Close activity\n finish();\n }", "public ManageStudentForm() {\n initComponents();\n \n initTable();\n \n fillTable();\n \n initMajor();\n setLocationRelativeTo(null);\n \n \n }", "@Override\n public void createStudent(Student student) throws ClassRosterDuplicateIdException, ClassRosterDataValidationException, ClassRosterPersistenceException {\n if (dao.getStudent(student.getStudentId()) != null) {\n throw new ClassRosterDuplicateIdException(\"ERROR: Could not create student. Student Id \" + student.getStudentId() + \" already exists\");\n }\n \n // RULE TWO: is the student valid\n validateStudentData(student);\n \n // RULE THREE: Pass data to DAO\n dao.addStudent(student.getStudentId(), student);\n auditDao.writeAuditEntry(\"Student \" + student.getStudentId() + \" CREATED.\");\n }", "public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "protected void addStuInfo(HttpServletRequest request, HttpServletResponse response)\n\tthrows ServletException, IOException {\n\t\tStudent stu = new Student();\n\t\tstu.setStudentNo(request.getParameter(\"studentNo\"));\n\t\tstu.setStudentName(request.getParameter(\"studentName\"));\n\t\tstu.setSex(request.getParameter(\"sex\"));\n\t\tstu.setGradeId(Integer.parseInt(request.getParameter(\"gradeId\")));\n\t\tstu.setBorndate(request.getParameter(\"borndate\"));\n\t\tstu.setEmail(request.getParameter(\"email\"));\n\t\tint count = biz.addStuInfo(stu);\n\t\tif(count > 0){\n\t\t\tout.print(\"<script>alert('新增成功!!!');window.location.href='StudentServlet.do';</script>\");\n\t\t}else{\n\t\t\tout.print(\"<script>alert('新增失败!!!');window.location.href='StudentServlet.do';</script>\");\n\t\t}\n\t}", "public Student() {\r\n }", "@PostMapping(\"/api/students\")\n public ResponseEntity createOrUpdateStudent(@RequestBody StudentDto studentRequest) {\n this.studentService.createOrUpdateStudent(studentRequest);\n return ResponseEntity.ok().build();\n }", "Student(int i, String n) {\n id = i;\n name = n;\n }", "public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "public static void createAccount()\r\n\t {\r\n\t\t String name;\r\n\t\t String username;\r\n\t\t String password;\r\n\t\t ArrayList<Book> booksLent = null;\r\n\t\t System.out.println(\"Enter your name\");\r\n\t\t Scanner src = new Scanner(System.in);\r\n\t\t name = src.next();\r\n\t\t System.out.println(\"Enter your username\");\r\n\t\t src = new Scanner(System.in);\r\n\t\t username = src.next();\r\n\t\t System.out.println(\"Enter your password\");\r\n\t\t src = new Scanner(System.in);\r\n\t\t password = src.next();\r\n\t\t \r\n\t\t Student stu = new Student(name, username, password, booksLent, 0);\r\n\t\t studentAccount = stu;\r\n\t\t FileReader.getStudents().add(stu);\r\n\t\t FileReader.update();\r\n\t\t Display.studentDisplay(studentAccount);\r\n\t }", "void save(Student student);", "@PostMapping(\"/students\")\n @Timed\n @RegionBasedInsert\n public ResponseEntity<Student> createStudent(@RequestBody Student student) throws URISyntaxException {\n log.debug(\"REST request to save Student : {}\", student);\n if (student.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new student cannot already have an ID\")).body(null);\n }\n Student result = studentService.save(student);\n return ResponseEntity.created(new URI(\"/api/students/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public Student() {\n }", "public Student() {\n }", "public Student() {\n }", "@GetMapping(\"/reg_m_student\")\r\n\tpublic String m_studentReg() {\r\n\t\treturn \"m_student_Form\";\r\n\t}", "public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }", "public Result addSemester() {\n\t\tUser user = Application.getLoggedUser();\n\t\tif (user == null || user.userType != UserType.ADMIN) {\n\t\t\treturn unauthorized(message.render(\"Please log in to the system as administrator\"));\n\t\t}\n\t\tForm<Semester> semesterForm = Form.form(Semester.class);\n\t\tFormatters.register(Date.class, new Formatters.SimpleFormatter<Date>() {\n\t\t\t@Override\n\t\t\tpublic Date parse(String input, Locale arg1) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n//\t\t\t\t\n\t\t\t\t\treturn format.parse(input);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic String print(Date date, Locale arg1) {\n\t\t\t\t\n\t\t\t\treturn date.toString();\n\t\t\t}\n\t\t});\n\t\tsemesterForm = Form.form(Semester.class).bindFromRequest();\n\t\tif (semesterForm.hasErrors()) {\n\t\t\treturn redirect(\"/newSemester\");\n\t\t}\t\t\n\t\tSemester semester = semesterForm.get();\n\t\ttry{\n\t\t\tsemester.insertIntoDatabase();\n\t\t\treturn ok(message.render(\"Semester Successfully added\"));\n\t\t}\tcatch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn internalServerError(message.render(\"Could not add semester\"));\n\t\t}\n\t}", "private void ADDStudents(Student s) {\n\t\t\tint exist = 0;\n\n\t\t\tif(data.size() > 0) {\n\t\t\t\tfor(Student st: data) {\n\t\t\t\t\tif(s.id == st.id) {\n\t\t\t\t\t\texist = 1;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tthrow new Exception(\"This student already in the table.\");\n\t\t\t\t\t\t\t}catch(Exception ex){\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This student already in the table.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tIDField.setText(\"\");\n\t\t\t\t\t\tfirstNameField.setText(\"\");\n\t\t\t\t\t\tlastNameField.setText(\"\");\n\t\t\t\t\t\tgenderField.setText(\"\");\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\t\tdata.add(s);\n\t\t\t\tObject[] row = new Object[4];\n\t\t\t\trow[0] = \"\" + s.id;\n\t\t\t\trow[1] = s.firstName;\n\t\t\t\trow[2] = s.lastName;\n\t\t\t\trow[3] = s.gender;\n\t\t\t\tmodel.addRow(row);\n\t\t\t if(exist ==1) {\n\t\t\t\t data.remove(s);\n\t\t\t\t model.removeRow(data.size());\n\t\t\t }\n\t\t\t\t\n\t\t\t}", "Student(String name){\n this.name = name;\n }", "private void createLocalStudentUserData(FirebaseUser user){\n\n String name = usernameTextView.getText().toString();\n StudentManager.createStudent(name, user.getUid(), newSchoolID);\n\n }", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "public void AddToStudent(){\n\n try {\n\n String addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN + \", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Margaret', 'Elkins', '555-555-1212')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Scott', 'Sivad', '555-555-1313')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Sarah', 'Kwabi', '555-555-1414')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n addDataSQL = \"INSERT INTO \" + STUDENT_TABLE_NAME + \"(\" + STUDENT_FIRST_COLUMN + \", \" + STUDENT_LAST_COLUMN +\", \" + STUDENT_PHONE_COLUMN + \")\" + \" VALUES ('Caleb', 'Mohammad', '555-555-1515')\";\n ConnectDB.statement.executeUpdate(addDataSQL);\n }\n catch (SQLException se){\n System.out.println(se);\n se.printStackTrace();\n }\n }", "public StudentRegistration() {\n initComponents();\n }", "@PostMapping(\"/students\")\n\tpublic ResponseEntity addstudent (@RequestBody StudentBean studentbean, @PathVariable long id) {\n\t\treturn null;\n\t\t\n\t}", "@OnClick (R.id.create_course_btn)\n public void createCourse()\n {\n\n CourseData courseData = new CourseData();\n courseData.CreateCourse( getView() ,UserData.user.getId() ,courseName.getText().toString() , placeName.getText().toString() , instructor.getText().toString() , Integer.parseInt(price.getText().toString()), date.getText().toString() , descreption.getText().toString() ,location.getText().toString() , subField.getSelectedItem().toString() , field.getSelectedItem().toString());\n }", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "private void SaveStudentInfo() {\n EditText _fullName = (EditText) findViewById(R.id.editTextFullName);\n EditText _birthdate = (EditText) findViewById(R.id.dateBirthday);\n EditText _fullStreetAddress = (EditText) findViewById(R.id.editTextFullAddress);\n EditText _contactPhone = (EditText) findViewById(R.id.editTextContactPhone);\n EditText _contactEmail = (EditText) findViewById(R.id.editTextContactEmail);\n EditText _parentNames = (EditText) findViewById(R.id.editTextParentNames);\n EditText _defaultRate = (EditText) findViewById(R.id.numberRate);\n EditText _notes = (EditText) findViewById(R.id.editTextNotes);\n\n // ***** Create the Student Object\n Student _student = new Student();\n\n // ***** Set the field values\n _student.fullName = String.valueOf(_fullName.getText());\n _student.birthDate = String.valueOf(_birthdate.getText());\n _student.fullAddress = String.valueOf(_fullStreetAddress.getText());\n _student.contactPhone = String.valueOf(_contactPhone.getText());\n _student.contactEmail = String.valueOf(_contactEmail.getText());\n _student.parentNames = String.valueOf(_parentNames.getText());\n\n // ***** Convert to a double to store in database for calulations\n _student.defaultRate = Double.valueOf(String.valueOf(_defaultRate.getText()));\n\n _student.notes = String.valueOf(_notes.getText());\n\n // **** Save the student information\n _myDb.setStudentInfo(_student);\n\n\n }", "public void addStudent(View view) {\n String s1 = regNo.getText().toString();\n String s2 = course.getText().toString();\n String s3 = name.getText().toString();\n String s4 = fname.getText().toString();\n String s5 = mname.getText().toString();\n String s6 = address.getText().toString();\n String s7 = district.getText().toString();\n String s8 = city.getText().toString();\n String s9 = state.getText().toString();\n String s10 = pno.getText().toString();\n String s11 = sex.getText().toString();\n String s12 = dob.getText().toString();\n String s13 = email.getText().toString();\n\n if (validate()) {\n new ExecuteTask().execute(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13);\n } else {\n showToast(\"Enter Valid Credentials\");\n }\n }", "@Override\r\n\tpublic Student createOrUpdateStudentRecord(Student student) {\r\n\t\t\tstudentDAO.addStudent(student);\r\n\t\treturn student;\r\n\t}", "public Student(String name, String SSN) {\n this.name = name;\n this.SSN = SSN;\n System.out.println(\"Student: \" + name + \", email: \" + generateEmail(name) + \", ID: \" + generateID(SSN));\n }", "private void Add() {\n\t\t\tString names2 = StudentNum.getText();\n\t\t\tString names1 = Studentname.getText();\n\t\t\tStudentname.setText(\"\");\n\t\t\tStudentNum.setText(\"\");\n\t\t\tif (!names2.equals(\"Student Number\")) {\n\t\t\t\tFile directory = new File(\"Schools\\\\\" + names2 + \".hi\");\n\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\tif (directory.mkdir()) {\n\t\t\t\t\t\tworklabel.setText(\"Student has been added\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tPrintWriter out;\n\t\t\t\t\t\t\tPrintWriter out2;\n\t\t\t\t\t\t\tout = new PrintWriter(new FileWriter(\"Schools\\\\\"\n\t\t\t\t\t\t\t\t\t+ names2 + \".hi\" + \"\\\\\"\n\t\t\t\t\t\t\t\t\t+ \"Student Information.txt\", true));\n\t\t\t\t\t\t\tout.println(\"Student Name: \" + names1);\n\t\t\t\t\t\t\tout.println(\"Student Number: \" + names2);\n\t\t\t\t\t\t\tout.println(\"Address:\");\n\t\t\t\t\t\t\tout.println(\"Postal Code:\");\n\t\t\t\t\t\t\tout.println(\"Phone Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Email:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Email:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #1:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #2:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #3:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #4:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #5:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #1:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #2:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #3:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #4:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #5:\");\n\t\t\t\t\t\t\tout.println(\"Volunteer Hours:\");\n\t\t\t\t\t\t\tout2 = new PrintWriter(new FileWriter(\"Schools\\\\\"+ names2+\".hi\" + \"\\\\\" + \"Transcript.txt\",true));\n\t\t\t\t\t\t\tout2.println(\"Course Code\t\tMark\tPassed\tAbsences\tLate\");\n\t\t\t\t\t\t\tout.close();\n\t\t\t\t\t\t\tout2.close();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tworklabel.setText(\"Invalid\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public Student(){}", "public void insertCourse(){\n \n }", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(final Model model)\n\t{\n\t\tfinal Student theStudent = new Student();\n\n\t\t// --- add student object to the model ---\n\t\tmodel.addAttribute(\"student\", theStudent);\n\n\t\treturn \"student-form\";\n\t}", "public Student( String name ) {\n sname=name;\n }", "public boolean addStudent(Student student) throws Exception {\n\t\tint collegeid = 0;\n\t\tString courseid = null;\n\t\tint i = 0;\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\ttry {\n\t\t\tSystem.out.println(student.getCoursename());\n\t\t\tPreparedStatement st = con.prepareStatement(\"select course_id from course where course_name=?\");\n\t\t\tst.setString(1, student.getCoursename());\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcourseid = rs.getString(1);\n\t\t\t}\n\t\t\tSystem.out.println(student.getCollegename());\n\t\t\tPreparedStatement st1 = con.prepareStatement(\"select college_id from college where college_name=?\");\n\t\t\tst1.setString(1, student.getCollegename());\n\t\t\tResultSet rs1 = st1.executeQuery();\n\t\t\twhile (rs1.next()) {\n\t\t\t\tcollegeid = rs1.getInt(1);\n\t\t\t}\n\t\t\tPreparedStatement st2 = con.prepareStatement(\n\t\t\t\t\t\"insert into student(student_name, college_id, course_id, phn_no, address) values(?,?,?,?,?)\");\n\t\t\tst2.setString(1, student.getStudentname());\n\t\t\tst2.setInt(2, collegeid);\n\t\t\tst2.setString(3, courseid);\n\t\t\tst2.setString(4, student.getPhno());\n\t\t\tst2.setString(5, student.getAddress());\n\t\t\ti = st2.executeUpdate();\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\tif (i != 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@PostMapping(\"/register\")\n\tpublic String doRegistration(Model model, @ModelAttribute Student student) {\n\t\tStudent temp = studentRepository.findByUserName(student.getUserName());\n\t\tif(temp !=null)\n\t\t{\n\t\t\tmodel.addAttribute(\"errMsg\", \"User Name already taken!\");\n\t\t\tmodel.addAttribute(\"student\", student);\n\t\t\treturn \"/register\";\n\t\t}\n\t\t\n\t\t// student should not be enabled by default\n//\t\tStudent student = Student.builder().firstName(firstname).lastName(lastname).email(email).userName(username)\n//\t\t\t\t.encryptedPassword(encodePassword(password)).enabled(Byte.valueOf(\"0\")).build();\n\t\tstudent.setEnabled(Byte.valueOf(\"0\"));\n\t\tstudent.setEncryptedPassword(encodePassword(student.getEncryptedPassword()));\n\t\tSystem.out.println(\"doRegistration start\");\n\n\t\t// default for all students\n\t\tRole userRole = roleRepository.findByRolename(\"ROLE_USER\");\n\t\tSystem.out.println(\"userRole is: \" + userRole);\n\t\tstudent.setRole(userRole);\n\t\tSystem.out.println(\"doRegistration Middle\");\n\t\tstudentRepository.save(student);\n\n\t\tConfirmationToken confirmationToken = new ConfirmationToken(student);\n\t\tconfirmationTokenRepository.save(confirmationToken);\n\t\tsendEmail(student.getEmail(), \"CourseAid Confirmation Email\", confirmationToken.getConfirmationToken());\n\t\tSystem.out.println(\"doRegistration about to finish\");\n\n\t\treturn \"redirect:/\";\n\t}", "private void createStudyStudent() {\n\t\t\n\t\t//Initiate Window\n\t\tsAssignStudyWindow = new JFrame(\"Assign Study Material\");\n\t\tsAssignStudyWindow.setSize(assignStudyWidth, assignStudyHeight);\n\t\tsAssignStudyWindow.setLocationRelativeTo(null);\n\t\tsAssignStudyWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tArrayList<Class> sClasses = student.getClasses();\n\t\t\n\t\tsAddStudyModel = new DefaultListModel<>();\n\t JList classList = new JList<>(sAddStudyModel);\n\t classList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t classList.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));\n\t\tclassList.addMouseListener(this);\n\t \n\t\t//Add classes\n\t for (Class c: sClasses) {\n\t \t\tsAddStudyModel.addElement(c.getName());\n\t }\n\t \n\t //Main JPanel\n\t JPanel panel = new JPanel();\n\t panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\n\t \n\t //Left JPanel\n\t JPanel leftPanel = new JPanel();\n\t leftPanel.setLayout(new BorderLayout());\n\t leftPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\n\t leftPanel.add(new JScrollPane(classList));\n\t \n\t //Right JPanel\n\t JPanel rightPanel = new JPanel();\n\t rightPanel.setLayout(new GridLayout(2,1,1,1));\n\t rightPanel.setBorder(BorderFactory.createEmptyBorder(75, 10, 75, 20));\n\n\t //Student: \"Assign\" JButton\n\t JButton assignB = new JButton(\"Assign\");\n\t assignB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent event) {\n\t ListSelectionModel selmodel = classList.getSelectionModel();\n\t int index = selmodel.getMinSelectionIndex();\n\t if (index >= 0) {\n\t \t \tClass selectedClass = sClasses.get(index);\n\t \t \tselectedClass.addFlashCard(newFlashCard);\n\t }\n\t }\n\t });\n\t rightPanel.add(assignB);\n\t\t\n\t //Student: \"Exit\" JButton\n\t JButton exitB = new JButton(\"Exit\");\n\t exitB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t sAssignStudyWindow.dispose();\n\t \tsPortalWindow.dispose();\n\t \tstudentPortalScreen();\n\t }\n\t \t});\n\t rightPanel.add(exitB);\n\n\t panel.add(leftPanel);\n\t panel.add(rightPanel);\n\n\t sAssignStudyWindow.add(panel);\n\t sAssignStudyWindow.setVisible(true);\n\t\t\n\t}", "private void createSubject(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n // Formulareingaben prüfen\n String name = request.getParameter(\"name\");\n\n Subject subject = new Subject(name);\n List<String> errors = this.validationBean.validate(subject);\n\n // Neue Kategorie anlegen\n if (errors.isEmpty()) {\n this.subjectBean.saveNew(subject);\n }\n\n // Browser auffordern, die Seite neuzuladen\n if (!errors.isEmpty()) {\n FormValues formValues = new FormValues();\n formValues.setValues(request.getParameterMap());\n formValues.setErrors(errors);\n\n HttpSession session = request.getSession();\n session.setAttribute(\"subjects_form\", formValues);\n }\n\n response.sendRedirect(request.getRequestURI());\n }" ]
[ "0.78319263", "0.7713299", "0.73472047", "0.7306912", "0.7263642", "0.700614", "0.69753915", "0.69395006", "0.69366866", "0.6898295", "0.6813383", "0.67454416", "0.6726714", "0.6704676", "0.6672739", "0.66675335", "0.6654063", "0.662715", "0.6594643", "0.65931803", "0.6584493", "0.6530122", "0.650706", "0.6504787", "0.6482313", "0.6477396", "0.6469351", "0.6452432", "0.6435035", "0.6432029", "0.642413", "0.6421925", "0.6412065", "0.63929564", "0.63793534", "0.63501877", "0.6320436", "0.631581", "0.6298286", "0.6295903", "0.62946", "0.62895066", "0.62794995", "0.6262615", "0.6260338", "0.6251613", "0.6248656", "0.6237003", "0.6227125", "0.62151384", "0.6208214", "0.6205346", "0.61961687", "0.6191539", "0.61805123", "0.61629975", "0.61548984", "0.61543816", "0.61506724", "0.6116642", "0.61114115", "0.6109461", "0.6108672", "0.6107086", "0.6099671", "0.60980684", "0.6097693", "0.60881627", "0.6070734", "0.6058854", "0.605157", "0.6042936", "0.6013958", "0.6013958", "0.6013958", "0.6012125", "0.6002929", "0.60028225", "0.5994357", "0.59913427", "0.5988775", "0.59873635", "0.59712625", "0.5956542", "0.5949345", "0.59461075", "0.59439695", "0.59439635", "0.5940496", "0.59342", "0.59327227", "0.5917604", "0.5914676", "0.5910088", "0.59078515", "0.5902199", "0.58998704", "0.5898153", "0.589179", "0.5882973", "0.5878702" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jComboBox1 = new javax.swing.JComboBox<>(); jComboBox2 = new javax.swing.JComboBox<>(); jComboBox3 = new javax.swing.JComboBox<>(); jLabel5 = new javax.swing.JLabel(); jComboBox4 = new javax.swing.JComboBox<>(); jTextField1 = new javax.swing.JTextField(); jSeparator1 = new javax.swing.JSeparator(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setText("Name"); jLabel2.setText("Department"); jLabel3.setText("Course"); jLabel4.setText("Year"); jButton1.setText("Fill Feedback"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox2ActionPerformed(evt); } }); jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jLabel5.setText("Div"); jComboBox4.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); jLabel6.setText("Teacher's Name:"); jLabel7.setText("Subject:"); jButton2.setText("Next"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel8.setForeground(new java.awt.Color(0, 102, 0)); jLabel8.setText("No question found!! Please visit again later..."); jButton3.setText("Home"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jLabel9.setForeground(new java.awt.Color(204, 0, 0)); jLabel9.setText("jLabel9"); jLabel10.setText("Roll no"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(29, 29, 29) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton1) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(jLabel1)) .addGap(38, 38, 38) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel5))) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(24, 24, 24) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(76, 76, 76) .addComponent(jLabel10) .addGap(48, 48, 48) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)))))) .addGroup(layout.createSequentialGroup() .addGap(32, 32, 32) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton2) .addGroup(layout.createSequentialGroup() .addComponent(jLabel6) .addGap(178, 178, 178) .addComponent(jLabel7)) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(97, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jButton3)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5) .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(14, 14, 14) .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(jLabel7)) .addGap(18, 18, 18) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 190, Short.MAX_VALUE) .addComponent(jButton2) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7319037", "0.7290621", "0.7290621", "0.7290621", "0.7285163", "0.72480375", "0.72130316", "0.7207723", "0.7195822", "0.7189463", "0.7183591", "0.71580946", "0.7147075", "0.70924276", "0.70795405", "0.7056352", "0.6986753", "0.6976759", "0.6954958", "0.69533294", "0.6944831", "0.69417095", "0.6934517", "0.6930924", "0.6926761", "0.69241685", "0.6923851", "0.69112706", "0.6910913", "0.689217", "0.689193", "0.6890017", "0.68896353", "0.6888143", "0.68825865", "0.6881063", "0.6880471", "0.6877822", "0.68752986", "0.6873734", "0.68713146", "0.6859294", "0.6856707", "0.685489", "0.6854541", "0.68543345", "0.68526614", "0.68516856", "0.68516856", "0.6842822", "0.6836592", "0.6836195", "0.68277925", "0.6827518", "0.68260497", "0.682339", "0.68222433", "0.6816619", "0.6815844", "0.68096834", "0.6808133", "0.68078655", "0.6807532", "0.68070555", "0.6802426", "0.6794083", "0.679347", "0.6791848", "0.6790225", "0.6788846", "0.67884487", "0.6787538", "0.67819446", "0.6766094", "0.676505", "0.6764832", "0.67562455", "0.6754961", "0.67515653", "0.6750421", "0.6742601", "0.673875", "0.67371166", "0.6735209", "0.6732373", "0.6727282", "0.6726048", "0.6719771", "0.67154175", "0.6714355", "0.671359", "0.67079127", "0.670646", "0.670331", "0.6700197", "0.669957", "0.6698499", "0.6697054", "0.6693929", "0.6690299", "0.66896695" ]
0.0
-1
GENFIRST:event_jComboBox2ActionPerformed TODO add your handling code here:
private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) { if (jComboBox2.getSelectedItem() == "MCA") { jComboBox1.removeAllItems(); jComboBox3.removeAllItems(); jComboBox1.addItem("Computer"); jComboBox1.setSelectedItem("Computer"); jComboBox1.addItem("Management"); jComboBox3.addItem("FY"); jComboBox3.setSelectedItem("FY"); jComboBox3.addItem("SY"); jComboBox3.addItem("TY"); } else if (jComboBox2.getSelectedItem() == "Engineering") { jComboBox1.removeAllItems(); jComboBox3.removeAllItems(); jComboBox1.addItem("Mechanical"); jComboBox1.setSelectedItem("Mechanical"); jComboBox1.addItem("Computer"); jComboBox3.addItem("FE"); jComboBox3.setSelectedItem("FE"); jComboBox3.addItem("SE"); jComboBox3.addItem("BE"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox5ActionPerformed\n // TODO add your handling code here:\n }", "private void comboBox1ActionPerformed(ActionEvent e) {\n }", "protected void jComboBox10ActionPerformed(ActionEvent evt) {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel13 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jPanel2 = new javax.swing.JPanel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jComboBox2 = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowActivated(java.awt.event.WindowEvent evt) {\n formWindowActivated(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(0, 153, 153));\n\n jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/desgin image/nsu-logo.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(224, 224, 224)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 529, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1978, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1305, Short.MAX_VALUE)\n );\n\n jScrollPane1.setViewportView(jPanel2);\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"Agust\", \"Septembor\", \"Octobar\", \"November\", \"December\" }));\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"2016\", \"2017\", \"2018\", \"2019\", \"2020\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)\n .addComponent(jComboBox2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "private void combo_diabeticoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox2ActionPerformed\r\n jComboBox3.removeAllItems();\r\n jLabel21.setText(\" \");\r\n jLabel14.setText(\" \");\r\n jLabel19.setText(\" \");\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jComboBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"Project\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"User\");\n\n jComboBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jButton1.setText(\"Confirm\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(88, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox1, 0, 358, Short.MAX_VALUE)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(201, 201, 201))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(75, 75, 75))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(81, 81, 81)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(88, 88, 88)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 159, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(80, 80, 80))\n );\n\n pack();\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox();\n btnDelete = new javax.swing.JButton();\n btnDelete.addActionListener(new ChangeGenreRemoveAction(this));\n btnOk = new javax.swing.JButton();\n btnOk.addActionListener(new ChangeGenreOkAction(this));\n btnChange = new javax.swing.JButton();\n btnChange.addActionListener(new ChangeGenreChangeAction(this));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Change genre\");\n\n btnDelete.setText(\"Remove selected\");\n\n btnOk.setText(\"Ok\");\n\n btnChange.setText(\"Change selected\");\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jComboBox1, 0, 365, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(btnDelete)\n .addGap(18, 18, 18)\n .addComponent(btnChange)))\n .addContainerGap(23, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addComponent(btnOk, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(172, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnDelete)\n .addComponent(btnChange))\n .addGap(27, 27, 27)\n .addComponent(btnOk)\n .addContainerGap(20, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jComboBox_Colecao = new javax.swing.JComboBox();\n btn_Entrar = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"TDG SIS\");\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Selecione uma Coleção\"));\n jPanel2.setToolTipText(\"\");\n\n jLabel1.setText(\"Coleção:\");\n\n jComboBox_Colecao.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n btn_Entrar.setText(\"Entrar\");\n btn_Entrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_EntrarActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Gerenciar Coleções\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox_Colecao, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn_Entrar, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(16, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox_Colecao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn_Entrar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton2))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setToolTipText(\"\");\n setPreferredSize(new java.awt.Dimension(600, 500));\n\n jTextField1.setEditable(false);\n jTextField1.setBackground(new java.awt.Color(141, 141, 157));\n jTextField1.setFont(new java.awt.Font(\"Modern No. 20\", 0, 36)); // NOI18N\n jTextField1.setForeground(new java.awt.Color(255, 255, 255));\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextField1.setText(\"Criar Professor\");\n jTextField1.setToolTipText(\"\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel1.setText(\"Nome: \");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel2.setText(\"Grau Académico:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel3.setText(\"Idade: \");\n\n jButton1.setText(\"Criar Professor\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/undo.png\"))); // NOI18N\n jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButton2.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);\n jButton2.setDefaultCapable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextField2.setName(\"Nome\"); // NOI18N\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTextField3.setName(\"Idade\"); // NOI18N\n\n jComboBox1.setName(\"Grau académico\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(197, 197, 197)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)\n .addGap(88, 88, 88)\n .addComponent(jButton2)\n .addGap(22, 22, 22)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 76, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)\n .addComponent(jTextField3)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(72, 72, 72))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(139, 139, 139)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField3)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1))\n .addGap(113, 113, 113)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(44, 44, 44))\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ClinicaFprojectPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"ClinicaFprojectPU\").createEntityManager();\n pacienteQuery = java.beans.Beans.isDesignTime() ? null : ClinicaFprojectPUEntityManager.createQuery(\"SELECT p FROM Paciente p\");\n pacienteList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : pacienteQuery.getResultList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setClosable(true);\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(356, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(34, 34, 34)\n .addComponent(jButton1)\n .addGap(155, 155, 155))\n .addGroup(layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(49, 49, 49))\n );\n\n pack();\n }", "private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed\n // TODO add your handling code here:\n\n String lacname2 = jComboBox12.getSelectedItem().toString();\n\n array2.add(lacname2);\n // System.out.println(array);\n\n // day.addItem(array.get());\n Vector vv2 = new Vector();\n\n for (int i = 0; i < array2.size(); i++) {\n String gette = array2.get(i);\n vv2.add(gette);\n jComboBox24.setModel(new DefaultComboBoxModel<>(vv2));\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox();\n jComboBox2 = new javax.swing.JComboBox();\n jComboBox3 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel17 = new javax.swing.JLabel();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"rez de chaussez\", \"etage 1\", \"etage 2\", \"etage 3\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"chambre 1\", \"chambre 2\", \"chambre 3\", \"chambre 4\" }));\n jComboBox2.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox2ItemStateChanged(evt);\n }\n });\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"lit 1\", \"lit 2\", \"lit 3\", \"lit4\" }));\n\n jButton1.setText(\"Ajouter Lit\");\n\n jButton2.setText(\"Supprimer Lit\");\n\n jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/exit.png\"))); // NOI18N\n jLabel17.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel17MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGap(82, 82, 82)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(111, 111, 111)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jButton2))\n .addContainerGap(190, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel17))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel17)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(433, Short.MAX_VALUE))\n );\n }", "private void setUpComboBox2() {\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>());\n jComboBox1.addItem(\"Unit Test\");\n jComboBox1.addItem(\"Quiz\");\n jComboBox1.addItem(\"Assignment\");\n jComboBox1.addItem(\"Other\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jComboBox2 = new javax.swing.JComboBox<>();\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n\n jPanel2.setBackground(new java.awt.Color(204, 204, 204));\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Tất cả\", \"Nhân khẩu\", \"Hộ Khẩu\", \"Tạm vắng\", \"Tạm trú\" }));\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Tất cả\", \"Họ tên\", \"Số CMND\", \"ID\" }));\n\n jTextField1.setText(\"jTextField1\");\n\n jButton1.setText(\"Tìm\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(64, 64, 64)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(150, 150, 150)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(50, 50, 50)\n .addComponent(jButton1)\n .addContainerGap(317, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addContainerGap(75, Short.MAX_VALUE))\n );\n\n jPanel3.setBackground(new java.awt.Color(204, 204, 204));\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 321, Short.MAX_VALUE)\n );\n\n jLabel1.setText(\"Kết quả\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(15, 15, 15))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel1)\n .addGap(20, 20, 20)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n }", "private void comboClienteActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tCierreCajaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.cierrecaja,new Object(),this.cierrecajaParameterGeneral,this.cierrecajaReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tCierreCajaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.cierrecaja,new Object(),this.cierrecajaParameterGeneral,this.cierrecajaReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CierreCajaConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tCostoGastoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.costogastoimpor,new Object(),this.costogastoimporParameterGeneral,this.costogastoimporReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tCostoGastoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.costogastoimpor,new Object(),this.costogastoimporParameterGeneral,this.costogastoimporReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CostoGastoImporConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tEvaluacionProveedorBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.evaluacionproveedor,new Object(),this.evaluacionproveedorParameterGeneral,this.evaluacionproveedorReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tEvaluacionProveedorBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.evaluacionproveedor,new Object(),this.evaluacionproveedorParameterGeneral,this.evaluacionproveedorReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,EvaluacionProveedorConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tUtilidadTipoPrecioBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.utilidadtipoprecio,new Object(),this.utilidadtipoprecioParameterGeneral,this.utilidadtipoprecioReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tUtilidadTipoPrecioBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.utilidadtipoprecio,new Object(),this.utilidadtipoprecioParameterGeneral,this.utilidadtipoprecioReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,UtilidadTipoPrecioConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tLiquidacionImpuestoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.liquidacionimpuestoimpor,new Object(),this.liquidacionimpuestoimporParameterGeneral,this.liquidacionimpuestoimporReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tLiquidacionImpuestoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.liquidacionimpuestoimpor,new Object(),this.liquidacionimpuestoimporParameterGeneral,this.liquidacionimpuestoimporReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,LiquidacionImpuestoImporConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel9 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel11 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel12 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jComboBox3 = new javax.swing.JComboBox<>();\n jLabel13 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMaximumSize(new java.awt.Dimension(350, 454));\n setMinimumSize(new java.awt.Dimension(350, 454));\n setResizable(false);\n\n jPanel2.setBackground(new java.awt.Color(102, 102, 102));\n\n jLabel1.setFont(new java.awt.Font(\"SansSerif\", 1, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Modifer la chambre\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(75, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n jLabel8.setText(\"Hotel Id\");\n\n jComboBox1.setMaximumSize(new java.awt.Dimension(269, 25));\n jComboBox1.setMinimumSize(new java.awt.Dimension(269, 25));\n jComboBox1.setPreferredSize(new java.awt.Dimension(269, 25));\n\n jLabel9.setForeground(new java.awt.Color(255, 0, 0));\n jLabel9.setMaximumSize(new java.awt.Dimension(200, 14));\n jLabel9.setMinimumSize(new java.awt.Dimension(200, 14));\n jLabel9.setPreferredSize(new java.awt.Dimension(200, 14));\n\n jLabel16.setMaximumSize(new java.awt.Dimension(25, 25));\n jLabel16.setMinimumSize(new java.awt.Dimension(25, 25));\n jLabel16.setPreferredSize(new java.awt.Dimension(25, 25));\n\n jLabel10.setText(\"Type de chambre\");\n\n jComboBox2.setMaximumSize(new java.awt.Dimension(269, 25));\n jComboBox2.setMinimumSize(new java.awt.Dimension(269, 25));\n jComboBox2.setPreferredSize(new java.awt.Dimension(269, 25));\n\n jLabel11.setForeground(new java.awt.Color(255, 0, 0));\n jLabel11.setMaximumSize(new java.awt.Dimension(200, 14));\n jLabel11.setMinimumSize(new java.awt.Dimension(200, 14));\n jLabel11.setPreferredSize(new java.awt.Dimension(200, 14));\n\n jLabel17.setMaximumSize(new java.awt.Dimension(25, 25));\n jLabel17.setMinimumSize(new java.awt.Dimension(25, 25));\n jLabel17.setPreferredSize(new java.awt.Dimension(25, 25));\n\n jLabel6.setText(\"Numéro de téléphone\");\n jLabel6.setMaximumSize(new java.awt.Dimension(96, 14));\n jLabel6.setMinimumSize(new java.awt.Dimension(96, 14));\n jLabel6.setPreferredSize(new java.awt.Dimension(96, 14));\n\n jTextField1.setMaximumSize(new java.awt.Dimension(269, 25));\n jTextField1.setMinimumSize(new java.awt.Dimension(269, 25));\n jTextField1.setPreferredSize(new java.awt.Dimension(269, 25));\n\n jLabel7.setForeground(new java.awt.Color(255, 0, 0));\n jLabel7.setMaximumSize(new java.awt.Dimension(200, 14));\n jLabel7.setMinimumSize(new java.awt.Dimension(200, 14));\n jLabel7.setPreferredSize(new java.awt.Dimension(200, 14));\n\n jLabel15.setMaximumSize(new java.awt.Dimension(25, 25));\n jLabel15.setMinimumSize(new java.awt.Dimension(25, 25));\n jLabel15.setName(\"\"); // NOI18N\n jLabel15.setPreferredSize(new java.awt.Dimension(25, 25));\n\n jButton1.setText(\"Modifier\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel12.setText(\"Numéro de chambre\");\n\n jTextField2.setEditable(false);\n jTextField2.setMaximumSize(new java.awt.Dimension(269, 25));\n jTextField2.setMinimumSize(new java.awt.Dimension(269, 25));\n jTextField2.setPreferredSize(new java.awt.Dimension(269, 25));\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"disponible\", \"occupé\" }));\n jComboBox3.setMaximumSize(new java.awt.Dimension(169, 25));\n jComboBox3.setMinimumSize(new java.awt.Dimension(169, 25));\n jComboBox3.setPreferredSize(new java.awt.Dimension(169, 25));\n\n jLabel13.setText(\"Disponibilité\");\n jLabel13.setMaximumSize(new java.awt.Dimension(96, 14));\n jLabel13.setMinimumSize(new java.awt.Dimension(96, 14));\n jLabel13.setPreferredSize(new java.awt.Dimension(96, 14));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel12)\n .addGap(3, 3, 3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel8)\n .addGap(3, 3, 3)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(7, 7, 7)\n .addComponent(jLabel10)\n .addGap(3, 3, 3)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(3, 3, 3)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(3, 3, 3)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(58, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tLibroContableBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.librocontable,new Object(),this.librocontableParameterGeneral,this.librocontableReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tLibroContableBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.librocontable,new Object(),this.librocontableParameterGeneral,this.librocontableReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,LibroContableConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx2 = cb[2].getSelectedIndex();\n\t\t\t}", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tPlantillaFacturaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.plantillafactura,new Object(),this.plantillafacturaParameterGeneral,this.plantillafacturaReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tPlantillaFacturaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.plantillafactura,new Object(),this.plantillafacturaParameterGeneral,this.plantillafacturaReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,PlantillaFacturaConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jComboGrafica = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jComboTipo = new javax.swing.JComboBox<>();\n jPanelGrafica = new javax.swing.JPanel();\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n jLabel1.setText(\"Seleciona una Grafica\");\n\n jComboGrafica.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n jComboGrafica.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione una Grafica\", \"Número de productos por categoria\", \"Ganancia por Categoria\", \"Cantidad de prodctos pedidos\", \"Inversion\" }));\n jComboGrafica.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboGraficaItemStateChanged(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n jLabel2.setText(\"Tipo\");\n\n jComboTipo.setFont(new java.awt.Font(\"Arial\", 0, 12)); // NOI18N\n jComboTipo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione un tipo\", \"Barras\", \"Pastel\" }));\n\n jPanelGrafica.setBackground(new java.awt.Color(153, 153, 153));\n jPanelGrafica.setLayout(new java.awt.BorderLayout());\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanelGrafica, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(jComboTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jComboGrafica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanelGrafica, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboGrafica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jComboTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(20, 20, 20))\n );\n\n pack();\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tAnalisisTransaClienteBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.analisistransacliente,new Object(),this.analisistransaclienteParameterGeneral,this.analisistransaclienteReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tAnalisisTransaClienteBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.analisistransacliente,new Object(),this.analisistransaclienteParameterGeneral,this.analisistransaclienteReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,AnalisisTransaClienteConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tTipoDireccionBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.tipodireccion,new Object(),this.tipodireccionParameterGeneral,this.tipodireccionReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tTipoDireccionBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.tipodireccion,new Object(),this.tipodireccionParameterGeneral,this.tipodireccionReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,TipoDireccionConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tPagosAutorizadosBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.pagosautorizados,new Object(),this.pagosautorizadosParameterGeneral,this.pagosautorizadosReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tPagosAutorizadosBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.pagosautorizados,new Object(),this.pagosautorizadosParameterGeneral,this.pagosautorizadosReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,PagosAutorizadosConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tTipoDetalleMovimientoInventarioBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.tipodetallemovimientoinventario,new Object(),this.tipodetallemovimientoinventarioParameterGeneral,this.tipodetallemovimientoinventarioReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tTipoDetalleMovimientoInventarioBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.tipodetallemovimientoinventario,new Object(),this.tipodetallemovimientoinventarioParameterGeneral,this.tipodetallemovimientoinventarioReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,TipoDetalleMovimientoInventarioConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tTablaAmortiDetalleBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.tablaamortidetalle,new Object(),this.tablaamortidetalleParameterGeneral,this.tablaamortidetalleReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tTablaAmortiDetalleBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.tablaamortidetalle,new Object(),this.tablaamortidetalleParameterGeneral,this.tablaamortidetalleReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,TablaAmortiDetalleConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jComboBox4 = new javax.swing.JComboBox();\n jComboBox5 = new javax.swing.JComboBox();\n jComboBox6 = new javax.swing.JComboBox();\n jLabel8 = new javax.swing.JLabel();\n\n jLabel2.setText(\"jLabel2\");\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBounds(new java.awt.Rectangle(50, 50, 750, 500));\n getContentPane().setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Source:\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(40, 110, 53, 17);\n\n jComboBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"DELHI\", \"MUMBAI\", \"PUNE\" }));\n getContentPane().add(jComboBox1);\n jComboBox1.setBounds(240, 110, 130, 23);\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"Destination:\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(430, 110, 87, 23);\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"Singapore\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(560, 110, 80, 23);\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"Number of Passenger:\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(40, 150, 154, 20);\n\n jComboBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" }));\n getContentPane().add(jComboBox2);\n jComboBox2.setBounds(240, 150, 130, 23);\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel6.setText(\"Date of Departure:\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(40, 190, 129, 25);\n\n jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(411, 320, 230, 37);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(0, 51, 51));\n jLabel7.setText(\"Air Ticket Booking System\");\n getContentPane().add(jLabel7);\n jLabel7.setBounds(190, 20, 330, 50);\n\n jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"2015\" }));\n getContentPane().add(jComboBox4);\n jComboBox4.setBounds(380, 190, 56, 20);\n\n jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\", \"21\", \"22\", \"23\", \"24\" }));\n getContentPane().add(jComboBox5);\n jComboBox5.setBounds(240, 190, 40, 20);\n\n jComboBox6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"October\" }));\n getContentPane().add(jComboBox6);\n jComboBox6.setBounds(290, 190, 80, 20);\n getContentPane().add(jLabel8);\n jLabel8.setBounds(0, 0, 670, 440);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n Operador1TF = new javax.swing.JTextField();\n Operador2TF = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n ResultadoTF = new javax.swing.JTextArea();\n CalcularBT = new javax.swing.JButton();\n combo = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n jLabel1.setText(\"Operador1:\");\n\n jLabel2.setText(\"Operador2:\");\n\n jLabel3.setText(\"Operacao:\");\n\n ResultadoTF.setColumns(20);\n ResultadoTF.setRows(5);\n jScrollPane1.setViewportView(ResultadoTF);\n\n CalcularBT.setText(\"Calcular\");\n CalcularBT.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CalcularBTActionPerformed(evt);\n }\n });\n\n combo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"+\", \"-\", \"/\", \"*\" }));\n combo.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n comboItemStateChanged(evt);\n }\n });\n combo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Operador2TF, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Operador1TF)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(24, 24, 24))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(CalcularBT)\n .addGap(42, 42, 42))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(Operador1TF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(Operador2TF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(CalcularBT)))\n .addGap(0, 45, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n nama_kost = new javax.swing.JTextField();\n alamat_kost = new javax.swing.JTextField();\n jum_kamar = new javax.swing.JTextField();\n nama_pemilik = new javax.swing.JTextField();\n no_pemilik = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n nama_penyewa = new javax.swing.JTextField();\n no_penyewa = new javax.swing.JTextField();\n kode_sewa = new javax.swing.JComboBox<>();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Kost\");\n\n jLabel2.setText(\"Nama Kost : \");\n\n jLabel3.setText(\"Alamat Kost : \");\n\n jLabel4.setText(\"Jumlah Kamar: \");\n\n jLabel5.setText(\"Pemilik Kost :\");\n\n jLabel6.setText(\"No HP : \");\n\n nama_kost.setToolTipText(\"\");\n nama_kost.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nama_kostActionPerformed(evt);\n }\n });\n\n alamat_kost.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n alamat_kostActionPerformed(evt);\n }\n });\n\n no_pemilik.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n no_pemilikActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Sewa Kost\");\n\n jLabel8.setText(\"Nama :\");\n\n jLabel9.setText(\"Kode Kos : \");\n\n jLabel10.setText(\"Kode Kos : \");\n\n kode_sewa.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(100, 100, 100))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(nama_kost, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(nama_pemilik))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(no_pemilik, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(alamat_kost)\n .addComponent(jum_kamar))))\n .addGap(59, 59, 59)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nama_penyewa)\n .addComponent(no_penyewa)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(kode_sewa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 77, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(nama_kost, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(nama_penyewa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(alamat_kost, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9)\n .addComponent(no_penyewa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jum_kamar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(kode_sewa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(nama_pemilik, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(no_pemilik, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 145, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Prov = new javax.swing.JComboBox<>();\n Ko = new javax.swing.JComboBox<>();\n Kec = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Prov.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n Prov.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ProvItemStateChanged(evt);\n }\n });\n Prov.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ProvActionPerformed(evt);\n }\n });\n\n Ko.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n Kec.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(79, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(247, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(108, 108, 108))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jPanel7 = new javax.swing.JPanel();\n jButton13 = new javax.swing.JButton();\n jButton14 = new javax.swing.JButton();\n jButton15 = new javax.swing.JButton();\n jPanel8 = new javax.swing.JPanel();\n jButton16 = new javax.swing.JButton();\n jButton17 = new javax.swing.JButton();\n jButton18 = new javax.swing.JButton();\n jPanel9 = new javax.swing.JPanel();\n jButton19 = new javax.swing.JButton();\n jButton20 = new javax.swing.JButton();\n jButton21 = new javax.swing.JButton();\n jPanel10 = new javax.swing.JPanel();\n jButton22 = new javax.swing.JButton();\n jButton23 = new javax.swing.JButton();\n jButton24 = new javax.swing.JButton();\n jPanel11 = new javax.swing.JPanel();\n jButton25 = new javax.swing.JButton();\n jButton26 = new javax.swing.JButton();\n jButton27 = new javax.swing.JButton();\n jPanel12 = new javax.swing.JPanel();\n jButton28 = new javax.swing.JButton();\n jButton29 = new javax.swing.JButton();\n jButton30 = new javax.swing.JButton();\n jPanel13 = new javax.swing.JPanel();\n jButton31 = new javax.swing.JButton();\n jButton32 = new javax.swing.JButton();\n jButton33 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel14 = new javax.swing.JPanel();\n jPanel15 = new javax.swing.JPanel();\n jButton34 = new javax.swing.JButton();\n jPanel16 = new javax.swing.JPanel();\n jButton37 = new javax.swing.JButton();\n jPanel17 = new javax.swing.JPanel();\n jButton35 = new javax.swing.JButton();\n jButton36 = new javax.swing.JButton();\n jButton38 = new javax.swing.JButton();\n jButton39 = new javax.swing.JButton();\n jButton40 = new javax.swing.JButton();\n jButton41 = new javax.swing.JButton();\n jPanel18 = new javax.swing.JPanel();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jPanel19 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jPanel20 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jButton7 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel2.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton1.setText(\"3\");\n jButton1.setFocusPainted(false);\n\n jButton2.setText(\"2\");\n jButton2.setFocusPainted(false);\n\n jButton3.setText(\"1\");\n jButton3.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(33, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n\n jButton4.setText(\"6\");\n jButton4.setFocusPainted(false);\n\n jButton5.setText(\"5\");\n jButton5.setFocusPainted(false);\n\n jButton6.setText(\"4\");\n jButton6.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4)\n .addComponent(jButton5)\n .addComponent(jButton6))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton6)\n .addContainerGap())\n );\n\n jButton13.setText(\"9\");\n jButton13.setFocusPainted(false);\n\n jButton14.setText(\"8\");\n jButton14.setFocusPainted(false);\n\n jButton15.setText(\"7\");\n jButton15.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton13)\n .addComponent(jButton14)\n .addComponent(jButton15))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton13)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton15)\n .addContainerGap())\n );\n\n jPanel8.setBackground(new java.awt.Color(255, 204, 204));\n jPanel8.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton16.setText(\"12\");\n jButton16.setFocusPainted(false);\n\n jButton17.setText(\"11\");\n jButton17.setFocusPainted(false);\n\n jButton18.setText(\"10\");\n jButton18.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton16)\n .addComponent(jButton17)\n .addComponent(jButton18))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton18)\n .addContainerGap())\n );\n\n jPanel9.setBackground(new java.awt.Color(255, 204, 204));\n jPanel9.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton19.setText(\"15\");\n jButton19.setFocusPainted(false);\n\n jButton20.setText(\"14\");\n jButton20.setFocusPainted(false);\n\n jButton21.setText(\"13\");\n jButton21.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);\n jPanel9.setLayout(jPanel9Layout);\n jPanel9Layout.setHorizontalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton19)\n .addComponent(jButton20)\n .addComponent(jButton21))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton19)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton21)\n .addContainerGap())\n );\n\n jPanel10.setBackground(new java.awt.Color(255, 204, 204));\n jPanel10.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton22.setText(\"18\");\n jButton22.setFocusPainted(false);\n\n jButton23.setText(\"17\");\n jButton23.setFocusPainted(false);\n\n jButton24.setText(\"16\");\n jButton24.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);\n jPanel10.setLayout(jPanel10Layout);\n jPanel10Layout.setHorizontalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton22)\n .addComponent(jButton23)\n .addComponent(jButton24))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton23)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton24)\n .addContainerGap())\n );\n\n jPanel11.setBackground(new java.awt.Color(153, 153, 255));\n jPanel11.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton25.setText(\"21\");\n jButton25.setFocusPainted(false);\n\n jButton26.setText(\"20\");\n jButton26.setFocusPainted(false);\n\n jButton27.setText(\"19\");\n jButton27.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);\n jPanel11.setLayout(jPanel11Layout);\n jPanel11Layout.setHorizontalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel11Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton25)\n .addComponent(jButton26)\n .addComponent(jButton27))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel11Layout.setVerticalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton25)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton26)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton27)\n .addContainerGap())\n );\n\n jPanel12.setBackground(new java.awt.Color(153, 153, 255));\n jPanel12.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton28.setText(\"24\");\n jButton28.setFocusPainted(false);\n\n jButton29.setText(\"23\");\n jButton29.setFocusPainted(false);\n\n jButton30.setText(\"22\");\n jButton30.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);\n jPanel12.setLayout(jPanel12Layout);\n jPanel12Layout.setHorizontalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel12Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton28)\n .addComponent(jButton29)\n .addComponent(jButton30))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel12Layout.setVerticalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton28)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton29)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton30)\n .addContainerGap())\n );\n\n jButton31.setText(\"27\");\n jButton31.setFocusPainted(false);\n\n jButton32.setText(\"26\");\n jButton32.setFocusPainted(false);\n\n jButton33.setText(\"25\");\n jButton33.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);\n jPanel13.setLayout(jPanel13Layout);\n jPanel13Layout.setHorizontalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton31)\n .addComponent(jButton32)\n .addComponent(jButton33))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel13Layout.setVerticalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton31)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton32)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton33)\n .addContainerGap())\n );\n\n jLabel2.setText(\"Hospitalización\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel2))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n jPanel14.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton34.setText(\"A-2\");\n jButton34.setBorder(null);\n jButton34.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);\n jPanel15.setLayout(jPanel15Layout);\n jPanel15Layout.setHorizontalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton34, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel15Layout.setVerticalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n\n jButton37.setText(\"A-1\");\n jButton37.setBorder(null);\n jButton37.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);\n jPanel16.setLayout(jPanel16Layout);\n jPanel16Layout.setHorizontalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton37, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel16Layout.setVerticalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37))\n );\n\n javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);\n jPanel14.setLayout(jPanel14Layout);\n jPanel14Layout.setHorizontalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel14Layout.setVerticalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n jPanel17.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton35.setText(\"Masculino\");\n jButton35.setBorder(null);\n jButton35.setFocusPainted(false);\n jButton35.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton35ActionPerformed(evt);\n }\n });\n\n jButton36.setText(\"Femenino\");\n jButton36.setBorder(null);\n jButton36.setFocusPainted(false);\n\n jButton38.setText(\"Pediatrico\");\n jButton38.setBorder(null);\n jButton38.setFocusPainted(false);\n\n jButton39.setText(\"Ginecologia\");\n jButton39.setBorder(null);\n jButton39.setFocusPainted(false);\n jButton39.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton39ActionPerformed(evt);\n }\n });\n\n jButton40.setText(\"C. General\");\n jButton40.setBorder(null);\n jButton40.setFocusPainted(false);\n jButton40.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton40ActionPerformed(evt);\n }\n });\n\n jButton41.setText(\"M. General\");\n jButton41.setBorder(null);\n jButton41.setFocusPainted(false);\n jButton41.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton41ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);\n jPanel17.setLayout(jPanel17Layout);\n jPanel17Layout.setHorizontalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton36, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)\n .addComponent(jButton35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(158, Short.MAX_VALUE))\n );\n jPanel17Layout.setVerticalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton35, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel18.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel3.setText(\"Nombre (s):\");\n\n jLabel4.setText(\"Primer Apellido:\");\n\n jLabel5.setText(\"Segundo apellido:\");\n\n jLabel6.setText(\"Edad:\");\n\n jLabel7.setText(\"Diagnostico:\");\n\n javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);\n jPanel18.setLayout(jPanel18Layout);\n jPanel18Layout.setHorizontalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addContainerGap(40, Short.MAX_VALUE))\n );\n jPanel18Layout.setVerticalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addGap(1, 1, 1)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addGap(1, 1, 1)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addGap(2, 2, 2)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel7)\n .addGap(2, 2, 2)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel19.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel1.setText(\"Busqueda paciente hospitalizado:\");\n\n javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);\n jPanel19.setLayout(jPanel19Layout);\n jPanel19Layout.setHorizontalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel19Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel19Layout.setVerticalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel20.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton7.setText(\"U-1\");\n jButton7.setBorder(null);\n jButton7.setFocusPainted(false);\n\n jButton8.setText(\"U-2\");\n jButton8.setBorder(null);\n jButton8.setFocusPainted(false);\n\n jButton9.setText(\"U-3\");\n jButton9.setBorder(null);\n jButton9.setFocusPainted(false);\n\n jButton10.setText(\"U-4\");\n jButton10.setBorder(null);\n jButton10.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(4, 4, 4)))\n .addContainerGap(12, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);\n jPanel20.setLayout(jPanel20Layout);\n jPanel20Layout.setHorizontalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel20Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel20Layout.setVerticalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()\n .addContainerGap(12, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tFacturaPuntoVentaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.facturapuntoventa,new Object(),this.facturapuntoventaParameterGeneral,this.facturapuntoventaReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\tif(sTipo.equals(\"id_clienteFacturaPuntoVenta\")) {\r\n\t\t\t\tif(jComboBoxGenerico==null) {\r\n\t\t\t\t\tjComboBoxGenerico=this.jInternalFrameDetalleFormFacturaPuntoVenta.jComboBoxid_clienteFacturaPuntoVenta;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.facturapuntoventaSessionBean.getConGuardarRelaciones()) {\r\n\t\t\t\t\t//classes=FacturaPuntoVentaConstantesFunciones.getClassesRelationshipsOfFacturaPuntoVenta(new ArrayList<Classe>(),DeepLoadType.NONE);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.procesarActionsCombosForeignKeyCliente(jComboBoxGenerico,\"Formulario\");\r\n\r\n\t\t\t\tthis.recargarFormFacturaPuntoVenta(sTipo,\"Formulario\",eventoGlobalTipo,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,\"COMBOBOX\",classes,false,esControlTabla);\r\n\t\t\t}\r\n\t\t\t else if(sTipo.equals(\"jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta\")) {\r\n\t\t\t\tthis.procesarActionsCombosForeignKeyCliente(jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta,\"FK_IdCliente\");\r\n\t\t\t\t//recargarFormFacturaPuntoVentaCliente(jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta,\"FK_IdCliente\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tFacturaPuntoVentaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.facturapuntoventa,new Object(),this.facturapuntoventaParameterGeneral,this.facturapuntoventaReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,FacturaPuntoVentaConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getSource()==jComboBox){\n updateIcon(names[jComboBox.getSelectedIndex()]);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabNom = new javax.swing.JLabel();\n jLabAp1 = new javax.swing.JLabel();\n jLabAp2 = new javax.swing.JLabel();\n jLabSex = new javax.swing.JLabel();\n jLabEdad = new javax.swing.JLabel();\n jLabNomin = new javax.swing.JLabel();\n jLabIRPF = new javax.swing.JLabel();\n jTexNom = new javax.swing.JTextField();\n jTexAp1 = new javax.swing.JTextField();\n jTexNomin = new javax.swing.JTextField();\n jTexAp2 = new javax.swing.JTextField();\n jTexEd = new javax.swing.JTextField();\n jTexIRPF = new javax.swing.JTextField();\n jBAcept = new javax.swing.JButton();\n jBAtras = new javax.swing.JButton();\n jCoBSex = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabNom.setText(\"Nombre :\");\n\n jLabAp1.setText(\"Apellido 1:\");\n\n jLabAp2.setText(\"Apellido 2:\");\n\n jLabSex.setText(\"Sexo:\");\n\n jLabEdad.setText(\"Edad:\");\n\n jLabNomin.setText(\"Nomina:\");\n\n jLabIRPF.setText(\"IRPF:\");\n\n jTexNom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTexNomActionPerformed(evt);\n }\n });\n\n jBAcept.setText(\"Aceptar\");\n jBAcept.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAceptActionPerformed(evt);\n }\n });\n\n jBAtras.setText(\"Atrás\");\n jBAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAtrasActionPerformed(evt);\n }\n });\n\n jCoBSex.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"H\", \"M\", \"NB\" }));\n jCoBSex.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCoBSexActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(19, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabNomin)\n .addGap(27, 27, 27)\n .addComponent(jTexNomin, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabAp1)\n .addComponent(jLabSex))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCoBSex, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexAp1))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jBAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 143, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabAp2)\n .addComponent(jLabEdad)\n .addComponent(jLabIRPF))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTexEd, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)\n .addComponent(jTexIRPF, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTexAp2)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBAcept, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(116, 116, 116)\n .addComponent(jLabNom)\n .addGap(34, 34, 34)\n .addComponent(jTexNom, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabNom)\n .addComponent(jTexNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabAp1)\n .addComponent(jLabAp2)\n .addComponent(jTexAp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexAp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabSex)\n .addComponent(jLabEdad)\n .addComponent(jTexEd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCoBSex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabIRPF)\n .addComponent(jLabNomin)\n .addComponent(jTexNomin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexIRPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBAtras)\n .addComponent(jBAcept)))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n cboard = new javax.swing.JComboBox<>();\n cdrop = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n lbbodr = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\" Boarding Location\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"Dropping Location\");\n\n jPanel2.setBackground(new java.awt.Color(194, 62, 75));\n\n lbbodr.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n lbbodr.setForeground(new java.awt.Color(255, 255, 255));\n lbbodr.setText(\"Journey\");\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/bus/back.png\"))); // NOI18N\n jLabel4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel4MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lbbodr)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lbbodr, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jButton1.setBackground(new java.awt.Color(153, 0, 0));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"Continue Booking\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setBackground(new java.awt.Color(153, 0, 0));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Select Seats\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(cboard, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(jLabel2)\n .addComponent(cdrop, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(88, 88, 88)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(112, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(130, 130, 130)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(cdrop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(cboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(26, 26, 26))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void comboBox3ItemStateChanged(ItemEvent e) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>) e.getSource();\n\t\t\t\tinputTypes_dropDown.setModel(new DefaultComboBoxModel<>(inputs[cb.getSelectedIndex()]));\n\t\t\t}", "private void PLAYERS_ComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(PLAYERS_ComboBox1.getSelectedIndex() == 1)\n Machin_playin = true;\n else\n Machin_playin = false;\n \n }", "private void formWindowActivated(java.awt.event.WindowEvent evt) {\n jComboBox3.removeAllItems();\r\n fillrec();\r\n //jPanel5.setVisible(false);\r\n \r\n }", "private JComboBox getJComboBox2() {\n\t\tif (jComboBox2 == null) {\n\t\t\tjComboBox2 = new JComboBox(labelFiles);\n\t\t\tjComboBox2.setPreferredSize(new Dimension(130, 24));\n\t\t\tjComboBox2.setEditable(true);\n\t\t}\n\t\tjComboBox2.addItem(\"\");\n\t\treturn jComboBox2;\n\t}", "private void cbxJornadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbxJornadaActionPerformed\n if (cbxJornada.getSelectedIndex() == 1) {\n jornadaTrabalho(40);\n } else if(cbxJornada.getSelectedIndex() == 2){\n jornadaTrabalho(44);\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString j1 = (String)cob.getSelectedItem();\t\t\t\t\n\t\t\t\tString j2=jtf2.getText();\n\n\t\t\t\tGetSQL db = new GetSQL();\n\t\t\t\tdb.ConnectSQL();\n\t\t\t\tif(j2.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter data!\", \"Message\",\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\t\t}else{\n\t\t\t\tString sql = \"update sc set degree='\" + j2 + \"' where sno='\"+non+\"' and cno='\" + j1.substring(0, 3) + \"'\";\n\t\t\t\tdb.insert(sql);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Modified successfully\", \"Message\",\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\t\t}\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jcbDeliveryman = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jcbOrderNo = new javax.swing.JComboBox();\n btnAssign = new javax.swing.JButton();\n lblDeliverymanName = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n lblBack = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jcbDeliveryman.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcbDeliverymanActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Job Assignation\");\n\n jLabel2.setText(\"Deliveryman Number:\");\n\n jLabel3.setText(\"Order Number:\");\n\n btnAssign.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n btnAssign.setText(\"ASSIGN\");\n btnAssign.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnAssignMouseClicked(evt);\n }\n });\n\n jLabel5.setText(\"Deliveryman Name:\");\n\n lblBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ModuleD/icon_taxa_nav_arrow_left.png\"))); // NOI18N\n lblBack.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lblBackMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jcbOrderNo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(lblBack)\n .addGap(18, 18, 18)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jcbDeliveryman, 0, 164, Short.MAX_VALUE)\n .addComponent(lblDeliverymanName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(65, 65, 65)\n .addComponent(btnAssign, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(68, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblBack, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcbDeliveryman, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblDeliverymanName, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcbOrderNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(36, 36, 36)\n .addComponent(btnAssign, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(35, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n\n String lacname3 = jComboBox27.getSelectedItem().toString();\n\n array3.add(lacname3);\n // System.out.println(array);\n\n // day.addItem(array.get());\n Vector vv3 = new Vector();\n\n for (int i = 0; i < array3.size(); i++) {\n String gette = array3.get(i);\n vv3.add(gette);\n jComboBox26.setModel(new DefaultComboBoxModel<>(vv3));\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton5 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameActivated(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel1.setText(\"* Vehiculo\");\n\n jTextField1.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel2.setText(\"Color\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton1.setText(\" \");\n jButton1.setFocusable(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel3.setText(\"* Serie\");\n\n jTextField2.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel4.setText(\"Placas\");\n\n jTextField3.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton2.setText(\"Agregar\");\n jButton2.setFocusable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setBackground(new java.awt.Color(255, 255, 255));\n jButton3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton3.setText(\"Cancelar\");\n jButton3.setFocusable(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setBackground(new java.awt.Color(255, 255, 255));\n jButton4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton4.setText(\"Actualizar\");\n jButton4.setFocusable(false);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Dialog\", 0, 10)); // NOI18N\n jTextArea1.setLineWrap(true);\n jTextArea1.setRows(5);\n jTextArea1.setWrapStyleWord(true);\n jTextArea1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Comentario\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 8))); // NOI18N\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton5.setBackground(new java.awt.Color(255, 255, 255));\n jButton5.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton5.setText(\"Eliminar\");\n jButton5.setFocusable(false);\n\n jLabel5.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jLabel5.setText(\"Agencia\");\n\n jComboBox1.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(29, 29, 29)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(22, 22, 22)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 406, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton3)\n .addComponent(jButton2)\n .addComponent(jButton5))\n .addContainerGap(15, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n txtUrunSeriNo = new javax.swing.JTextField();\n txtSatisFiyati = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtUrunModel = new javax.swing.JTextField();\n txtUrunIsmi = new javax.swing.JTextField();\n txtAlisFiyati = new javax.swing.JTextField();\n txtAdet = new javax.swing.JTextField();\n jPanel2 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n comboDepo = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Stok Ekle | Stok Otomasyonu |\");\n setFocusTraversalPolicyProvider(true);\n setLocation(new java.awt.Point(0, 0));\n setResizable(false);\n setType(java.awt.Window.Type.UTILITY);\n\n jButton1.setText(\"EKLE\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n txtSatisFiyati.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n txtSatisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtSatisFiyatiKeyTyped(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"Ürün Seri No : \");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"Ürün İsmi :\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Ürün Model :\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"Adet :\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel6.setText(\"Alış Fiyatı :\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel7.setText(\"Satış Fiyatı :\");\n\n txtAlisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAlisFiyatiKeyTyped(evt);\n }\n });\n\n txtAdet.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAdetKeyTyped(evt);\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(48, 66, 105));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"# Ürün Ekle #\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)\n .addGap(32, 32, 32))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel8.setText(\"Depo :\");\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.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel7)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(comboDepo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)\n .addComponent(txtAdet)\n .addComponent(txtUrunModel)\n .addComponent(txtUrunIsmi)\n .addComponent(txtUrunSeriNo)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunSeriNo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunIsmi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunModel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAdet, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboDepo, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void jcbY_AxisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new JPanel();\n jButton1 = new javax.swing.JButton();\n visrusjComboBox = new javax.swing.JComboBox<>();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n quarantinejComboBox = new javax.swing.JComboBox<>();\n socialdistancingjComboBox = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n maskjComboBox = new javax.swing.JComboBox<>();\n jLabel6 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n populationjTextField = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jPanel2 = new JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setPreferredSize(new Dimension(1000, 800));\n\n jButton1.setText(\"Run\");\n jButton1.setAlignmentX(1.0F);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n visrusjComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n visrusjComboBox.setAlignmentX(1.0F);\n\n jLabel3.setText(\"Virus\");\n jLabel3.setAlignmentX(1.0F);\n\n jLabel4.setText(\"Quarantine\");\n jLabel4.setAlignmentX(1.0F);\n\n quarantinejComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n quarantinejComboBox.setAlignmentX(1.0F);\n\n socialdistancingjComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n socialdistancingjComboBox.setAlignmentX(1.0F);\n\n jLabel5.setText(\"Social distancing \");\n jLabel5.setAlignmentX(1.0F);\n\n maskjComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n maskjComboBox.setAlignmentX(1.0F);\n\n jLabel6.setText(\"Mask\");\n jLabel6.setAlignmentX(1.0F);\n\n jLabel8.setText(\"Population density\");\n\n jLabel9.setFont(new java.awt.Font(\"Lucida Grande\", 0, 10)); // NOI18N\n jLabel9.setText(\"Default value: 200\");\n\n jButton2.setText(\"Graphics\");\n jButton2.setAlignmentX(1.0F);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(populationjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(visrusjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(quarantinejComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(socialdistancingjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(maskjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {maskjComboBox, quarantinejComboBox, socialdistancingjComboBox, visrusjComboBox});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(quarantinejComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(socialdistancingjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(maskjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(visrusjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(populationjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(jLabel9)\n .addContainerGap(13, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 352, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel4 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setClosable(true);\n setIconifiable(true);\n setTitle(\"Настройки организации\");\n setFrameIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/settings.png\"))); // NOI18N\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameIconified(evt);\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setText(\"Организация\");\n\n jLabel2.setText(\"jLabel2\");\n\n jLabel3.setText(\"Основная валюта\");\n\n jLabel4.setText(\"Основной склад\");\n\n jLabel5.setText(\"Контрагент \");\n\n jButton1.setText(\"Отмена\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Сохранить\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox3, 0, 166, Short.MAX_VALUE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n\n pack();\n }", "private void gradoSeleccionado(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gradoSeleccionado\n if (cbox2Grado.getSelectedIndex() != 0) {\n gradoSeleccionado = true;\n buscarEvaluacion();\n vaciarTabla();\n } else {\n gradoSeleccionado = false;\n vaciarTabla();\n cbox3Evaluacion.removeAllItems();\n cbox3Evaluacion.addItem(\"Seleccione una opción\");\n }\n\n }", "private void jComboBoxSpecialisatieActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxSpecialisatieActionPerformed\n\n this.SpecialisatieSitueert = this.dbFacade.getAllSitueertOfSpecialisatieID(((Specialisatie)this.jComboBoxSpecialisatie.getSelectedItem()).getId());\n this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\tpublic void actionPerformed(ActionEvent evt) {\n\n\t\tJComboBox cb = (JComboBox)evt.getSource();\n\t\tString look = (String) cb.getSelectedItem();\n System.out.println(\"picked = \" + look);\n try {\n\t\t\tUIManager.setLookAndFeel(look);\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedLookAndFeelException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmainWindow.closeWindow();\n mainWindow.drawMainWindow();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx1 = cb[1].getSelectedIndex();\n\t\t\t}", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed\n MimsPlus imp = null;\n\n // Get the title of the window currently selected in the combobox.\n // Then get the window associated with that title. \n String title = (String) jComboBox1.getSelectedItem();\n if (title != null) {\n imp = (MimsPlus) windows.get(title);\n }\n\n // Select autocontrasting radio button...\n if (imp != null) {\n jRadioButton1.setSelected(imp.getAutoContrastAdjust());\n updateHistogram();\n }\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jbloco = new javax.swing.JComboBox();\n japartamento = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Condomínio-SJ2\");\n\n jbloco.setForeground(new java.awt.Color(153, 0, 153));\n jbloco.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"BLOCO A\", \"BLOCO B\", \"BLOCO C\", \"BLOCO D\", \"BLOCO F\", \"BLOCO G\", \"BLOCO H\", \"BLOCO I\", \"BLOCO J\", \"BLOCO K\", \" \", \" \" }));\n jbloco.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jblocoActionPerformed(evt);\n }\n });\n\n japartamento.setForeground(new java.awt.Color(204, 0, 204));\n japartamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"APARTAMENTO 101\", \"APARTAMENTO 102\", \"APARTAMENTO 103\", \"APARTAMENTO 104\", \"APARTAMENTO 201\", \"APARTAMENTO 202\", \"APARTAMENTO 203\", \"APARTAMENTO 204\", \"APARTAMENTO 301\", \"APARTAMENTO 302\", \"APARTAMENTO 303\", \"APARTAMENTO 304\", \"APARTAMENTO 401\", \"APARTAMENTO 402\", \"APARTAMENTO 403\", \"APARTAMENTO 404\", \" \", \" \" }));\n\n jButton1.setText(\"Pesquisar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Verificar possibilidade de agendamento :\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 431, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(97, 97, 97)\n .addComponent(jButton1)))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addComponent(jLabel1)\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addContainerGap(230, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n comboEstado = new javax.swing.JComboBox<>();\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null}\n },\n new String [] {\n \"Beneficio Humedo\", \"Responsable\", \"Capturista\", \"Domicilio\", \"Telefono\", \"Estado\", \"Municipio\", \"Localidad\", \"Sociedad\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Filtros\"));\n\n jLabel1.setText(\"Beneficio\");\n\n jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField1KeyReleased(evt);\n }\n });\n\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField2KeyReleased(evt);\n }\n });\n\n jLabel2.setText(\"Responsable\");\n\n jLabel3.setText(\"Domicilio\");\n\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField3KeyReleased(evt);\n }\n });\n\n jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField4KeyReleased(evt);\n }\n });\n\n jLabel4.setText(\"Sociedad\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(170, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n jButton2.setText(\"Exportar\");\n\n jButton3.setText(\"Nuevo\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Editar\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton5.setText(\"Desactivar\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n comboEstado.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboEstadoActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(comboEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton3)\n .addComponent(jButton4)\n .addComponent(jButton5)\n .addComponent(comboEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel6 = new javax.swing.JLabel();\n NomeProdutoTextField = new javax.swing.JTextField();\n BtnGravar = new javax.swing.JButton();\n BtnCancelar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n DescricaoProdutoTextField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n GradeComboBox = new javax.swing.JComboBox();\n\n setClosable(true);\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setIconifiable(true);\n\n jLabel6.setText(\"Nome do Produto:\");\n\n NomeProdutoTextField.setColumns(15);\n\n BtnGravar.setText(\"Gravar\");\n BtnGravar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnGravarActionPerformed(evt);\n }\n });\n\n BtnCancelar.setText(\"Cancelar\");\n BtnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnCancelarActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Descrição do Produto:\");\n\n jLabel2.setText(\"Selecione a Grade:\");\n\n GradeComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n GradeComboBoxItemStateChanged(evt);\n }\n });\n GradeComboBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GradeComboBoxActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jLabel1)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(NomeProdutoTextField)\n .addComponent(DescricaoProdutoTextField)\n .addComponent(GradeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(BtnCancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(BtnGravar)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(NomeProdutoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(DescricaoProdutoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(GradeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(BtnGravar)\n .addComponent(BtnCancelar))\n .addContainerGap())\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jComboBox1 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setSize(new java.awt.Dimension(1000, 800));\n\n jPanel1.setBackground(new java.awt.Color(47, 47, 48));\n jPanel1.setForeground(java.awt.Color.lightGray);\n jPanel1.setMaximumSize(new java.awt.Dimension(1000, 800));\n jPanel1.setMinimumSize(new java.awt.Dimension(1000, 800));\n jPanel1.setPreferredSize(new java.awt.Dimension(1000, 800));\n\n jList1.setBackground(new java.awt.Color(51, 51, 51));\n jList1.setFont(new java.awt.Font(\"Gotham\", 1, 12)); // NOI18N\n jList1.setForeground(java.awt.Color.lightGray);\n jList1.setSelectionBackground(new java.awt.Color(28, 91, 201));\n jList1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jList1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jList1);\n\n jComboBox1.setBackground(java.awt.Color.lightGray);\n jComboBox1.setFont(new java.awt.Font(\"Gotham\", 1, 12)); // NOI18N\n jComboBox1.setForeground(java.awt.Color.lightGray);\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jButton1.setBackground(new java.awt.Color(51, 51, 51));\n jButton1.setFont(new java.awt.Font(\"Gotham\", 1, 12)); // NOI18N\n jButton1.setForeground(java.awt.Color.lightGray);\n jButton1.setText(\"Alterar Categoria\");\n jButton1.setBorder(null);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Gotham\", 1, 12)); // NOI18N\n jLabel1.setForeground(java.awt.Color.lightGray);\n jLabel1.setText(\"Escolha a nova categoria\");\n\n jButton2.setBackground(new java.awt.Color(51, 51, 51));\n jButton2.setFont(new java.awt.Font(\"Gotham\", 1, 12)); // NOI18N\n jButton2.setForeground(java.awt.Color.lightGray);\n jButton2.setText(\"Voltar\");\n jButton2.setBorder(null);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(150, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(58, 58, 58)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(35, 35, 35)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(147, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n nameLabel = new javax.swing.JLabel();\n performButton = new javax.swing.JButton();\n availableNames = new javax.swing.JComboBox<>();\n\n setMaximumSize(new java.awt.Dimension(435, 600));\n setMinimumSize(new java.awt.Dimension(435, 600));\n setPreferredSize(new java.awt.Dimension(435, 600));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Знайти за назвою\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n nameLabel.setText(\"Назва:\");\n\n performButton.setText(\"Виконати\");\n performButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n performButtonActionPerformed(evt);\n }\n });\n\n availableNames.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(performButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(40, 40, 40)\n .addComponent(performButton))\n );\n\n nameLabel.getAccessibleContext().setAccessibleName(\"id\");\n\n getAccessibleContext().setAccessibleParent(this);\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "private void jcbX_AxisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n jTable2.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane2.setViewportView(jTable2);\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"События на:\");\n\n jLabel2.setText(\"События по выслуге лет:\");\n\n jLabel4.setText(\"События по дням рождениям:\");\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(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 635, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(11, 11, 11))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton11 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jButton4 = new javax.swing.JButton();\n jButton14345 = new javax.swing.JButton();\n jComboBox3 = new javax.swing.JComboBox<>();\n jButton7 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextPane1 = new javax.swing.JTextPane();\n jButton9 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jComboBox4 = new javax.swing.JComboBox<>();\n jButton23234 = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton12 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n jButton13 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton11.setText(\"11\");\n jButton11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton11ActionPerformed(evt);\n }\n });\n\n jButton6.setText(\"6\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"C\");\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Salon Seçiniz\" }));\n jComboBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox2ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"4\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton14345.setText(\"Satın Al\");\n jButton14345.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton14345ActionPerformed(evt);\n }\n });\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seans Seçiniz\" }));\n jComboBox3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox3ActionPerformed(evt);\n }\n });\n\n jButton7.setText(\"7\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n\n jScrollPane1.setViewportView(jTextPane1);\n\n jButton9.setText(\"9\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"A\");\n\n jLabel1.setText(\"İsim: \");\n\n jLabel3.setText(\"B\");\n\n jComboBox4.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jButton23234.setText(\"Getir\");\n jButton23234.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton23234ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"1\");\n jButton1.setMaximumSize(new java.awt.Dimension(39, 30));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton10.setText(\"10\");\n jButton10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton10ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton8.setText(\"8\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"3\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton12.setText(\"12\");\n jButton12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton12ActionPerformed(evt);\n }\n });\n\n jButton5.setText(\"5\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Film Seçiniz\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jButton13.setText(\"Perde\");\n jButton13.setEnabled(false);\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox3, 0, 171, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n .addComponent(jComboBox4, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jButton23234))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(9, 9, 9))\n .addComponent(jLabel2))\n .addGap(42, 42, 42)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(238, 238, 238))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(140, 140, 140))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton14345, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(285, 285, 285))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton13))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(94, 94, 94)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)))\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jButton23234))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton14345, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(53, 53, 53))\n );\n\n pack();\n }", "private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jPanel1 = new javax.swing.JPanel();\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(UnitConverterTopComponent.class, \"UnitConverterTopComponent.jLabel1.text\")); // NOI18N\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 331, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 457, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cbplaca = new javax.swing.JComboBox<>();\n cbdia = new javax.swing.JComboBox<>();\n cbcolor = new javax.swing.JComboBox<>();\n imprimirtxt = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n revisar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n cbplaca.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cbdia.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cbcolor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n imprimirtxt.setText(\"jTextField1\");\n\n jButton1.setText(\"jButton1\");\n\n revisar.setText(\"jButton2\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cbplaca, 0, 146, Short.MAX_VALUE)\n .addComponent(cbdia, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbcolor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 210, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(imprimirtxt, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(44, 44, 44))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(106, 106, 106))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(revisar)\n .addGap(103, 103, 103))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbplaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGap(59, 59, 59)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbdia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(imprimirtxt, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbcolor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(revisar))\n .addContainerGap(140, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cmbFakture = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n cmbProizvod = new javax.swing.JComboBox();\n btnUbaci = new javax.swing.JButton();\n txtKolicina = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Faktura: \");\n\n jLabel2.setText(\"Kolicina:\");\n\n jLabel3.setText(\"Proizvod:\");\n\n btnUbaci.setText(\"Ubaci\");\n btnUbaci.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUbaciActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbProizvod, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cmbFakture, 0, 373, Short.MAX_VALUE)\n .addComponent(txtKolicina)))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnUbaci)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cmbFakture, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(102, 102, 102)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtKolicina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(82, 82, 82)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(cmbProizvod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addComponent(btnUbaci)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jFrame1 = new javax.swing.JFrame();\n jFrame2 = new javax.swing.JFrame();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n jSlider1 = new javax.swing.JSlider();\n jComboBox2 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox<>();\n\n javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());\n jFrame1.getContentPane().setLayout(jFrame1Layout);\n jFrame1Layout.setHorizontalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n jFrame1Layout.setVerticalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jFrame2Layout = new javax.swing.GroupLayout(jFrame2.getContentPane());\n jFrame2.getContentPane().setLayout(jFrame2Layout);\n jFrame2Layout.setHorizontalGroup(\n jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n jFrame2Layout.setVerticalGroup(\n jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(51, 51, 0));\n jPanel1.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 0, 11)); // NOI18N\n\n jPanel2.setBackground(new java.awt.Color(51, 51, 0));\n\n jLabel6.setBackground(new java.awt.Color(204, 204, 204));\n jLabel6.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 1, 40)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"CONFIGURE \");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\n );\n\n jLabel1.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 1, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Threshold CO Sensor:\");\n\n jLabel2.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 1, 16)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Alarm Duration:\");\n\n jLabel3.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 1, 16)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Alarm Volume:\");\n jLabel3.setToolTipText(\"\");\n\n jLabel4.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 1, 16)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Interval\");\n\n jTextField1.setBackground(new java.awt.Color(204, 204, 204));\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jTextField1.setForeground(new java.awt.Color(255, 255, 255));\n jTextField1.setOpaque(false);\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jComboBox1.setBackground(new java.awt.Color(204, 204, 204));\n jComboBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"1\", \"2\", \"3\", \"4\" }));\n jComboBox1.setToolTipText(\"Time(in minutes)\");\n jComboBox1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jSlider1.setBackground(new java.awt.Color(204, 204, 204));\n jSlider1.setFont(new java.awt.Font(\"Tahoma\", 1, 10)); // NOI18N\n jSlider1.setMajorTickSpacing(20);\n jSlider1.setMaximum(50);\n jSlider1.setMinorTickSpacing(10);\n jSlider1.setPaintLabels(true);\n jSlider1.setSnapToTicks(true);\n jSlider1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n\n jComboBox2.setBackground(new java.awt.Color(204, 204, 204));\n jComboBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"60\", \"15\", \"30\", \"10\", \"120\", \"\" }));\n jComboBox2.setToolTipText(\"Time(in second)\");\n jComboBox2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jComboBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox2ActionPerformed(evt);\n }\n });\n\n jButton1.setBackground(new java.awt.Color(204, 204, 204));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton1.setText(\"Save\");\n jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setBackground(new java.awt.Color(204, 204, 204));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton2.setText(\"Back\");\n jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"MS Reference Sans Serif\", 1, 16)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Sensor ID:\");\n\n jComboBox3.setBackground(new java.awt.Color(204, 204, 204));\n jComboBox3.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"CO Sensor\", \"Heat Sensor\", \"Smoke Sensor\", \" \" }));\n jComboBox3.setToolTipText(\"Select sensor type.\");\n jComboBox3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jComboBox3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jComboBox3MouseClicked(evt);\n }\n });\n jComboBox3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(31, 248, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(58, 58, 58)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(246, 246, 246))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(49, 49, 49)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(19, 19, 19)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButtonPlayPause = new javax.swing.JButton();\n jButtonStop = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setLayout(null);\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n add(jComboBox1);\n jComboBox1.setBounds(80, 0, 290, 27);\n\n jButton1.setText(\"Upload\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n add(jButton1);\n jButton1.setBounds(270, 30, 100, 29);\n\n jLabel1.setText(\"Adicionar:\");\n add(jLabel1);\n jLabel1.setBounds(0, 0, 70, 17);\n\n jButtonPlayPause.setText(\"Play\");\n jButtonPlayPause.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonPlayPauseActionPerformed(evt);\n }\n });\n add(jButtonPlayPause);\n jButtonPlayPause.setBounds(0, 30, 70, 29);\n\n jButtonStop.setText(\"Stop\");\n jButtonStop.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonStopActionPerformed(evt);\n }\n });\n add(jButtonStop);\n jButtonStop.setBounds(80, 30, 70, 29);\n\n jButton2.setText(\"Exportar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n add(jButton2);\n jButton2.setBounds(160, 30, 100, 29);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jC1 = new javax.swing.JComboBox<>();\n jC2 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jYearChooser1 = new com.toedter.calendar.JYearChooser();\n jC3 = new javax.swing.JComboBox<>();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(0, 204, 204));\n\n jLabel1.setFont(new java.awt.Font(\"Andalus\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 51, 255));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"PAYMENT SLIP\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"Department\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"Faculty Id\");\n\n jC1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jC1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Computer Science\", \"Mathematics\", \"Chemistry\", \"Physics\", \"Botony\", \"Zoology\" }));\n jC1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jC1ActionPerformed(evt);\n }\n });\n\n jC2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jC2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jC2ActionPerformed(evt);\n }\n });\n\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton1.setText(\"Print\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jC3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jC3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"January\", \"February\", \"March\", \"April\", \"May\", \"June \", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" }));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel4.setText(\"Month\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"Year\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel7.setText(\"Name\");\n\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton2.setText(\"Back\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jC2, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jC3, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(66, 66, 66))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jYearChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 463, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jC1, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(179, 179, 179)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(47, 47, 47)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jC1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jC2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(27, 27, 27)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jC3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jYearChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE))\n .addGap(21, 21, 21))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void cdRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cdRadioActionPerformed\n itemList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select a CD\", \"Where The Light Is\", \"Unorthodox Jukebox\", \"Songs About Jane\" }));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n txt1 = new javax.swing.JTextField();\n txt2 = new javax.swing.JTextField();\n cmb1 = new javax.swing.JComboBox();\n cmb2 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n txt1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txt1KeyTyped(evt);\n }\n });\n\n txt2.setEditable(false);\n txt2.setBackground(new java.awt.Color(209, 202, 202));\n txt2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txt2KeyTyped(evt);\n }\n });\n\n cmb1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"onzas\", \"libras\", \"kg\", \"gramos\" }));\n cmb1.setName(\"gramos\\nkg\\nonzas\\nlibras\\n\"); // NOI18N\n\n cmb2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"gramos\", \"Kg\", \"onzas\", \"libras\" }));\n\n jButton1.setText(\"Convertir\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cmb1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txt1))\n .addGap(12, 12, 12)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmb2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txt2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cmb1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cmb2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jButton1))\n .addContainerGap(33, Short.MAX_VALUE))\n );\n\n jLabel1.setFont(new java.awt.Font(\"Droid Sans\", 0, 16)); // NOI18N\n jLabel1.setText(\"Convertor de Medidas\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(101, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(109, 109, 109))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox();\n jComboBox2 = new javax.swing.JComboBox();\n jComboBox3 = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jComboBox6 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jSpinner1 = new javax.swing.JSpinner();\n jSpinner2 = new javax.swing.JSpinner();\n jButton5 = new javax.swing.JButton();\n jTextField5 = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jButton6 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowFocusListener(new java.awt.event.WindowFocusListener() {\n public void windowGainedFocus(java.awt.event.WindowEvent evt) {\n formWindowGainedFocus(evt);\n }\n public void windowLostFocus(java.awt.event.WindowEvent evt) {\n }\n });\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel1.setText(\"Artist\");\n\n jLabel2.setText(\"Album\");\n\n jLabel3.setText(\"Genre\");\n\n jLabel4.setText(\"NAME OF SONG\");\n\n jTextField1.setText(\"song name\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"YEAR OF RELEASE\");\n\n jTextField2.setText(\"2009\");\n\n jLabel6.setText(\"LENGTH OF SONG\");\n\n jLabel7.setText(\"VALUE\");\n\n jTextField3.setText(\"5\");\n\n jLabel8.setText(\"COST\");\n\n jTextField4.setText(\"10\");\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField4ActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"LANGUAGE\");\n\n jComboBox6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jButton1.setText(\"NEW ARTIST\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"NEW ALBUM\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"NEW GENRE\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"ADD SONG\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton5.setText(\"Cancel\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jTextField5.setText(\"jTextField5\");\n\n jLabel10.setText(\"ADDRESS\");\n\n jButton6.setText(\"Browse\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(73, 73, 73)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel8)\n .addComponent(jButton4)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel10))\n .addComponent(jLabel9)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField4)\n .addComponent(jTextField2)\n .addComponent(jTextField3)\n .addComponent(jComboBox6, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton6))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(53, 53, 53)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3))\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(jLabel1))\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(59, 59, 59)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(110, 110, 110)\n .addComponent(jLabel3)\n .addGap(49, 49, 49)))))\n .addGap(27, 27, 27))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(jButton6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton1)\n .addComponent(jButton3)))\n );\n\n pack();\n }", "private void comCosasActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }" ]
[ "0.90401804", "0.8530146", "0.8526802", "0.8526802", "0.8526802", "0.8526802", "0.8526802", "0.8367324", "0.8348879", "0.777984", "0.76408595", "0.736682", "0.73080945", "0.7213133", "0.7162104", "0.7101403", "0.7101403", "0.7101403", "0.7101403", "0.7085022", "0.70813245", "0.7063302", "0.7049577", "0.70059556", "0.69741595", "0.6953453", "0.6952076", "0.6932227", "0.6890881", "0.687093", "0.68501717", "0.68419987", "0.6834878", "0.68321556", "0.6818116", "0.6813904", "0.68130183", "0.68124974", "0.681135", "0.67959684", "0.67943573", "0.6792876", "0.6781242", "0.67524916", "0.67483974", "0.67345405", "0.67230487", "0.67099094", "0.66902024", "0.6679815", "0.66633517", "0.66630393", "0.6659524", "0.665784", "0.66538304", "0.664543", "0.66410595", "0.66272175", "0.66208804", "0.6601914", "0.6591749", "0.65877074", "0.6583488", "0.65637326", "0.6562846", "0.6558352", "0.6553687", "0.65475875", "0.6545455", "0.65446055", "0.6540594", "0.6540594", "0.6540594", "0.6530313", "0.65301174", "0.65257776", "0.6522466", "0.6521348", "0.6518319", "0.65157914", "0.651312", "0.6510857", "0.6503045", "0.6495923", "0.6495377", "0.6488986", "0.6484682", "0.6484148", "0.6483558", "0.64746976", "0.646614", "0.6461506", "0.6451957", "0.64351684", "0.6433758", "0.64301515", "0.6425525", "0.6424505", "0.641982", "0.641982" ]
0.7971046
9
Trying to find common SQLI inside the components found by art
static AnalysisResult analyseQueryComponents(ArrayList<String> components) { if (components != null && components.size() > 0) { for (int i = 0; i < components.size(); i++) { String component = components.get(i).toLowerCase(); for (String attack : commonAttacks) { attack = attack.toLowerCase(); if (trim(component).contains(trim(attack))) { return new AnalysisResult(true, i, attack, false); } } } } return new AnalysisResult(false, null, null, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDatabaseProductNames() throws SQLException\r\n {\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DerbyAdapter\", factory.getAdapterClass(pluginMgr, null, \"Apache Derby\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DerbyAdapter\", factory.getAdapterClass(pluginMgr, null, \"Derby\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DerbyAdapter\", factory.getAdapterClass(pluginMgr, null, \"Cloudscape\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DB2Adapter\", factory.getAdapterClass(pluginMgr, null, \"DB2\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DB2Adapter\", factory.getAdapterClass(pluginMgr, null, \"DB2/NT\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DB2AS400Adapter\", factory.getAdapterClass(pluginMgr, null, \"DB2 AS/400\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.DB2AS400Adapter\", factory.getAdapterClass(pluginMgr, null, \"DB2 UDB for AS/400\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.FirebirdAdapter\", factory.getAdapterClass(pluginMgr, null, \"Firebird\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.FirebirdAdapter\", factory.getAdapterClass(pluginMgr, null, \"Interbase\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SQLServerAdapter\", factory.getAdapterClass(pluginMgr, null, \"Microsoft SQL Server\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.H2Adapter\", factory.getAdapterClass(pluginMgr, null, \"H2\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.HSQLAdapter\", factory.getAdapterClass(pluginMgr, null, \"HSQL Database Engine\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.InformixAdapter\", factory.getAdapterClass(pluginMgr, null, \"Informix\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.MySQLAdapter\", factory.getAdapterClass(pluginMgr, null, \"MySQL\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SybaseAdapter\", factory.getAdapterClass(pluginMgr, null, \"Adaptive Server Anywhere\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SybaseAdapter\", factory.getAdapterClass(pluginMgr, null, \"Adaptive Server Enterprise\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SybaseAdapter\", factory.getAdapterClass(pluginMgr, null, \"Adaptive Server IQ\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SybaseAdapter\", factory.getAdapterClass(pluginMgr, null, \"Sybase\", clr).getName());\r\n \r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.OracleAdapter\", factory.getAdapterClass(pluginMgr, null, \"Oracle\", clr).getName());\r\n \r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.PointbaseAdapter\", factory.getAdapterClass(pluginMgr, null, \"Pointbase\", clr).getName());\r\n \r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.PostgreSQLAdapter\", factory.getAdapterClass(pluginMgr, null, \"PostgreSQL\", clr).getName());\r\n \r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SAPDBAdapter\", factory.getAdapterClass(pluginMgr, null, \"SAP DB\", clr).getName());\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.SAPDBAdapter\", factory.getAdapterClass(pluginMgr, null, \"SAPDB\", clr).getName());\r\n\r\n assertEquals(\"org.datanucleus.store.rdbms.adapter.CloudSpannerAdapter\", factory.getAdapterClass(pluginMgr, null, \"Google Cloud Spanner\", clr).getName());\r\n }", "public void test2() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis like \" + \"\\\"%m%\" + \"\\\";\");\r\n\t\tVector<Object> v1 = tbl.getGrid().get(0);\r\n\t\tVector<Object> v2 = tbl.getGrid().get(1);\r\n\t\tVector<Object> v3 = tbl.getGrid().get(2);\r\n\t\tassertTrue(v1.get(0).equals(\"Mumbai\"));\r\n\t\tassertTrue(v2.get(0).equals(\"Rome\")); \r\n\t\tassertTrue(v3.get(0).equals(\"Melbourne\"));\r\n\t}", "public interface ProductBrandCommon {\n\n /**\n * SQL statement that filter product brand by its description or id.\n */\n String FIND_BY_PRODUCT_BRAND_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')\";\n\n /**\n * SQL statement that filter product brand by its description and show own brand only.\n */\n String FIND_BY_PRODUCT_BRAND_AND_OWN_BRAND_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where (productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')) \" +\n \"and productBrand.productBrandTier.productBrandTierCode <> :productBrandTierCode\";\n\n /**\n * SQL statement that filter product brands by brand description or id and brand tier name.\n */\n String FIND_BY_PRODUCT_BRAND_AND_BRAND_TIER_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where (productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')) \" +\n \"and upper(productBrand.productBrandTier.productBrandName) like concat('%', upper(:brandTier),'%')\";\n\n /**\n * SQL statement that filter product brands by brand description or id and brand tier name and show own brand only.\n */\n String FIND_BY_PRODUCT_BRAND_AND_BRAND_TIER_AND_OWN_BRAND_SQL =\n \"select productBrand from ProductBrand productBrand join productBrand.productBrandTier brandTier \" +\n \"where (productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')) \" +\n \"and upper(brandTier.productBrandName) like concat('%', upper(:brandTier),'%') \" +\n \"and brandTier.productBrandTierCode <> :productBrandTierCode\";\n\n\t/**\n\t * SQL statement that filter product brands by brand description or id.\n\t */\n\tString FIND_BY_PRODUCT_BRAND_AND_DESCRIPTION_SQL =\n\t\t\t\"from ProductBrand productBrand \" +\n\t\t\t\t\t\"where (productBrand.productBrandId like concat('%', :id, '%') \" +\n\t\t\t\t\t\"or upper(productBrand.productBrandDescription) like concat('%', upper(:desciption), '%')) \";\n\n /**\n * SQL statement that filter brands by productBrandId.\n */\n String FIND_BY_BRAND_ID_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where productBrand.productBrandId like concat('%', :productBrandId, '%')\";\n\n /**\n * SQL statement that filter brands by productBrandId and productBrandDescription.\n */\n String FIND_BY_PRODUCT_BRAND_ID_AND_BRAND_DESCRIPTION_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where productBrand.productBrandId like concat('%', :productBrandId, '%') \" +\n \"and upper(productBrand.productBrandDescription) like concat('%', upper(:productBrandDescription), '%')\";\n\n\n String FIND_BY_BRAND_DESCRIPTION_EXCEPT_ITSELF_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where upper(TRIM(productBrand.productBrandDescription)) = upper(:productBrandDescription) \" +\n \"and productBrand.productBrandId != :productBrandId\";\n\n\n}", "public static void analyzeRuleComponentsQueries() throws SQLException\r\n\t{\r\n\t\tStatement stat = conn.createStatement();\r\n \r\n ResultSet result = stat.executeQuery(\"SELECT * FROM fraud.afm_fraudscorerecord_afm_rulecomponentrecord\");\r\n \r\n while (result.next())\r\n {\r\n \tString queryId = result.getString(\"afm_fraudscorerecord_recordId\");\r\n \tString ruleId = result.getString(\"ruleComponentRecords_componentId\");\r\n \t\r\n \t\r\n \t\tStatement stat2 = conn.createStatement();\r\n \t\r\n \t\tResultSet s = stat2.executeQuery(\"SELECT * FROM fraud.afm_fraudscorerecord where recordId='\"+queryId+\"';\");\r\n \t \t\t\r\n \t\t\r\n \t\twhile (s.next())\r\n \t\t{\r\n \t\t\t\tSystem.out.print(new Date(s.getInt(\"timestamp\")));\r\n \t\t\t\tSystem.out.print(\" UserID: \" +s.getString(\"userId\"));\r\n \t\t\tSystem.out.print(\" Query Type: \" + s.getString(\"queryType\"));\r\n \t\t\t//System.out.print(\" Amount: \" + s.getDouble(\"transactionAmount\"));\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t\tResultSet t = stat2.executeQuery(\"SELECT * FROM fraud.afm_rulecomponentrecord where componentId='\"+ruleId+\"';\");\r\n \t\r\n \t\t\r\n \t\twhile (t.next())\r\n \t\t{\r\n \t\t\tSystem.out.print(\" >>>>> Rule Name: \" + t.getString(\"ruleLongName\"));\r\n \t\t\t//System.out.print(\" Amount: \" + s.getDouble(\"transactionAmount\"));\r\n \t\t}\r\n \t\r\n \t\r\n \tSystem.out.println();\r\n \t}\r\n \t\r\n stat.close();\r\n \r\n\t}", "@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "@Override\n public Cursor query(Uri url, String[] projectionIn, String selection, \n String[] selectionArgs, String sort) {\n SQLiteQueryBuilder qb = new SQLiteQueryBuilder();\n SQLiteDatabase db = getDatabase(getContext()); //mOpenHelper.getReadableDatabase();\n // Modifyed by amt_chenjing for switchui-2192 20120715 begin\n\tif(db == null) {\n\t\tLog.v(TAG, \"open database: Failed\");\n\t\treturn null;\n\t}\n\t// Modifyed by amt_chenjing for switchui-2192 20120715 end\n int match = graphyUri.match(url);\n Cursor cur = null;\n switch (match) {\n case ALL_APPS:\n qb.setTables(Apps.TABLE_NAME);\n cur = qb.query(db, projectionIn, selection, selectionArgs, null, null, sort);\n break;\n case ONE_APP:\n qb.setTables(Apps.TABLE_NAME);\n qb.appendWhere(\"_id=\");\n qb.appendWhere(url.getPathSegments().get(1));\n cur = qb.query(db, projectionIn, selection, selectionArgs, null, null, sort);\n break;\n case ALL_RANKS:\n qb.setTables(Ranks.TABLE_NAME);\n cur = qb.query(db, projectionIn, selection, selectionArgs, null, null, sort);\n break;\n case ONE_RANK:\n qb.setTables(Ranks.TABLE_NAME);\n qb.appendWhere(\"_id=\");\n qb.appendWhere(url.getPathSegments().get(1));\n cur = qb.query(db, projectionIn, selection, selectionArgs, null, null, sort);\n break;\n case ALL_MANUALS:\n qb.setTables(ManualList.TABLE_NAME);\n cur = qb.query(db, projectionIn, selection, selectionArgs, null, null, sort);\n break;\n case ONE_MANUAL:\n qb.setTables(ManualList.TABLE_NAME);\n qb.appendWhere(\"_id=\");\n qb.appendWhere(url.getPathSegments().get(1));\n cur = qb.query(db, projectionIn, selection, selectionArgs, null, null, sort);\n break;\n case EXCUTESQL:\n cur = db.rawQuery(selection, null);\n break;\n default:\n throw new IllegalArgumentException(\"Unknown URi \" + url);\n }\n \n if (cur == null) {\n Log.v(TAG, \"query: failed\");\n } \t\t\n return cur;\n }", "private String createFindAll() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\treturn sb.toString();\n\t}", "public void getComponents(DatabaseMetaData meta) throws SQLException {\n String[] types = {\"TABLE\"};\n ResultSet rs = meta.getTables(null, null, null, types);\n while(rs.next()){\n Table t = new MysqlTable(rs.getString(\"TABLE_NAME\"), rs.getString(\"TABLE_TYPE\"));\n //t.getComponents(meta);\n this.setTables(t);\n }\n try{\n rs.close();\n } catch (Exception ignored){\n } finally { rs.close(); /*Anyway*/ }\n }", "private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }", "public interface SqlQueries {\n\n /**\n * The constant QUOTATION.\n */\n String QUOTATION = \"'\";\n\n /**\n * The constant SELECT_ALL_CARS.\n */\n String SELECT_ALL_CARS = \"SELECT * FROM Car\";\n\n /**\n * The constant SELECT_ALL_USERS.\n */\n String SELECT_ALL_USERS = \"SELECT * FROM Users\";\n\n /**\n * The constant FIND_CAR_BY_ID.\n */\n String FIND_CAR_BY_ID = \"Select * from Car Where id = \";\n\n /**\n * The constant CREATE_A_CAR.\n */\n String CREATE_A_CAR = \"insert into car values({0},{1}, {2}, {3}, {4})\";\n\n}", "public static void main(String[] args) {\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIBaseConfiguration.class);\n\n EntityHierarchy eh = ENTITY_HIERARCHY.as(\"eh\");\n Measurable m = MEASURABLE.as(\"m\");\n MeasurableCategory mc = MEASURABLE_CATEGORY.as(\"mc\");\n\n DSLContext dsl = ctx.getBean(DSLContext.class);\n\n Field<Integer> maxLevelField = DSL.max(eh.LEVEL).as(\"maxLevel\");\n Integer maxLevel = dsl\n .select(maxLevelField)\n .from(eh)\n .where(eh.KIND.eq(EntityKind.MEASURABLE.name()))\n .and(eh.ID.in(DSL\n .select(m.ID)\n .from(m)\n .where(m.MEASURABLE_CATEGORY_ID.eq(MEASURABLE_CATEGORY_ID))))\n .fetchOne(maxLevelField);\n\n ArrayList<Tuple3<Integer, EntityHierarchy, Measurable>> ehAndMeasurableTablesForLevel = new ArrayList<>(maxLevel);\n\n for (int i = 0; i < maxLevel; i++) {\n ehAndMeasurableTablesForLevel.add(i, tuple(i + 1, ENTITY_HIERARCHY.as(\"eh\" + i), MEASURABLE.as(\"l\" + i)));\n }\n\n List<Field<?>> fields = ehAndMeasurableTablesForLevel\n .stream()\n .flatMap(t -> Stream.of(\n _m(t).NAME.as(\"Level \" + t.v1 + \" Name\"),\n _m(t).EXTERNAL_ID.as(\"Level \" + t.v1 + \" External Id\"),\n _m(t).ID.as(\"Level \" + t.v1 + \" Waltz Id\")))\n .collect(Collectors.toList());\n\n Tuple3<Integer, EntityHierarchy, Measurable> l1 = ehAndMeasurableTablesForLevel.get(0);\n\n SelectOnConditionStep<Record> baseQry = dsl\n .select(fields)\n .from(_m(l1))\n .innerJoin(_eh(l1))\n .on(_eh(l1).ID.eq(_m(l1).ID)\n .and(_eh(l1).KIND.eq(EntityKind.MEASURABLE.name()))\n .and(_eh(l1).DESCENDANT_LEVEL.eq(_lvl(l1)))\n .and(_m(l1).MEASURABLE_CATEGORY_ID.eq(MEASURABLE_CATEGORY_ID)));\n\n for (int i = 1; i < maxLevel; i++) {\n Tuple3<Integer, EntityHierarchy, Measurable> curr = ehAndMeasurableTablesForLevel.get(i);\n Tuple3<Integer, EntityHierarchy, Measurable> prev = ehAndMeasurableTablesForLevel.get(i - 1);\n baseQry = baseQry\n .leftJoin(_eh(curr))\n .on(_eh(curr).ANCESTOR_ID.eq(_eh(prev).ID)\n .and(_eh(curr).KIND.eq(EntityKind.MEASURABLE.name())\n .and(_eh(curr).DESCENDANT_LEVEL.eq(_lvl(curr)))))\n .leftJoin(_m(curr))\n .on(_m(curr).ID.eq(_eh(curr).ID));\n }\n\n System.out.println(baseQry);\n\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public String dynLookupDependency() \r\n {\r\n\tSessionCO sessionCO = returnSessionObject();\r\n\tString elementId=null,colName =null, colDesc = null,colType =null,colTechName= null,elemId = null, colValue=null;\r\n\tDynCommonLookupSC dynCommonLookupSC =new DynCommonLookupSC ();\r\n\r\n\ttry\r\n\t{\r\n\t List<String> elemIds = new ArrayList<String>();\r\n\t for(Map.Entry<String, Object> entry : criteria.getElemHm().entrySet())\r\n\t {\r\n\t\tString entryKey = (String)entry.getKey();\r\n\t\telemIds.add(entryKey);\r\n\t\t//get column name\r\n\t\tif(\"colName\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colName= val[0];\r\n\t\t}\r\n\t\t//get column description\r\n\t\telse if(\"colDesc\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colDesc= val[0];\r\n\t\t}\r\n\t\t//get column technical name\r\n\t\telse if(\"colTechName\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colTechName= val[0];\r\n\t\t}\r\n\t\telse if(\"elementId\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t elementId = val[0]; \r\n\t\t String[] arr = val[0].split(\"_\");\r\n\t\t elemId= arr[0];\r\n\r\n\t\t}\r\n\t\telse if(\"colValue\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colValue= val[0];\r\n\t\t}\r\n\t\t//get Column Type\r\n\t\telse if(\"colType\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colType= val[0];\r\n\t\t}\r\n\t }\r\n\t if(colValue.isEmpty())\r\n\t {\r\n\t\tcolValue=\"NULL\";\r\n\t }\r\n\t else {\r\n\t\t//check column type\r\n\t\tif(!colType.isEmpty())\r\n\t\t{\r\n\r\n\t\t switch(colType) {\r\n\t\t\tcase \"1\"://String\r\n\r\n\t\t\t //Escape single quotes\r\n\t\t\t if(colValue.indexOf(\"'\")!=-1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = colValue.replaceAll(\"'\", \"''\"); \r\n\t\t\t }\r\n\t\t\t colValue= \"'\"+colValue+\"'\";\r\n\t\t\t break;\r\n\t\t\tcase \"2\"://Date\r\n\r\n\t\t\t //Escape single quotes\r\n\t\t\t if(colValue.indexOf(\"'\")!=-1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = colValue.replaceAll(\"'\", \"''\"); \r\n\t\t\t }\r\n\t\t\t if(criteria.getIsOracle() == 1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = \"TO_DATE(TO_CHAR('\" + colValue + \"','dd/mm/yyyy'),'dd/mm/yyyy')\";\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\tcolValue = \"CONVERT(DATE,CONVERT(VARCHAR,'\" + colValue + \"',103),103))\";\r\n\t\t\t }\r\n\t\t\t break;\r\n\t\t\tcase \"3\"://NUMERIC\r\n\t\t\t if(!NumberUtil.isNumber(colValue))\r\n\t\t\t {\r\n\t\t\t\tcolValue=\"NULL\";\r\n\t\t\t }\r\n\r\n\t\t\t break;\r\n\t\t\tcase \"4\"://BOOLEAN\r\n\t\t\t //Escape single quotes\r\n\t\t\t if(colValue.indexOf(\"'\")!=-1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = colValue.replaceAll(\"'\", \"''\"); \r\n\t\t\t }\r\n\t\t\t colValue= \"'\"+colValue+\"'\";\r\n\t\t\t break;\r\n\r\n\t\t\tdefault:\r\n\t\t\t colValue=\"NULL\";\r\n\t\t\t break;\r\n\t\t }\r\n\r\n\t\t}\r\n\t }\r\n\t //get session values\r\n\t RequiredFieldsSC requiredFieldsSC = new RequiredFieldsSC(); \r\n\t requiredFieldsSC.setLoginUserId(sessionCO.getUserName());\r\n\t requiredFieldsSC.setCompCode(sessionCO.getCompanyCode());\r\n\t requiredFieldsSC.setCompanyName(sessionCO.getCompanyName());\r\n\t requiredFieldsSC.setBranchCode(sessionCO.getBranchCode());\r\n\t requiredFieldsSC.setBranchName(sessionCO.getBranchName());\r\n\t requiredFieldsSC.setUserFirstName(sessionCO.getUserFirstName());\r\n\t requiredFieldsSC.setUserLastName(sessionCO.getUserLastName());\r\n\t requiredFieldsSC.setBaseCurrencyName(sessionCO.getBaseCurrencyName());\r\n\t requiredFieldsSC.setIsTeller((sessionCO.getCtsTellerVO() != null ? BigDecimal.ONE : BigDecimal.ZERO));\r\n\t requiredFieldsSC.setRunningDate(sessionCO.getRunningDateRET());\r\n\t //get query result\r\n\t ArrayList<LinkedHashMap> result = null;\r\n\t if(elemId!=null && colTechName!=null && colValue!=null )\r\n\t {\r\n\t\t//escape single quote\r\n\t\tif(elemId.indexOf(\"'\")!=-1)\r\n\t\t{\r\n\t\t elemId = elemId.replaceAll(\"'\", \"''\"); \r\n\t\t}\r\n\t\telse if(colTechName.indexOf(\"'\")!=-1)\r\n\t\t{\r\n\t\t colTechName = colTechName.replaceAll(\"'\", \"''\");\r\n\t\t}\r\n\t\telse if(StringUtil.isNotEmpty(colDesc)&& colDesc.indexOf(\"'\")!=-1)\r\n\t\t{\r\n\t\t colDesc = colDesc.replaceAll(\"'\", \"''\");\r\n\t\t}\r\n\t\tdynCommonLookupSC.setElementId(new BigDecimal(elemId));\r\n\t\tdynCommonLookupSC.setColName(colTechName);\r\n\t\tdynCommonLookupSC.setColumnCode(colName);\r\n\t\tdynCommonLookupSC.setColValue(colValue);\r\n\t\tdynCommonLookupSC.setColDesc(colDesc);\r\n\t\tresult = dynamicScreenBO.validateColPropLookupQuery(requiredFieldsSC,dynCommonLookupSC,criteria.getElemHm()) ;\r\n\t }\r\n\r\n\t //TP#1053821 Additional lookup description for colProp\r\n\t if(result!=null && result.size()>0)\r\n\t {\r\n\t\tHashMap<String, Object> lookUpRow = (HashMap<String, Object>) result.get(0);\r\n\t\t\r\n\t\tif(StringUtil.isNotEmpty(colDesc) )\r\n\t\t{\r\n\t\t\tObject descStr = lookUpRow.get(colDesc) == null? \"\":lookUpRow.get(colDesc) ;\r\n\t\t\tcriteria.getElemHm().put(\"colDescValue\", descStr);\r\n\t\t\t//set lookupDesc to readonly\r\n\t\t\tcriteria.getElemHm().put(\"colDescReadOnly\", \"true\");\r\n\t\t}\r\n\t\tif(criteria.getElemHm().get(\"addLkpDesc\")!=null)\r\n\t\t{\r\n\t\t String[] val = (String[]) criteria.getElemHm().get(\"addLkpDesc\");\r\n\t\t String addLkpDesc = val[0];\r\n\t\t addLkpDesc = addLkpDesc.substring(0, addLkpDesc.length());\r\n\t\t \r\n\t\t if(StringUtil.isNotEmpty(addLkpDesc))\r\n\t\t {\r\n\t\t\tString[] addlkpArr = addLkpDesc.split(\";\");\r\n\t\t\tfor(int k=0;k<addlkpArr.length;k++) \r\n\t\t\t{\r\n\t\t\t String[] depElem = addlkpArr[k].split(\"~VALUE_\");\r\n\t\t\t colDesc = depElem[1];\r\n\t\t\t String elId = depElem[0];\r\n\t\t\t Object descStr = lookUpRow.get(colDesc) == null? lookUpRow.get(colDesc.toUpperCase()):lookUpRow.get(colDesc) ;\r\n\t\t\t criteria.getElemHm().put(elId, descStr);\r\n\t\t\t}\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t else \r\n\t {\r\n\t\tcriteria.getElemHm().put(\"colDescValue\", \"\");\r\n\t\tcriteria.getElemHm().put(\"colValue\", \"\");\r\n\t\tthrow new BOException(MessageCodes.INVALID_ENTRY);\r\n\t }\r\n\t return SUCCESS;\r\n\t}\r\n\r\n\tcatch(Exception e)\r\n\t{\r\n\t // TODO Auto-generated catch block\r\n\t handleException(e, null, null);\r\n\t return SUCCESS;\r\n\t}\r\n }", "public void testEmbeddedFrom() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName, cc.CCount \" + \"FROM AD_Table t,\" + \"(SELECT COUNT(ColumnName) AS CCount FROM AD_Column) cc \" + \"WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column|AD_Table=t,(##)=cc|1]\", fixture.toString());\n }", "@Test public void gh1202() {\n execute(new CreateDB(NAME, \"<x/>\"));\n query(\"let $x := 'e' return element e {} / self::e[name() = $x]\", \"<e/>\");\n query(\"let $x := 'f' return element f {} ! self::f[name() = $x]\", \"<f/>\");\n }", "public List<PluginCase> findUsingPlugin(Connection conn)\r\n/* 49: */ throws SQLException\r\n/* 50: */ {\r\n/* 51: 86 */ return this.dao.findUsingPlugin(conn);\r\n/* 52: */ }", "public void SQLQueryEnhanced(String databaseName) throws SQLException{\n\t\tdatabaseName = databaseName.toLowerCase();\n\t\tString sql = \"SELECT name,tid,value FROM \"+databaseName;\n\t\tthis.visualComponentList = new VisualComponentList();\n\t\tthis.visualComponentList.setVisualComponentList(new ArrayList<VisualComponent>());\n\t\tSystem.out.println(\"Running SQL Query :\"+sql);\n\t\texecuteSQL(sql, databaseName);\n\t}", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}", "List<JModuleInfo> queryAll();", "public Cursor querySources(){\n String sql = \"SELECT \" + ArticleContract.ArticleEntry.COLUMN_SOURCE + \", \"\n + ArticleContract.ArticleEntry.COLUMN_CATEGORY + \" FROM \"\n + ArticleContract.ArticleEntry.TOP_ARTICLE_TABLE + \" GROUP BY \"\n + ArticleContract.ArticleEntry.COLUMN_SOURCE + \" UNION \"\n + \"SELECT \" + ArticleContract.ArticleEntry.COLUMN_SOURCE + \", \"\n + ArticleContract.ArticleEntry.COLUMN_CATEGORY + \" FROM \"\n + ArticleContract.ArticleEntry.LATEST_ARTICLE_TABLE + \" GROUP BY \"\n + ArticleContract.ArticleEntry.COLUMN_SOURCE;\n return db.rawQuery(sql, null);\n }", "public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}", "public void test3() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis = \" + \"\\\"Mumbai\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(1).equals(\"Asia\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis = \" + \"\\\"New York\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(1).equals(\"North America\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE population >= \" + 20400000 +\";\"); \r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"Mumbai\"));\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE population >= \" + 21000000 +\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"New York\"));\r\n\t}", "private Boolean compararQueries(Configuracion config,Consulta consultaOriginal, Consulta consultaAlternativa, int itemConsultaOriginal, int itemConsultaAlternativa){\n\t\tDatabase database1 = new Database();\n\t\tDatabase database2 = new Database();\n\t\tList<Map<String, Object>> resultadosConsulta1 = database1.ejecutarQuery(config, consultaOriginal, database1);\n\t\tList<Map<String, Object>> resultadosConsulta2 = database2.ejecutarQuery(config, consultaAlternativa, database2);\n\t\tif (resultadosConsulta1.equals(resultadosConsulta2)){\n\t\t\treturn true;\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn false;\t\t\t\n\t}", "@Test\n\tpublic void selectFromCourseTable_where() {\n\t\tList arrayList = em.createNamedQuery(\"query_with_where_name_like_call\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c WHERE name like '%call%' -> {}\", arrayList);\n\t}", "public interface QtlAdaptor extends Adaptor {\n \n /**\n * Adaptor type. TYPE = \"qtl\".\n */\n final static String TYPE = \"qtl\";\n \n /**\n * Fetch Qtl by it's internalID.\n * @return Qtl with specied internalID, or null if no such Qtl exists in database.\n */\n Qtl fetch(long internalID) throws AdaptorException ;\n \n /**\n * Fetch all Qtls from database.\n * @return list of zero or more Qtls.\n */\n List fetchAll() throws AdaptorException ;\n \n /**\n * Fetch all Qtls from database with the specified trait.\n * @param trait trait affected by Qtl.\n * @return list of zero or more Qtls.\n */\n List fetchByTrait(String trait) throws AdaptorException ;\n \n\n /**\n * Fetch all Qtls from database that originally come from the specified\n * database.\n * @param sourceDatabaseName name of the source database.\n * @return list of zero or more Qtls.\n */\n List fetchBySourceDatabase(String sourceDatabaseName) throws AdaptorException ;\n \n /**\n * Fetch all Qtls from database that originally come from the specified\n * database and have the specified id.\n * @param sourceDatabaseName name of the source database.\n * @param sourceID id in the source database.\n * @return list of zero or more Qtls matching the criteria.\n */\n List fetchBySourceDatabase(String sourceDatabaseName, String sourceID) throws AdaptorException ;\n \n}", "public abstract String getDB2ProductTypeTestSql();", "public void testProductInstanceAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND EXISTS (SELECT * FROM M_Storage s INNER JOIN M_AttributeSetInstance asi ON (s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) WHERE s.M_Product_ID=p.M_Product_ID AND asi.SerNo LIKE '33' AND asi.Lot LIKE '33' AND asi.M_Lot_ID=101 AND TRUNC(asi.GuaranteeDate)<TO_DATE('2003-10-16','YYYY-MM-DD') AND asi.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=103 AND Value LIKE '33') AND (M_Attribute_ID=102 AND M_AttributeValue_ID=106))) AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=101 AND M_AttributeValue_ID=105) AND (M_Attribute_ID=100 AND M_AttributeValue_ID=102)) AND p.AD_Client_ID IN(0,11) AND p.AD_Org_ID IN(0,11,12) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Storage=s,M_AttributeSetInstance=asi|M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|3]\", fixture.toString());\n }", "String queryInformation(String tableName,String queryname){\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n String tar;\n if(tableName.equals(\"authorinformation\"))\n tar = \"author\";\n else if(tableName.equals(\"classificationinformation\"))\n tar = \"classification\";\n else tar = \"press\";\n String sql = \"select \" + tar + \"Id\" + \" from \" + tableName + \" where \";\n if(tableName.equals(\"authorinformation\"))\n sql += \"authorName = ?;\";\n else if(tableName.equals(\"classificationinformation\"))\n sql += \"classifcationName = ?;\";\n else sql += \"pressName = ?;\";\n System.out.println(sql);\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,queryname);\n ResultSet rs = preSQL.executeQuery();\n rs.beforeFirst();\n if(rs.next()){\n String ans = rs.getString(1);\n GetDBConnection.closeCon(con);\n return ans;\n }\n else{\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }", "public abstract void queryReferences(CoreEditorTableModel model) throws SQLException;", "public void test4() throws ClassNotFoundException, SQLException {\r\n\t\tsqlTable tbl = new sqlTable();\r\n\t\ttbl.printInAplication(\"SELECT * FROM metropolises WHERE metropolis like \" + \"\\\"m%\" + \"\\\"\" + \" and continent like \" + \"\\\"%u%\" + \"\\\";\");\r\n\t\tassertTrue(tbl.getGrid().get(0).get(0).equals(\"Melbourne\"));\r\n\t}", "protected String createFindBy(String nume) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \");\n\t\treturn sb.toString();\n\t}", "private List<Song> internalExternalQuery(Context context,\n String[] columns,\n String selectionClause,\n String[] selectionArgs) {\n\n Log.i(TAG, \"Query: SELECT \" + columns + \" FROM table WHERE \" + selectionClause + selectionArgs);\n\n List<Song> songs = new LinkedList<Song>();\n\n Cursor externalCursor = context.getContentResolver()\n .query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,\n columns,\n selectionClause,\n selectionArgs,\n null);\n\n // External music library\n if (externalCursor != null && externalCursor.getCount() > 0) {\n\n if (externalCursor.isBeforeFirst()) {\n externalCursor.moveToNext();\n }\n\n Song song;\n String id;\n String title;\n String artist;\n String album;\n String songUri;\n String albumId;\n while (!externalCursor.isAfterLast()) {\n\n id = externalCursor.getString(0);\n title = externalCursor.getString(1);\n artist = externalCursor.getString(2);\n album = externalCursor.getString(3);\n songUri = externalCursor.getString(4);\n albumId = externalCursor.getString(5);\n song = new Song(title, artist, album, Uri.parse(songUri), albumId);\n songs.add(song);\n externalCursor.moveToNext();\n }\n\n externalCursor.close();\n }\n else {\n\n Log.i(TAG, \"Well....my external cursor is useless...\");\n }\n\n Cursor internalCursor = context.getContentResolver()\n .query(MediaStore.Audio.Media.INTERNAL_CONTENT_URI,\n columns,\n selectionClause,\n selectionArgs,\n null);\n\n // Internal music library\n if (internalCursor != null && internalCursor.getCount() > 0) {\n\n if (internalCursor.isBeforeFirst()) {\n internalCursor.moveToNext();\n }\n\n Song song;\n String id;\n String title;\n String artist;\n String album;\n String songUri;\n String albumId;\n while (!internalCursor.isAfterLast()) {\n\n id = internalCursor.getString(0);\n title = internalCursor.getString(1);\n artist = internalCursor.getString(2);\n album = internalCursor.getString(3);\n songUri = internalCursor.getString(4);\n albumId = internalCursor.getString(5);\n song = new Song(title, artist, album, Uri.parse(songUri), albumId);\n songs.add(song);\n internalCursor.moveToNext();\n }\n\n internalCursor.close();\n }\n else {\n\n Log.i(TAG, \"Well....my internal cursor is useless...\");\n }\n\n return songs;\n }", "protected String getSql(MethylDbQuerier params, String chr) \n\tthrows Exception{\n\t\tString methTable = tablePrefix + chr;\n\t\t//String methTable = params.methylTablePrefix;\n\t\tString sql = String.format(\"select * from %s WHERE \", methTable);\n\t\tsql += \"ABaseRefUpperCase != '0'\";\n\t\tsql += \" AND BBaseRefUpperCase != '0'\";\n\t\t\n\t\tsql += \" AND (ACReads != 0 OR BCReads != 0)\";\n\t\tsql += \" AND (ATReads != 0 OR BTReads != 0)\";\n\t\t//sql += \" AND (ACReads + ATReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (BCReads + BTReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (ACReads + ATReads >= \" + minAlleleCount + \")\";\n\t\t//sql += \" AND (BCReads + BTReads >= \" + minAlleleCount + \")\";\n\t\tsql += \" AND aReadsOpposite/totalReadsOpposite <= \" + minOppoAFreq;\n\t\tif (Cpg){\n\t\t\tsql += \" AND nextBaseRefUpperCase = 'G'\";\n\t\t}\n\t\t\t\n\t\t//sql += \" GROUP BY chromPos \"; // If you don't do this, you get multiple instances of the same CpG if it overlaps multiple features.\n\t\tsql += \" ORDER BY chromPos,alleleChromPos ;\";\n\t\t\n\t\treturn sql;\n\t}", "private String getBaseDependencyQuery(BuildParams buildParams) {\n String baseQuery;\n if (!buildParams.isAllArtifact()) {\n baseQuery = BuildQueries.MODULE_DEPENDENCY_DIFF_QUERY;\n } else {\n baseQuery = BuildQueries.BUILD_DEPENDENCY_DIFF_QUERY;\n }\n return baseQuery;\n }", "protected abstract String getEntityExistanceSQL(E entity);", "public void fromDatabase(String name) {\r\n \r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \t\tConnection conn = db.getConnection();\r\n \r\n \t\tthis.name = name;\r\n \t\tname = RationaleDBUtil.escape(name);\r\n \r\n \t\tStatement stmt = null;\r\n \t\tResultSet rs = null;\r\n \t\tString findQuery = \"\";\r\n \t\ttry {\r\n \t\t\tstmt = conn.createStatement();\r\n \t\t\tfindQuery = \"SELECT * FROM \" + \"alternatives where name = '\"\r\n \t\t\t+ name + \"'\";\r\n \t\t\t// *** System.out.println(findQuery);\r\n \t\t\trs = stmt.executeQuery(findQuery);\r\n \r\n \t\t\tif (rs.next()) {\r\n \t\t\t\tid = rs.getInt(\"id\");\r\n \t\t\t\tdescription = RationaleDBUtil.decode(rs\r\n \t\t\t\t\t\t.getString(\"description\"));\r\n \t\t\t\tptype = RationaleElementType.fromString(rs.getString(\"ptype\"));\r\n \t\t\t\tparent = rs.getInt(\"parent\");\r\n \t\t\t\t// enabled = rs.getBoolean(\"enabled\");\r\n \t\t\t\tstatus = (AlternativeStatus) AlternativeStatus.fromString(rs\r\n \t\t\t\t\t\t.getString(\"status\"));\r\n \t\t\t\tevaluation = rs.getFloat(\"evaluation\");\r\n \t\t\t\tpatternID = rs.getInt(\"patternID\");\r\n \r\n \t\t\t\ttry {\r\n \t\t\t\t\tint desID = rs.getInt(\"designer\");\r\n \r\n \t\t\t\t\tif (rs.wasNull())\r\n \t\t\t\t\t\tthrow new SQLException();\r\n \r\n \t\t\t\t\tdesigner = new Designer();\r\n \t\t\t\t\tdesigner.fromDatabase(desID);\r\n \t\t\t\t} catch (SQLException ex) {\r\n \t\t\t\t\tdesigner = null; // nothing...\r\n \t\t\t\t}\r\n \r\n \t\t\t\ttry {\r\n \t\t\t\t\tint contID = rs.getInt(\"designType\");\r\n \r\n \t\t\t\t\tif (rs.wasNull())\r\n \t\t\t\t\t\tthrow new SQLException();\r\n \r\n \t\t\t\t\tcontingency = new Contingency();\r\n \t\t\t\t\tcontingency.fromDatabase(contID);\r\n \t\t\t\t} catch (SQLException ex) {\r\n \t\t\t\t\tcontingency = null; // nothing...\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// need to read in the rest - recursive routines?\r\n \t\t\t\t// Now, we need to get the lists of arguments for and against\r\n \t\t\t\t// first For\r\n \t\t\t\tString findFor = \"SELECT id FROM \"\r\n \t\t\t\t\t+ RationaleDBUtil.escapeTableName(\"arguments\")\r\n \t\t\t\t\t+ \" where ptype = 'Alternative' and \" + \"parent = \"\r\n \t\t\t\t\t+ new Integer(this.id).toString() + \" and \"\r\n \t\t\t\t\t+ \"(type = 'Supports' or \" + \"type = 'Addresses' or \"\r\n \t\t\t\t\t+ \"type = 'Satisfies' or \"\r\n \t\t\t\t\t+ \"type = 'Pre-supposed-by')\";\r\n \t\t\t\t// *** System.out.println(findFor);\r\n \t\t\t\trs = stmt.executeQuery(findFor);\r\n \t\t\t\tVector<Integer> aFor = new Vector<Integer>();\r\n \t\t\t\tVector<Integer> aAgainst = new Vector<Integer>();\r\n \t\t\t\tVector<Integer> aRel = new Vector<Integer>();\r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\taFor.addElement(new Integer(rs.getInt(\"id\")));\r\n \t\t\t\t}\r\n \t\t\t\trs.close();\r\n \r\n \t\t\t\t// Now, the arguments against\r\n \t\t\t\tString findAgainst = \"SELECT id FROM \"\r\n \t\t\t\t\t+ RationaleDBUtil.escapeTableName(\"arguments\")\r\n \t\t\t\t\t+ \" where ptype = 'Alternative' and \" + \"parent = \"\r\n \t\t\t\t\t+ new Integer(this.id).toString() + \" and \"\r\n \t\t\t\t\t+ \"(type = 'Denies' or \" + \"type = 'Violates' or \"\r\n \t\t\t\t\t+ \"type = 'Opposed-by')\";\r\n \t\t\t\t// *** System.out.println(findAgainst);\r\n \t\t\t\trs = stmt.executeQuery(findAgainst);\r\n \r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\taAgainst.addElement(new Integer(rs.getInt(\"id\")));\r\n \t\t\t\t}\r\n \t\t\t\trs.close();\r\n \r\n \t\t\t\t// Now, any other useful relationships\r\n \t\t\t\t// Now, the arguments against\r\n \t\t\t\tString findRel = \"SELECT id FROM \"\r\n \t\t\t\t\t+ RationaleDBUtil.escapeTableName(\"arguments\")\r\n \t\t\t\t\t+ \" where ptype = 'Alternative' and \" + \"parent = \"\r\n \t\t\t\t\t+ new Integer(this.id).toString() + \" and \"\r\n \t\t\t\t\t+ \"(type = 'Opposed' or \" + \"type = 'Pre-supposes')\";\r\n \t\t\t\t// *** System.out.println(findRel);\r\n \t\t\t\trs = stmt.executeQuery(findRel);\r\n \r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\taRel.addElement(new Integer(rs.getInt(\"id\")));\r\n \t\t\t\t}\r\n \t\t\t\trs.close();\r\n \r\n \t\t\t\t// ..Treat non-affiliated arguments as relationships (for now)\r\n \t\t\t\tString findUnafil = \"SELECT id FROM Arguments where \"\r\n \t\t\t\t\t+ \"ptype = 'Alternative' and \" + \"parent = \"\r\n \t\t\t\t\t+ new Integer(this.id).toString() + \" and \"\r\n \t\t\t\t\t+ \"(type = 'NONE' )\";\r\n \t\t\t\t// ** System.out.println(findUnafil);\r\n \t\t\t\trs = stmt.executeQuery(findUnafil);\r\n \r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\taRel.addElement(new Integer(rs.getInt(\"id\")));\r\n \t\t\t\t}\r\n \t\t\t\trs.close();\r\n \r\n \t\t\t\t// Cleanup before loading arguments\r\n \t\t\t\targumentsFor.removeAllElements();\r\n \t\t\t\t// Now that we have the IDs, create the arguments\r\n \t\t\t\tEnumeration args = aFor.elements();\r\n \t\t\t\twhile (args.hasMoreElements()) {\r\n \t\t\t\t\tArgument arg = new Argument();\r\n \t\t\t\t\targ.fromDatabase(((Integer) args.nextElement()).intValue());\r\n \t\t\t\t\tif (arg.getParent() == this.id)\r\n \t\t\t\t\t\targumentsFor.add(arg);\r\n \t\t\t\t\telse {\r\n \t\t\t\t\t\tSystem.out.println(\"argparent = \" + arg.getParent()\r\n \t\t\t\t\t\t\t\t+ \"not equal\" + this.id);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Cleanup before loading arguments\r\n \t\t\t\targumentsAgainst.removeAllElements();\r\n \t\t\t\targs = aAgainst.elements();\r\n \t\t\t\twhile (args.hasMoreElements()) {\r\n \t\t\t\t\tArgument arg = new Argument();\r\n \t\t\t\t\targ.fromDatabase(((Integer) args.nextElement()).intValue());\r\n \t\t\t\t\tif (arg.getParent() == this.id)\r\n \t\t\t\t\t\targumentsAgainst.add(arg);\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Cleanup before loading arguments\r\n \t\t\t\trelationships.removeAllElements();\r\n \t\t\t\targs = aRel.elements();\r\n \t\t\t\twhile (args.hasMoreElements()) {\r\n \t\t\t\t\tArgument arg = new Argument();\r\n \t\t\t\t\targ.fromDatabase(((Integer) args.nextElement()).intValue());\r\n \t\t\t\t\tif (arg.getParent() == this.id)\r\n \t\t\t\t\t\trelationships.add(arg);\r\n \t\t\t\t}\r\n \r\n \t\t\t\tVector<String> decNames = new Vector<String>();\r\n \t\t\t\tString findQuery2 = \"SELECT name from DECISIONS where \"\r\n \t\t\t\t\t+ \"ptype = '\"\r\n \t\t\t\t\t+ RationaleElementType.ALTERNATIVE.toString()\r\n \t\t\t\t\t+ \"' and parent = \" + new Integer(id).toString();\r\n \t\t\t\t// *** System.out.println(findQuery2);\r\n \t\t\t\trs = stmt.executeQuery(findQuery2);\r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\tdecNames.add(RationaleDBUtil.decode(rs.getString(\"name\")));\r\n \t\t\t\t}\r\n \t\t\t\tEnumeration decs = decNames.elements();\r\n \r\n \t\t\t\t// Cleanup before loading subdecisions\r\n \t\t\t\tsubDecisions.removeAllElements();\r\n \t\t\t\twhile (decs.hasMoreElements()) {\r\n \t\t\t\t\tDecision subDec = new Decision();\r\n \t\t\t\t\tsubDec.fromDatabase((String) decs.nextElement());\r\n \t\t\t\t\tsubDecisions.add(subDec);\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// need to do questions too\r\n \t\t\t\tVector<String> questNames = new Vector<String>();\r\n \t\t\t\tString findQuery3 = \"SELECT name from QUESTIONS where \"\r\n \t\t\t\t\t+ \"ptype = '\"\r\n \t\t\t\t\t+ RationaleElementType.ALTERNATIVE.toString()\r\n \t\t\t\t\t+ \"' and parent = \" + new Integer(id).toString();\r\n \t\t\t\t// *** System.out.println(findQuery3);\r\n \t\t\t\trs = stmt.executeQuery(findQuery3);\r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\tquestNames\r\n \t\t\t\t\t.add(RationaleDBUtil.decode(rs.getString(\"name\")));\r\n \t\t\t\t}\r\n \t\t\t\tEnumeration quests = questNames.elements();\r\n \t\t\t\t// Cleanup before loading questions\r\n \t\t\t\tquestions.removeAllElements();\r\n \t\t\t\twhile (quests.hasMoreElements()) {\r\n \t\t\t\t\tQuestion quest = new Question();\r\n \t\t\t\t\tquest.fromDatabase((String) quests.nextElement());\r\n \t\t\t\t\tquestions.add(quest);\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Last, but not least, look for any associations\r\n \t\t\t\tString findQuery4 = \"SELECT artName from ASSOCIATIONS where \"\r\n \t\t\t\t\t+ \"alternative = \" + Integer.toString(id);\r\n \t\t\t\trs = stmt.executeQuery(findQuery4);\r\n \r\n \t\t\t\t// Cleanup before loading artifacts\r\n \t\t\t\tartifacts.removeAllElements();\r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\tartifacts.add(rs.getString(\"artName\"));\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// no, not last - need history too\r\n \t\t\t\tString findQuery5 = \"SELECT * from HISTORY where ptype = 'Alternative' and \"\r\n \t\t\t\t\t+ \"parent = \" + Integer.toString(id);\r\n \t\t\t\t// *** System.out.println(findQuery5);\r\n \t\t\t\trs = stmt.executeQuery(findQuery5);\r\n \r\n \t\t\t\t// Cleanup before loading history\r\n \t\t\t\thistory.removeAllElements();\r\n \r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\tHistory nextH = new History();\r\n \t\t\t\t\tnextH.setStatus(rs.getString(\"status\"));\r\n \t\t\t\t\tnextH.setReason(RationaleDBUtil.decode(rs\r\n \t\t\t\t\t\t\t.getString(\"reason\")));\r\n \t\t\t\t\tnextH.dateStamp = rs.getTimestamp(\"date\");\r\n \t\t\t\t\t// nextH.dateStamp = rs.getDate(\"date\");\r\n \t\t\t\t\thistory.add(nextH);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} catch (SQLException ex) {\r\n \t\t\t// handle any errors\r\n \t\t\tRationaleDB.reportError(ex, \"Alternative.fromDatabase(String)\",\r\n \t\t\t\"Error in a query\");\r\n \t\t} finally {\r\n \t\t\tRationaleDB.releaseResources(stmt, rs);\r\n \t\t}\r\n \r\n \t}", "private Map getColumns(TableConfiguration tc) throws SQLException {\n String localCatalog;\n String localSchema;\n String localTableName;\n \n boolean delimitIdentifiers = tc.isDelimitIdentifiers()\n || StringUtility.stringContainsSpace(tc.getCatalog())\n || StringUtility.stringContainsSpace(tc.getSchema())\n || StringUtility.stringContainsSpace(tc.getTableName());\n\n if (delimitIdentifiers) {\n localCatalog = tc.getCatalog();\n localSchema = tc.getSchema();\n localTableName = tc.getTableName();\n } else if (databaseMetaData.storesLowerCaseIdentifiers()) {\n localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()\n .toLowerCase();\n localSchema = tc.getSchema() == null ? null : tc.getSchema()\n .toLowerCase();\n localTableName = tc.getTableName() == null ? null : tc\n .getTableName().toLowerCase();\n } else if (databaseMetaData.storesUpperCaseIdentifiers()) {\n localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()\n .toUpperCase();\n localSchema = tc.getSchema() == null ? null : tc.getSchema()\n .toUpperCase();\n localTableName = tc.getTableName() == null ? null : tc\n .getTableName().toUpperCase();\n } else {\n localCatalog = tc.getCatalog();\n localSchema = tc.getSchema();\n localTableName = tc.getTableName();\n }\n\n if (tc.isWildcardEscapingEnabled()) {\n String escapeString = databaseMetaData.getSearchStringEscape();\n \n StringBuffer sb = new StringBuffer();\n StringTokenizer st;\n if (localSchema != null) {\n st = new StringTokenizer(localSchema, \"_%\", true); //$NON-NLS-1$\n while (st.hasMoreTokens()) {\n String token = st.nextToken();\n if (token.equals(\"_\") //$NON-NLS-1$\n || token.equals(\"%\")) { //$NON-NLS-1$\n sb.append(escapeString);\n }\n sb.append(token);\n }\n localSchema = sb.toString();\n }\n \n sb.setLength(0);\n st = new StringTokenizer(localTableName, \"_%\", true); //$NON-NLS-1$\n while (st.hasMoreTokens()) {\n String token = st.nextToken();\n if (token.equals(\"_\") //$NON-NLS-1$\n || token.equals(\"%\")) { //$NON-NLS-1$\n sb.append(escapeString);\n }\n sb.append(token);\n }\n localTableName = sb.toString();\n }\n\n Map answer = new HashMap();\n \n ResultSet rs = databaseMetaData.getColumns(localCatalog, localSchema,\n localTableName, null);\n\n while (rs.next()) {\n ColumnDefinition cd = new ColumnDefinition(tc.getAlias(), abatorContext);\n\n cd.setJdbcType(rs.getInt(\"DATA_TYPE\")); //$NON-NLS-1$\n cd.setLength(rs.getInt(\"COLUMN_SIZE\")); //$NON-NLS-1$\n cd.setActualColumnName(rs.getString(\"COLUMN_NAME\")); //$NON-NLS-1$\n cd.setNullable(rs.getInt(\"NULLABLE\") == DatabaseMetaData.columnNullable); //$NON-NLS-1$\n cd.setScale(rs.getInt(\"DECIMAL_DIGITS\")); //$NON-NLS-1$\n cd.setTypeName(rs.getString(\"TYPE_NAME\")); //$NON-NLS-1$\n \n ActualTableName atn = new ActualTableName(rs.getString(\"TABLE_CAT\"), //$NON-NLS-1$\n rs.getString(\"TABLE_SCHEM\"), //$NON-NLS-1$\n rs.getString(\"TABLE_NAME\")); //$NON-NLS-1$\n \n List columns = (List) answer.get(atn);\n if (columns == null) {\n columns = new ArrayList();\n answer.put(atn, columns);\n }\n \n columns.add(cd);\n }\n \n closeResultSet(rs);\n \n return answer;\n }", "public QueryGeneral() {\n try {\n connection = ConnectionDB.getInstance().getConnection();\n } catch (SQLException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n } catch (ClassNotFoundException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n }\n }", "private SearchResultInfo doDependencyAnalysisSearch(\n\t\t\tList<String> cluVersionIndIds, List<String> cluSetIds) {\n \tList<Object[]> results = statementDao.getStatementsWithDependencies(cluVersionIndIds,cluSetIds);\n \t\n \t//From the Object[], which contains a statement at index 0, and a result component id at index 1\n \t//obtain a list of statements and a comma delimited list of requirement component ids for each \n \t//statement which contain the target clu/cluset\n \tMap<String,String> statementToResultComponentIds = new HashMap<String,String>();\n \tMap<String, Statement> statements = new HashMap<String,Statement>();\n \tfor(Object[] result:results){\n \t\tStatement statement = (Statement) result[0];\n \t\tstatements.put(statement.getId(),statement);\n \t\tString resultComponentIds = statementToResultComponentIds.get(statement.getId());\n \t\tif(resultComponentIds == null){\n \t\t\tresultComponentIds = (String)result[1];\n \t\t}else{\n \t\t\tresultComponentIds+=\",\" + (String)result[1];\n \t\t}\n \t\tstatementToResultComponentIds.put(statement.getId(), resultComponentIds);\n \t}\n \t\n \t\n \t//HashMap of root statements used to store non duplicate root statements \n \tMap<String,Statement> rootStatements = new HashMap<String,Statement>();\n \t\n \tMap<String,String> rootToRequirementComponentList = new HashMap<String,String>();\n \t\n \t//Next find the root statements since only the root is related to a clu\n \tfor(Statement statement:statements.values()){\n \t\tStatement child = statement;\n \t\tStatement parent = child;\n \t\twhile(parent!=null){\n\t \t\ttry{\n\t \t\t\t//Search for parent of this child\n\t \t\t\tparent = statementDao.getParentStatement(child.getId());\n\t \t\t\tchild = parent;\n\t \t\t}catch(DoesNotExistException e){\n\t \t\t\t//This is the root (no parent) so add to list of roots\n\t \t\t\trootStatements.put(child.getId(), child);\n\t \t\t\t\n\t \t\t\t//Create a comma delimited mapping of all the requirement components\n\t \t\t\t//ids that contain the trigger clu within this root statement\n\t \t\tString childStatementList = rootToRequirementComponentList.get(child.getId());\n\t \t\tif(childStatementList==null){\n\t \t\t\tchildStatementList = statementToResultComponentIds.get(statement.getId());\n\t \t\t}else{\n\t \t\t\tchildStatementList += \",\"+statementToResultComponentIds.get(statement.getId());\n\t \t\t}\n\t \t\trootToRequirementComponentList.put(child.getId(), childStatementList);\n\t \t\t\t\n\t \t\t\t//Exit condition(hopefully there are no cyclic statements)\n\t \t\t\tparent = null;\n\t \t\t}\n \t\t}\n \t}\n \t\n \tSearchResultInfo searchResult = new SearchResultInfo();\n \t\n \t//Record each statement's reference id type and reference type as a search result row\n \t//Use a hashset of the cell values to remove duplicates\n \tSet<String> processed = new HashSet<String>();\n \tfor(Statement statement:rootStatements.values()){\n \t\tfor(RefStatementRelation relation:statement.getRefStatementRelations()){\n \t\t\tString rowId = relation.getRefObjectId()+\"|\"+relation.getRefObjectTypeKey();\n \t\t\tif(!processed.contains(rowId)){\n \t\t\t\t//This row does not exist yet so we can add it to the results.\n \t\t\t\tprocessed.add(rowId);\n\t \t\t\tSearchResultRowInfo row = new SearchResultRowInfo();\n\t \t\t\trow.addCell(\"stmt.resultColumn.refObjId\",relation.getRefObjectId());\n\t \t\t\trow.addCell(\"stmt.resultColumn.rootId\",statement.getId());\n\t \t\t\trow.addCell(\"stmt.resultColumn.requirementComponentIds\",rootToRequirementComponentList.get(statement.getId()));\n\t \t\t\trow.addCell(\"stmt.resultColumn.statementTypeId\",statement.getStatementType().getId());\n\t \t\t\trow.addCell(\"stmt.resultColumn.statementTypeName\",statement.getStatementType().getName());\n\t \t\t\tsearchResult.getRows().add(row);\n \t\t\t}\n \t\t}\n \t}\n \t\n\t\treturn searchResult;\n\t}", "static void checkObjects() {\n String[] names = new String[]{\"Person\", \"Address\", \"CreditCard\", \"Pincode\", \"Bank\"};\n EntityManager em = factory.createEntityManager();\n\n System.out.println(\"-----------------------------------\");\n for (String name : names) {\n Query q = em.createQuery(String.format(\"select x from %s x\", name));\n\n List resultList = q.getResultList();\n for (Object x : resultList) {\n System.out.println(x);\n }\n System.out.println(\"-----------------------------------\");\n }\n em.close();\n }", "private static void executeQuery4(PersistenceManager pm) {\n Query query = pm.newQuery(Category.class);\n query.declareParameters(\"int length\");\n query.declareVariables(\"Item item\");\n query.setFilter(\n \"elements.contains(item) && item.name.length() <= length\");\n Collection results = (Collection)query.execute(new Integer(10));\n printCollection(\"Categories containing an item with a short name: \",\n results.iterator());\n query.closeAll();\n }", "@Test\n public void testTableDependencies() throws Exception {\n Table table = database.findTableByName(\"programs_with_twitter_tags\");\n assertDependentTables(table, \"programs\", \"broadcasts\", \"clusters\");\n }", "@Override\n protected Map<String, String> initializeCommonQueries() {\n Map<String, String> commonQueries = new HashMap<>();\n\n commonQueries.put(SELECT_ALL_QUERY_KEY, SELECT_ALL_QUERY);\n commonQueries.put(SELECT_BY_ID_QUERY_KEY, SELECT_BY_ID_QUERY);\n commonQueries.put(DELETE_BY_ID_QUERY_KEY, DELETE_BY_ID_QUERY);\n commonQueries.put(INSERT_ENTITY_QUERY_KEY, INSERT_ENTITY_QUERY);\n commonQueries.put(UPDATE_ENTITY_QUERY_KEY, UPDATE_ENTITY_QUERY);\n\n return commonQueries;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "public Entity[] queryEntityInfo() throws UnifyException, SQLException {\n Bookmark bookmark = visual.getSelectBookmark();\n if (bookmark == null)\n return null;\n\n String catalogName= visual.getQueryCatalog();\n String schemaName = visual.getQuerySchema();\n\n String entityName = visual.getQueryEntity(); //ʵ��\n\n if(bookmark.getDbInfoProvider().getDatabaseMetaData().storesLowerCaseIdentifiers())\n {\n \tif(catalogName!=null)\n \t\tcatalogName = catalogName.toLowerCase();\n \tif(schemaName!=null)\n \t\tschemaName = schemaName.toLowerCase();\n \tif(entityName!=null)\n \t\tentityName = entityName.toLowerCase();\n }else if(bookmark.getDbInfoProvider().getDatabaseMetaData().storesUpperCaseIdentifiers())\n {\n \tif(catalogName!=null)\n \t\tcatalogName = catalogName.toUpperCase();\n \tif(schemaName!=null)\n \t\tschemaName = schemaName.toUpperCase();\n \tif(entityName!=null)\n \t\tentityName = entityName.toUpperCase();\n }\n// �����mysql��ݿ⣬����ѯ���������ݵ���Ϊ��д\n// if (catalogName != null&&!(bookmark.isMysql()))\n// \tcatalogName = catalogName.toUpperCase();\n// if (schemaName != null&&!(bookmark.isMysql()))\n// schemaName = schemaName.toUpperCase();\n// if (entityName != null&&!(bookmark.isMysql()))\n// entityName = entityName.toUpperCase();\n return queryEntityInfo(bookmark,catalogName, schemaName, entityName);\n }", "public static void main(String[] args) throws Exception {\n CalciteConnection connection = new SimpleCalciteConnection();\n String salesSchema = Resources.toString(SimpleQueryPlanner2.class.getResource(\"/sales.json\"), Charset.defaultCharset());\n // ModelHandler reads the sales schema and load the schema to connection's root schema and sets the default schema\n new ModelHandler(connection, \"inline:\" + salesSchema);\n\n // Create the query planner with sales schema. conneciton.getSchema returns default schema name specified in sales.json\n SimpleQueryPlanner2 queryPlanner = new SimpleQueryPlanner2(connection.getRootSchema().getSubSchema(connection.getSchema()));\n RelNode logicalPlan = queryPlanner.getLogicalPlan(\"select id,product from orders where product='paint' and units>=5\");\n System.out.println(logicalPlan.getDescription());\n System.out.println(RelOptUtil.toString(logicalPlan));\n\n System.out.println(\"======================================\");\n\n queryPlanner = new SimpleQueryPlanner2(connection.getRootSchema().getSubSchema(connection.getSchema()));\n //RelNode plan = queryPlanner.getTRel(\"select id,product from orders where product='paint' and units>=5\"); // TODO 报错\n RelNode plan = queryPlanner.getTRel(\"select id,product from orders\");\n System.out.println(RelOptUtil.toString(plan));\n ((TRel) plan).doSomething(0);\n }", "public static void main(String[] args) {\n\t\tString queryHql = \"select Map(a.id,a.name,b.brandId,b.productId) from ShopBrand as a,SysProductType b where a.id=b.aid \";\n\n\t\tString tableStatement = StringUtils.substringBetween(queryHql, \"from\",\n\t\t\t\t\"where\");\n\t\tString mappingStatement = StringUtils.substringBetween(queryHql, \"Map\",\n\t\t\t\t\"from\");\n\t\tmappingStatement = StringUtils.replaceOnce(mappingStatement, \"(\", \"\");\n\n\t\tSet<String> estimateTransformFields = Sets.newHashSet();\n\t\tfor (String t : Splitter.on(\",\").split(mappingStatement)) {\n\t\t\tt = t.trim();\n\t\t\testimateTransformFields.add(Splitter.on(\"as\").trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\n\t\tboolean hasAlias = true;\n\t\tString singleEntityName = \"\";\n\t\tSet<String> estimateTableNames = Sets.newHashSet();\n\t\tBiMap<String, String> entityName2aliasBimap = HashBiMap.create();\n\t\tString separator;\n\t\tList<String> tList;\n\t\tfor (String t : Splitter.on(\",\").split(tableStatement)) {\n\t\t\tt = t.trim();\n\t\t\tif (t.contains(\"as\")) {\n\t\t\t\tseparator = \"as\";\n\t\t\t} else {\n\t\t\t\tseparator = \" \";\n\t\t\t}\n\t\t\ttList = Splitter.on(separator).trimResults().omitEmptyStrings()\n\t\t\t\t\t.limit(2).splitToList(t);\n\n\t\t\tif (tList.size() == 1) {\n\t\t\t\tsingleEntityName = tList.get(0);\n\t\t\t\thasAlias = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tentityName2aliasBimap.put(tList.get(0), tList.get(1));\n\t\t\testimateTableNames.add(Splitter.on(separator).trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\t\tBiMap<String, String> alias2EntityNameBimap = entityName2aliasBimap\n\t\t\t\t.inverse();\n\n\t\tlogger.info(\"estimateTransformFields is:{}\", estimateTransformFields);\n\t\tlogger.info(\"estimateTableNames is:{}\", estimateTableNames);\n\t\tlogger.info(\"entityName2aliasBimap is:{}\", entityName2aliasBimap);\n\n\t\tMap<String, Set<String>> estimateResultMap = Maps.newHashMap();\n\t\tString tmpAlias;\n\t\tString tmpFiledNameWithoutAlias;\n\t\tString tmpEntityName;\n\t\tif (hasAlias) {\n\t\t\tfor (String field : estimateTransformFields) {\n\t\t\t\ttmpAlias = field.substring(0, 1);\n\t\t\t\ttmpFiledNameWithoutAlias = field.substring(2);\n\t\t\t\ttmpEntityName = alias2EntityNameBimap.get(tmpAlias);\n\t\t\t\tif (estimateResultMap.get(tmpEntityName) != null) {\n\t\t\t\t\testimateResultMap.get(tmpEntityName)\n\t\t\t\t\t\t\t.add(tmpFiledNameWithoutAlias);\n\t\t\t\t} else {\n\t\t\t\t\testimateResultMap.put(tmpEntityName,\n\t\t\t\t\t\t\tSets.newHashSet(tmpFiledNameWithoutAlias));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\testimateResultMap.put(singleEntityName, estimateTransformFields);\n\t\t}\n\t\tlogger.info(\"estimateResultMap is:{}\", estimateResultMap);\n\t}", "public void testTwoTableSyn() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName, c.AD_Column_ID, c.ColumnName FROM AD_Table as t, AD_Column AS c WHERE t.AD_Table_ID=c.AD_Table_ID AND t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t,AD_Column=c|0]\", fixture.toString());\n }", "private String queryAllFrom(String tableName) {\n return EXTRA_ALL_FROM + tableName + EXTRA_SEMI_COLON;\n }", "String getObjectCheckSql(String name);", "public static void main(String[] args) throws Exception {\n\t\tConnection con = DriverManager.getConnection(args[0]);\n\t\tDatabaseMetaData dbmd = con.getMetaData();\n\t\ttry {\n\t\t\t// inspect the catalog by use of dbmd functions\n\t\t\tdumpResultSet(dbmd.getCatalogs());\n//\t\t\tdumpResultSet(dbmd.getSchemas());\t// this produces different outputs on different platforms due to dependency on SAMTOOLS and NETCDF. so exclude it\n\t\t\tdumpResultSet(dbmd.getSchemas(null, \"sys\"));\n//\t\t\tdumpResultSet(dbmd.getTables(null, \"sys\", null, null));\t// this produces different outputs on different platforms due to dependency on Geom and NETCDF.\n\t\t\tdumpResultSet(dbmd.getTables(null, \"tmp\", null, null));\t// schema tmp has 6 tables\n\t\t\tdumpResultSet(dbmd.getUDTs(null, \"sys\", null, null));\n\t\t\tint[] UDTtypes = { Types.STRUCT, Types.DISTINCT };\n\t\t\tdumpResultSet(dbmd.getUDTs(null, \"sys\", null, UDTtypes));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"FAILED :( \"+ e.getMessage());\n\t\t\tSystem.out.println(\"ABORTING TEST!!!\");\n\t\t}\n\t\tcon.close();\n\t}", "public final Data execeuteQueries() throws SQLException {\r\n\r\n\t\tStatement stat = con.createStatement();\r\n\t\tStatement stat2 = con.createStatement();\r\n\t\tStatement stat3 = con.createStatement();\r\n\r\n\t\t// will provide a list of all the parts starting from the one with the\r\n\t\t// highest cost\r\n\t\tResultSet result1 = stat\r\n\t\t\t\t.executeQuery(\"select sp.part_name,sp.cost_in_cents,sp.part_code from supplier_parts sp \"\r\n\t\t\t\t\t\t+ \"ORDER BY cost_in_cents DESC\");\r\n\r\n\t\t// getting all the suppliers\r\n\t\tResultSet result2 = stat2.executeQuery(\"SELECT * from suppliers\");\r\n\r\n\t\t// will provide the list of suppliers with their supplied parts\r\n\t\tResultSet result3 = stat3\r\n\t\t\t\t.executeQuery(\"select s.supplier_id,s.name, sp.part_name,sp.part_code\"\r\n\t\t\t\t\t\t+ \" from supplier_parts sp \"\r\n\t\t\t\t\t\t+ \"INNER JOIN suppliers s ON s.supplier_id = sp.supplier_id\");\r\n\r\n\t\t// adding all the parts to the total parts list\r\n\t\twhile (result1.next()) {\r\n\t\t\tString part_name = result1.getString(\"part_name\");\r\n\t\t\tint cost_of_part = result1.getInt(\"cost_in_cents\");\r\n\t\t\tString part_id = result1.getString(\"part_code\");\r\n\r\n\t\t\t/*\r\n\t\t\t * if (checkIfPartExists(dat, part_name)) {\r\n\t\t\t * System.out.println(\"Multiple records found for the same part\");\r\n\t\t\t * System.out.println(\"Part:\" + part_name +\r\n\t\t\t * \" already exists!! Skipping this part!!\"); } else {\r\n\t\t\t * dat.getParts_list().add( new Parts(part_name, part_id,\r\n\t\t\t * cost_of_part)); }\r\n\t\t\t */\r\n\r\n\t\t\t// assuming that all the parts are distinct\r\n\t\t\tdat.getParts_list()\r\n\t\t\t\t\t.add(new Parts(part_name, part_id, cost_of_part));\r\n\t\t}\r\n\r\n\t\t// adding all the suppliers to the list irrespective of parts supplied;\r\n\t\twhile (result2.next()) {\r\n\t\t\tint id = result2.getInt(\"supplier_id\");\r\n\t\t\tString name = result2.getString(\"name\");\r\n\t\t\tString code = result2.getString(\"code\");\r\n\t\t\tString tele = result2.getString(\"telephone_number\");\r\n\t\t\tString email = result2.getString(\"email_address\");\r\n\t\t\t// not checking for multiple entries because of id as the primary\r\n\t\t\t// key\r\n\t\t\tdat.getSuppliers_list().add(\r\n\t\t\t\t\tnew Supplier(id, name, code, tele, email));\r\n\t\t}\r\n\r\n\t\t// adding the parts to their suppliers\r\n\t\twhile (result3.next()) {\r\n\t\t\tString supplier_name = result3.getString(\"name\");\r\n\t\t\tString part_supplied = result3.getString(\"part_name\");\r\n\t\t\tint supplier_id = result3.getInt(\"supplier_id\");\r\n\t\t\tString part_code = result3.getString(\"part_code\");\r\n\r\n\t\t\tParts part = findPart(part_code, dat);\r\n\t\t\tif (part == null) {\r\n\t\t\t\tpart = new Parts(part_supplied, part_code);\r\n\t\t\t}\r\n\t\t\t// checking if it is a known supplier; if so part is added to the\r\n\t\t\t// supplied parts list\r\n\t\t\t// else new supplier is created with the part supplied\r\n\t\t\tif (checkIfSupplierExists(supplier_id, part, dat) == false) {\r\n\t\t\t\tdat.getSuppliers_list().add(\r\n\t\t\t\t\t\tnew Supplier(supplier_id, supplier_name, part));\r\n\t\t\t}\r\n\t\t}\r\n\t\t// closing all the connections\r\n\t\tstat.close();\r\n\t\tstat2.close();\r\n\t\tstat3.close();\r\n\t\tcon.close();\r\n\t\treturn dat;\r\n\t}", "public Cursor queryCombinedArticleLists(String query){\n String output = ArticleContract.ArticleEntry.COLUMN_TITLE + \", \"\n + ArticleContract.ArticleEntry.COLUMN_DESCRIPTION + \", \"\n + ArticleContract.ArticleEntry.COLUMN_URL_TO_IMAGE + \", \"\n + ArticleContract.ArticleEntry.COLUMN_URL;\n\n String whereClause = \" WHERE \" + ArticleContract.ArticleEntry.COLUMN_DESCRIPTION + \" LIKE \\\"%\"\n + query + \"%\\\" OR \" + ArticleContract.ArticleEntry.COLUMN_TITLE + \" LIKE \\\"%\"\n + query + \"%\\\"\";\n\n String sql = \"SELECT \" + output + \" FROM \" + ArticleContract.ArticleEntry.TOP_ARTICLE_TABLE\n + whereClause + \" UNION \"\n + \"SELECT \" + output + \" FROM \" + ArticleContract.ArticleEntry.LATEST_ARTICLE_TABLE\n + whereClause;\n return db.rawQuery(sql, null);\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\" WHERE \");\n String string0 = SQLUtil.typeAndName(defaultDBTable0);\n assertEquals(\"table WHERE \", string0);\n }", "@Override\n public Cursor query(@NonNull Uri uri, String[] projection, String selection,\n String[] selectionArgs, String sortOrder) {\n\n // Get access to underlying database (read-only for query)\n final SQLiteDatabase db = mRecipeDbHelper.getReadableDatabase();\n\n // Create a SQLiteQueryBuilder to build the appropriate table\n SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();\n\n // Write URI match code and set a variable to return a Cursor\n int match = sUriMatcher.match(uri);\n\n Cursor retCursor;\n\n switch (match) {\n // Query for the recipes directory\n case CODE_RECIPES:\n queryBuilder.setTables(RecipeDbContract.RecipeEntry.TABLE_NAME);\n retCursor = queryBuilder.query(db,\n projection,\n selection,\n selectionArgs,\n null,\n null,\n sortOrder);\n break;\n\n case CODE_RECIPE_WITH_ID:\n String id = uri.getPathSegments().get(1);\n queryBuilder.setTables(RecipeDbContract.RecipeEntry.TABLE_NAME);\n retCursor = queryBuilder.query(db,\n projection,\n RecipeEntry.COLUMN_RECIPE_UID + \"=?\",\n new String[]{id},\n null,\n null,\n sortOrder);\n break;\n\n case CODE_RECIPE_WITH_APP_WIDGET_ID:\n Log.d(TAG, \"Query() CODE_RECIPE_WITH_APP_WIDGET_ID uri matched, uri: \" + uri);\n\n String appWidgetId = uri.getLastPathSegment();\n // Left join the recipe table with the app widget table\n // Set the projection to have the recipe detail, and select rows that has\n // the recipe key value matching the appWidgetId\n\n Log.d(TAG, \"Query() CODE_RECIPE_WITH_APP_WIDGET_ID appWidgetId: \" + appWidgetId);\n\n String RECIPE_WIDGET_JOIN_TABLE =\n RecipeEntry.TABLE_NAME +\n \" LEFT JOIN \" +\n AppWidgetIdEntry.TABLE_NAME +\n \" ON \" +\n RecipeEntry.TABLE_NAME + \".\" + RecipeEntry.COLUMN_RECIPE_UID +\n \" = \" +\n AppWidgetIdEntry.TABLE_NAME + \".\" +\n AppWidgetIdEntry.COLUMN_APP_WIDGET_RECIPE_KEY;\n\n Log.d(TAG, \"Query() Join table statement: \" + RECIPE_WIDGET_JOIN_TABLE);\n\n queryBuilder.setTables(RECIPE_WIDGET_JOIN_TABLE);\n\n retCursor = queryBuilder.query(db,\n new String[]{\n RecipeEntry.COLUMN_RECIPE_UID,\n RecipeEntry.COLUMN_RECIPE_NAME,\n RecipeEntry.COLUMN_RECIPE_IMAGE_URL,\n RecipeEntry.COLUMN_RECIPE_SERVINGS\n },\n AppWidgetIdEntry.COLUMN_APP_WIDGET_UID + \"=?\",\n new String[]{appWidgetId},\n null,\n null,\n null\n );\n\n if (retCursor == null || retCursor.getCount() == 0)\n Log.e(TAG, \"Query() can't find the corresponding recipe with appWidgetId: \"\n + appWidgetId);\n break;\n\n case CODE_INGREDIENTS:\n retCursor = db.query(IngredientEntry.TABLE_NAME,\n projection,\n selection,\n selectionArgs,\n null,\n null,\n sortOrder);\n break;\n\n case CODE_STEPS:\n retCursor = db.query(StepEntry.TABLE_NAME,\n projection,\n selection,\n selectionArgs,\n null,\n null,\n sortOrder);\n break;\n\n case CODE_FAVORITES:\n retCursor = db.query(FavoriteEntry.TABLE_NAME,\n projection,\n selection,\n selectionArgs,\n null,\n null,\n sortOrder);\n break;\n\n case CODE_APP_WIDGET_IDS:\n retCursor = db.query(AppWidgetIdEntry.TABLE_NAME,\n projection,\n selection,\n selectionArgs,\n null,\n null,\n sortOrder);\n break;\n // Default exception\n default:\n throw new UnsupportedOperationException(\"Unknown uri: \" + uri);\n }\n\n // Set a notification URI on the Cursor and return that Cursor\n if (getContext() != null && retCursor != null) {\n retCursor.setNotificationUri(getContext().getContentResolver(), uri);\n }\n\n // Return the desired Cursor\n return retCursor;\n }", "public interface NutrientStatementPanelHeaderRepositoryCommon {\n /**\n * The query search nutrient statement panel header by source system id and statement maintenance switch order by source system reference id.\n */\n String SEARCH_NUTRIENT_STATEMENT_PANEL_HEADER = \"SELECT ntrnPanHdr FROM NutrientStatementPanelHeader ntrnPanHdr\" +\n \" WHERE ntrnPanHdr.sourceSystemId = (:sourceSystemId) AND ntrnPanHdr.statementMaintenanceSwitch = (:statementMaintenanceSwitch)\" +\n \" ORDER BY CAST(ntrnPanHdr.sourceSystemReferenceId AS int) ASC\";\n\n /**\n * The query search nutrient statement panel header by source system reference id, source system id and statement maintenance switch order by source system reference id.\n */\n String SEARCH_NUTRIENT_STATEMENT_PANEL_HEADER_BY_SOURCE_SYSTEM_REFERENCE_ID = \"SELECT ntrnPanHdr FROM NutrientStatementPanelHeader ntrnPanHdr\" +\n \" WHERE ntrnPanHdr.sourceSystemReferenceId IN (:statementIds) AND ntrnPanHdr.sourceSystemId = (:sourceSystemId)\" +\n \" AND ntrnPanHdr.statementMaintenanceSwitch = (:statementMaintenanceSwitch)\" +\n \" ORDER BY CAST(ntrnPanHdr.sourceSystemReferenceId AS int) ASC\";\n}", "public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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 .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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 .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\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 .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}", "private List<String> getAllViewsDDL() {\n\t\tList<String> resultList = new ArrayList<String>();\n\t\tList<String> viewNameList = new ArrayList<String>();\n\t\tLinkedHashMap<String, String> viewQuerySpecMap = new LinkedHashMap<String, String>();\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\tCUBRIDResultSetProxy rs = null;\n\n\t\tString sql;\n\t\tif (dbInfo.isSupportUserSchema()) {\n\t\t\tsql = \"SELECT c.class_name, c.owner_name, c.class_type\" + \" FROM db_class c, db_attribute a\"\n\t\t\t\t+ \" WHERE c.class_name=a.class_name AND c.is_system_class='NO'\"\n\t\t\t\t+ \" AND c.owner_name=a.owner_name\"\n\t\t\t\t+ \" AND c.class_type='VCLASS'\" + \" GROUP BY c.owner_name, c.class_name, c.class_type\"\n\t\t\t\t+ \" ORDER BY c.owner_name, c.class_type, c.class_name\";\n\t\t} else {\n\t\t\tsql = \"SELECT c.class_name, c.class_type\" + \" FROM db_class c, db_attribute a\"\n\t\t\t\t\t+ \" WHERE c.class_name=a.class_name AND c.is_system_class='NO'\"\n\t\t\t\t\t+ \" AND c.class_type='VCLASS'\" + \" GROUP BY c.class_name, c.class_type\"\n\t\t\t\t\t+ \" ORDER BY c.class_type, c.class_name\";\n\t\t}\n\n\t\t// [TOOLS-2425]Support shard broker\n\t\tsql = dbInfo.wrapShardQuery(sql);\n\t\ttry {\n\t\t\tconn = JDBCConnectionManager.getConnection(dbInfo, false);\n\t\t\tstmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\n\t\t\trs = (CUBRIDResultSetProxy) stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tif (dbInfo.isSupportUserSchema()) {\n\t\t\t\t\tString className = rs.getString(1);\n\t\t\t\t\tString ownerName = rs.getString(2);\n\t\t\t\t\tviewNameList.add(ownerName + \".\" + className);\n\t\t\t\t} else {\n\t\t\t\t\tString className = rs.getString(1);\n\t\t\t\t\tviewNameList.add(className);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"\", e);\n\t\t} finally {\n\t\t\tQueryUtil.freeQuery(stmt, rs);\n\t\t}\n\n\t\ttry {\n\t\t\tstmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\n\t\t\tfor (String viewName : viewNameList) {\n\t\t\t\tString querySpecSql;\n\t\t\t\tif (dbInfo.isSupportUserSchema()) {\n\t\t\t\t\tquerySpecSql = \"SELECT vclass_def FROM db_vclass WHERE CONCAT(owner_name, '.' , vclass_name)='\"\n\t\t\t\t\t\t+ viewName + \"'\";\n\t\t\t\t} else {\n\t\t\t\t\tquerySpecSql = \"SELECT vclass_def FROM db_vclass WHERE vclass_name='\"\n\t\t\t\t\t\t+ viewName + \"'\";\n\t\t\t\t}\n\n\t\t\t\t// [TOOLS-2425]Support shard broker\n\t\t\t\tquerySpecSql = dbInfo.wrapShardQuery(querySpecSql);\n\n\t\t\t\ttry {\n\t\t\t\t\trs = (CUBRIDResultSetProxy) stmt.executeQuery(querySpecSql);\n\t\t\t\t\tif (rs.next()) {\n\t\t\t\t\t\tviewQuerySpecMap.put(viewName, rs.getString(1));\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tQueryUtil.freeQuery(rs);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"\", e);\n\t\t} finally {\n\t\t\tQueryUtil.freeQuery(conn, stmt);\n\t\t}\n\n\t\tfor (Map.Entry<String, String> entry : viewQuerySpecMap.entrySet()) {\n\t\t\tSchemaInfo viewInfo = dbInfo.getSchemaInfo(entry.getKey());\n\t\t\tString ddl = getViewDDL(viewInfo, dbInfo, entry.getValue());\n\t\t\tresultList.add(ddl);\n\t\t}\n\n\t\treturn resultList;\n\t}", "public abstract Statement queryToRetrieveData();", "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 }", "void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }", "Query queryOn(Connection connection);", "@Test\r\n\tpublic void testSQL() throws Exception {\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}// Mysql 的驱动\r\n\t\t// 2. 获取数据库的连接\r\n\t\tjava.sql.Connection conn = java.sql.DriverManager\r\n\t\t\t\t.getConnection(\r\n\t\t\t\t\t\t\"jdbc:mysql://223.203.192.248/ccindex?useUnicode=true&characterEncoding=utf8\",\r\n\t\t\t\t\t\t\"dba\", \"dba\");\r\n\r\n\t\tRowLoad<Connection,List<Map<String, Object>>> c = new RowLoadDB();\r\n\t\tc.setColums(\"hostname\",\"business\",\"log_type\");\r\n\t\tc.setSplit(\"select hostname , business , log_type from node_list where demand='ALLBU' \");\r\n\t\tc.setSource(conn);\r\n\t\tc.load();\r\n\t\t\r\n\t\tList<Map<String, Object>> ll = c.getData();\r\n\t\tSystem.out.println(ll.get(1).get(\"hostname\"));\r\n\t\tconn.close();\r\n\t}", "public static Cursor getBusINFOCursor() {\r\n SQLiteDatabase db = SearchHelper.getReadableDatabase();\r\n if(Bus.isLanguare()==true) {\r\n Cursor cursor = db.rawQuery(Prefix_Data_SQL.QUERY_BUS_BASIC_INFO_TC_SQL, null);\r\n return cursor;\r\n }else{\r\n Cursor cursor = db.rawQuery(Prefix_Data_SQL.QUERY_BUS_BASIC_INFO_EN_SQL, null);\r\n return cursor;\r\n }\r\n }", "@Test\n \tpublic void whereClauseDirectDominanceNamed() {\n \t\tnode23.addJoin(new Dominance(node42, NAME, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t}", "public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}", "public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}", "private void createMainQuery() {\r\n\t\tStringBuilder sb = new StringBuilder(\"SELECT B.*, M.NAME AS MAIN_CATEGORY FROM BUSINESS B, MAIN_CATE M \\nWHERE M.CAT_ID=B.CATEGORIES AND (M.CAT_ID=\");\r\n\t\tboolean first = true;\r\n\t\t\r\n\t\tfor(JCheckBox bo: boxes) {\r\n\t\t\tif(bo.isSelected()) {\r\n\t\t\t\tif(first) {\r\n\t\t\t\t\tsb.append(bo.getActionCommand());\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tsb.append(\" OR M.CAT_ID=\").append(bo.getActionCommand());\r\n\t\t\t}\r\n\t\t}\r\n\t\tsb.append(\")\");\r\n\t\tqueryArea.setText(sb.toString());\r\n\t}", "private static void runCatalog() {\r\n\r\n\t\tSystem.out.println(sqlAL.get(0));\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tString sql = \"\";\r\n\t\tboolean tableExist = true;\r\n\t\tString tname = \"\";\r\n\t\tString cmd = \"\";\r\n\r\n\t\ttry {\r\n\t\t\t// STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(catalogDriver);\r\n\r\n\t\t\t// STEP 3: Open a connection\r\n\t\t\tif (catalogUserName.equals(\" \") && catalogPassword.equals(\" \")) {\r\n\t\t\t\tconn = DriverManager.getConnection(catalogHostName);\r\n\t\t\t} else {\r\n\t\t\t\tconn = DriverManager.getConnection(catalogHostName, catalogUserName, catalogPassword);\r\n\t\t\t}\r\n\r\n\t\t\t// STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsql = \"SELECT * FROM dtables\";\r\n\t\t\t\tstmt.executeQuery(sql);\r\n\r\n\t\t\t\tSystem.out.println(\"Catalog table already exists\");\r\n\r\n\t\t\t} catch (SQLException e) {\r\n\r\n\t\t\t\ttableExist = false;\r\n\r\n\t\t\t\tSystem.out.println(\"Catalog table does not exist\");\r\n\t\t\t}\r\n\r\n\t\t\tif (tableExist == false) {\r\n\t\t\t\tsql = \"CREATE TABLE dtables(tname char(32),\" + \"nodedriver char(64),\" + \"nodeurl char(128),\"\r\n\t\t\t\t\t\t+ \"nodeuser char(16),\" + \"nodepasswd char(16),\" + \"partmtd int,\" + \"nodeid int,\"\r\n\t\t\t\t\t\t+ \"partcol char(32),\" + \"partparam1 char(32),\" + \"partparam2 char(32))\";\r\n\r\n\t\t\t\tstmt.executeUpdate(sql);\r\n\r\n\t\t\t\tSystem.out.println(\"SQL table created\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int x = 0; x < nodeAL.size(); x++) {\r\n\r\n\t\t\t\ttname = parseTname(sqlAL.get(x));\r\n\r\n\t\t\t\tcmd = getCmd(sqlAL.get(x));\r\n\t\t\t\t// System.out.println(cmd);\r\n\r\n\t\t\t\tif (cmd.equals(\"CREATE\")) {\r\n\r\n\t\t\t\t\tsql = \"INSERT INTO dtables VALUES \" + \"('\" + tname + \"', \" + \"'\" + (nodeAL.get(x)).getDriver()\r\n\t\t\t\t\t\t\t+ \"', \" + \"'\" + (nodeAL.get(x)).getHostName() + \"', \" + \"'\" + (nodeAL.get(x)).getUserName()\r\n\t\t\t\t\t\t\t+ \"', \" + \"'\" + (nodeAL.get(x)).getPassword() + \"', \" + -1 + \", \" + \"\" + x + \", \" + null\r\n\t\t\t\t\t\t\t+ \", \" + null + \", \" + null + \")\";\r\n\r\n\t\t\t\t\tstmt.executeUpdate(sql);\r\n\t\t\t\t} else if (cmd.equals(\"DROP\")) {\r\n\t\t\t\t\tsql = \"DELETE FROM dtables WHERE \" + \"tname = '\" + tname + \"'\" + \"AND nodedriver = '\"\r\n\t\t\t\t\t\t\t+ (nodeAL.get(x)).getDriver() + \"' \" + \"AND nodeurl = '\" + (nodeAL.get(x)).getHostName()\r\n\t\t\t\t\t\t\t+ \"' \" + \"AND nodeuser = '\" + (nodeAL.get(x)).getUserName() + \"' \" + \"AND nodepasswd = '\"\r\n\t\t\t\t\t\t\t+ (nodeAL.get(x)).getPassword() + \"' \"\r\n\t\t\t\t\t\t\t// + \"AND partmtd = \" + -1 + \"'\"\r\n\t\t\t\t\t\t\t+ \"AND nodeid = \" + x + \"\"\r\n\t\t\t\t\t\t\t// + \"AND partcol = '\" + null + \"'\"\r\n\t\t\t\t\t\t\t// + \"AND partparam1 = '\" + null + \"'\"\r\n\t\t\t\t\t\t\t// + \"AND partparam2 = '\" + null\r\n\t\t\t\t\t\t\t+ \"\";\r\n\r\n\t\t\t\t\tstmt.executeUpdate(sql);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// rs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: Catalog Updated\");\r\n\t\t} catch (SQLException se) {\r\n\t\t\t// Handle errors for JDBC\r\n\t\t\t// se.printStackTrace();\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: catalog update failed\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// Handle errors for Class.forName\r\n\t\t\t// e.printStackTrace();\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: catalog update failed\");\r\n\t\t} finally {\r\n\t\t\t// finally block used to close resources\r\n\t\t\ttry {\r\n\t\t\t\tif (stmt != null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException se2) {\r\n\t\t\t} // nothing we can do\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} // end finally try\r\n\t\t} // end try\r\n\t\t\t// System.out.println(\"Goodbye!\");\r\n\r\n\t}", "public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "private void checkInlineQueries() throws Exceptions.OsoException, Exceptions.InlineQueryFailedError {\n Ffi.Query nextQuery = ffiPolar.nextInlineQuery();\n while (nextQuery != null) {\n if (!new Query(nextQuery, host).hasMoreElements()) {\n String source = nextQuery.source();\n throw new Exceptions.InlineQueryFailedError(source);\n }\n nextQuery = ffiPolar.nextInlineQuery();\n }\n }", "private SelectOnConditionStep<Record> commonTestItemDslSelect() {\n\t\treturn dsl.select().from(TEST_ITEM).join(TEST_ITEM_RESULTS).on(TEST_ITEM.ITEM_ID.eq(TEST_ITEM_RESULTS.RESULT_ID));\n\t}", "public static void main(String[] args) throws SQLException {\r\n\t\t\r\n\t\tString sql01 = \"SELECT * FROM producto\";\r\n\t\tString sql02 = \"SELECT * FROM categorias\";\r\n\t\tString sql03 = \"SELECT * FROM producto where id_categoria = {id}\";\r\n\t\tString sql04 = \"SELECT * FROM categorias c JOIN producto p on (p.id_categoria == c.id ) where p.id = {id}\";\r\n\t\t\r\n\t\tDB01 db01 = new DB01();\r\n\t\t\r\n\t\t// Consultas A\r\n\t\tdb01.db.ejecutar(sql01); // CONSULTA A1\r\n\t\tdb01.db.ejecutar(sql02); // CONSULTA A2\r\n\t\tdb01.db.ejecutar(sql03); // CONSULTA A3\r\n\t\tdb01.db.ejecutar(sql04); // CONSULTA A4\r\n\t\t\r\n\t\t// Consultas B\r\n\t\tdb01.db.ejecutarYDevolver(sql01); // CONSULTA B1\r\n\t\tdb01.db.ejecutarYDevolver(sql02); // CONSULTA B2\r\n\t\tdb01.db.ejecutarYDevolver(sql03); // CONSULTA B3\r\n\t\tdb01.db.ejecutarYDevolver(sql04); // CONSULTA B4\r\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n String[] stringArray0 = new String[0];\n SQLUtil.leftJoin(\"cxecute\", stringArray0, \"cxecute\", \"cxecute\", stringArray0);\n DBCatalog dBCatalog0 = new DBCatalog(\"cxecute\");\n DBSchema dBSchema0 = new DBSchema(\"\");\n // Undeclared exception!\n try { \n dBSchema0.getDatabase();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DBSchema\", e);\n }\n }", "@Override\n public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {\n String orderBy = null;\n Cursor cursor=null;\n SQLiteDatabase db;\n switch (sUriMatcher.match(uri)) {\n case CATEGORY:\n orderBy = ContractClass.Category.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Category.tableCategory, projection, selection, selectionArgs, null, null, orderBy);\n // cursor.moveToFirst();\n break;\n case CATEGORY_ID:\n if(TextUtils.isEmpty(selection))\n selection=ContractClass.Category.columnCategoryId + \"=\" + uri.getPathSegments().get(ContractClass.Category.CATEGORY_ID_PATH_POSITION);\n orderBy = ContractClass.Category.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Category.tableCategory , projection, selection, selectionArgs, null, null, orderBy);\n\n break;\n case CHANNEL:\n orderBy = ContractClass.Channel.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Channel.tableChannel , projection, selection, selectionArgs, null, null, orderBy);\n\n break;\n case CHANNEL_ID:\n // qb.setTables(ContractClass.Channel.tableChannel);\n // qb.setProjectionMap(sChannelProjectionMap);\n if(TextUtils.isEmpty(selection))\n selection=ContractClass.Channel.columnChannelId + \"=\" + uri.getPathSegments();\n orderBy = ContractClass.Channel.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Channel.tableChannel , projection, selection, selectionArgs, null, null, orderBy);\n\n break;\n case PROGRAM:\n orderBy = ContractClass.Program.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Program.tableProgram , projection, selection, selectionArgs, null, null, orderBy);\n break;\n case PROGRAM_ID:\n if(TextUtils.isEmpty(selection))\n selection=ContractClass.Program.columnProgramId + \"=\" + uri.getPathSegments();\n orderBy = ContractClass.Program.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Program.tableProgram , projection, selection, selectionArgs, null, null, orderBy);\n\n break;\n case FAVORITE:\n orderBy = ContractClass.Favorite.DEFAULT_SORT_ORDER;\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Favorite.tableFavorite , projection, selection, selectionArgs, null, null, orderBy);\n\n break;\n case FAVORITE_ID:\n if(TextUtils.isEmpty(selection))\n selection=(ContractClass.Favorite.columnFavoriteID + \"=\" + uri.getPathSegments());\n orderBy = ContractClass.Favorite.DEFAULT_SORT_ORDER;\n\n db = dbHelper.getReadableDatabase();\n cursor = db.query(ContractClass.Favorite.tableFavorite, projection, selection, selectionArgs, null, null, orderBy);\n\n break;\n default:\n throw new IllegalArgumentException(\"Unknown URI \" + uri);\n }\n cursor.setNotificationUri(getContext().getContentResolver(), uri);\n return cursor;\n }", "protected void initializer() {\n\t\tselect = new DBSelect();\n\t\ttry {\n\t\t\tselect.setDriverName(\"com.ibm.as400.access.AS400JDBCDriver\");\n\t\t\tselect.setUrl(\"jdbc:as400://192.168.101.14\");\n\t\t\tselect.setCommand(\n\t\t\t\"SELECT DISTINCT artitda.codaat, articulo.descma, articulo.des1ma, articulo.des2ma, articulo.unvema, SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) as departamento, SUBSTR(VARCHAR(ARTITDA.CODAAT), 3, 2) as lineaseccion, costos.coslllca, artitda.prevat, artitda.impuat as impuesto, articulo.empvma as empaque, articulo.povema as descuentoempaque, articulo.deemma as descuentoempleado, articulo.esrema, articulo.fecama \t\t\tFROM SISTEMA.ARTICULO as articulo inner join COMPRAS.LMLCA03 as costos on (articulo.codama = costos.artillca) inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) \t\t\tWHERE artitda.codaat IN (SELECT articulo.codama FROM SISTEMA.ARTICULO as articulo, COMPRAS.ARTITDA as artitda \t\t\tWHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000)) and (articulo.codama = artitda.codaat) )\"); \n\t\t\t\t//\"SELECT * FROM COMPRAS.ARTITDA, SISTEMA.ARTICULO WHERE (COMPRAS.ARTITDA.CODAAT = SISTEMA.ARTICULO.CODAMA) AND (CAST (COMPRAS.ARTITDA.TIENAT AS SMALLINT) = 3) AND (SISTEMA.ARTICULO.ESREMA = 'V') AND (COMPRAS.ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(COMPRAS.ARTITDA.CODAAT), 1, 2) = '90') OR (COMPRAS.ARTITDA.CODAAT < 3500000))\");\n\t\t\t//\"SELECT count(*) FROM SISTEMA.ARTICULO as articulo inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) WHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000))\"\t\t\t\n\t\t\t//DBParameterMetaData parmMetaData = select.getParameterMetaData();\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public interface ChecklistItemDAOQuery {\n public final static String UUID = \"select REPLACE(UUID(),'-','')\";\n public final static String CREATE_ITEM = \"insert into checklist_items (id, taskid, title) \"+\n \"values (unhex(?), unhex(?), ?)\";\n public final static String CHECK_ITEM = \"update checklist_items set checked=TRUE WHERE id=unhex(?)\";\n public final static String GET_ITEM_BY_ID = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.id=unhex(?)\";\n public final static String GET_ITEMS_FROM_TASK = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.taskid=unhex(?)\";\n}", "@Test\r\n\tpublic void testPrepareTupleQuery1() throws Exception{\r\n\t\t\r\n\t\tAssert.assertEquals(0, testAdminCon.size());\r\n\t\t\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\ttestAdminCon.add(st1, dirgraph);\r\n\t\ttestAdminCon.add(st2, dirgraph);\r\n\t\ttestAdminCon.add(st3, dirgraph);\r\n\t\ttestAdminCon.add(st4, dirgraph);\r\n\t\ttestAdminCon.add(st5, dirgraph);\r\n\t\ttestAdminCon.add(st6, dirgraph);\r\n\t\ttestAdminCon.add(st7, dirgraph);\r\n\t\ttestAdminCon.add(st8, dirgraph);\r\n\t\ttestAdminCon.add(st9, dirgraph);\r\n\t\ttestAdminCon.add(st10, dirgraph);\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\r\n\t\t\r\n\t\tStringBuilder queryBuilder = new StringBuilder();\r\n\t\tqueryBuilder.append(\"PREFIX ad: <http://marklogicsparql.com/addressbook#>\");\r\n\t\tqueryBuilder.append(\" PREFIX d: <http://marklogicsparql.com/id#>\");\r\n\t\tqueryBuilder.append(\" SELECT DISTINCT ?person\");\r\n\t\tqueryBuilder.append(\" FROM <http://marklogic.com/dirgraph>\");\r\n\t\tqueryBuilder.append(\" WHERE\");\r\n\t\tqueryBuilder.append(\" {?person ad:firstName ?firstname ;\");\r\n\t\tqueryBuilder.append(\" ad:lastName ?lastname.\");\r\n\t\tqueryBuilder.append(\" OPTIONAL {?person ad:homeTel ?phonenumber .}\");\r\n\t\tqueryBuilder.append(\" FILTER (?firstname = \\\"Fei\\\")}\");\r\n\t\t\r\n\t\tTupleQuery query = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, queryBuilder.toString());\r\n\t\tTupleQueryResult result = query.evaluate();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"person\"), is(equalTo(true)));\r\n\t\t\t\tValue nameResult = solution.getValue(\"person\");\r\n\t\t\t\tAssert.assertEquals(nameResult.stringValue(),fei.stringValue());\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\r\n\t}", "public static ru.terralink.mvideo.sap.Orders findByPrimaryKey(java.lang.String IV_FO_TOR_ID\n ,java.lang.String IV_FU_TOR_ID)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByPrimaryKey\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \"SELECT x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x\"\n + \".\\\"_rf\\\",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ? AND x.\\\"bm\\\" = ?)\";\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n IV_FU_TOR_ID,\n };\n Object res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, ru.terralink.mvideo.sap.Orders.class);\n return (ru.terralink.mvideo.sap.Orders)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "public static void main(String[] args)\r\n {\n TreeMap<String, String> v_mapDBConf = new TreeMap<>();\r\n //Variable which contains queries to execute.\r\n TreeMap<Integer, String> v_mapQueries = new TreeMap<>();\r\n\r\n Object v_database = null;\r\n\r\n //Affects target database informations and queries to execute into variables.\r\n v_mapDBConf = ConfReader.getConf();\r\n v_mapQueries = ConfReader.getQueries();\r\n\r\n try\r\n {\r\n //Dynamic instantiation corresponding to sgbd.\r\n String dbtype = \"src.database.\"+v_mapDBConf.get(\"DB_TYPE\");\r\n Class<?> clazz = Class.forName(dbtype);\r\n Class[] types = new Class[]{String.class, String.class, String.class, String.class, String.class};\r\n Constructor ct = clazz.getConstructor(types);\r\n v_database = ct.newInstance(new Object[]{v_mapDBConf.get(\"DB_IP_ADDR\"), v_mapDBConf.get(\"DB_PORT\"), v_mapDBConf.get(\"DB_SID\"), v_mapDBConf.get(\"DB_PASS\"), v_mapDBConf.get(\"DB_USER\")});\r\n Method methodConn = clazz.getDeclaredMethod(\"connectDb\");\r\n Method methodDisc = clazz.getSuperclass().getDeclaredMethod(\"disconnectDb\");\r\n Method methodChkConn = clazz.getSuperclass().getDeclaredMethod(\"connectionState\");\r\n\r\n //Connects to database.\r\n methodConn.invoke(v_database);\r\n boolean dbStatus = (boolean) methodChkConn.invoke(v_database);\r\n if (dbStatus)\r\n System.out.println(\"Connected to Database.\");\r\n else\r\n System.out.println(\"Error, not connected to Database.\");\r\n\r\n //Call to XmlBuilder.\r\n XmlBuilder.main((Database) v_database, v_mapQueries);\r\n\r\n //Call to HtmlBuilder.\r\n HtmlReplace.main(\"outputs/auditTemplate.html\", v_mapDBConf.get(\"DB_CLIENT\"), v_mapDBConf.get(\"AUDIT_AUTHOR\"));\r\n HtmlReplace.prepareSummary(\"outputs/htmlFinal.html\");\r\n\r\n //Disconnects from database.\r\n methodDisc.invoke(v_database);\r\n dbStatus = (boolean) methodChkConn.invoke(v_database);\r\n if (!dbStatus)\r\n System.out.println(\"Disconnected from Database.\");\r\n else\r\n System.out.println(\"Error, still connected to Database.\");\r\n } catch (SecurityException e)\r\n {\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e)\r\n {\r\n e.printStackTrace();\r\n } catch (ClassNotFoundException e)\r\n {\r\n e.printStackTrace();\r\n } catch (InstantiationException e)\r\n {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e)\r\n {\r\n e.printStackTrace();\r\n } catch (NoSuchMethodException e)\r\n {\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "void runQueries();", "public void testExistsSyn() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName \" + \"FROM AD_Table t \" + \"WHERE EXISTS (SELECT * FROM AD_Column c WHERE t.AD_Table_ID=c.AD_Table_ID)\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column=c|AD_Table=t|1]\", fixture.toString());\n }", "String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);", "@org.junit.Test\n public void constrCompelemCompname5() {\n final XQuery query = new XQuery(\n \"element {1,2} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XPTY0004\")\n );\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "public interface IQueryResolver {\n List<Field> equalCondition = new ArrayList();\n List<Field> greaterEqualCondition = new ArrayList();\n List<Field> lesserEqualCondition = new ArrayList();\n\n String getTableName();\n}", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM org.apache.derby.iapi.sql.execute.ExecutionContext WHERE null = null AND null = null AND null = null AND null = null\", string0);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Start subprojects\");\r\n\t\ttry {\r\n\t\t\tList<String> lista = new ArrayList<String>();\r\n\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\r\n\t\t\tConnection conn=DriverManager.getConnection(\"jdbc:mariadb://192.168.90.123/fatdb\",\"listy\",\"listy1234\");\r\n\t\t\tStatement st1 = conn.createStatement();\r\n\t\t\tResultSet rs1 = st1.executeQuery(\"SELECT consumerorder FROM PartsOverview WHERE OrderNo <> ConsumerOrder and ConsumerOrder not like '500%' group by OrderNo, ConsumerOrder\");\r\n\t\t\twhile(rs1.next()){\r\n\t\t\t\tlista.add(rs1.getString(\"ConsumerOrder\"));\r\n\t\t\t}\r\n\t\t\trs1.close();\r\n\t\t\tst1.close();\r\n\t\t\tfor(String a : lista ){\r\n\t\t\t\tStatement st2 = conn.createStatement(); \r\n\t\t\t\tst2.executeUpdate(\"Update PartsOverview set Description = 'subproject' where OrderNo = '\"+a+\"'\");\r\n\t\t\t\tst2.close();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//konstrukcyjne\r\n\t\t\t/*Statement st3 = conn.createStatement();\r\n\t\t\tResultSet rs3 = st3.executeQuery(\"SELECT * FROM PartsOverview where ItemNo like 'KM-%'\");\r\n\t\t\twhile(rs3.next()){\r\n\t\t\t\tString numerMaszyny = rs3.getString(\"OrderNo\");\r\n\t\t\t\tString opis = rs3.getString(\"Description\");\r\n\t\t\t\tString zadanie = rs3.getString(\"ItemNo\");\r\n\t\t\t\tString opis2 = opis;\r\n\t\t\t\tif(numerMaszyny.length()>8)\r\n\t\t\t\t\tnumerMaszyny = numerMaszyny.substring(0,8);\r\n\t\t\t\tif(opis.equals(\"subproject\")){\r\n\t\t\t\t\tStatement st4 = conn.createStatement();\r\n\t\t\t\t\tResultSet rs4 = st4.executeQuery(\"Select artikelomschrijving from bestellingdetail where (leverancier = '2' or leverancier = '6') and ordernummer ='\"+numerMaszyny.substring(2, 8)+\"'\");\r\n\t\t\t\t\twhile(rs4.next()){\r\n\t\t\t\t\t\topis2 = rs4.getString(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\trs4.close();\r\n\t\t\t\t\tst4.close();\r\n\t\t\t\t}\r\n\t\t\t\tStatement st5 = conn.createStatement();\r\n\t\t\t\tst5.executeUpdate(\"Update PartsOverview set OrderNo = '\"+numerMaszyny+\"', Description = '\"+opis2+\"' where ItemNo = '\"+zadanie+\"'\");\r\n\t\t\t\tst5.close();\r\n\t\t\t}\r\n\t\t\trs3.close();\r\n\t\t\tst3.close();\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t//SPRAWDZENIE PODPROJEKTÓW!\r\n\t\t\tStatement st6 = conn.createStatement();\r\n\t\t\tResultSet rs6 = st6.executeQuery(\"SELECT distinct orderno FROM PartsOverview WHERE Description = 'subproject'\");\r\n\t\t\twhile(rs6.next()){\r\n\t\t\t\tString zamowienie = rs6.getString(\"OrderNo\");\r\n\t\t\t\tString[] projekt = zamowienie.split(\"/\");\r\n\t\t\t\tString nadrzedny1 = \"\";\r\n\t\t\t\tString nadrzedny2 = \"\";\r\n\t\t\t\tString nazwa = \"\";\r\n\t\t\t\t//wyszukaj projekt nadrzedny \r\n\t\t\t\tStatement st7 = conn.createStatement();\r\n\t\t\t\tResultSet rs7 = st7.executeQuery(\"Select afdeling, afdelingseq from bestelling where leverancier = '\"+projekt[0]+\"' and ordernummer = '\"+projekt[1]+\"'\");\r\n\t\t\t\tSystem.out.println(\"Select afdeling, afdelingseq from bestelling where leverancier = '\"+projekt[0]+\"' and ordernummer = '\"+projekt[1]+\"'\");\r\n\t\t\t\twhile(rs7.next()){\r\n\t\t\t\t\tnadrzedny1 = rs7.getString(\"afdeling\");\r\n\t\t\t\t\tnadrzedny2 = rs7.getString(\"afdelingseq\");\r\n\t\t\t\t\tString status = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//sprawdz czy otwarty!\r\n\t\t\t\t\tSystem.out.println(\"Select afdeling, afdelingseq, statuscode from bestelling where leverancier = '\"+nadrzedny1+\"' and ordernummer = '\"+nadrzedny2+\"'\");\r\n\t\t\t\t\tStatement st8 = conn.createStatement();\r\n\t\t\t\t\tResultSet rs8 = st8.executeQuery(\"Select statuscode from bestelling where leverancier = '\"+nadrzedny1+\"' and ordernummer = '\"+nadrzedny2+\"'\");\r\n\t\t\t\t\twhile(rs8.next()){\r\n\t\t\t\t\t\tstatus = rs8.getString(\"statuscode\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\trs8.close();\r\n\t\t\t\t\tst8.close();\r\n\t\t\t\t\tif(status==null)\r\n\t\t\t\t\t\tstatus=\"\";\r\n\t\t\t\t\tif(status.equals(\"H\")||nadrzedny1.equals(\"7\")){\r\n\t\t\t\t\t\t//sprawdz nazwe podrzednego\r\n\t\t\t\t\t\tStatement st9 = conn.createStatement();\r\n\t\t\t\t\t\tResultSet rs9 = st9.executeQuery(\"Select artikelomschrijving from bestellingdetail where leverancier = '\"+projekt[0]+\"' and ordernummer = '\"+projekt[1]+\"'\");\r\n\t\t\t\t\t\twhile(rs9.next()){\r\n\t\t\t\t\t\t\tnazwa = rs9.getString(\"artikelomschrijving\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\trs9.close();\r\n\t\t\t\t\t\tst9.close();\r\n\t\t\t\t\t\tStatement st5 = conn.createStatement();\r\n\t\t\t\t\t\tst5.executeUpdate(\"Update PartsOverview set Description = '\"+nazwa+\"' where OrderNo = '\"+zamowienie+\"'\");\r\n\t\t\t\t\t\tSystem.out.println(\"Update PartsOverview set Description = '\"+nazwa+\"' where OrderNo = '\"+zamowienie+\"'\");\r\n\t\t\t\t\t\tst5.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trs7.close();\r\n\t\t\t\tst7.close();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs6.close();\r\n\t\t\tst6.close();\r\n\t\t\t\r\n\t\t\t//naniesienie dobrych dat dla zleceń serwisowych\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tStatement st12 = conn.createStatement();\r\n\t\t\tResultSet rs12 = st12.executeQuery(\"SELECT NrMaszyny from Calendar where Zakonczone = 0 and nrMaszyny like '14/%'\");\r\n\t\t\twhile(rs12.next()){\r\n\t\t\t\tString glownyProjekt = rs12.getString(\"NrMaszyny\");\r\n\t\t\t\t//sprawdzenie czy podprojekt jest zamknięty\r\n\t\t\t\tStatement st13 = conn.createStatement();\r\n\t\t\t\tString sql14 = \"SELECT bestelling.leverdatum, bestellingdetail.leveringsdatumvoorzien from bestelling \"\r\n\t\t\t\t\t\t+ \"join bestellingdetail on bestelling.leverancier = bestellingdetail.leverancier and bestelling.ordernummer = bestellingdetail.ordernummer \"\r\n\t\t\t\t\t\t+ \"where bestelling.leverancierordernummer = '\"+glownyProjekt+\"'\";\r\n\t\t\t\tResultSet rs13 = st13.executeQuery(sql14);\r\n\t\t\t\twhile(rs13.next()){\r\n\t\t\t\t\tString dataProdukcji = rs13.getString(2);\r\n\t\t\t\t\tString dataMontazu = rs13.getString(1);\r\n\t\t\t\t\tSystem.out.println(sql14+\" dataProdukcji = \"+dataProdukcji+\", dataMontazu = \"+dataMontazu);\r\n\t\t\t\t\tStatement st5 = conn.createStatement();\r\n\t\t\t\t\tst5.executeUpdate(\"Update Calendar set dataProdukcji = '\"+dataProdukcji+\"', DataKoniecMontazu = '\"+dataMontazu+\"' where NrMaszyny = '\"+glownyProjekt+\"'\");\r\n\t\t\t\t\tst5.close();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\trs13.close();\r\n\t\t\t\tst13.close();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint p = 1;\r\n\t\t\twhile(p>0) {\r\n\t\t\t\tp=0;\r\n\t\t\t\t//sprawdzenie czy GTT nie pominelo podprojektów\r\n\t\t\t\tStatement st14 = conn.createStatement();\r\n\t\t\t\tResultSet rs14 = st14.executeQuery(\"select distinct OrderNo, bestelling.afdeling, bestelling.afdelingseq from partsoverview \"\r\n\t\t\t\t\t\t+ \"join bestelling on partsoverview.OrderNo = bestelling.leverancierordernummer \"\r\n\t\t\t\t\t\t+ \"where Description <> 'subproject' and afdeling <> 0 and afdeling <> 7 and orderno not like '14/%' \");\r\n\t\t\t\twhile(rs14.next()) {\r\n\t\t\t\t\tString projNadrzedny = rs14.getString(\"afdeling\")+\"/\"+rs14.getString(\"afdelingseq\");\r\n\t\t\t\t\tString projZmieniany = rs14.getString(\"orderno\");\r\n\t\t\t\t\tStatement st14a = conn.createStatement();\r\n\t\t\t\t\tResultSet rs14a = st14a.executeQuery(\"Select statuscode from bestelling where leverancierordernummer = '\"+projNadrzedny+\"'\");\r\n\t\t\t\t\tString status14a = \"\";\r\n\t\t\t\t\twhile(rs14a.next()) {\r\n\t\t\t\t\t\tstatus14a = rs14a.getString(\"statuscode\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\trs14a.close();st14a.close();\r\n\t\t\t\t\tif(!status14a.equals(\"H\")) {\r\n\t\t\t\t\t\tString sql01 = \"update partsoverview set orderno = '\"+projNadrzedny+\"', description = 'tymczasowy' where orderno = '\"+projZmieniany+\"'\";\r\n\t\t\t\t\t\tSystem.out.println(sql01);\r\n\t\t\t\t\t\tStatement st15 = conn.createStatement();\r\n\t\t\t\t\t\tp+= st15.executeUpdate(sql01);\r\n\t\t\t\t\t\tst15.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trs14.close(); st14.close();\r\n\t\t\t\tSystem.out.println(p);\r\n\t\t\t}\r\n\t\t\tStatement st16 = conn.createStatement();\r\n\t\t\tResultSet rs16 = st16.executeQuery(\"Select distinct OrderNo, bestellingdetail.artikelomschrijving from partsoverview \"\r\n\t\t\t\t\t+ \"left join bestellingdetail on partsoverview.orderno = concat(bestellingdetail.leverancier, '/', bestellingdetail.ordernummer) \"\r\n\t\t\t\t\t+ \"where description = 'tymczasowy' and bestellingdetail.sequentie = 1\");\r\n\t\t\twhile(rs16.next()) {\r\n\t\t\t\tString orderno = rs16.getString(\"orderno\");\r\n\t\t\t\tString desc = rs16.getString(\"artikelomschrijving\");\r\n\t\t\t\tString sql01 = \"update partsoverview set description = '\"+desc+\"' where orderno = '\"+orderno+\"' and description = 'tymczasowy' \";\r\n\t\t\t\tSystem.out.println(sql01);\r\n\t\t\t\tStatement st15 = conn.createStatement();\r\n\t\t\t\tst15.executeUpdate(sql01);\r\n\t\t\t\tst15.close();\r\n\t\t\t}\r\n\t\t\trs16.close();st16.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//SPRAWDZENIE PODPROJEKTÓW! \r\n\t\t\t//sprawdzenie czy przypisane podprojekty są jeszcze otwarte!\r\n\t\t\tStatement st10 = conn.createStatement();\r\n\t\t\tResultSet rs10 = st10.executeQuery(\"SELECT NrMaszyny, Komentarz from Calendar where Zakonczone = 0 and (Komentarz like '2/%' or Komentarz like '6/%')\");\r\n\t\t\twhile(rs10.next()){\r\n\t\t\t\tString podprojekt = rs10.getString(\"Komentarz\");\r\n\t\t\t\tString glownyProjekt = rs10.getString(\"NrMaszyny\");\r\n\t\t\t\t//sprawdzenie czy podprojekt jest zamknięty\r\n\t\t\t\tStatement st11 = conn.createStatement();\r\n\t\t\t\tResultSet rs11 = st11.executeQuery(\"SELECT Zakonczone from Calendar where NrMaszyny ='\"+podprojekt+\"'\");\r\n\t\t\t\twhile(rs11.next()){\r\n\t\t\t\t\tString status = rs11.getString(\"Zakonczone\");\r\n\t\t\t\t\t//jeśli projekt (np 6/...) jest już zamknięty to usuwamy informację o zmianie numeru\r\n\t\t\t\t\tif(status.equals(\"1\")){\r\n\t\t\t\t\t\tStatement st5 = conn.createStatement();\r\n\t\t\t\t\t\tst5.executeUpdate(\"Update Calendar set Komentarz = '' where NrMaszyny = '\"+glownyProjekt+\"'\");\r\n\t\t\t\t\t\tst5.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trs11.close();\r\n\t\t\t\tst11.close();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs10.close();\r\n\t\t\tst10.close();\t\r\n\t\t\t\r\n\t\t\tconn.close();\r\n\t\t}catch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"end subprojects\");\r\n\t\treturn ;\r\n\t}", "private QueryAndProgram queryAndProgFind(ProgramPath pp,String queryClause,String qp) {\n Optional opt = queryAndProgramLink.stream().filter(p -> p.qtp.queryClause.equals(queryClause) \n && p.getPaths().stream().anyMatch(q -> q.pathId.equals(pp.pathId))\n && p.queryPoint.equals(qp)).findFirst();\n // && p.getPaths().contains(pp)).findFirst();\n if(opt.isPresent())\n return (QueryAndProgram)opt.get();\n return null;\n \n \n }", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "private static final String FIND_ALL() {\r\n\t\treturn \"from Shipping3VO vo \";\r\n\t}", "@DirtiesDatabase\n\t@Test\n\tpublic void testRetrieveByBundleConstituentList() {\n\t\tcreateBundles();\n\t\tcreatePA(\"P1\", \"PA1\", \"PLGUID\", \"CGUID\");\n\t\tcreatePA(\"P1\", \"PA2\", \"PLGUID\", \"C2GUID\");\n\t\t\n\t\t\n\t\tPriceAdjustmentDao dao = getBeanFactory().getBean(\"priceAdjustmentDao\");\n\t\tCollection<String> bcList = new ArrayList<String>();\n\t\tbcList.add(\"CGUID\");\n\t\tbcList.add(\"C2GUID\");\n\t\tCollection<PriceAdjustment> assignments = dao.findByPriceListBundleConstituents(\"PLGUID\", bcList);\n\t\tassertEquals(2, assignments.size());\n\t}", "private void checkMeta( String adql, ColSpec[] colSpecs,\n StarTable table ) {\n\n /* Check column counts match. */\n int qCount = colSpecs.length;\n int rCount = table.getColumnCount();\n if ( qCount != rCount ) {\n String msg = new StringBuffer()\n .append( \"Query/result column count mismatch; \" )\n .append( qCount )\n .append( \" != \" )\n .append( rCount )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"NCOL\", msg );\n return;\n }\n int ncol = qCount;\n assert ncol == rCount;\n\n /* Check column names match. */\n for ( int ic = 0; ic < ncol; ic++ ) {\n ColSpec cspec = colSpecs[ ic ];\n ColumnInfo cinfo = table.getColumnInfo( ic );\n String qName = cspec.getResultName();\n String rName = cinfo.getName();\n if ( ! qName.equalsIgnoreCase( rName ) ) {\n String msg = new StringBuffer()\n .append( \"Query/result column name mismatch \" )\n .append( \"for column #\" )\n .append( ic )\n .append( \"; \" )\n .append( qName )\n .append( \" != \" )\n .append( rName )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"CNAM\", msg );\n }\n String columnId = rName.equalsIgnoreCase( qName )\n ? qName\n : \"#\" + ic;\n\n /* Check column types match. */\n String qType = cspec.getColumnMeta().getDataType();\n String rType =\n (String) cinfo.getAuxDatumValue( VOStarTable.DATATYPE_INFO,\n String.class );\n if ( ! CompareMetadataStage\n .compatibleDataTypes( qType, rType ) ) {\n String msg = new StringBuffer()\n .append( \"Query/result column type mismatch \" )\n .append( \" for column \" )\n .append( columnId )\n .append( \"; \" )\n .append( qType )\n .append( \" vs. \" )\n .append( rType )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"CTYP\", msg );\n }\n }\n }", "@Test\n public void testFindComponentsLikeNombreAprobados() {\n System.out.println(\"findComponentsLikeNombreAprobados\");\n query = mock(Query.class);\n String namedQuery = \"Componente.findComponentsLikeNombreAprobados\";\n List<Componente> expected = new ArrayList<>();\n when(this.em.createNamedQuery(namedQuery)).thenReturn(query);\n when(cDao.findComponentsLikeNombreAprobados(anyString(), (Componente) any())).thenReturn(expected);\n List<Componente> result = cDao.findComponentsLikeNombreAprobados(anyString(), (Componente) any());\n assertThat(result, is(expected));\n }", "yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.DatabaseSpec getDatabaseSpec();", "synchronized public Cursor Qurey(String arg)\n\t{\n\t\tString selection = \" _name='\"+arg+\"'\";\n\t\tSystem.out.println(selection);\n\t\tSQLiteDatabase db = dbh.getReadableDatabase();\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\t\tcursor = db.query(\"_jns_launcher\", null, selection,\n\t\t\t\t\t\tnull, null, null, \"_id\");\n\t\t\t\tif(cursor.moveToFirst())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"cuisor has content\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"cuisor has none\");\n\t\t\t\t\tString filename = android.os.Environment.getExternalStorageDirectory() + \"/_jns_launcher\";\n\t\t\t\t\t\n\t\t\t\t\tSQLiteDatabase sqLiteDatabase = SQLiteDatabase.openOrCreateDatabase(filename, null);\n\t\t\t\t\ttry{\n\t\t\t\t\t\tcursor = sqLiteDatabase.query(\"_jns_launcher\", null, selection,\n\t\t\t\t\t\t\tnull, null, null, \"_id\");\n\t\t\t\t\t\tcursor.moveToFirst();\n\t\t\t\t\tif(!Insert(arg, cursor.getString(cursor.getColumnIndex(\"_description\"))))\n\t\t\t\t\t\tLog.d(\"steven_create databas\", \"insert failed\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tfinally \n\t\t\t\t\t{\n\t\t\t\t\t\tsqLiteDatabase.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn cursor;\n\t}", "protected void checkComponentList()\n {\n String lsLeft ;\n String lsDocComp ;\n int liDotIdx ;\n int liNumComps ;\n Hashtable loCompHash = new Hashtable( 5 ) ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n lsLeft = getData( \"AND_COND_LHS_\" + liCtr ).getString() ;\n if ( lsLeft != null )\n {\n liDotIdx = lsLeft.indexOf( '.' ) ;\n if ( liDotIdx >= 0 )\n {\n lsDocComp = lsLeft.substring( 0, liDotIdx ) ;\n } /* end if ( liDotIdx >= 0 ) */\n else\n {\n lsDocComp = lsLeft ;\n } /* end else */\n loCompHash.put( lsDocComp, lsDocComp ) ;\n } /* end if ( lsLeft != null ) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n\n liNumComps = loCompHash.size() ;\n if ( liNumComps > 2 )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( liNumComps > 2 ) */\n else if ( liNumComps == 2 )\n {\n Enumeration leComps = loCompHash.elements() ;\n String lsComp1 = (String)leComps.nextElement() ;\n String lsComp2 = (String)leComps.nextElement() ;\n\n if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) &&\n ( !lsComp2.endsWith( \"_DOC_HDR\" ) ) )\n {\n raiseException( \"%c:Q0089%\" ) ;\n } /* end if ( ( !lsComp1.endsWith( \"_DOC_HDR\" ) ) && . . . */\n } /* end else if ( liNumComps == 2 ) */\n }", "@Override\r\n public StringBuilder getWhereStatement(BuildingContext context, StringBuilder targetAlias, List<Object> params) {\n AbstractMsSQLDatabaseDialect dialect = (AbstractMsSQLDatabaseDialect)context.getDialect(); \r\n String schemaName;\r\n try{\r\n schemaName = dialect.getSchemaName();\r\n }catch(Exception e){\r\n throw new RuntimeException(\"Failed to get schema name from MSSQL Dialect\", e);\r\n }\r\n \r\n StringBuilder statement = new StringBuilder((schemaName.length() != 0 ? schemaName+\".\" : \"\"))\r\n .append(\"PREAD\")\r\n .append(\"(\")\r\n .append(QueryUtils.asPrefix(targetAlias)).append(dialect.convertColumnName(Constants.FIELD_ID))\r\n .append(\",\")\r\n .append(QueryUtils.asPrefix(targetAlias)).append(dialect.convertColumnName(Constants.TABLE_NODE__SECURITY_ID))\r\n .append(\",?,?,?,?)>0\");\r\n\r\n \r\n Collection<String> groups = context.getSession().getGroupIDs();\r\n Collection<String> contexts = context.getSession().getContextIDs();\r\n StringBuffer groupNames = new StringBuffer();\r\n int i = 0;\r\n for(String group:groups){\r\n if(i++>0) {\r\n groupNames.append(',');\r\n }\r\n \r\n groupNames.append(dialect.convertStringToSQL(group));\r\n }\r\n \r\n StringBuffer contextNames = new StringBuffer();\r\n i = 0;\r\n for(String c:contexts){\r\n if(i++>0)\r\n contextNames.append(',');\r\n \r\n contextNames.append(dialect.convertStringToSQL(c));\r\n }\r\n \r\n \r\n params.add(dialect.convertStringToSQL(context.getSession().getUserID()));\r\n params.add(groupNames.toString());\r\n params.add(contextNames.toString());\r\n params.add(context.isAllowBrowse());\r\n \r\n return statement;\r\n }" ]
[ "0.56174743", "0.54451835", "0.54411376", "0.53191316", "0.52880174", "0.5277323", "0.52631354", "0.5199506", "0.5167365", "0.51556045", "0.5139158", "0.51117986", "0.5094115", "0.50807726", "0.5045481", "0.5037039", "0.50321394", "0.5027761", "0.50228673", "0.50206494", "0.5013562", "0.50079113", "0.5001893", "0.49961075", "0.49937707", "0.4959881", "0.4959306", "0.49406114", "0.49367347", "0.4933635", "0.49313894", "0.4929664", "0.49094963", "0.49041572", "0.48909643", "0.4887426", "0.48860097", "0.48729643", "0.48710206", "0.4869827", "0.48585525", "0.48558182", "0.48543888", "0.48439425", "0.48403233", "0.4834501", "0.48298207", "0.48232922", "0.48182422", "0.481641", "0.48081198", "0.47975546", "0.478782", "0.47817013", "0.47795767", "0.477115", "0.47707698", "0.47701204", "0.4768217", "0.47560263", "0.47560105", "0.47541967", "0.47516662", "0.4750993", "0.4750384", "0.47490424", "0.47484326", "0.47484326", "0.47463045", "0.47396046", "0.47392616", "0.4730784", "0.4728625", "0.47250947", "0.47204795", "0.47204775", "0.47169033", "0.4711154", "0.47097155", "0.4703513", "0.47003582", "0.4699113", "0.46950376", "0.4689941", "0.4689197", "0.46884015", "0.4686522", "0.468354", "0.46744666", "0.46738818", "0.46708274", "0.4669431", "0.46691594", "0.4668763", "0.4668668", "0.466748", "0.46639168", "0.4654995", "0.4654251", "0.46542415" ]
0.5269299
6
Maybem it's in the query itself for some reason
static AnalysisResult analyseQuery(String query) { for (String attack : commonAttacks) { attack = attack.toLowerCase(); if (trim(query.toLowerCase()).contains(trim(attack))) { return new AnalysisResult(true, null, attack, true); } } return new AnalysisResult(false, null, null, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void montaQuery(Publicacao object, Query q) {\t\t\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Override\n\tpublic boolean hasSubquery() {\n\t\treturn false;\n\t}", "public Query advancedQuery() \n {\n return null;\n }", "@Override\n public boolean hasNext() {\n return !query.isEmpty();\n }", "@Override\n\tpublic Object accept(QueryVisitor visitor) {\n\t\treturn visitor.visit(this);\n\t}", "public void Query() {\n }", "boolean hasQuery();", "public boolean hasQuery() {\n return fieldSetFlags()[8];\n }", "@Override\n\tpublic Query objectQuery(String query) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Object> query(QueryUtil queryUtil) {\n\t\treturn null;\n\t}", "@Override\n public boolean hasNext() {\n return i+1 < queries.size();\n }", "public T caseQuery(Query object)\n {\n return null;\n }", "Query query();", "@Override\n\tprotected Cursor query()\n\t{\n\t\treturn null;\n\t}", "public XQValue bornAgain() {\n try {\n rset.beforeFirst();\n }\n catch (SQLException e) { }\t// just try\n return new RawResult(rset); \n }", "public void visit(Query obj) {\n if (obj.getOrderBy() != null || obj.getLimit() != null) {\n visitor.namingContext.aliasColumns = true;\n } \n visitNode(obj.getFrom());\n visitNode(obj.getCriteria());\n visitNode(obj.getGroupBy());\n visitNode(obj.getHaving());\n visitNode(obj.getSelect());\n visitNode(obj.getOrderBy());\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "@Override\n public void visit(QueryExpression.Function.Exists exists) {\n visit(exists.getQuery());\n }", "private boolean isQueryNew() throws PipelineNodeException {\n\t\tthis.getCanonicalFormForParameters();\n\n\t\t// get the Id of an evenual existing query identical to the one which is\n\t\t// submitted\n\t\ttry {\n\n\t\t\tthis.queryId = QueryDao.getInstance().getIdentifierExistingQuery(\n\t\t\t\t\tnotification);\n\t\t} catch (Exception e) {\n\t\t\tnew ErrorHandler(notification, queryId, e.getMessage(), this\n\t\t\t\t\t.getClass().getName());\n\t\t\tthrow new PipelineNodeException(e.getMessage());\n\t\t}\n\t\treturn (null == queryId);\n\t}", "protected abstract void onQueryStart();", "public Query getQuery ()\n {\n\n\treturn this.q;\n\n }", "public void customerQuery(){\n }", "public abstract Statement queryToRetrieveData();", "@Override\n\tpublic void queryPoints() {\n\n\t}", "boolean isIsQuery();", "Object executeSelectQuery(String sql) { return null;}", "protected String getQueryIdentifier() {\n \t\treturn null;\n \t}", "public abstract void applyToQuery(DatabaseQuery theQuery, GenerationContext context);", "public void cacheableQuery() throws HibException;", "String limitSubquery();", "public XQValue bornAgain() {\n try {\n rset.beforeFirst();\n }\n catch (SQLException e) { }\t// just try\n return new Result(rset); \n }", "public Query getQuery()\n {\n return query;\n }", "public List<T> query(QueryObject qo) {\n\t\treturn null;\n\t}", "protected String getRetrievalQuery()\n {\n return immutableGetRetrievalQuery();\n }", "boolean hasQueryId();", "boolean hasQueryId();", "private DbQuery() {}", "@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}", "@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}", "public boolean isSetQuery() {\n return this.query != null;\n }", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "public boolean isFirst() throws SQLException {\n/* 208 */ return (this.currentPositionInEntireResult == 0);\n/* */ }", "IQuery getQuery();", "protected boolean isQueryAvailable() {\n return query != null;\n }", "public String query() {\n return this.innerProperties() == null ? null : this.innerProperties().query();\n }", "@Override\n public boolean getMoreResults() throws SQLException {\n\n return (result != null);\n\n }", "public abstract void resetQuery();", "private void executeQuery() {\n }", "boolean hasQueryLogicName();", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "@Override\r\n\tpublic Pagination queryPagination(Pagination pagination) {\n\t\treturn null;\r\n\t}", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "public int processQuery(QueryOperation<?> query) {\n return query.evaluate(getAllObjects());\n }", "@Override\n\tpublic ResultSet select() {\n\t\treturn null;\n\t}", "public boolean hasQuery() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "ObstacleQuery createObstacleQuery();", "boolean hasQueryVisibility();", "@Test\n public void test3() throws Exception {\n String jpql = \"SELECT c FROM Course c where SQL('course_mapped ->> ''?'' = ''Second one''',c.name) \";\n Query q = em.createQuery(jpql, Course.class);\n List<Course> courses = q.getResultList();\n Assert.assertEquals(1, courses.size());\n Assert.assertEquals(\"Second one\", courses.get(0).getCourseMapped().getName());\n\n }", "@Override\n public void evaluateActiveUsers(String query) {\n\n\t}", "protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }", "@Override\n\tpublic void local_queryTopGiver() {\n\t\tqueryTopGiver();\n\t\t\n\t}", "boolean hasQueryMessage();", "SelectQuery createSelectQuery();", "@Override\r\n public void onShowQueryResult() {\n }", "@Override\n public Iterator<SingleQuery> iterator() {\n return new QueryHistoryIterator();\n }", "@SuppressWarnings(\"unused\")\n\t\tprivate String querySingleValue(String query, String field){\n\t\t\treturn field;\n\n\t\t/*\tJdbcTemplate jdt = new JdbcTemplate(getDataSource());\n\t \tList queryList;\n\t \tString result = \"\";\n\n\t \t queryList = jdt.queryForList(query);\n\t \t Iterator i = queryList.iterator();\n\t \t i = queryList.iterator();\n\t \t if (i.hasNext()) {\n\t\t\t\t ListOrderedMap data = (ListOrderedMap) i.next();\n\t\t\t\t if (data.get(field) == null){\n\t\t\t\t } else {\n\t\t\t\t\t result = data.get(field).toString();\n\t\t\t\t }\n\t \t }\n\t \t return result;*/\n\t\t}", "@Override\n public Collection<KlantBedrijf> select() {\n return null;\n }", "public boolean queryAfterZeroResults() {\n/* 264 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Integer getQuery() {\n return this.query;\n }", "private String getSelectQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeReadQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }", "@Override\r\n\t\t\tpublic double matchingItems(Query query) {\n\t\t\t\treturn 0;\r\n\t\t\t}", "@Override\r\n\tpublic UserDTO queryUnique(UserQO qo) {\n\t\treturn null;\r\n\t}", "public boolean isBeforeFirst() throws SQLException {\n/* 151 */ return (this.currentPositionInEntireResult < 0);\n/* */ }", "public DatabaseQuery getQuery() {\n return query;\n }", "public abstract boolean hasMapped(Long queryNode);", "@Override\n\tprotected String findAllStatement() {\n\t\treturn null;\n\t}", "static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }", "@Override\r\n\tpublic int query(ActionContext arg0) throws Exception {\n\t\treturn 0;\r\n\t}", "private QueryResponse query(Query query) throws ElasticSearchException{\r\n\t\tQueryResponse response = executor.executeQuery(query);\r\n\t\tresponse.setObjectMapper(mapper);\r\n\t\treturn response;\t\t\r\n\t}", "@Override\n public String toString() {\n return \"Query: QueryID=\" +this.getQueryID()+ \" ReqPosts=\" + this.getRequestedPosts();\n }", "private void addQueries(String query){\n ArrayList <String> idsFullSet = new ArrayList <String>(searchIDs);\n while(idsFullSet.size() > 0){\n ArrayList <String> idsSmallSet = new ArrayList <String>(); \n if(debugMode) {\n System.out.println(\"\\t Pmids not used in query available : \" + idsFullSet.size());\n }\n idsSmallSet.addAll(idsFullSet.subList(0,Math.min(getSearchIdsLimit(), idsFullSet.size())));\n idsFullSet.removeAll(idsSmallSet);\n String idsConstrain =\"\";\n idsConstrain = idsConstrain(idsSmallSet);\n addQuery(query,idsConstrain);\n }\n }", "public String query() {\n return this.query;\n }", "public boolean hasQuery() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public String getQueriedJMBAG() {\n if (!isDirectQuery()) {\n throw new IllegalStateException(\"Query type is not direct.\");\n }\n\n return query.get(0).getStringLiteral();\n }", "private void checkInlineQueries() throws Exceptions.OsoException, Exceptions.InlineQueryFailedError {\n Ffi.Query nextQuery = ffiPolar.nextInlineQuery();\n while (nextQuery != null) {\n if (!new Query(nextQuery, host).hasMoreElements()) {\n String source = nextQuery.source();\n throw new Exceptions.InlineQueryFailedError(source);\n }\n nextQuery = ffiPolar.nextInlineQuery();\n }\n }", "public abstract void inLineQuery(InlineQuery q);", "private String doQueryById(HttpServletRequest request,\n HttpServletResponse response) {\n return null;\n }", "@Override\n\t\tpublic void executeQuery(String query) {\n\t\t\t\n\t\t}", "public boolean replaceResultVariableInOrderByClauseWithPosition() {\n \t\treturn false;\n \t}", "public String getQuery(){\n return this.query;\n }", "@ActionTrigger(action=\"QUERY\")\n\t\tpublic void spriden_Query()\n\t\t{\n\t\t\t\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tenterQuery();\n//\t\t\t\tif ( SupportClasses.SQLFORMS.FormSuccess().not() )\n//\t\t\t\t{\n//\t\t\t\t\t\n//\t\t\t\t\tthrow new ApplicationException();\n//\t\t\t\t}\n\t\t\t}", "public void withWhiteCompoundPk() {\n _query.xdoNss(() -> _query.queryWhiteCompoundPk());\n }", "boolean hasQueryName();", "@Override\n protected void processSelect() {\n \n }", "@Override\n\tpublic String getQueryDeExiste(Onibus entidade) {\n\t\treturn null;\n\t}", "public void prepareSelectOneRow() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareSelectOneRow();\n }", "@Override\n public boolean visit(SQLInSubQueryExpr subQuery) {\n subQuery.getExpr().setParent(subQuery);\n return true;\n }", "@Override\n\tpublic int getCurrentCriterion() {\n\t\treturn 0;\n\t}", "public NestedClause getXQueryClause();" ]
[ "0.6063703", "0.6012975", "0.59135514", "0.5838703", "0.5794445", "0.5764274", "0.5698426", "0.5559588", "0.55520684", "0.55089694", "0.5475483", "0.5459421", "0.5450045", "0.5448361", "0.54475105", "0.5439882", "0.5381812", "0.53791803", "0.53556585", "0.53429854", "0.53303456", "0.532464", "0.53156537", "0.5314472", "0.5309301", "0.5307644", "0.5299057", "0.52938205", "0.52911335", "0.5281157", "0.52732885", "0.52651227", "0.5253942", "0.52454054", "0.5244471", "0.52064824", "0.52064824", "0.5204238", "0.5203231", "0.5197989", "0.51919425", "0.5182544", "0.51820445", "0.51664174", "0.51413697", "0.51401114", "0.5129446", "0.51261437", "0.5123595", "0.51210064", "0.51196265", "0.51196265", "0.51189923", "0.51044875", "0.5104426", "0.50946313", "0.50897694", "0.5088977", "0.5082582", "0.508251", "0.5080452", "0.5077818", "0.5072011", "0.5071092", "0.50704545", "0.5068967", "0.50538105", "0.5051766", "0.5049844", "0.50485814", "0.5043503", "0.50386024", "0.50310206", "0.502187", "0.50212127", "0.5015314", "0.5014409", "0.50032663", "0.49983943", "0.49911016", "0.49910548", "0.49870417", "0.4986461", "0.49827015", "0.4980917", "0.4965883", "0.4961683", "0.49607623", "0.49597484", "0.49591556", "0.49553046", "0.49522802", "0.49431854", "0.49408534", "0.4940049", "0.49369675", "0.49368662", "0.49355647", "0.4935498", "0.4935321", "0.49327806" ]
0.0
-1
the default trim function doesn' t trim the space between quotes.
private static String trim(String s) { return s.replace(" ", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String trim(final String toTrim) {\n return replaceAll(toTrim, \"\\u00A0\", \" \").trim();\n }", "public static String trim(String s) {\r\n\t\treturn Escape.collapseWhitespace(Escape.forDoubleQuotedString(s, true).trim());\r\n\t}", "private String getTrimmedValue(String value) {\n\t\treturn value == null ? \"\" : value.trim();\n\t}", "@Test\n public void testSafeTrim() {\n assertEquals(\"\", Strings.safeTrim(null));\n assertEquals(\"\", Strings.safeTrim(\" \\t\\n\"));\n assertEquals(\"hello there!\", Strings.safeTrim(\" hello there! \\n\"));\n }", "public XMLString trim() {\n/* 780 */ return new XMLStringDefault(this.m_str.trim());\n/* */ }", "public String trim(String value) {\r\n return (value == null) ? value : nullable(value.trim());\r\n }", "public String trim(String str) {\n\n return str.replaceFirst(\" \", \"\");\n\n }", "protected static String trimmed(String value) {\n return (value != null) ? value.trim() : null;\n }", "@Test\n public void testSafeTrimToNull() {\n assertNull(Strings.safeTrimToNull(\" \\n\\t \\n\"));\n assertNull(Strings.safeTrimToNull(null));\n assertEquals(\"hello there!\", Strings.safeTrimToNull(\" hello there! \\n\"));\n }", "private String stripQuotes( String quoted ) { return quoted.substring( 1, quoted.length() - 1 ); }", "public static String trim(String str) {\n if (str == null) {\n return null;\n } else {\n return str.trim();\n }\n }", "public static String trim(String str) {\n\t\treturn str == null ? null : str.trim();\n\t}", "protected String stripQuotes(String s) {\n s = s.trim();\n if (s.length() > 2) {\n return s.substring(1, s.length() - 1);\n }\n return s;\n }", "public boolean getTrimSpaces();", "public static String trim(String s)\r\n {\r\n return (s == null ? null : s.trim());\r\n }", "private static String trimWhiteSpace(String sentence) {\n\t\tsentence = sentence.replaceAll(\"[^a-zA-Z]\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\n\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\t\", \" \");\n// sentence = sentence.replaceAll(\"\\\\.\", \" \");\n// sentence = sentence.replaceAll(\",\", \" \");\n \n//\t\tint length;\n//\t\tdo {\n//\t\t\tlength = sentence.length();\n//\t\t\tsentence = sentence.replaceAll(\" \", \" \");\n//\n//\t\t} while (sentence.length() < length);\n\t\treturn sentence;\n\t}", "static String trim(String s) {\n return s.substring(0, s.length() - 1);\n }", "public static String trim(CharSequence s) {\n if (s == null) {\n return null;\n }\n\n // Just strip any sequence of whitespace or java space characters from the beginning and end\n Matcher m = sTrimPattern.matcher(s);\n return m.replaceAll(\"$1\");\n }", "public static String trim(String str) {\n\n\n str = str.replace(\"_IN_\", \"\");\n str = str.replace(\"_In_\", \"\");\n str = str.replace(\"__in\", \"\");\n str = str.replace(\"_Out_\", \"\");\n str = str.replace(\"__out\", \"\");\n str = str.replace(\"_Inout_\", \"\");\n str = str.replace(\"opt_\", \"\"); // this method is to remove _In_opt_\n str = str.replace(\"<span style=\\\"color:Blue;\\\">\", \"\");\n str = str.replace(\"</span>\", \"\");\n str = str.replace(\"WINAPI\", \"\");\n str = str.replace(\"_Inout_\", \"\");\n str = str.replaceAll(\"&nbsp;\", \"\");\n str = str.replaceAll(String.valueOf((char)160), \"\");\n str = str.replaceAll(\" \", \" \");\n str = str.replaceAll(\"CALLBACK \", \"\");\n str = str.replaceAll(\"const\", \"\");\n str = str.replaceAll(\"\\\\( \", \"\\\\(\");\n str = str.trim();\n str = str.substring(0, str.length() - 1);\n\n\n // System.out.println(\"AFTER TRIM \" + this.syntax);\n\n return str;\n\n\n }", "private static String _stripWhitespace(String str)\n {\n if (str == null)\n return null;\n\n int length = str.length();\n int startIndex = 0;\n\n while (startIndex < length)\n {\n if (Character.isWhitespace(str.charAt(startIndex)))\n startIndex++;\n else\n break;\n }\n\n int endIndex = length;\n while (endIndex > 0)\n {\n if (Character.isWhitespace(str.charAt(endIndex - 1)))\n endIndex--;\n else\n break;\n }\n\n if ((startIndex == 0) && (endIndex == length))\n return str;\n\n return str.substring(startIndex, endIndex);\n }", "@Test\n void trim_null() {\n assertNull(stringUtil.trim(null));\n }", "private void removeSpaces(String[] lines) {\r\n for (int i = 0; i<lines.length; i++) {\r\n lines[i] = lines[i].strip();\r\n lines[i] = lines[i].replaceAll(\"\\\"\", \"\");\r\n }\r\n }", "protected static String trimWhitespace(String s) {\n int len = s.length();\n StringBuffer buf = new StringBuffer(len);\n for (int ii = 0; ii < len; ii++) {\n char c = s.charAt(ii);\n if (!Character.isWhitespace(c)) {\n buf.append(c);\n }\n }\n return buf.toString();\n }", "private String trim(String string, String trimmedPart)\r\n {\r\n int index = string.indexOf(trimmedPart);\r\n return string.substring(index+trimmedPart.length()).trim();\r\n }", "public static String trimToEmpty(String str) {\n\t\treturn str == null ? EMPTY : str.trim();\n\t}", "public boolean supportsTrimChar() {\n return false;\n }", "private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }", "private static String trimLeadingCommaAndSpaces(String fragment) {\n\t\tif ( fragment.length() > 0 && fragment.charAt( 0 ) == ',' ) {\n\t\t\tfragment = fragment.substring( 1 );\n\t\t}\n\t\tfragment = fragment.trim();\n\t\treturn fragment.trim();\n\t}", "public String trimOne(String str) {\n return trim(str, 1);\n }", "public String getTrim() {\r\n return (String) store.get(Names.trim);\r\n }", "public void setTrim(String trim) {\r\n if (trim != null) {\r\n store.put(Names.trim, trim);\r\n } else {\r\n \tstore.remove(Names.trim);\r\n }\r\n }", "public XMLString fixWhiteSpace(boolean trimHead, boolean trimTail, boolean doublePunctuationSpaces) {\n/* 92 */ return new XMLStringDefault(this.m_str.trim());\n/* */ }", "@Override\n\tpublic String spaceRemover(String input) {\n\t\treturn input.replaceAll(\"\\\\s+\",\"\");\n\n\t}", "String trimLeft( String txt ){\r\n // trim\r\n int start = 0;\r\n WHITESPACE: for( int i=0; i < txt.length(); i++ ){\r\n char ch = txt.charAt(i);\r\n if( Character.isWhitespace(ch)){\r\n continue;\r\n }\r\n else {\r\n start = i;\r\n break WHITESPACE;\r\n }\r\n }\r\n return txt.substring(start); \r\n }", "public static String trimSpace(String oldString)\r\n\t{\r\n\t\tif (null == oldString)\r\n\t\t\treturn null;\r\n\t\tif (0 == oldString.length())\r\n\t\t\treturn \"\";\r\n\t\tStringBuffer sbuf = new StringBuffer();\r\n\t\tint oldLen = oldString.length();\r\n\t\tfor (int i = 0; i < oldLen; i++)\r\n\t\t{\r\n\t\t\tif (' ' != oldString.charAt(i))\r\n\t\t\t\tsbuf.append(oldString.charAt(i));\r\n\t\t}\r\n\t\tString returnString = sbuf.toString();\r\n\t\tsbuf = null;\r\n\t\treturn returnString;\r\n\t}", "public static String cleanString(String s) {\n\t\ts = s.trim();\n\t\tString newStr = \"\";\n\t\tboolean lastWasSpace = false;\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tif(c == ' ' && lastWasSpace) {\n\t\t\t\t//Ignore\n\t\t\t} else if (c == ' ' && !lastWasSpace) {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = true;\n\t\t\t} else {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = false;\n\t\t\t}\n\t\t}\n\t\ts = newStr;\n\t\treturn s;\n\t}", "public static String squeezeWhitespace (String input){\r\n return Whitespace.matcher(input).replaceAll(\" \").trim();\r\n }", "@Test\n\tpublic void testTrimmingWhiteSpaces() {\n\t\t// Setup\n\t\tString file = \" file.name \";\n\n\t\t// Exercise\n\t\tLine line = new Line(\"5\", \"5\", file);\n\n\t\t// Verify\n\t\tassertEquals(\"file.name\", line.toString());\n\t}", "public static String trimToNull(String str) {\n\t\tString temp = trim(str);\n\t\treturn isEmpty(temp) ? null : temp;\n\t}", "public static String rightTrim(String str, char trim)\n {\n if (str == null || str.length() == 0)\n return str;\n\n char[] chars = str.toCharArray();\n\n int i = str.length() - 1;\n while (chars[i] == trim)\n i--;\n\n int count = i + 1;\n char[] new_chars = new char[count];\n\n System.arraycopy(chars, 0, new_chars, 0, count);\n return String.valueOf(new_chars);\n }", "public static String removeWhiteSpace(String value) {\n return value.replaceAll(\"\\\\s\", \"\");\n }", "public DATATYPE trim() {\n\t\tif (size() > 0) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\t\n\t\t\tfor (int i=0; i < mLines.length; i++) {\n\t\t\t\tif (mLines[i].trim().length() > 0) {\n\t\t\t\t\tlist.add(mLines[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmLines = list.toArray( new String[list.size()] );\n\t\t}\n\t\t\n\t\treturn (DATATYPE) this;\n\t}", "public static String chompTrim(String str) {\n String rtn = str;\n if (null != rtn) {\n int i = 0;\n int j = str.length() - 1;\n while (i < j) {\n char head = rtn.charAt(i);\n char tail = rtn.charAt(j);\n if (CharacterConstants.SPACE == head || CharacterConstants.LF == head\n || CharacterConstants.CR == head || CharacterConstants.TAB == head) {\n i++;\n } else {\n if (CharacterConstants.SPACE == tail || CharacterConstants.LF == tail\n || CharacterConstants.CR == tail || CharacterConstants.TAB == tail) {\n j--;\n } else {\n break;\n }\n }\n }\n rtn = rtn.substring(i, j + 1);\n }\n return rtn;\n }", "private void trimWhitespaces() {\n \n while(currentIndex < dataLength && Character.isWhitespace( data[currentIndex] )) {\n ++currentIndex;\n }\n }", "public CharSequence trim(CharSequence sequence, TrimOption trimOption, UnicodeSet.SpanCondition spanCondition) {\n/* 244 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static String leftTrim(String str, char trim)\n {\n if (str == null || str.length() == 0)\n return str;\n\n char[] chars = str.toCharArray();\n\n int i = 0;\n while (chars[i] == trim)\n i++;\n\n int count = str.length() - i;\n char[] new_chars = new char[count];\n\n System.arraycopy(chars, i, new_chars, 0, count);\n return String.valueOf(new_chars);\n }", "public static String stringTrim(String stringToTrim) \n\t{\n\t\t// remove any leading whitespace\n\t\tfor (int i = 0; i < stringToTrim.length(); i++) \n\t\t{\n\t\t\tif (stringToTrim.charAt(i) == ' ') continue;\n\t\t\telse \n\t\t\t{\n\t\t\t\tstringToTrim = stringToTrim.substring(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// ...remove any trailing whitespace\n\t\tfor (int i = stringToTrim.length()-1; i > 0; i--) \n\t\t{\n\t\t\tif (stringToTrim.charAt(i) == ' ') continue;\n\t\t\telse \n\t\t\t{\n\t\t\t\tstringToTrim = stringToTrim.substring(0, i+1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn stringToTrim;\n\t}", "public static String trim(String s)\r\n\t{\r\n\t\tif((s.length()<3)||(s.charAt(s.length()-3)!='*'))\r\n\t\t\treturn s;\r\n\t\treturn s.substring(0,s.length()-3);\r\n\t}", "public String cleanStr(String s) {\n\t\t\n\t\tString fixed = s;\n\t\tif(s.contains(\"\\\"\")) {\n\t\t\tfixed = s.strip().split(\"\\\"\")[1];\n\t\t}\n\t\treturn fixed;\n\t}", "public String getTrimmedText(String stringToTrim, int lengthOfTrimmedString)\n/* */ {\n/* 634 */ return FormatUtil.getTrimmedText(stringToTrim, lengthOfTrimmedString);\n/* */ }", "public String trim(String string)\n\t{\n\t\tString result = string;\n\t\t\n\t\tif (string.length() > 0)\n\t\t{\n\t\t\t// Find first non-white space character\n\t\t\tchar[] charArray = string.toCharArray();\n\t\t\t\n\t\t\tint charIndex = 0;\n\t\t\tchar currentChar = charArray[charIndex];\n\t\t\t\n\t\t\twhile ((charIndex < charArray.length) && (charArray[charIndex] > STYLE_RED) && (charArray[charIndex] <= ' '))\n\t\t\t{\n\t\t\t\tcharIndex++;\n\t\t\t}\n\t\t\t\n\t\t\tint startIndex = charIndex;\n\t\t\t\n\t\t\tif (startIndex < charArray.length)\n\t\t\t{\n\t\t\t\t// Find the last non-white space character\n\t\t\t\tcharIndex = charArray.length - 1;\n\t\t\t\t\n\t\t\t\twhile ((charIndex >= 0) && (charArray[charIndex] > STYLE_RED) && (charArray[charIndex] <= ' '))\n\t\t\t\t{\n\t\t\t\t\tcharIndex--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult = string.substring(startIndex, charIndex + 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public String getTrimmedText(String stringToTrim, int lengthOfTrimmedString)\n/* */ {\n/* 640 */ return FormatUtil.getTrimmedText(stringToTrim, lengthOfTrimmedString);\n/* */ }", "private String stripQuotes(String word) {\n\t\tString workWord = new String (word);\n\t\tif (workWord != null && workWord.length() > 1) {\n\t\t\tif (workWord.endsWith(new String(\"\\'\")) || workWord.endsWith(new String(\"\\\"\"))) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-1);\n\t\t\t}\n\t\t\telse if (workWord.endsWith(new String(\"\\'s\")) || workWord.endsWith(new String(\"\\'d\")) ) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-2);\n\t\t\t}\n\t\t\tif (workWord.startsWith(new String(\"\\'\")) || workWord.startsWith(new String(\"\\\"\")) && workWord.length() > 1) {\n\t\t\t workWord = workWord.substring(1);\n\t\t\t}\n\t\t}\n\t return workWord;\n\t}", "public String getTrimmedText(String stringToTrim, int lengthOfTrimmedString)\n/* */ {\n/* 631 */ return FormatUtil.getTrimmedText(stringToTrim, lengthOfTrimmedString);\n/* */ }", "public static void trim(String[] array){\r\n\t\tfor(int i=0;i<array.length;i++){\r\n\t\t\tarray[i] = array[i].trim();\r\n\t\t}\r\n\t}", "private static String stripQuotes(String text) {\n Matcher matcher = quotePattern.matcher(text);\n text = matcher.replaceAll(\"\");\n return text;\n }", "public static String ltrim(String s)\r\n {\r\n if (s == null)\r\n return null;\r\n \r\n for (int k = 0; k < s.length(); k++)\r\n {\r\n if (!Character.isWhitespace(s.charAt(k)))\r\n return (k == 0 ? s : s.substring(k));\r\n }\r\n return \"\";\r\n }", "private static String dequote(String s)\r\n {\r\n String t = s.trim();\r\n if (t.startsWith(\"\\\"\") && t.endsWith(\"\\\"\"))\r\n {\r\n return t.substring(1, t.length()-1);\r\n }\r\n return t;\r\n }", "public static String removeWhitespace(String s) {\n s = s.replace(\" \",\"\");\n s = s.replace(\"\\n\",\"\");\n s = s.replace(\"\\t\",\"\");\n return s;\n }", "public static String trimHorizontalSpace(String str) {\n String horizontalSpace = \"\\\\h\";\n str = str.replaceAll(\"(^\" + horizontalSpace + \"*)|(\" + horizontalSpace + \"*$)\", \"\");\n return str;\n }", "static String trimStart(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(0) == '\\u005cr'\n || sb.charAt(0) == '\\u005cn'\n || sb.charAt(0) == '\\u005ct'\n || sb.charAt(0) == ' ')) {\n sb.deleteCharAt(0);\n }\n return sb.toString();\n }", "public static String removeQuotes(String s) {\n\t\tif (s == null)\n\t\t\treturn null;\n\n\t\ts = s.trim();\n\t\tif (s.startsWith(\"\\\"\"))\n\t\t\ts = s.substring(1);\n\t\tif (s.endsWith(\"\\\"\"))\n\t\t\ts = s.substring(0, s.length() - 1);\n\n\t\treturn s;\n\t}", "private String trimStringNewline(String text) {\n while (text.endsWith(\"\\n\")) {\n text = text.substring(0, text.length() - 1);\n }\n \n return text;\n }", "private String stripQuotes(String inStr) {\n \t\n \tif(inStr.startsWith(\"\\\"\") || inStr.startsWith(\"'\")) {\n \tinStr = inStr.substring(1);\n \t}\n \tif(inStr.endsWith(\"\\\"\") || inStr.endsWith(\"'\")) {\n \tinStr = inStr.substring(0, inStr.length() - 1);\n \t}\n \treturn inStr;\n\t}", "@Test\n public void testTrimOne() {\n System.out.println(\"trimOne\");\n String str = \"Hello\";\n TrimOne instance = new TrimOne();\n String expResult = \"ell\";\n String result = instance.trimOne(str);\n assertEquals(expResult, result);\n \n str = \"java\";\n expResult = \"av\";\n result = instance.trimOne(str);\n assertEquals(expResult, result);\n \n str = \"coding\";\n expResult = \"odin\";\n result = instance.trimOne(str);\n assertEquals(expResult, result);\n }", "static void trim() {\n if (a.size() == 0)\n return;\n Object o = a.get(a.size() - 1);\n StringBuilder sb = new StringBuilder();\n if (o instanceof Token)\n sb.append( ((Token)o).image );\n else\n sb.append((String)o);\n while(sb.length() > 0 && sb.charAt(sb.length() - 1) == ' ')\n sb.deleteCharAt(sb.length() - 1);\n a.set(a.size() - 1, sb.toString() );\n }", "private String clean(String in) {\n return (in == null ? \"\" : in.replaceAll(\"'\", \"\\\\'\"));\n }", "public static CharSequence trim(CharSequence seq) {\n return trimmedSubsequence(notNull(\"seq\", seq));\n }", "public static String removeQuotes(String name)\r\n/* 28: */ {\r\n/* 29: 31 */ if (name.trim().isEmpty()) {\r\n/* 30: 32 */ return \"\";\r\n/* 31: */ }\r\n/* 32: 34 */ StringBuffer buffer = new StringBuffer(name);\r\n/* 33: */ int index;\r\n/* 34: 36 */ while ((index = buffer.indexOf(\"\\\"\")) >= 0)\r\n/* 35: */ {\r\n/* 36: */ int index;\r\n/* 37: 37 */ buffer.replace(index, index + 1, \"\");\r\n/* 38: */ }\r\n/* 39: 39 */ return buffer.toString();\r\n/* 40: */ }", "public static void main(String[] args) {\n\t\tString str=\" 45wraf54 \";\n\t\tSystem.out.println(\"字符串str的长度是:\"+str.length());\n\t\tSystem.out.println(\"去掉首位空格后字符串str:\"+str.trim());\n\t\tSystem.out.println(\"字符串str的长度是:\"+str.trim().length());\n\t}", "private String normalizeSpace(final String arg) {\n return arg.replaceAll(Constants.SPACE_PATTERN, Constants.SPACE);\n }", "private String removeLeadingWhitespace(String input) {\n for (int index = 0; index < input.length(); index++) {\n if (!Character.isWhitespace(input.charAt(index))) {\n return input.substring(index);\n }\n }\n return input;\n }", "public static String cutSpaces(String s){\n\t\tString res = s;\n\t\t\n\t\twhile ((res.startsWith(\" \")||(res.startsWith(\"\\n\")))&& res.length()>0) {\n\t\t\tres=res.substring(1);\n\t\t}\n\t\treturn res;\n\t}", "public static String trimString(String line) {\n\t\tline = line.trim();\n\t\tStringBuilder tline = new StringBuilder(\"\");\n\t\tint textMode = 0;\n\t\tboolean trim = false;\n\t\tString temp = \"\";\n\t\tif(line.equalsIgnoreCase(\"\")) return \"\";\n\t\tboolean macro = line.charAt(0)=='%';\n\t\tfor(int c=0;c<line.length();c++) {\n\t\t\tif((textMode == 0 || textMode == 2) && line.charAt(c)=='\"') {\n\t\t\t\tif(macro)\n\t\t\t\t\ttline.append('\"');\n\t\t\t\telse {\n\t\t\t\t\ttextMode = textMode==0?2:0;\n\t\t\t\t\tif(textMode == 0)\n\t\t\t\t\t\ttline.deleteCharAt(tline.length()-1);\n\t\t\t\t}\n\t\t\t}else if((textMode == 0 || textMode == 1) && line.charAt(c) == \"'\".charAt(0)) {\n\t\t\t\tif(macro)\n\t\t\t\t\ttline.append('\"');\n\t\t\t\telse {\n\t\t\t\t\ttextMode = textMode==0?1:0;\n\t\t\t\t\tif(textMode == 0)\n\t\t\t\t\t\ttline.deleteCharAt(tline.length()-1);\n\t\t\t\t}\n\t\t\t}else if(textMode != 0) {\n\t\t\t\ttline.append(\"'\"+line.charAt(c)+\"',\");\n\t\t\t}else if(textMode == 0 && line.charAt(c) == ';')\n\t\t\t\tbreak;\n\t\t\telse if(textMode == 0 && (line.charAt(c) == ' ' || line.charAt(c) == '\\t')) {\n\t\t\t\tif(trim == false) {\n\t\t\t\t\ttline.append(\" \");\n\t\t\t\t\ttemp = \"\";\n\t\t\t\t\ttrim = true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\ttrim = false;\n\t\t\t\ttline.append(line.charAt(c));\n\t\t\t\ttemp = temp + line.charAt(c);\n\t\t\t\tif(temp.equalsIgnoreCase(\"incbin\"))\n\t\t\t\t\tmacro = true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn tline.toString();\n\t}", "private String trimIgnoreChars(StringBuilder tokenBuilder) {\n\t\t\tint lastCharacterIdx = tokenBuilder.length()-1;\n\t\t\twhile(tokenBuilder.length()>0 && \n\t\t\t\t\tIGNORE_CHARS.contains(Character.valueOf(tokenBuilder.charAt(lastCharacterIdx)))) {\n\t\t\t\ttokenBuilder.deleteCharAt(lastCharacterIdx);\n\t\t\t\tlastCharacterIdx--;\n\t\t\t}\n\t\t\n\t\t\twhile(tokenBuilder.length()>0 && \n\t\t\t\t\tIGNORE_CHARS.contains(Character.valueOf(tokenBuilder.charAt(0))))\n\t\t\t\ttokenBuilder.deleteCharAt(0);\n\t\t\t\n\t\t\treturn tokenBuilder.toString();\n\t\t}", "private static String removeWhitespace(String str)\n {\n // A string buffer to build the result in.\n StringBuffer res;\n\n // Create the result string buffer.\n res = new StringBuffer(str.length());\n\n // Iterate through the input string, appending chars to the\n // result if they are not white space.\n for (int iChar = 0; iChar < str.length(); iChar++) {\n if (!Character.isWhitespace(str.charAt(iChar))) {\n res.append(str.charAt(iChar));\n }\n }\n\n return res.toString();\n }", "public synchronized String toString(boolean tag,boolean trim)\n {\n String s=toString(tag);\n if(s!=null&&trim)\n s=s.trim();\n return s;\n }", "private String trimName(String line) {\n line = trimLine(line);\n int idx = line.indexOf(\"(\");\n if(idx == -1){\n idx = line.indexOf(\":\");\n }\n if (idx != -1) {\n line = line.substring(0, idx);\n }\n return line.trim();\n }", "public static String clearLongWhitespaces(String str) {\r\n\r\n if (str == null) {\r\n str = \"\";\r\n }\r\n String result = \"\";\r\n StringTokenizer st = new StringTokenizer(str);\r\n while (st.hasMoreTokens()) {\r\n String s = st.nextToken();\r\n if (s != null) {\r\n result += s.trim();\r\n }\r\n }\r\n return result.trim();\r\n }", "public CharSequence trim(CharSequence sequence, TrimOption trimOption) {\n/* 221 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static String[] trim(String[] ss)\r\n {\r\n if (ss == null)\r\n return ss;\r\n \r\n for (int i = 0; i < ss.length; i++)\r\n {\r\n ss[i] = TextUtil.trim(ss[i]);\r\n }\r\n return ss;\r\n }", "public static String removeSpaces(String s) {\r\n StringTokenizer stt = new StringTokenizer(s);\r\n String res = \"\";\r\n\r\n while (stt.hasMoreTokens()) {\r\n String tok = stt.nextToken().trim();\r\n res += tok;\r\n }\r\n return res;\r\n }", "private String removeQuotedSubstring(String str) throws Exception {\n\t\treturn str.replaceFirst(\n\t\t\t\tstr.substring(str.indexOf(\"\\\"\") + 1, str.lastIndexOf(\"\\\"\")), \"\");\n\t}", "public static boolean isEmptyStringAfterTrim(String s) {\n \tif(s == null) {\n \t\treturn true;\n \t}\n \treturn isEmptyString(s.trim());\t\n }", "public static String stripWhiteSpace(String str) {\n if (str != null) {\n StringBuffer stringBuffer = new StringBuffer(str.length());\n for (int i = 0, strLen = str.length(); i < strLen; i++) {\n final char ch = str.charAt(i);\n if (ch != ' ' && ch != '\\r' && ch != '\\n' && ch != '\\t') {\n stringBuffer.append(ch);\n }\n }\n return stringBuffer.toString();\n }\n return str;\n }", "private String trimString(String input) {\n final int maxWidth = 16; // Scoreboard string length is 16.\n\n // Check to see if the input length is greater than the maxWidth of characters.\n if (input.length() > maxWidth) {\n int amountOver = input.length() - maxWidth;\n return input.substring(0, input.length() - amountOver);\n } else {\n // The input is less than 15 characters so it does not need to be trimmed.\n return input;\n }\n }", "private String trimRight(String string) {\n String newString = \"\";\n for (int i = 0; i < string.length(); i++) {\n if (string.charAt(i) != ' ') {\n newString = string.substring(0, i) + string.trim();\n break;\n }\n }\n return newString;\n }", "public String removeComplexWhiteSpaces(@NotNull String rawText) {\n return rawText.replaceAll(\"(\\\\s)?\\n\\n(\\\\s)?\", \"\\n\").trim();\n }", "@Override\n\tpublic String clean(String input) {\n\t\tinput = input.replaceAll(removeCommonWords.toString(), \" \");\n\t\t//input = input.replaceAll(removeSingleCharacterOrOnlyDigits.toString(), \" \");\n\t\t//input = input.replaceAll(removeTime.toString(), \" \");\n\t\t//input = input.replaceAll(\"(\\\\s+>+\\\\s+)+\", \" \");\n\t\treturn input;\n\t}", "private String trim(String attribute) {\n if (attribute.length() > 20) {\n return attribute.substring(0, 20) + \"...\";\n } else {\n return attribute;\n }\n }", "static String emptyToNull(String value) {\n if (value == null || value.trim().isEmpty())\n return null;\n return value.trim();\n }", "public static String removeSingleQuotation(String line) {\n\t\tif (line.contains(\"'\")) {\n\t\t\tline = line.replace(\"'\", \"\");\n\t\t}\n\t\treturn line;\n\t}", "public static String fromNullToSpace(String a) {\r\n\t\tif (a == null || \"\".equals(a)) {\r\n\t\t\treturn \" \";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}", "public String getNameWithOutTrim() {\n\t\treturn new String(name);\n\t}", "public String removespaces(String inputString) {\r\n char[] charArray = inputString.toCharArray();\r\n \r\n String stringWithoutSpaces = \"\";\r\n \r\n for (int i = 0; i < charArray.length; i++) \r\n {\r\n if ( (charArray[i] != ' ') && (charArray[i] != '\\t') )\r\n {\r\n stringWithoutSpaces = stringWithoutSpaces + charArray[i];\r\n }\r\n }\r\n return stringWithoutSpaces;\r\n\t}", "public static String trimLines(String s) {\n\t\tif (s == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn s.replaceAll(\"[ \\t]*\\r?\\n[ \\t]*\", \"\\n\").trim();\n\t\t}\n\t}", "public static String trimAndConvertEmptyToNull(String str) {\n\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString newStr = str.trim();\n\n\t\tif (newStr.length() < 1) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn newStr;\n\t}", "public static String trimer (String text){\n\t\treturn text.replaceAll(\"\\\\s+\", \" \");\n\t}", "private String trimLeft(String html) {\n int start = 0;\n for (int i = 0; i < html.length(); ++i) {\n char c = html.charAt(i);\n if (Character.isWhitespace(c) || c == 0xA0) { // nbsp\n start = i;\n } else {\n break;\n }\n }\n\n if (html.charAt(start) == 0xA0) {\n return html.substring(start + 1);\n } else {\n return html.substring(start); // left one space\n }\n }", "public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }" ]
[ "0.77473944", "0.74640507", "0.74259156", "0.7367864", "0.73251426", "0.7311775", "0.723495", "0.71266246", "0.6825747", "0.6806868", "0.6770706", "0.67530876", "0.6739688", "0.6733973", "0.6729306", "0.66742", "0.66167367", "0.66060024", "0.6601799", "0.65636486", "0.6538023", "0.65251327", "0.65191984", "0.64999276", "0.646448", "0.64570343", "0.6412949", "0.6400096", "0.63863295", "0.63862526", "0.6378534", "0.6376364", "0.63713014", "0.6350156", "0.63255024", "0.63028264", "0.6268534", "0.6248242", "0.62450576", "0.62303096", "0.62282413", "0.62208396", "0.6212988", "0.62019", "0.6190046", "0.6170044", "0.61609674", "0.6140667", "0.61121607", "0.60848284", "0.6028532", "0.60251415", "0.6019644", "0.601936", "0.6013053", "0.59770966", "0.5976266", "0.59657073", "0.5962276", "0.5932125", "0.5931489", "0.5921368", "0.5911993", "0.5900431", "0.58980143", "0.5891379", "0.58884627", "0.58725446", "0.58701617", "0.58650833", "0.58573633", "0.58242536", "0.5821851", "0.5817376", "0.58071774", "0.58044845", "0.5798421", "0.577624", "0.5764074", "0.57638776", "0.5761939", "0.57541203", "0.5752711", "0.57466567", "0.5730175", "0.5715592", "0.57147646", "0.56677794", "0.56303424", "0.56206477", "0.56204486", "0.5616702", "0.5613833", "0.56064516", "0.5604137", "0.56034434", "0.5578687", "0.557278", "0.55663496", "0.5557604" ]
0.76867616
1
What to use to separate the word from its frequency in the WORD_FREQUENCY file
public static void main(String...args) { try { List<String> wordList = getWordList(FEED_FILE); final File frequencyFile = new File(WORD_FREQUENCY); frequencyFile.createNewFile(); // If the file already exists, this will not overwrite it final HashMap<String, Long> dataMap = new HashMap<>(); // HashMap that will have each word as a key and its frequency as a value fillDataMapFromFrequencyFile(frequencyFile, dataMap); feedMapWithWordList(wordList, dataMap); updateFrequencyFile(frequencyFile, dataMap); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public static void DocumentFrequencies() throws FileNotFoundException {\n for (Entry<String, List<Integer>> entry : dictionary.entrySet()) {\n List<Integer> termfrequency = new ArrayList<>();\n\n termfrequency = entry.getValue();\t// getting each word's termfrequency list\n int i = 0;\n termfrequency.add(0); \t\t\t//maintaining documentfrequency at the 57th index\n Integer documentFrequency = termfrequency.get(totaldocument+1);\n while(i<56) { //iterate 0 to 55 all speeches term frequency\n if(termfrequency.get(i)>0) {\t\t//increment document frequency of that word if termfrequency is greater than 0.0\n documentFrequency++;\t\t\t//increment document frequency\n }\n i++;\t\t//increment index\n }\n termfrequency.set(57, documentFrequency);\t//re-set the documentfrequency and save the current maintained document frequency from 0 to calculated value\n dictionary.put(entry.getKey(), termfrequency);\t\t// place the incremented final value of that word back to the same list in dictionary hashmap\n }\n //save();\n }", "private void showWordFrequency() {\n\t\tWordFrequencyProcessor wordFreqProcessor = new WordFrequencyProcessor();\n\t\ttry {\n\t\t\twordFreqProcessor.readFile(FILE_NAME);\n\t\t} catch (IOException e) {\n\t\t\tshowErrorAlert(\"Error\", \"Error Reading File: \", FILE_NAME);\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\tList<WordFrequency> list = wordFreqProcessor.getFrequency();\n\t\tint size = list.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tWordFrequency wordFreq = (WordFrequency) list.get(i);\n\t\t\tfreqTable.getItems().add(wordFreq);\n\t\t} // for\n\t}", "java.lang.String getFrequency();", "private void parseAvailableFrequencies(){\n\t\tString str = parser.readFile(FREQ_AVAILABLE, 256);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] frestrs = str.split(\" \");\n\t\tint[] freqs = new int[frestrs.length - 1];\n\t\tfor(int i = 0; i < freqs.length; i++)\n\t\t\tfreqs[i] = Integer.valueOf(frestrs[i]);\n\t\t\n\t\tcpuFrequencies = freqs;\n\t}", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "private void createFreqVector(Path file) {\r\n\t\t\tVector vector = new Vector(vocabulary.size());\r\n\t\t\tList<String> lines;\r\n\t\t\ttry {\r\n\t\t\t\tlines = Files.readAllLines(file);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSet<String> words = new HashSet<>();\r\n\t\t\t//create frequency vector of words in single document -> tf(w,d)\r\n\t\t\tfor (String line : lines) {\r\n\t\t\t\tif (line.isEmpty()) continue;\r\n\t\t\t\tString[] values = p.split(line);\r\n\t\t\t\tfor (String value : values) { \r\n\t\t\t\t\tif (value.isEmpty()) continue;\r\n\t\t\t\t\tString lowWord = value.toLowerCase().trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tInteger[] arr = vocabulary.get(lowWord);\r\n\t\t\t\t\tif (arr == null) continue;\r\n\t\t\t\t\tvector.incrementValueAt(arr[0]);\r\n\t\t\t\t\tif (words.add(lowWord)) {\r\n\t\t\t\t\t\t arr[1] += 1;\t//first time occurrence of this word in document\r\n\t\t\t\t\t\tvocabulary.put(lowWord, arr);\t//increment number of documents for this word\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfreqVectors.put(file, vector);\t\t\r\n\t\t}", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n \n \n File textBank = new File(\"textbank/\");\n Hashtable<Integer,Integer> frequency;\n Hashtable<Integer, String> table;\n table = new Hashtable<>();\n frequency = new Hashtable<>();\n Scanner input = new Scanner(new File(\"stoplist.txt\"));\n int max=0;\n while (input.hasNext()) {\n String next;\n next = input.next();\n if(next.length()>max)\n max=next.length();\n table.put(next.hashCode(), next); //to set up the hashmap with the wordsd\n \n }\n \n System.out.println(max);\n \n Pattern p0=Pattern.compile(\"[\\\\,\\\\=\\\\{\\\\}\\\\\\\\\\\\\\\"\\\\_\\\\+\\\\*\\\\#\\\\<\\\\>\\\\!\\\\`\\\\-\\\\?\\\\'\\\\:\\\\;\\\\~\\\\^\\\\&\\\\%\\\\$\\\\(\\\\)\\\\]\\\\[]\") \n ,p1=Pattern.compile(\"[\\\\.\\\\,\\\\@\\\\d]+(?=(?:\\\\s+|$))\");\n \n \n \n wor = new ConcurrentSkipListMap<>();\n \n ConcurrentMap<String , Map<String,Integer>> wordToDoc = new ConcurrentMap<String, Map<String, Integer>>() {\n @Override\n public Map<String, Integer> putIfAbsent(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean remove(Object key, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean replace(String key, Map<String, Integer> oldValue, Map<String, Integer> newValue) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> replace(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public int size() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean isEmpty() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsKey(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsValue(Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> get(Object key) {\n return wor.get((String)key);//To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> put(String key, Map<String, Integer> value) {\n wor.put(key, value); // this saving me n \n //if(frequency.get(key.hashCode())== null)\n \n //frequency.put(key.hashCode(), )\n return null;\n }\n\n @Override\n public Map<String, Integer> remove(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void putAll(Map<? extends String, ? extends Map<String, Integer>> m) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<String> keySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Collection<Map<String, Integer>> values() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<Map.Entry<String, Map<String, Integer>>> entrySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n totalFiles = textBank.listFiles().length;\n for (File textFile : textBank.listFiles()) {\n totalReadFiles++;\n //checking whether file has txt extension and file size is higher than 0\n if(textFile.getName().contains(\".txt\") && textFile.length() > 0){\n docName.add(textFile.getName().replace(\".txt\", \".stp\"));\n StopListHandler sp = new StopListHandler(textFile, table,System.currentTimeMillis(),p0,p1,wordToDoc);\n sp.setFinished(() -> {\n \n tmp++;\n \n if(tmp==counter)\n //printTable(counter);\n \n if(totalReadFiles == totalFiles)\n {\n printTable(counter);\n }\n \n });\n \n sp.start();\n counter ++;}\n \n \n }\n System.out.println(counter);\n //while(true){if(tmp==counter-1) break;}\n System.out.println(\"s\");\n \n }", "public int getFrequencyOf(String word) {\r\n\t\tint frequency = 0;\r\n\t\tif (readDocument != null) {\r\n\t\t\tfrequency = readDocument.getFrequencyOf(word);\r\n\t\t\tSystem.out.println(\"Frequency: \" + frequency);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t\treturn frequency;\r\n\t}", "public static void InvertedDocFrequency() throws FileNotFoundException {\n //int totalDoc = totaldocument;\n int i = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> docFrequency = new ArrayList<>();\n //\tList<Double> idfValue = new ArrayList<>();\n docFrequency = entry.getValue(); //again taking the list of word terms from the same dictionary hashmap\n int df = docFrequency.get(totaldocument+1); // it will save the idf of every word term at the 57th index\n double ans = Math.log10(df);\n ans /= totaldocument;\n\n idfFinal.add(i,ans); //updatin\n i++;\n }\n saveidf();\n }", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "public void getWordFrequency(ArrayList<String> out_words, ArrayList<Integer> out_counts) {\n //... Put in ArrayList so sort entries by frequency\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n Collections.sort(entries, new ComparatorFrequency());\n\n //... Add word and frequency to parallel output ArrayLists.\n for (Map.Entry<String, MutableInteger> ent : entries) {\n out_words.add(ent.getKey());\n out_counts.add(ent.getValue().getValue());\n }\n }", "private void traverseLine(String str) {\n\t\tFrequencyCount f ;\r\n\t\tint prev = 0;\r\n\t\tString docid = \"\";\r\n\t\tint flag = 0,flag1 = 0;\r\n\t\tfor(int k = 0;k<str.length();k++)\r\n\t\t{\r\n\t\t\t//System.out.print(str.charAt(k));\r\n\t\t\tif(str.charAt(k) == ':'){\r\n\t\t\t\tflag = 1;k++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(flag == 1){\r\n\t\t\t\tint indexid;\r\n\t\t\t\tif(flag1 == 0){\r\n\t\t\t\t\tcounter = \"\";\r\n\t\t\t\t\tindexid = str.indexOf(':', k);\r\n\t\t\t\t\tcounter = str.substring(k, indexid);\r\n\t\t\t\t\tk = indexid+1;\r\n\t\t\t\t\tflag1 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tindexid = str.indexOf('#', k);\r\n\t\t\t\tdocid = String.valueOf(Integer.parseInt(str.substring(k, indexid))+prev);\r\n\t\t\t\tprev = Integer.parseInt(docid);\r\n\t\t\t\t\r\n\t\t\t\tf = new FrequencyCount(docid);\r\n\t\t\t\tk = indexid+1;\r\n\t\t\t\twhile(str.charAt(k) != '|'){\r\n\t\t\t\t\tif(k+1 == str.length()){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(str.charAt(k) == '#') {k++;continue;}\r\n\t\t\t\t\tint flagop = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch(str.charAt(k)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcase 't' : flagop = 1;\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\tcase 'i' : flagop = 2;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'b' : flagop = 3;\r\n\t\t\t\t \t\t \t\t\tbreak;\r\n\t\t\t\t\t\tcase 'r' : flagop = 6;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'L' : flagop = 5;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'c' : flagop = 4;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'l' : flagop = 7;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault : flagop = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(flagop != 0){\r\n\t\t\t\t\t\tindexid = Math.min(str.indexOf('#', k), str.indexOf('|', k));\r\n\t\t\t\t\t\tif(indexid == -1){\r\n\t\t\t\t\t\t\tindexid = str.indexOf('|', k);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tint count = Integer.parseInt(str.substring(k+1, indexid));\r\n\t\t\t\t\t\t//System.out.print(count +\" \");\r\n\t\t\t\t\t\tfor(int j = 0;j<count;j++)\r\n\t\t\t\t\t\t\tf.incrementCounter(flagop);\r\n\t\t\t\t\t\tk = indexid;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e){e.printStackTrace();\r\n\t\t\t\t\t\t\tSystem.out.println(\"EXCEPTION : \"+e.getMessage());\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\tfc.add(f);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tword = word+str.charAt(k);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "private static List<String> computeTwoGramFrequencies(List<String> words, int top_no, List<String> stopwordslist) {\n\t\t\t\n\t\tMap<String, Integer> tempstopmap= new HashMap<String, Integer>();\n\t\tfor (int i=0; i<stopwordslist.size(); i++){\n\t\t\tString tempword = stopwordslist.get(i);\n\t\t\ttempstopmap.put(tempword, 1);\n\t\t}//construct temp stopwordmap\n\t\t\n\t\tint i=0;\n\t\tMap<String, Integer> tempmap= new HashMap<String, Integer>();\n\t\twhile(i<words.size()){\n\t\t\tString temptwogram=\"\";\n\t\t\tString tempword1=\" \";\n\t\t\tString tempword2=\" \";\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size()-1)\n\t\t\t\t\tbreak;\n\t\t\t\ttempword1=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword1))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword1=\" \";\n\t\t\t}\n\t\t\ti++;\n\t\t\tSystem.out.println(\"b\"+i);\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size())\n\t\t\t\t\tbreak;\n\t\t\t\ttempword2=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword2))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword2=\" \";\n\t\t\t}//jump for the case that word + stopword +word\n\t\t\t\n\t\t\ttemptwogram = tempword1+\" \"+tempword2; //2-gram\n\t\t\tif (tempmap.containsKey(temptwogram))\n\t\t\t\ttempmap.put(temptwogram, tempmap.get(temptwogram)+1);\n\t\t\telse\n\t\t\t\ttempmap.put(temptwogram, 1);\n\t\t}//construct hashmap to count 2-gram words (key(word), value(frequency))\n\t\tList<Map.Entry<String, Integer>> templist = new ArrayList<Map.Entry<String, Integer>>();\n\t\tfor(Map.Entry<String, Integer> entry: tempmap.entrySet()){\n\t\t\t\n\t\t\t\n\t\t\ttemplist.add(entry);\n\t\t}//construct templist with entry containing word/frequency in map\n\t\t\n\t\tCollections.sort(templist, Collections.reverseOrder(new comparatorByFrequencyReverse()));//sort templist in decresing order\n\n\t\t /*change the templist into sortedlist*/\n\t\tList<String> sortedlist = new ArrayList<String> ();\n\t\tif(templist.size()>=top_no){\n\t\t\tfor (int j=0; j<top_no;j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tfor (int j=0; j<templist.size();j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\treturn sortedlist;\n\t}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "private static List<Pair<String, Integer>> splitWords(String line) {\n // This is kinda silly: we read and parse the stop words file once for each chunk, but this is the way the book\n // does it, so better stay in line with that.\n Set<String> stopWords = Arrays.stream(readFile(\"../stop_words.txt\").split(\",\")).\n collect(Collectors.toCollection(HashSet::new));\n return Arrays.stream(line.replaceAll(\"[^a-zA-Z\\\\d\\\\s]\", \" \").toLowerCase().split(\" \")).\n filter(w -> w.length() >= 2 && !stopWords.contains(w)).\n map(w -> new Pair<>(w, 1)).\n collect(Collectors.toList());\n }", "private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }", "public void countWords(File sourceFile) throws IOException {\n Scanner wordScanner = new Scanner(sourceFile);\n// wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n wordScanner.close(); // Close underlying file.\n }", "public Siteword(String site, String word, int frequency) {\r\n\t\tthis.site = site;\r\n\t\tthis.word = word;\r\n\t\tthis.frequency = frequency;\r\n\t}", "public WordCount2(Integer frequency) {\n emitFrequency = frequency;\n }", "abstract public int docFreq(Term t) throws IOException;", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}", "public void process(String firstWord, String secondWord){\n\t\tSystem.out.println();\n\t\t\n\n\t\tchar[] secondWordChar = secondWord.toCharArray();\n\t\tchar[] removeDuplicateInfirstWord = eliminateDuplicate(firstWord);\n\t\tint[] frequency = new int[removeDuplicateInfirstWord.length];\n\t\t\t\n\t\t// save frequency to frequency array\n\t\tfor(int i = 0; i < removeDuplicateInfirstWord.length; i++){\n\t\t\tfor(int j = 0; j < secondWordChar.length; j++){\n\t\t\t\tif(removeDuplicateInfirstWord[i] == secondWordChar[j]){\n\t\t\t\t\tfrequency[i]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print the frequency of letters in word1 appear in word2\n\t\tSystem.out.print(\"Letters\");\n\t\tSystem.out.print(\" \");\n\t\tSystem.out.print(\"Frequency\\n\");\n\t\tfor(int a = 0; a < removeDuplicateInfirstWord.length; a++){\n\t\t\tSystem.out.printf(\"%3c %s %d\", removeDuplicateInfirstWord[a], \" \", frequency[a]);\t\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// print histogram of the frequency\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Histogram of the frequency\");\n\t\tSystem.out.println();\n\t\tfor(int j = 0; j < frequency.length; j++){\n\t\t\tSystem.out.print(\"Letter \" + removeDuplicateInfirstWord[j] + \": \");\n\t\t\t\n\t\t\t// print stars for each letter\n\t\t\tfor(int star = 0; star < frequency[j]; star++){\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void genIDFData(String vocabFile, String outFile) throws Exception {\n List<String> lines = FileUtils.readLines(new File(vocabFile), Charset.defaultCharset());\n BufferedWriter bw = new BufferedWriter(new FileWriter(outFile));\n int N = reader.numDocs();\n for (String line: lines) {\n String word = TrecDocIndexer.analyze(indexer.getAnalyzer(), line).trim();\n int df = reader.docFreq(new Term(TrecDocIndexer.FIELD_ANALYZED_CONTENT, word));\n bw.write(line.trim() + \"\\t\");\n bw.write(String.valueOf(Math.log(N/(double)df)));\n bw.newLine();\n }\n bw.close();\n }", "@Override\r\n\t\t\tpublic long getDocumentFrequency(String term) {\n\t\t\t\treturn 0;\r\n\t\t\t}", "public static Vector<Thought> loadWords(File f, int dimensions) {\r\n\t\t\r\n\t\tVector<Thought> ret = new Vector<Thought>();\r\n\t\t\r\n\t\tCSV csv = new CSV(f);\r\n\t\tString[] line;\r\n\t\t\r\n\t\tHashSet<String> words = new HashSet<String>();\r\n\t\t\r\n\t\twhile((line = csv.getLine()) != null) {\r\n\t\t\tString word = line[0].trim();\r\n\t\t\tword = word.replaceAll(\" ?\\\\(.*\\\\)\", \"\");\r\n\t\t\t\r\n\t\t\tif(word.indexOf(' ') != -1) {\r\n\t\t\t\t// Ignore sentences.\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tword = word.replaceAll(\"[^a-z]\", \"\");\r\n\t\t\t\t\r\n\t\t\t\t// Only add words without spaces.\r\n\t\t\t\tif(!words.contains(word)) {\r\n\t\t\t\t\twords.add(word);\r\n\t\t\t\t\t//float frequency = Float.parseFloat(line[line.length-1]);\r\n\t\t\t\t\tret.add(new Thought(word, dimensions));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}", "private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }", "static void ReadQuery(String input) throws FileNotFoundException {\n input = input.replaceAll(\"[^A-Za-z]\",\" \");\n String[] arr = input.split(\" \"); // splitting the whole string into words by split on the basis of white spaces\n\n\n for(int i=0; i<arr.length; i++) {\n String termWord = arr[i].toLowerCase();\t//same pre-processing is applied to all the query word\n //termWord = RemoveSpecialCharacter(termWord);\n termWord = removeStopWords(termWord);\n\n if(!termWord.equalsIgnoreCase(\"\")) { // all the white spaces are removed as if not removed then lemmatization wont be successfully done\n\n termWord = Lemmatize(termWord);\n System.out.println(termWord);\n if(dictionary.containsKey(termWord)) {\n List<Integer> wordList = new ArrayList<>();\n wordList = dictionary.get(termWord);\n int queryWordFrequency = wordList.get(totaldocument);\n queryWordFrequency++;\n wordList.set(totaldocument, queryWordFrequency); // all the frequencies of the query words are stored at the 56th index of the List stored in the\n //hashmap associated with its word-terms\n dictionary.put(termWord, wordList);\n }\n else {\n //if any of the enterd query word not present in all the docs so list will have 0.0 value from 0th index to 55th and 56th index is reserver\n // for query word frequency\n List<Integer> wordList = new ArrayList<>();\n for(int j=0; j<totaldocument+1; j++) {\n wordList.add(0);\n }\n wordList.add(1);\n dictionary.put(termWord, wordList); //updating the dictionary hashmap now containing all the query words frequencies\n }\n }\n }\n save();\n }", "void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}", "java.lang.String getFrequencyOffset();", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText().toLowerCase();\n\n // TODO: construct a vector of tokens and update the tokenList in CAS\n\n String[] wordList = docText.split(\" \");\n HashMap<String, Integer> tokenCount = new HashMap<String, Integer>();\n for (String word : wordList) {\n String newWord = word;\n if(word.charAt(word.length()-1)<'a' || word.charAt(word.length()-1)>'z'){\n newWord = word.substring(0, word.length()-1);\n }\n //if(Utils.GetStopWordFilter().isStopword(newWord))continue;\n if (!tokenCount.containsKey(newWord)) {\n tokenCount.put(newWord, 1);\n } else {\n tokenCount.put(newWord, tokenCount.get(newWord) + 1);\n }\n }\n\n ArrayList<Token> tokenList = new ArrayList<Token>();\n for (String word : tokenCount.keySet()) {\n Token token = new Token(jcas);\n token.setText(word);\n token.setFrequency(tokenCount.get(word));\n tokenList.add(token);\n }\n FSList tokenFSList = Utils.fromCollectionToFSList(jcas, tokenList);\n doc.setTokenList(tokenFSList);\n }", "float getFrequency();", "private static void fillDataMapFromFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedReader frequencyReader = new BufferedReader(new FileReader(frequencyFile));\n\n\t\tList<String> lines = frequencyReader.lines()\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tfrequencyReader.close();\n\n\t\tfor(int i = 0, size = lines.size(); i < size; i++) { // Split each line at the delimiter, into word & frequency - put them in the data map\n\n\t\t\tfinal String[] dataSplit = lines.get(i).split(WORD_FREQUENCY_DELIMITER);\n\t\t\tfinal String word = dataSplit[0];\n\t\t\tfinal long frequency = Long.parseLong(dataSplit[1]);\n\n\t\t\tdataMap.put(word, frequency);\n\t\t}\n\t}", "private static void wordCount(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t\t int count=0;\n\t\t while(sc.hasNext()){\n\t\t sc.next();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"Number of words: \" + count);\n\t\t\n\t\t\n\t}", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "public void process() {\n int secondSpace = songLine.indexOf(' ', (songLine.indexOf(' ') + 1));\n \n if(secondSpace != -1) {\n String firstTwoWords = songLine.substring(0, secondSpace);\n String rest = songLine.substring(secondSpace);\n System.out.printf(\"First two words: %s%n\",firstTwoWords);\n System.out.printf(\"Rest of the words: %s%n\",rest.substring(1));\n }\n \n int thirdSpace = songLine.indexOf(' ', (songLine.indexOf(' ') + 2));\n char firstLetterThirdWord = songLine.charAt(thirdSpace + 1);\n \n int firstOccurance = songLine.indexOf('b');\n \n System.out.printf(\"Length is: %d%n\", songLine.length());\n \n System.out.printf(\"Last character is: %c%n\", songLine.charAt(songLine.length() - 1) );\n \n System.out.printf(\"First letter of the third word: %c%n\",firstLetterThirdWord);\n \n System.out.printf(\"Replaced spaces with x's: %s%n\", songLine.replace(\" \", \"x\"));\n \n System.out.printf(\"Uppercase: %s%n\", songLine.toUpperCase());\n \n System.out.printf(\"Index of first occurence of 'b': %d%n%n\", firstOccurance);\n \n }", "public interface IWordFrequency {\n\n\t/**\n\t * \n\t * @param input\n\t * text string to process\n\t * @param wordNumber\n\t * max number of word in the returned list\n\t * @return for a given non null or empty input text, returns the list of\n\t * words ordered by word frequency, the most frequently occurring\n\t * word first, null otherwise.\n\t * \n\t */\n\tList<String> getWordFrequency(String input, int wordNumber);\n\n}", "public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}", "public TextMetaData parse(IFileHandler file) {\n\n\t\tTextMetaData metaData = new TextMetaData();\n\t\tStringBuilder bldWord = new StringBuilder();\n\n\t\t// the caret position holds the current position in the text stream\n\t\t// and is used to store the position of the words that have been found\n\t\t// which is useful information to highlight the words later on\n\t\tlong caretPosition = 0;\n\t\t\n\t\twhile (file.hasNext()) {\n\n\t\t\t// we iterate over the file content (which is obviously text based)\n\t\t\tString filePart = file.next();\n\t\t\t\n\t\t\tfor (int i = 0; i < filePart.length(); ++i) {\n\n\t\t\t\tchar c = filePart.charAt(i);\n\t\t\t\tboolean isWordFinisihed = false;\n\n\t\t\t\tint type = Character.getType(c);\n\n\t\t\t\t// check for a punctuation character\n\t\t\t\tswitch (type) {\n\t\t\t\t\n\t\t\t\tcase Character.START_PUNCTUATION:\n\t\t\t\tcase Character.INITIAL_QUOTE_PUNCTUATION:\n\t\t\t\tcase Character.FINAL_QUOTE_PUNCTUATION:\n\t\t\t\tcase Character.END_PUNCTUATION:\n\t\t\t\tcase Character.DASH_PUNCTUATION:\n\t\t\t\tcase Character.CONNECTOR_PUNCTUATION:\n\t\t\t\tcase Character.SPACE_SEPARATOR:\n\t\t\t\tcase Character.LINE_SEPARATOR:\n\t\t\t\tcase Character.PARAGRAPH_SEPARATOR:\n\t\t\t\tcase Character.CONTROL:\n\t\t\t\t\t\n\t\t\t\t\tisWordFinisihed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase Character.OTHER_PUNCTUATION:\n\n\t\t\t\t\t// if we found a punctuation between a letter or digit\n\t\t\t\t\t// aka 1.2.3 or V.1.2 or something like this\n\t\t\t\t\t// we will see this as a single word\n\t\t\t\t\tif ((i > 0)\n\t\t\t\t\t\t\t&& (i != filePart.length() - 1)\n\t\t\t\t\t\t\t&& Character\n\t\t\t\t\t\t\t\t\t.isLetterOrDigit(filePart.charAt(i - 1))\n\t\t\t\t\t\t\t&& Character\n\t\t\t\t\t\t\t\t\t.isLetterOrDigit(filePart.charAt(i + 1))) {\n\n\t\t\t\t\t\tisWordFinisihed = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tisWordFinisihed = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tisWordFinisihed = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// if we figured out that we have finished one word\n\t\t\t\tif (isWordFinisihed) {\n\n\t\t\t\t\tif (bldWord.length() > 0) {\n\n\t\t\t\t\t\t// we have to store this information in the meta data\n\t\t\t\t\t\tString newWord = bldWord.toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\tWordPosition pos = new WordPosition(caretPosition + i - newWord.length(), newWord);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmetaData.addWord(newWord, pos);\n\n\t\t\t\t\t\t// and inform the UI about the process update\n\t\t\t\t\t\tint percentage = (int) (pos.getEndPosition() * 100 / file.getFileLength());\n\t\t\t\t\t\t\n\t\t\t\t\t\tString message = String.format(\"Wort \\\"%s\\\" gefunden\",\n\t\t\t\t\t\t\t\tnewWord);\n\n\t\t\t\t\t\tnotifyTextProcessStatusUpdate(new TextProcessStatusEvent(\n\t\t\t\t\t\t\t\tthis, percentage, message));\n\n\t\t\t\t\t\tbldWord = new StringBuilder();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// when the word is finished, we have examined a valid punctuation character before\n\t\t\t\t\t// which is the signal to the text processing strategy that the word is finished\n\t\t\t\t\tmetaData.addPunctuation(c);\n\t\t\t\t\t\n\t\t\t\t} else {\n\n\t\t\t\t\t// otherwise we are still in-between the word and have to build it \n\t\t\t\t\t// char-by-char\n\t\t\t\t\tbldWord.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcaretPosition += filePart.length();\n\t\t}\n\n\t\t// notify that we will have to sort the list of examined words\n\t\t// based on their frequency, which might take a while\n\t\tnotifyTextProcessStatusUpdate(new TextProcessStatusEvent(this, -1,\n\t\t\t\t\"Sortiere Wortliste...\"));\n\n\t\tmetaData.sortWordsByFrequency();\n\n\t\t// after all the process is finished, so refresh the UI here\n\t\tnotifyTextProcessStatusFinish(new TextProcessFinishEvent(this,\n\t\t\t\tfile.getPlainText(), metaData));\n\t\t\n\t\treturn metaData;\n\t}", "int getFreq();", "public WordData(String word, int frequency) {\n\t\tif (word == null) {\n\t\t\tthrow new IllegalArgumentException(\"word should not be null\");\n\t\t}\n\t\tif (word.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(\"word should not be empty\");\n\t\t}\n\t\tif (frequency <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"frequency always should not be negative value\");\n\t\t}\n\t\tthis.data = word;\n\t\tthis.frequency = frequency;\n\t}", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "private static HashMap<String, Integer> generateWordIndex()\n\t{\n\t\tHashMap<String, Integer> wordIndex = new HashMap<String, Integer>();\n\t\tint currIndex = 0;\n\t\tStringBuffer combinedHeaders;\n\t\tfor (MP mp : Capone.getInstance().getParliament().getMPList())\n\t\t{\n\t\t\tfor (Speech sp : mp.returnSpeeches())\n\t\t\t{\n\t\t\t\tcombinedHeaders = new StringBuffer();\n\t\t\t\tcombinedHeaders.append(sp.getHeader1());\n\t\t\t\tcombinedHeaders.append(sp.getHeader2());\n\t\t\t\tfor (String str : combinedHeaders.toString().split(\" \"))\n\t\t\t\t{\n\t\t\t\t\tif (!wordIndex.containsKey(str))\n\t\t\t\t\t{\n\t\t\t\t\t\twordIndex.put(str, currIndex);\n\t\t\t\t\t\tcurrIndex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn wordIndex;\n\t}", "public static void main(String arg[]) {\n \tFile wordListFile = new File(\"WordList.txt\");\r\n \tFile definitionsFile = new File (\"DefinitionsAndSentences.txt\"); \t\r\n \tFile outputFile = new File (\"debug.txt\"); \r\n \t\r\n \tInputStream inputStreamOne;\r\n \tInputStreamReader readerOne;\r\n \tBufferedReader binOne;\r\n \t\r\n \tInputStream inputStreamTwo;\r\n \tInputStreamReader readerTwo;\r\n \tBufferedReader binTwo;\r\n \t\r\n \tOutputStream outputStream;\r\n \tOutputStreamWriter writerTwo;\r\n \tBufferedWriter binThree;\r\n \t \t\r\n \t\r\n \t// Lists to store data to write to database\r\n \tArrayList<TermItem>databaseTermList = new ArrayList<TermItem>();\r\n \tArrayList<DefinitionItem>databaseDefinitionList = new ArrayList<DefinitionItem>();\r\n \tArrayList<SentenceItem>databaseSampleSentenceList = new ArrayList<SentenceItem>();\r\n \t\r\n \t// Create instance to use in main()\r\n \tDictionaryParserThree myInstance = new DictionaryParserThree();\r\n \t\r\n \tint totalTermCounter = 1;\r\n \tint totalDefinitionCounter = 1;\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyInstance.createDatabase();\r\n\t\t\t// Open streams for reading data from both files\r\n\t\t\tinputStreamOne = new FileInputStream(wordListFile);\r\n\t \treaderOne= new InputStreamReader(inputStreamOne);\r\n\t \tbinOne= new BufferedReader(readerOne);\r\n\t \t\r\n\t \tinputStreamTwo = new FileInputStream(definitionsFile);\r\n\t \treaderTwo= new InputStreamReader(inputStreamTwo);\r\n\t \tbinTwo= new BufferedReader(readerTwo);\r\n\t \t\r\n\t \toutputStream = new FileOutputStream(outputFile);\r\n\t \twriterTwo= new OutputStreamWriter(outputStream);\r\n\t \tbinThree= new BufferedWriter(writerTwo);\r\n\r\n\t \tString inputLineTwo;\r\n\t \tString termArray[] = new String[NUM_SEARCH_TERMS];\r\n\t \t\r\n\t \t// Populate string array with all definitions.\r\n\t \tfor (int i = 0; (inputLineTwo = binTwo.readLine()) != null; i++) {\r\n\t\t \t termArray[i] = inputLineTwo; \r\n\t \t}\t \t\r\n\t \t\r\n\t \t// Read each line from the input file (contains top gutenberg words to be used)\r\n\t \tString inputLineOne;\r\n\t \tint gutenbergCounter = 0;\r\n\t \twhile ((inputLineOne = binOne.readLine()) != null) {\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t// Each line contains three or four words. Grab each word inside double brackets.\r\n\t\t \tString[] splitString = (inputLineOne.split(\"\\\\[\\\\[\")); \t\t \t\r\n\t \t\tfor (String stringSegment : splitString) {\r\n\t \t\t\t\r\n\t \t\t\tif (stringSegment.matches((\".*\\\\]\\\\].*\")))\r\n\t \t\t\t{\r\n\t \t\t\t\t// Increment counter to track Gutenberg rating (already from lowest to highest)\r\n\t \t\t\t\tgutenbergCounter++;\r\n\t \t \t\t\r\n\t \t\t\t\tboolean isCurrentTermSearchComplete = false;\r\n\t \t\t \tint lowerIndex = 0;\r\n\t \t\t \tint upperIndex = NUM_SEARCH_TERMS - 1;\r\n\t \t\t \t\r\n\t \t\t \tString searchTermOne = stringSegment.substring(0, stringSegment.indexOf(\"]]\"));\r\n\t \t\t \tsearchTermOne = searchTermOne.substring(0, 1).toUpperCase() + searchTermOne.substring(1);\r\n\t \t\t \t\r\n\t \t\t\t\twhile (!isCurrentTermSearchComplete) {\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// Go to halfway point of lowerIndex and upperIndex.\r\n\t \t\t\t\t\tString temp = termArray[(lowerIndex + upperIndex)/2];\r\n\t \t\t\t\t\tString currentTerm = temp.substring(temp.indexOf(\"<h1>\") + 4, temp.indexOf(\"</h1>\"));\r\n\t \t\t\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// If definition term is lexicographically lower, need to increase lower Index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If definition term is lexicographically higher, need decrease upper index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If a match is found, need to find first definition, and record each definition\r\n\t \t\t\t\t\t// in case of duplicates.\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (currentTerm.compareTo(searchTermOne) < 0) {\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\tlowerIndex = (lowerIndex + upperIndex)/2;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\telse if (currentTerm.compareTo(searchTermOne) > 0) {\r\n\t \t\t\t\t\t\tupperIndex = (lowerIndex + upperIndex)/2; \t\t\t\t\t\t\r\n\t \t\t\t\t\t} \t\t\t\t\t\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\telse {\t\r\n\t \t\t\t\t\t\t// Backtrack row-by-row until we reach the first term in the set. Once we reach the beginning,\r\n\t \t\t\t\t\t\t// cycle through each match in the set and obtain each definition until we reach the an unmatching term.\r\n\r\n\t \t\t\t\t\t\t//else {\r\n\t \t\t\t\t\t\t\tSystem.out.println(searchTermOne);\r\n\t\t \t\t\t\t\t\tint k = (lowerIndex + upperIndex)/2;\r\n\t\t \t\t\t\t\t\tboolean shouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\tif (k <= 0 || k >= NUM_SEARCH_TERMS) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString previous = termArray[k - 1].substring(termArray[k - 1].indexOf(\"<h1>\") + 4, termArray[k - 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t \t\t\t\t\t\tif (current.compareTo(previous) == 0) {\t\t\t\r\n\t\t\t\t \t\t\t\t\t\t\tk--;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t\t \t\t\t\t\telse {\r\n\t\t\t\t\t \t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t\t \t\t\t\t\t}\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\tshouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\t\t \t\r\n\t\t \t\t\t\t\t\t\t// Used to store data to later pass to DB\r\n\t\t \t\t\t\t\t DictionaryParserThree.TermItem tempTermItem = myInstance.new TermItem();\r\n\r\n\t\t \t\t\t\t\t // Determine unique ID (which will be written to DB later)\r\n\t\t \t\t\t\t\t // Add current term and gutenberg rating.\r\n\t\t \t\t\t\t\t tempTermItem.ID = totalTermCounter;\t\t \t\t\t\t\t \t \t\t\t\t\t \r\n\t\t \t\t\t\t\t \ttempTermItem.theWord = searchTermOne; // same as termArray[k]'s term\r\n\t\t \t\t\t\t\t \r\n\t\t \t\t\t\t\t\t\ttempTermItem.gutenbergRating = gutenbergCounter;\r\n\t\t \t\t\t\t\t\t\tdatabaseTermList.add(tempTermItem);\r\n\t\t \t\t\t\t\t\t\tbinThree.write(\"Term ID \" + tempTermItem.ID + \" \" + tempTermItem.theWord + \" guten rank is \" + tempTermItem.gutenbergRating);\r\n\t\t \t\t\t\t\t\t\tbinThree.newLine();\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t \t\tsplitString = termArray[k].split(\"<def>\");\r\n\t\t \t\t\t\t \t\t\r\n\t\t \t\t\t\t \t\tint m = 0;\r\n\t \t\t\t\t\t \t\tfor (String stringSegment2 : splitString) {\r\n\t \t\t\t\t\t \t\t\tif (stringSegment2.matches(\".*</def>.*\") && m > 0) {\r\n\t \t\t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t\t\t// Determine unique ID (which will be written to DB later)\r\n\t \t\t\t\t\t \t\t\t\t// Add definition, as well as term ID it is associated with.\r\n\t \t\t\t\t\t \t\t\t\tDictionaryParserThree.DefinitionItem tempDefinitionItem = myInstance.new DefinitionItem();\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.ID = totalDefinitionCounter;\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.theDefinition = stringSegment2.substring(0, stringSegment2.indexOf(\"</def>\"));\r\n\t \t\t\t\t\t\t \t\t\ttempDefinitionItem.termID = totalTermCounter;\r\n\t \t\t\t\t\t\t \t\t\tdatabaseDefinitionList.add(tempDefinitionItem);\r\n\r\n\t \t\t\t\t\t\t \t\t\tint n = 0;\r\n\t \t\t\t\t\t\t \t\t\tString[] splitString2 = (stringSegment2.split(\"<blockquote>\")); \r\n\t \t \t\t\t\t\t \t\tfor (String stringSegment3 : splitString2) {\r\n\t \t \t\t\t\t\t \t\t\tif (stringSegment3.matches(\".*</blockquote>.*\") && n > 0) {\r\n\t \t \t\t\t\t\t \t\t\t\t// Add data which will be added to DB later.\r\n\t \t \t\t\t\t\t \t\t\t\t// Add sample sentence as well as the definition ID it is associated with.\r\n\t \t \t\t\t\t\t \t\t\t\tDictionaryParserThree.SentenceItem tempSentenceItem = myInstance.new SentenceItem();\t\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.definitionID = totalDefinitionCounter;\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.theSampleSentence = stringSegment3.substring(0, stringSegment3.indexOf(\"</blockquote>\"));\r\n\t \t \t\t\t\t\t \t\t\t\tdatabaseSampleSentenceList.add(tempSentenceItem);\t \t \t\t\t\t\t \t\t\t\t\r\n\t \t \t \t\t\t\t\t \t\t\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\"Definition is\" + tempDefinitionItem.theDefinition);\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.newLine();\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\" and sample sentence is \" + tempSentenceItem.theSampleSentence);\r\n\t \t \t\t \t\t\t\t\t\t\tbinThree.newLine();\t\r\n\t \t \t\t\t\t\t \t\t\t}\r\n\t \t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's sample sentence)\r\n\t \t \t\t\t\t\t \t\t\tn++;\r\n\t \t \t\t\t\t\t \t\t}\r\n\t \t \t\t\t\t\t \t\ttotalDefinitionCounter++;\r\n\t \t\t\t\t\t \t\t\t}\r\n\t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's definition)\r\n\t \t\t\t\t \t\t\t\tm++;\r\n\t \t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t}\t \t \t\t\t\t\t \t\t\r\n\t \t\t\t\t\t \t\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\ttotalTermCounter++;\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\t// Compare next definition and see if duplicate exists.\r\n\t\t \t\t\t\t\t\t\t// If so, add to string array.\r\n\t \t\t\t\t\t \t\tif (k < 0 || k >= NUM_SEARCH_TERMS - 1) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\telse { \t \t\t\t\t\t \t\t\r\n\t\t\t \t\t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString next = termArray[k + 1].substring(termArray[k + 1].indexOf(\"<h1>\") + 4, termArray[k + 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\tif (current.compareTo(next) == 0) {\t\r\n\t\t\t\t \t\t\t\t\t\t\tk++;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t \t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\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\t\t//}\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\tisCurrentTermSearchComplete = true;\r\n\t\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// If the term does not exist in the database.\r\n\t \t\t\t\t\tif (Math.abs(upperIndex) - Math.abs(lowerIndex) <= 1)\r\n\t \t\t\t\t\t{\r\n \t\t\t\t\t\t\t isCurrentTermSearchComplete = true;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t \t\t} \t \t\t\r\n\t \t}\r\n\t \t\r\n\t \t \t\r\n\t \tSystem.out.println(\"ended search.\");\t\r\n\t \tmyInstance.writeAllItemsToDatabase(databaseTermList, databaseDefinitionList, databaseSampleSentenceList);\t\r\n\t \tSystem.out.println(\"ended write.\");\r\n\t \t\r\n\t \tbinOne.close();\r\n\t \treaderOne.close();\r\n\t \tinputStreamOne.close();\t \t\r\n\t \t\r\n\t \tbinTwo.close();\r\n\t \treaderTwo.close();\r\n\t \tinputStreamTwo.close();\t \t\r\n\t \t\r\n\t \tbinThree.close(); \r\n\t \twriterTwo.close();\r\n\t \toutputStream.close();\r\n\t \tSystem.exit(0);\r\n\r\n\r\n\t \t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \t\r\n }", "public Map<Integer, Integer> getMap(String fileContent) {\n\t\tString[] words = fileContent.split(\" \");\n\t\tfor (String word : words) {\n\t\t\tint hash = word.hashCode();\n\t\t\tint frequency = 1;\n\t\t\tif (map.containsKey(hash)) {\n\t\t\t\tfrequency += map.get(hash);\n\t\t\t\tmap.put(hash, frequency);\n\t\t\t} else {\n\t\t\t\tmap.put(hash, frequency);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static double[] calculateYuleK(Map<String, Double> wordFrequencies) \n\t{\n\t\t// m1 = number of different words in document (review)\n\t\tdouble m1 = wordFrequencies.keySet().size();\n\n\t\tMap<Double, Double> yuleMap = Utilities.reverseMap(wordFrequencies);\n\n\t\t// m2 = sum of products of each observed frequency squared and number of \n\t\t// words with that frequency\n\t\tdouble m2 = 0.0;\n\t\tdouble[] legomenas = new double[11];\n\t\tfor(Entry<Double,Double> e : yuleMap.entrySet()){\n\t\t\tDouble freq = e.getKey();\n\t\t\tDouble wordCount = e.getValue();\n\t\t\tm2 += freq*freq*wordCount;\n\t\t\tif (freq.intValue() < legomenas.length)\n\t\t\t\tlegomenas[freq.intValue()] = wordCount;\n\t\t}\n\t\tlegomenas[0] = 10000*(m2-m1)/(m1*m1); \n\t\treturn legomenas;\n\t}", "private static void MostFrequentTwoGram() throws Exception{\n\t\tFile file=new File(filenameforpages);\n\t\tList<String> words = Utilities.tokenizeFile(file);\n\t\t\n\t\tList<String> stopwordslist = Utilities.tokenizeFile(new File(filenameforstopwords));\n\t\tList<String> mostfrequenttwogramlist =computeTwoGramFrequencies(words, top_number , stopwordslist);\n\t\tWriteMostFrequentTwoGramsToFile(mostfrequenttwogramlist);\n\t}", "static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}", "@Override\n public int getTermFrequency(String term) {\n return 0;\n }", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\n\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\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\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\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\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/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \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\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\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\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\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\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\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\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\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\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\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\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\n\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\t// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\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\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\n\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 \t\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\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/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public static String wordCounting(File file)\n {\n return null;\n }", "public ArrayList<Ngram> getNgramsFromFileWithStopwordsListOnly(String content) {\n HashMap<String, Integer> ngramsTable = new HashMap<>();\n InputStream modelIn = null; //rules_POS = null;\n if (content != null) {\n try {\n\n modelIn = new FileInputStream(\"resources/en-token.bin\");\n TokenizerModel model = new TokenizerModel(modelIn);\n Tokenizer tokenizer = new TokenizerME(model);\n String paras[] = tokenizer.tokenize(content);\n\n //create the first ngram\n String[] ngram = new String[nrGrams];\n int i = 0, count = 0;\n while (count < nrGrams && i < paras.length) {\n if (paras[i].trim().length() > 0 && !paras[i].matches(\"[\\\\p{Punct}\\\\p{Digit}]+|'s\")) {\n String word = paras[i].toLowerCase();\n if (word.trim().length() > 0) {\n ngram[count] = word;\n count++;\n }\n }\n i++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < ngram.length - 1; j++) {\n sb.append(ngram[j]).append(\"<>\");\n }\n sb.append(ngram[ngram.length - 1]);\n\n //adding to the frequencies table\n ngramsTable.put(sb.toString(), 1);\n\n //creating the remaining ngrams\n String word;\n while (i < paras.length) {\n if (paras[i].trim().length() > 0 && !paras[i].matches(\"[\\\\p{Punct}\\\\p{Digit}']+|'s\")) {\n word = paras[i].toLowerCase();\n\n if (word.trim().length() > 0) {\n String ng = addNextWord(ngram, word);\n\n //verify if the ngram already exist on the document\n if (ngramsTable.containsKey(ng)) {\n ngramsTable.put(ng, ngramsTable.get(ng) + 1);\n } else {\n ngramsTable.put(ng, 1);\n }\n }\n }\n i++;\n }\n } catch (IOException e) {\n Logger.getLogger(AbstractDatabaseImporter.class.getName()).log(Level.SEVERE, null, e);\n } finally {\n if (modelIn != null) {\n try {\n modelIn.close();\n } catch (IOException e) {\n }\n }\n }\n }\n\n\n\n\n ArrayList<Ngram> ngrams = new ArrayList<>();\n for (Entry<String, Integer> entry : ngramsTable.entrySet()) {\n ngrams.add(new Ngram(entry.getKey(), entry.getValue()));\n }\n Collections.sort(ngrams);\n return ngrams;\n }", "public void updateFrequency(String lineWord, String lineType) {\r\n\t\tString oldWordType = \"start\";\r\n\t\tif (lineType != null && lineWord != null) {\r\n\t\t\tString[] wordTypes = lineType.split(\" \");\r\n\t\t\tString[] words = lineWord.split(\" \");\r\n\t\t\tint i = 0;\r\n\t\t\tfor (String currentWordType: wordTypes) {\r\n\r\n\t\t\t\t//if not at first word of sentence\r\n\t\t\t\tif (oldWordType.equals(\"start\")) {\r\n\t\t\t\t\tupdateProbabilities(transMapTemp, oldWordType, currentWordType);\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 word = words[i-1].toLowerCase();\t//\r\n\t\t\t\t\tupdateProbabilities(emissionMapTemp, oldWordType, word);\r\n\t\t\t\t\tupdateProbabilities(transMapTemp, oldWordType, currentWordType);\r\n\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\r\n\t\t\t\toldWordType = currentWordType;\r\n\t\t\t}\r\n\t\t\tupdateProbabilities(emissionMapTemp, oldWordType, words[i-1]);\r\n\t\t\toldWordType = \"\";\t\t//signifies we are now at a new sentence/line\r\n\r\n\t\t}\r\n\t}", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public static void findWords(String target) throws FileNotFoundException{\n //reads file through the scanner\n scan = new Scanner(newFile);\n \n //creates new arraylist \n ArrayList<String> list = new ArrayList<String>();\n int count;\n while(scan.hasNextLine()){\n word = scan.nextLine();\n if(contains(target, word)){\n list.add(word.toLowerCase());\n }\n }\n\n int length = target.length();\n\n for(int i = length; i >= 2; i--){\n count = 0;\n System.out.println(i + \" letter words made by unscrambling the letters in \" + target );\n \n //This loop goes through all the strings in the arraylist of words contained\n //in the target word\n for(String a : list){\n //If the length of word in the arraylist is equal to i it prints the \n //word, as long as the line does not go over 40 characters\n if(a.length() == i) {\n if(count > (40 -a.length())){ \n System.out.print(\"\\n\");\n System.out.print(a + \" \");\n count = 0;\n count += (a.length() + 1);\n }\n else{\n System.out.print(a + \" \");\n count += (a.length() + 1);\n }\n }\n\n }\n //decrements length, and continues going through the loop\n length--;\n System.out.println(\"\\n\");\n }\n }", "public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}", "public ArrayList wordsInNumFiles(int number){\n System.out.println(\"\\nThese words appear \" + number + \" times: \");\n ArrayList<String> words = new ArrayList<String>();\n int countWordsSizeN =0;\n for (String word : hashWords.keySet()){\n int counts = hashWords.get(word).size();\n if(counts == number){//if count of this word is equal to the given number\n words.add(word);//add this word into the words Arrylist\n countWordsSizeN++;//increment the count of words of size n\n System.out.println( \"words are\"+ word ); \n }\n // System.out.println(\"total of words repeated \" + number + \" times: \" + countWordsSizeN + \"words are\"+ word );\n }\n System.out.println(\"total of words repeated \" + number + \" times: \" + countWordsSizeN + \"words are\"+ words );\n return words;\n }", "public static void main(String[] args) {\n Scanner input = null;\r\n int allWords = 0;\r\n int threeLetterWords = 0;\r\n try {\r\n input = new Scanner(new File(\"prog512h.dat\"));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n \r\n while(input.hasNext()){\r\n if (input.next().length() == 3){\r\n threeLetterWords++;\r\n }\r\n allWords++;\r\n }\r\n System.out.println(\"Three letter words comprised \" + 100*(threeLetterWords+0.0)/allWords + \"% of all words.\");\r\n \r\n }", "public void read(String filename) throws IOException {\n // open the file\n BufferedReader r = new BufferedReader(new FileReader(filename));\n\n // load the number of terms\n int size = Integer.parseInt(r.readLine());\n\n // must divide by load factor (0.75) to not need to rehash\n index = new HashMap((int) (size / .75) + 1);\n\n // temporary variables\n String line;\n StringTokenizer tokens;\n String word;\n HashMap docList;\n String docid;\n int[] fArray;\n int lineNumber = 1;\n\n // while there are more lines in the document\n while ((line = r.readLine()) != null) {\n // increment the line number\n lineNumber++;\n\n // the word is the only thing on the line\n word = line;\n\n // load all documents containign this term\n docList = new HashMap();\n index.put(word, docList);\n\n line = r.readLine();\n while (line != null && !line.equals(\"\")) {\n fArray = new int[1];\n\n docid = line;\n fArray[0] = Integer.parseInt(r.readLine());\n\n docList.put(docid, fArray);\n line = r.readLine();\n }\n }\n\n // close the file\n r.close();\n }", "public int getFreq(){ return frequency;}", "public static int[] scanFile(String fileName){\n File file = new File(fileName);\n int[] freqNums = new int[94];\n //try catch in case the file doesn't exist\n try {\n Scanner scan = new Scanner(file);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94)\n freqNums[(int)s.charAt(i)-32] = freqNums[(int)s.charAt(i)-32] + 1;\n }\n //accounts for all the spaces\n freqNums[0] = freqNums[0]+1;\n }\n scan.close();\n //gets rid of the imaginary last space\n freqNums[0] = freqNums[0]-1;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return freqNums;\n }", "public void setFrequency(int f){\n this.frequency = f;\n }", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public synchronized void register(int docid, String word, int frequency) {\n // load the hashtable for this term\n Object val = index.get(word);\n\n // define a new int[1] to store the frequency\n int[] fArray = new int[1];\n fArray[0] = frequency;\n\n if (val == null) {\n // if this term isn't in the index, create a new hashtable and store\n // it\n HashMap newList = new HashMap();\n newList.put(docid, fArray);\n index.put(word, newList);\n } else {\n // if the term exists, simply store appropriately\n ((HashMap) val).put(docid, fArray);\n }\n }", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText();\n // construct a vector of tokens and update the tokenList in CAS\n // use tokenize0 from above\n List<String> ls = tokenize0(docText);\n Map<String, Integer> map = new HashMap<String, Integer>();\n Collection<Token> token_collection = new ArrayList<Token>();\n for (String d : ls) {\n if (map.containsKey(d)) {\n int inc = map.get(d) + 1;\n map.put(d, inc);\n } else {\n map.put(d, 1);\n }\n }\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry) it.next();\n Token t = new Token(jcas);\n String k = pairs.getKey().toString();\n int v = Integer.parseInt(pairs.getValue().toString());\n t.setFrequency(v);\n t.setText(k);\n token_collection.add(t);\n it.remove(); // avoids a ConcurrentModificationException\n }\n // use util tool to convert to FSList\n doc.setTokenList(Utils.fromCollectionToFSList(jcas, token_collection));\n doc.addToIndexes(jcas);\n\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n }\n }", "public static String compareFreq(double fileFreq)\n\t{\n\t\tfor(int i = 0; i <= 8; i++)\n\t\t{\n\t\t\tif(fileFreq <= 1.025 * constantTones[11] * (Math.pow(2,i)) )\n\t\t\t{\n\t\t\t\t//If the note appears to be in this octave, the program attempts to determine the note\n\t\t\t\tfor(int j = 0; j < constantTones.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(fileFreq <= (1.025 * constantTones[j] * (Math.pow(2,i)) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tnum = 0;\n\t\t\t\t\t\tString note = findNoteValue(j);\n\t\t\t\t\t\tnum = (i*7) + num;\n\n\t\t\t\t\t\tSystem.out.println(num + \", Octave = \" + i);\n\t\t\t\t\t\tString fullNote = note + i;\n\t\t\t\t\t\treturn fullNote;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn \"Invalid\";\n\t}", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "private int[] readCharacterFrequency(BitInputStream in) throws IOException {\r\n int[] freq = new int[n];\r\n for(int i = 0; i < n; i++){\r\n freq[i] = in.readInt();\r\n }\r\n return freq;\r\n }", "private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }", "private void update(String person){\n\n\t\tint index = myWords.indexOf(person);\n\t\tif(index == -1){\n\t\t\tmyWords.add(person);\n\t\t\tmyFreqs.add(1);\n\t\t}\n\t\telse{\n\t\t\tint value = myFreqs.get(index);\n\t\t\tmyFreqs.set(index,value+1);\n\t\t}\n\t}", "public ComputeTermFrequencies() { super(); }", "public Integer eliminateWordByFreq(Integer frequency) {\r\n\r\n\t\tInteger eliminateCount = 0;\r\n\r\n\t\tfor (String word : vocabulary.keySet().toArray(\r\n\t\t\t\tnew String[vocabulary.keySet().size()])) {\r\n\t\t\tif (vocabulary.get(word) < frequency) {\r\n\t\t\t\tvocabulary.remove(word);\r\n\t\t\t\tspamVocab.remove(word);\r\n\t\t\t\tnotSpamVocab.remove(word);\r\n\t\t\t\teliminateCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn eliminateCount;\r\n\t}", "public static Frequency parse(String line) {\n\n double value = -1;\n Unit unit = null;\n Frequency freq = null;\n\n try {\n Scanner s = new Scanner(line);\n s.useDelimiter(\"[\\\\p{Lower}\\\\p{Upper}\\\\p{javaWhitespace}]\");\n\n value = s.nextDouble();\n\n s.reset();\n s.useDelimiter(\"[\\\\p{Digit}\\\\p{Punct}\\\\p{javaWhitespace}]\");\n\n long multiplier = Unit.HZ.getMagnitude();\n String unitString = \"\";\n\n if(s.hasNext()) {\n unitString = s.next();\n unit = Unit.parse(unitString);\n multiplier = unit.getMagnitude();\n }\n\n if(s.hasNext()) {\n throw new IllegalArgumentException(\n String.format(\"Invalid Frequency Format: %s\", line));\n }\n\n freq = new Frequency((long)(value * multiplier), unit);\n freq.originalString = line;\n }\n catch(Exception e) {\n throw new IllegalArgumentException(\"Error parsing: \" + line);\n }\n\n return freq;\n }", "@Override\n\t public float sloppyFreq(int distance) {\n\t //return 1.0f / (distance + 1);\n\t\t return 1.0f;\n\t }", "public void countWords(String path) {\n\t\n//\t\tdeclaration and initialization\n\t\tFile file = new File(path);\n\t\tString str = \"\",word = \"\";\n\t\tBufferedReader br;\n\t\tint counter = 1;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t\t\n//\t\t\tReads the file lines until eof\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tword = word.concat(str);\n\t\t\t}\n\t\t\t\n//\t\t\tReplace both comma and dot with whitespace\n\t\t\tword = word.replace(',',' ');\n\t\t\tword = word.replace('.',' ');\n\t\t\t\n//\t\t\tSplit the string using space\n\t\t\tString[] words = word.split(\"\\\\s+\");\n\t\n//\t\t\tCompare the words and if they are same words increase the counter\n\t\t\tfor (int i = 0; i < words.length; i++){\n\t\t\t\tfor(int j = i+1; j < words.length; j++){\n\t\t\t\t\tif(words[i] != null && words[i].equals(words[j]) ){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\twords[j] = null; //replace the repeated word with null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tdisplays the count of the words\n\t\t\t\tif(words[i] != null)\n\t\t\t\tSystem.out.println(words[i]+\": \"+counter);\n\t\t\t\tcounter = 1;\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception\");\n\t\t}\n\t}", "public void countWords(String source) {\n Scanner wordScanner = new Scanner(source);\n// wordScanner.useDelimiter(\"[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n }", "public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{\n\t\t//read File\n\t\t// go to letters directory\n\t\tString seriesLetterFolder = lettersInputFolder + File.separator + \"letters\";\n\t\tFile directory = new File(seriesLetterFolder); \n\t\tfileNames = directory.listFiles(new FileFilter() {\n\t\t @Override\n\t\t public boolean accept(File pathname) {\n\t\t String name = pathname.getName().toLowerCase();\n\t\t return name.endsWith(\".csv\") && pathname.isFile();\n\t\t }\n\t\t});\n\t\tfor (int i = 0; i < fileNames.length; i++) {\n\t\t\t\n\t\t\t// Overall structure is as follows:\n\t\t\t// On each row, for each word - we have a Map of String and List<Double> indicating a word\n\t\t\t// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.\n\t\t\t// the size of the list is 20. Eventually the global dictionary will be a List of such lists.\n\t\t\t// in case of sample data, the global dictionary is of 60 lists.\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(fileNames[i]));\n\t\t\t\n\t\t\t\n\t\t\t// for each document\n\t\t\tList<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>(); \n\t\t\t\n\t\t\tMap<String,List<Double>> wordMap = null; //per row \n\t\t\twhile(in.ready()) {\n\t\t\t\twordMap = new HashMap<String, List<Double>>(); //per rows\n\t\t\t\tString series = in.readLine();\n\t\t\t\tString letters[]= series.split(\",\");\n\t\t\t\tInteger lastLocationForRef = -1; // for padding\n\t\t\t\tdouble totalWordCountPerDocument = 0.0; \n\t\t\t\tfor (int curLineCharLocation = 0; curLineCharLocation < letters.length\n\t\t\t\t\t\t- wordLength + 1; curLineCharLocation = curLineCharLocation\n\t\t\t\t\t\t+ shiftLength) {\n\t\t\t\t\t// this for loop runs on each line and curLineCharLocation\n\t\t\t\t\t// indicates the current pointer\n\t\t\t\t\t// from which we should be forming the word\n\t\t\t\t\t// extract a word and move the shift length\n\t\t\t\t\tString currentWord = \"\";\n\t\t\t\t\tfor (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength\n\t\t\t\t\t\t\t+ curLineCharLocation; currentWordLocation++) {\n\t\t\t\t\t\t// this inner for loop denotes the current word to be\n\t\t\t\t\t\t// created\n\t\t\t\t\t\tcurrentWord = currentWord\n\t\t\t\t\t\t\t\t+ letters[currentWordLocation];\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, currentWord);\n\t\t\t\t\tlastLocationForRef = curLineCharLocation + shiftLength;\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t\t\t\t}\n\t\t\t\t// check to see if we have any leftover strings. If yes then pad that word using\n\t\t\t\t// the last character pointed by lastLocationForRef\n\t\t\t\tInteger difference = letters.length - lastLocationForRef;\n\t\t\t\tif (difference > 0) {\n\t\t\t\t\tString paddedWord = \"\";\n\t\t\t\t\tInteger extraPaddingSize = wordLength - difference;\n\t\t\t\t\twhile (difference > 0) {\n\t\t\t\t\t\t// this while loop will simply create the padded word \n\t\t\t\t\t\t// to be appended at the end\n\t\t\t\t\t\tpaddedWord = paddedWord + letters[lastLocationForRef];\n\t\t\t\t\t\tdifference = difference - 1;\n\t\t\t\t\t\tlastLocationForRef = lastLocationForRef + 1; //advance to next location\n\t\t\t\t\t}\n\t\t\t\t\twhile(extraPaddingSize > 0) {\n\t\t\t\t\t\t paddedWord = paddedWord + letters[lastLocationForRef-1];\n\t\t extraPaddingSize = extraPaddingSize - 1;\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, paddedWord);\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t }\n\t\t\t\twordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq\n\t\t\t\tmapPerGestureFile.add(wordMap);\t\t\t\t\n\t\t\t}\n\t\t\tgetTfMapArrayIDF().add(mapPerGestureFile);\n\t\t\t//count idf2 per document\n\t\t\tinitIDF2Map(mapPerGestureFile);\n\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\t\n\t\t//populate global map for IDF values List<LIst<Map>\n\t\t initIDFMap(getTfMapArrayIDF());\n\t\t //Generate IDF Files from Global Map * TF Values\n\t\t calculateIDFValues();\n\t\t //Generate IDF2 Files\n\t\t calculateIDF2Values();\n\t\t //normalize tfidf and tfidf2\n\t\t normalizeDictionary(); \n\t\t createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);\n\t}", "public void parseWord(String line){\r\n String[] tokens = line.split(\"\\\\t|/|<|>|\\\\?|=%3C|%3E|=%3C|&=%3C|&|=| \");\r\n// for(String word: tokens){\r\n//\r\n// keys.add(word);\r\n// }\r\n int n = tokens.length-2;//to ignore the the word GET from the string.\r\n if(n>0){\r\n for(int i=1;i<n;i++){\r\n if(!tokens[i].equals(\"\")){\r\n this.keys.add(tokens[i]);\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "public long getFreq() {\n return freq;\n }", "public Verbum getWord(String pos, char freqLevel){\r\n\t\t// Pick random starting point in the linked list\r\n\t\tint start = (int)(Math.random() * words.size());\r\n\t\tDSElement<Verbum> w = words.first;\r\n\t\tfor(int i = 0; i < start; i++)\r\n\t\t\tw = w.getNext();\r\n\t\tchar freq; \r\n\t\t//char freqLevel = 'B'; //Anything ABOVE this char will be used\r\n\t\t/* Frequency:\r\n\t\t * A full column or more, more than 50 citations - very frequent\r\n\t\t * B half column, more than 20 citations - frequent\r\n\t\t * C more then 5 citations - common\r\n\t\t * D 4-5 citations - lesser\r\n\t\t * E 2-3 citations - uncommon\r\n\t\t * F only 1 citation - very rare\r\n\t\t */\r\n\t\tint count = words.size()*100; // failsafe counter\r\n\t\twhile(count > 0){\r\n\t\t\tif(w.getItem().attribs.length()>3)\r\n\t\t\t\tfreq = w.getItem().attribs.charAt(3);\r\n\t\t\telse \r\n\t\t\t\tfreq = 'E'; // If missing feq data, just put very low - i.e. normally not called\r\n\t\t\t//Names are not allowed to be retrieved here\r\n\t\t\tif(w.getItem().pos.equals(pos) && freq < freqLevel && Character.isLowerCase(w.getItem().form1.charAt(0)))\r\n\t\t\t\treturn w.getItem();\r\n\t\t\tw = w.getNext();\r\n\t\t\tif(w == null)\r\n\t\t\t\tw = words.first;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\tw.setItem(new Verbum());\r\n\t\tw.getItem().form1 = \"inrepertum\";\r\n\t\tw.getItem().cw.item = \"inrepertum\";\r\n\t\t//w.getItem().form1 = w.getItem().form1 + \" BAD\";\r\n\t\treturn w.getItem(); // Failsafe word\r\n\t}", "com.google.protobuf.ByteString\n getFrequencyBytes();", "public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "static void solution1Day1Part2() {\n\n Scanner file = null;\n Set<Integer> resultingFrequencies = new HashSet<>();\n int resultingFrequency = 0;\n int change = 0;\n boolean duplicateFound = false;\n\n try {\n while (!duplicateFound) {\n\n file = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n\n while (file.hasNext()) {\n //System.out.println(\"\\nCurrent frequency is: \" + resultingFrequency);\n change = file.nextInt();\n resultingFrequency += change;\n //System.out.println(\"Change of: \" + change);\n //System.out.println(\"Resulting frequency is: \" + resultingFrequency);\n\n if (resultingFrequencies.contains(resultingFrequency)) {\n System.out.println(\"\\nDay1 Part2 - The first duplicate resulting frequency is: \" + resultingFrequency);\n duplicateFound = true;\n break;\n }\n resultingFrequencies.add(resultingFrequency);\n }\n file.close();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public void test() throws IOException, SQLException\r\n\t{\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(\"src/result.txt\")));\r\n\t\tList<String> sents = new ArrayList<>();\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"src/test_tmp_col.txt\")));\r\n\t\tString line = \"\";\r\n\t\tString wordseq = \"\";\r\n\t\tList<List<String>> tokens_list = new ArrayList<>();\r\n\t\tList<String> tokens = new ArrayList<>();\r\n\t\twhile((line=br.readLine())!=null)\r\n\t\t{\r\n\t\t\tif(line.trim().length()==0)\r\n\t\t\t{\r\n\t\t\t\tsents.add(wordseq);\r\n\t\t\t\ttokens_list.add(tokens);\r\n\t\t\t\twordseq = \"\";\r\n\t\t\t\ttokens = new ArrayList<>();\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tString word = line.split(\"#\")[0];\r\n\t\t\t\twordseq += word;\r\n\t\t\t\ttokens.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tfor(String sent : sents)\r\n\t\t{\r\n\t\t\tString newsURL = null;\r\n\t\t\tString imgAddress = null;\r\n\t\t\tString newsID = null;\r\n\t\t\tString saveTime = null;\r\n\t\t\tString newsTitle = null;\r\n\t\t\tString placeEntity = null;\r\n\t\t\tboolean isSummary = false;\r\n\t\t\tPair<String, LabelItem> result = extractbysentence(newsURL, imgAddress, newsID, saveTime, newsTitle, sent, placeEntity, isSummary);\r\n\t\t\t\r\n\t\t\tif(result!=null)\r\n\t\t\t{\r\n\t\t\t\r\n//\t\t\t\tSystem.out.print(result.getSecond().eventType+\"\\n\");\r\n\t\t\t\tbw.write(sent+'\\t'+result.getSecond().triggerWord+\"\\t\"+result.getSecond().sourceActor+'\\t'+result.getSecond().targetActor+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tbw.write(sent+'\\n');\r\n\t\t\t}\r\n\t\t}\r\n\t\tbw.close();\r\n\t\t\r\n\t}", "public void process(int length) {\n\t\t//the result HashMap contains the word and its parts\n\t\tHashMap<String, List<String>> result = new HashMap<>();\n\t\t// retrieve a list of all tokens with the given length from the dictionary\n\t\tList<String> wordsToProcess = getDict().getWordsByLength(length);\n\t\t\n\t\t// if not empty, process it\n\t\tif (!wordsToProcess.isEmpty()) {\n\t\t\tfor (String word : wordsToProcess) {\n\t\t\t\tfor (int cut = 1; cut < length - 1; cut++) {\n\t\t\t\t\tString firstWord = word.substring(0, cut);\n\t\t\t\t\tString secondWord = word.substring(cut);\n\n\t\t\t\t\tif (dict.contains(firstWord) && dict.contains(secondWord)) {\n\t\t\t\t\t\t// if we find a match, we add it to the results\n\t\t\t\t\t\tList<String> parts = new LinkedList<String>();\n\t\t\t\t\t\tparts.add(firstWord);\n\t\t\t\t\t\tparts.add(secondWord);\n\t\t\t\t\t\tresult.put(word, parts);\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\t\n\t\t// result list is returned and can be used for further processing\n\t\tsetConcatWords(result);\n\t}", "private double calIDF(String key) throws IOException {\n\t\tList<String> in = FileHelper.readFile(Constants.inputpath);\r\n\t\tint doccount=0;\r\n\t\tfor(String line:in){\r\n\t\t\tString[] l = line.split(\" \");\r\n\t\t\tfor(String word:l){\r\n\t\t\t\tif (word.equals(key)){\r\n\t\t\t\t\tdoccount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble idf=Math.log((double)in.size()/doccount);\r\n\t\treturn idf;\r\n\t}" ]
[ "0.6660851", "0.6526449", "0.6487698", "0.6331058", "0.6266808", "0.6166304", "0.61340386", "0.60867524", "0.6007972", "0.59859776", "0.59797776", "0.59738183", "0.59529984", "0.59246594", "0.5910016", "0.58946484", "0.5877805", "0.5873582", "0.5870827", "0.5870083", "0.58426", "0.5812393", "0.5806069", "0.5803602", "0.57969457", "0.5776476", "0.5776087", "0.57610554", "0.5750598", "0.5723641", "0.57226026", "0.5705626", "0.57024205", "0.5679662", "0.5666438", "0.5663644", "0.56458193", "0.5636193", "0.5620152", "0.5611397", "0.5602856", "0.5558928", "0.55587184", "0.5550125", "0.55493927", "0.55334467", "0.5526623", "0.55261457", "0.5513163", "0.55130297", "0.55129355", "0.55119425", "0.550486", "0.54874206", "0.54838943", "0.5477804", "0.54761475", "0.5471203", "0.5461035", "0.54569256", "0.5453376", "0.5451065", "0.54476404", "0.5445942", "0.5443043", "0.544296", "0.5440703", "0.5436096", "0.5429994", "0.5416791", "0.5414583", "0.53935367", "0.53900087", "0.5384462", "0.537556", "0.5363023", "0.5360199", "0.53575015", "0.5355632", "0.53510535", "0.5346266", "0.53452635", "0.5337094", "0.53319263", "0.5329368", "0.53077406", "0.5306576", "0.53060716", "0.53051275", "0.53029525", "0.530141", "0.52941614", "0.5293038", "0.529116", "0.52908903", "0.5290593", "0.52800506", "0.52795196", "0.5279337", "0.52768", "0.52714264" ]
0.0
-1
Gets a list of lowercase, nonempty words from the text file it is being fed
private static List<String> getWordList(File feedFile) throws IOException { final List<String> words = new ArrayList<>(); final BufferedReader textReader = new BufferedReader(new FileReader(feedFile)); textReader.lines() .forEach(lines -> words.addAll(Arrays.asList(lines.split("[" + SPLIT_WORDS_AT_CHARS + "]")))); // Adds every word of every line to the words list textReader.close(); return words.stream() .map(String::toLowerCase) .filter(word -> !word.equals("")) // Filters out empty strings .map(String::trim) .collect(Collectors.toList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<String> parseDocument(Path file) throws IOException {\n List<String> words = new ArrayList<>();\n try (BufferedReader br = Files.newBufferedReader(file)) {\n String line;\n while ((line = br.readLine()) != null) {\n char[] characters = line.trim().toCharArray();\n int startPosition = -1;\n for (int i = 0; i < characters.length; i++) {\n char c = characters[i];\n if (!Character.isAlphabetic(c)) {\n if (startPosition == -1) {\n continue;\n }\n words.add(new String(characters, startPosition, i - startPosition).toLowerCase());\n startPosition = -1;\n } else if (Character.isAlphabetic(c) && startPosition == -1) {\n startPosition = i;\n }\n }\n if (startPosition != -1) {\n words.add(new String(characters, startPosition, characters.length - startPosition).toLowerCase());\n }\n }\n }\n return words;\n }", "public String[] FetchWordsFrom(File file){\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t \tScanner scnr = null;\r\n\t\ttry {\r\n\t\t\tscnr = new Scanner(file);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t \tString s=\"\";\r\n\t \twhile(scnr.hasNextLine()){\r\n\t \t\tsb.append(scnr.nextLine());\r\n\t \t\tsb.append(\" \");\r\n\t \t\ts=sb.toString();\r\n\t \t}\r\n\tString[] words = s.split(\" \");\r\n\tscnr.close();\r\n\treturn words;\r\n\t}", "private List<String> readStopFile(File stopFile) throws FileNotFoundException {\n\n Scanner scanner = new Scanner(stopFile);\n List<String> words;\n words = new ArrayList<>();\n String temp;\n\n while (scanner.hasNextLine()) {\n temp = scanner.nextLine();\n words.add(temp.toLowerCase());\n }\n\n return words;\n }", "public ArrayList<String> getTerms () throws FileNotFoundException {\n String inputFile = getInputFile();\r\n Scanner scanner = new Scanner (new File (inputFile));\r\n ArrayList<String> terms = new ArrayList<String>();\r\n ArrayList<String> definitions = new ArrayList<String>();\r\n while (scanner.hasNextLine()) {\r\n terms.add(scanner.nextLine()); //took out .toLowerCase() part so it prints correctly \r\n definitions.add(scanner.nextLine());\r\n }\r\n return terms;\r\n }", "public List<String> spellCheck(String fileName) {\r\n List<String> list = new LinkedList<String>();\r\n\r\n Scanner fileScanner;\r\n\r\n try {\r\n // use a FileInputStream to ensure correct reading end-of-file\r\n fileScanner = new Scanner(new FileInputStream(\"data\" + File.separator +fileName));\r\n\r\n while (fileScanner.hasNextLine()) {\r\n String nextLine = fileScanner.nextLine();\r\n // System.out.println(\"nextLine: \" + nextLine); uncomment if you want to see what is read in\r\n String [] words = nextLine.split(\" \");\r\n\r\n for(int i = 0; i < words.length; i++)\r\n {\r\n if(words[i].length() > 0 && !contains(words[i]))\r\n {\r\n list.add(words[i]);\r\n }\r\n }\r\n }\r\n\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"could not find the file \" +fileName+ \"in the data directory!\");\r\n return null;\r\n }\r\n\r\n return list;\r\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "private void exercise6() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted()\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public static ArrayList<String> readWords(String fileName){\n\t\treturn read(fileName, true);\n\t}", "public ArrayList <String> loadWordList () {\n ArrayList <String> words = new ArrayList <String> ();\n File file;\n if (chooser.showOpenDialog (null) == JFileChooser.APPROVE_OPTION) {\n file = chooser.getSelectedFile ();\n } else {\n return words;\n }\n if (file != null) {\n try {\n FileReader fileReader = new FileReader (file);\n BufferedReader buffer = new BufferedReader (fileReader);\n String temp;\n while ((temp = buffer.readLine ()) != null)\n words.add (temp);\n buffer.close ();\n return words;\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n return words;\n }", "public List<String> readFile(File spamFile) throws FileNotFoundException {\n\n Scanner scanner = new Scanner(spamFile);\n List<String> words;\n words = new ArrayList<>();\n List<String> temp;\n List<String> tempStr;\n while (scanner.hasNextLine()) \n {\n temp = Arrays.asList(scanner.nextLine().split(\"[ :@,.-]\"));\n for (String t : temp) \n {\n t = t.toLowerCase();\n if (!t.matches(\"[a-z']+\") || (stopListEnable && stopWords.contains(t))) \n {\n continue;\n } \n else \n {\n words.add(t);\n }\n }\n }\n\n return words;\n }", "public ArrayList<String> readTokens(String fileName) {\n Scanner sc1, sc2;\n ArrayList<String> wordList = new ArrayList<String>();\n\n try {\n sc1 = new Scanner(new File(fileName));\n\n while (sc1.hasNextLine()) {\n sc2 = new Scanner(sc1.nextLine());\n\n while (sc2.hasNext()) {\n String strWord = sc2.next().replaceAll(\"\\\\W\", \"\").toLowerCase();\n wordList.add(strWord);\n }\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n\n return wordList;\n }", "private static void list() throws FileNotFoundException {\n ArrayList<String> words = new ArrayList<>();\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!words.contains(word)) {\n words.add(word);\n }\n }\n }", "List<String> fileToListOfWords(File f) throws FileNotFoundException {\n\n\t\tScanner sc = new Scanner(f, \"UTF-8\");\n\n\t\tString txt = sc.useDelimiter(\"\\\\A\").next().toLowerCase();\n\t\tString[] s = txt.replaceAll(\"^[.,\\\\s]+\", \"\").split(\"[.,\\\\s]+\");\n\t\tsc.close(); // ovo je dobro\n\t\tList<String> list = Arrays.asList(s);\n\t\t\n\t\treturn list;\n\t}", "public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }", "public ArrayList<String> readWords(String fileName) {\n BufferedReader r = null;\n\n try {\n r = new BufferedReader(new InputStreamReader(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n words = new ArrayList<String>();\n\n while (true) {\n String word = null;\n try {\n word = r.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (word == null) {\n break;\n }\n assert word.length() == 5;\n words.add(word);\n }\n\n return words;\n }", "public List<String> getFromFile(String file) throws FileNotFoundException {\n\t\tScanner scan = new Scanner(new File(file));\n\t\tList<String> words = new ArrayList<String>();\n\t\twhile(scan.hasNextLine()){\n\t \tString line = scan.nextLine();\n\t \n\t \twords.add(line);\n\t }\n\t\treturn words;\n\t}", "private void setWords() {\r\n words = new ArrayList<>();\r\n\r\n String line = null;\r\n try {\r\n // FileReader reads text files in the default encoding.\r\n FileReader fileReader = new FileReader(\"words.txt\");\r\n\r\n // Always wrap FileReader in BufferedReader.\r\n BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\r\n while((line = bufferedReader.readLine()) != null)\r\n words.add(line);\r\n\r\n // Always close files.\r\n bufferedReader.close();\r\n }\r\n catch(Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Unable to open file '\");\r\n }\r\n }", "public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}", "public ArrayList<String> getDefinitions () throws FileNotFoundException {\n String inputFile = getInputFile();\r\n Scanner scanner = new Scanner (new File (inputFile));\r\n ArrayList<String> terms = new ArrayList<String>();\r\n ArrayList<String> definitions = new ArrayList<String>();\r\n while (scanner.hasNextLine()) {\r\n terms.add(scanner.nextLine()); //took out .toLowerCase()\r\n definitions.add(scanner.nextLine());\r\n }\r\n return definitions;\r\n }", "public static List<String> GetWordsOnly(String pathToAnnFile) throws FileNotFoundException {\r\n\r\n\r\n List<String> originalList = GetFullAnnotations(pathToAnnFile);\r\n List<String> finalList = new ArrayList<>();\r\n\r\n for (String anno : originalList) {\r\n String[] split_anno = anno.split(\"\\t\"); // split each line\r\n String annoWord = split_anno[2]; // extract word\r\n finalList.add(annoWord); // append word to list\r\n }\r\n return finalList;\r\n }", "private static Set<String> readFromFile(String fileName)\n\t{\n\t\tSet<String> words = new HashSet<String> ();\n\t\ttry \n\t\t{\n\t\t\tScanner scanner = new Scanner(new File(fileName));\n\t\t\twhile (scanner.hasNext())\n\t\t\t{\n\t\t\t\tString word = scanner.nextLine();\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\treturn words;\n\t\t}\n\t\treturn words;\n\t}", "public static String[] loadword(File file) throws FileNotFoundException {\r\n System.out.println(\"loading file\");\r\n Scanner scan = new Scanner(file); // create a scanner to scanner the message in the given file\r\n String[] message = new String[totalWord(file)]; // create array to store words\r\n String word;\r\n for (int i = 0; i < message.length; ) // start scan from beginning\r\n {\r\n word = scan.next().toLowerCase(); // change all letters in the word into lower case\r\n if (isWord(word)) // check the content is a word or not if is store it if not skip it\r\n {\r\n message[i] = removeNonWord(word); // remove the character that is not English letter and not '-'\r\n i++;\r\n }\r\n }\r\n return message;\r\n }", "public static String[] readFile() throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(new File(\"H:/My Documents/Eclipse/wordlist.txt\"));\r\n\t\tArrayList<String> a = new ArrayList<String>();\r\n\t\twhile (scan.hasNextLine()) {\r\n\t\t\ta.add(scan.nextLine());\r\n\t\t}\r\n\t\tString[] w = new String[a.size()];\r\n\t\tfor (int i = 0; i < a.size(); i++) {\r\n\t\t\tw[i] = a.get(i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t\treturn w;\r\n\t}", "private ArrayList<String> load(String fileName, String initialWord)\n\t{\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\ttry{\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\t\tString word = reader.readLine();\n\t\t\twhile(word != null){\n\t\t\tif(word.length()==initialWord.length())\n\t\t\t\twords.add(word);\n\t\t\tword = reader.readLine();\n\t\t\t}\n\t\t\treader.close();\n\t\t}catch(IOException e){\n\t\t\tSystem.err.println(\"Can't find a file '\"+fileName+\"'!\");\n\t\t\tJOptionPane.showMessageDialog(null,\"Can't find a file '\"+fileName+\"'!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\treturn words;\n\t}", "public Set<String> loadWords(final String filePath, final String delimiter) {\n\t\tSet<String> keywords = new HashSet<>();\n\t\tFile file = new File(filePath);\n\t\tScanner scanner = null;\n\t\ttry {\n\t\t\tscanner = new Scanner(file);\n\t\t\tscanner.useDelimiter(\",\");\n\t\t\twhile (scanner.hasNext()) {\n\t\t\t\tkeywords.add(scanner.next().toLowerCase());\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tscanner.close();\n\t\t}\n\t\treturn keywords;\n\t}", "public ArrayList<String> getInputByWords(Class c, String file){\n this.resourceName = file;\n input = new ArrayList<String>();\n headerLine = new String();\n getFileAsResourceSpaceDelineated(c);\n return this.input;\n }", "private void loadDictWords(String dictFile) {\n try {\n BufferedReader reader = new BufferedReader(new FileReader(dictFile));\n\n String word = reader.readLine();\n while (word != null) {\n word = word.trim().toLowerCase();\n wordsList.add(word);\n\n word = reader.readLine();\n }\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Cannot find dictionary file at location: \" + dictFile);\n } catch (IOException e) {\n System.out.println(\"Error: Failed to open and read dictionary file at location: \" + dictFile);\n }\n }", "public static void main(String[] args) throws FileNotFoundException{\n Scanner scnr = new Scanner(new File(\"words.txt\"));\r\n //Declare the ArrayList to store words\r\n ArrayList<String> words = new ArrayList<String>();\r\n \r\n //Read from file and store elements in the ArrayList\r\n //while(scnr.hasNext()) File is too large and will take time\r\n for(int i = 0; i < 2000; i++){\r\n words.add(scnr.next());\r\n }\r\n // Task1: Display the ArrayList\r\n System.out.println(words); //toString() of the ArrayList\r\n \r\n // Task 2: Display words in reverse order\r\n displayReverse(words);\r\n \r\n // Task 3: Display words ending with \"s\" capitalized\r\n displayPlurals(words);\r\n \r\n // Task 4: Remove words ending with \"s\"\r\n removePlurals(words);\r\n System.out.println(words);\r\n \r\n }", "private String[] readStopwords(String filepath) {\n // Get filepath\n Path path = Paths.get(filepath);\n\n // Array to hold each stopword\n ArrayList<String> words = new ArrayList<>();\n\n // Read file at that path\n try {\n Files.readAllLines(path).forEach(word -> {\n // Add each stopword\n words.add(word);\n });\n } catch (IOException e) {\n System.out.println(\"No stopwords list found.\");\n System.exit(1);\n }\n\n // Cast to String array and return\n String[] wordsArray = new String[words.size()];\n wordsArray = words.toArray(wordsArray);\n return wordsArray;\n }", "private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public static ArrayList<String> getWords(String input) {\r\n ArrayList<String> w = new ArrayList<String>();\r\n input = input.toLowerCase();\r\n String[] words = input.split(\"\\\\s+\");\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = words[i].replaceAll(\"[^\\\\w]\", \"\");\r\n }\r\n for(String elem: words) {\r\n w.add(elem);\r\n }\r\n return w;\r\n }", "public void loadExemptWords(String fname) {\n\t\ttry {\n\t\t\tBufferedReader wordsReader = new BufferedReader(new FileReader(fname));\n\t \n\t\t\tfor ( ; ; ) {\n\t\t\t\tString line = wordsReader.readLine();\n\t\n\t\t\t\tif (line == null) {\n\t\t\t\t\twordsReader.close();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t\t\telse {\n\t\t\t\t\tString[] parts = line.split(\" \");\n\t\t\t\t\tstopWords.add(parts[0]);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t} catch (Exception e) {\n\t \t LOGGER.warning(e.getMessage());\n\t\t}\n\t}", "public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }", "public static ArrayList<String> readBook(String filename)\n throws FileNotFoundException {\n ArrayList<String> words = new ArrayList<>();\n Scanner in = new Scanner(new File(filename));\n while (in.hasNext()) {\n words.add(in.next());\n }\n return words;\n }", "public static ArrayList<String> convert2listWithoutDuplicate(String filename) \n\t\t\tthrows FileNotFoundException{\n\t\t\n\t\tInputStream oeuvre = new FileInputStream(filename);\n\t\tScanner scanner = new Scanner(oeuvre).useDelimiter(\"\\n\");\n\t\t\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\tString word = null;\n\t\twhile(scanner.hasNext()){\n\t\t\tword = scanner.next();\n\t\t\tif (!(words.contains(word))){\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn words;\n\t}", "public static void main(String[] args) {\r\n int argc = args.length;\r\n\r\n // Given only the words file\r\n if(argc == 2 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i'){\r\n String fileName = args[1];\r\n int size = 1;\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size) size = arrOfStr[i].length();\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n if(wordList.size() > size) size = wordList.size();\r\n char[][] wordSoup = wsGen( wordList, size + 2);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n\r\n // Given all args\r\n if(argc == 4 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i' && args[2].charAt(0) == '-' && args[2].charAt(1) == 's'){\r\n String fileName = args[1];\r\n int size = Integer.parseInt(args[3]);\r\n // Check max size\r\n if(size > 40){\r\n System.out.print(\"Max size 40\");\r\n return;\r\n }\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size){\r\n System.out.println(\"At least one word given doesn't fit in the size provided.\");\r\n return;\r\n }\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n char[][] wordSoup = wsGen( wordList, size);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n // Help message\r\n System.out.println(\"usage: -i file # gives file with word soup words\");\r\n System.out.println(\" -s size # gives size for the word soup\");\r\n return;\r\n }", "public List<String> readFile(File inputFile) {\n\n List<String> AL = new ArrayList<>();\n List<String> retAL;\n wordReplace wr = new wordReplace();\n String text;\n try{\n Scanner file_scan = new Scanner(inputFile);\n while(file_scan.hasNextLine()){\n text= file_scan.nextLine();\n AL.add(text);\n }\n file_scan.close();\n }\n catch(IOException e){\n System.out.println(\"File Not Found for some reason.\");\n }\n retAL = wr.replaceWord((ArrayList<String>) AL);\n return retAL;\n }", "public static final String[] toLowerCaseWordArray(String text) {\r\n StringTokenizer tokens = new StringTokenizer(text, \" ,\\r\\n.:/\\\\+\");\r\n String[] words = new String[tokens.countTokens()];\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = tokens.nextToken().toLowerCase();\r\n }\r\n return words;\r\n }", "public static List<String> getPalindromes(File f) throws IOException\n {\n //FileReader constructor throws FileNotFoundException (IOException)\n BufferedReader br = new BufferedReader(new FileReader(f));\n List<String> strings = new ArrayList<String>();\n String s;\n while ((s=br.readLine())!=null)\n {\n strings.add(s.toLowerCase());\n }\n\n br.close();\n return getPalindromes(strings);\n }", "public static void loadFile(String inputFile, ArrayList<String> array) {\n String line = \"\";\n String[] words;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(inputFile));\n System.out.println(\"\\nFile found\");\n System.out.println(\"Loading file... \\\"CorrectMe\\\"\");\n while ((line = reader.readLine()) != null) {\n line = line.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n words = line.split(\" \");\n for (int i = 0; i < words.length; i++)\n array.add(words[i]);\n }\n reader.close();\n } catch (IOException ex) {\n System.out.println(\"File not found\");\n }\n }", "private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}", "public static ArrayList<String> convert2list(String filename) \n\t\t\tthrows FileNotFoundException{\n\t\tInputStream oeuvre = new FileInputStream(filename);\n\t\tScanner scanner = new Scanner(oeuvre).useDelimiter(\"\\n\");\n\t\t\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\twhile(scanner.hasNext()){\n\t\t\twords.add(scanner.next());\n\t\t}\n\t\treturn words;\n\t}", "public static void findWords(String target) throws FileNotFoundException{\n //reads file through the scanner\n scan = new Scanner(newFile);\n \n //creates new arraylist \n ArrayList<String> list = new ArrayList<String>();\n int count;\n while(scan.hasNextLine()){\n word = scan.nextLine();\n if(contains(target, word)){\n list.add(word.toLowerCase());\n }\n }\n\n int length = target.length();\n\n for(int i = length; i >= 2; i--){\n count = 0;\n System.out.println(i + \" letter words made by unscrambling the letters in \" + target );\n \n //This loop goes through all the strings in the arraylist of words contained\n //in the target word\n for(String a : list){\n //If the length of word in the arraylist is equal to i it prints the \n //word, as long as the line does not go over 40 characters\n if(a.length() == i) {\n if(count > (40 -a.length())){ \n System.out.print(\"\\n\");\n System.out.print(a + \" \");\n count = 0;\n count += (a.length() + 1);\n }\n else{\n System.out.print(a + \" \");\n count += (a.length() + 1);\n }\n }\n\n }\n //decrements length, and continues going through the loop\n length--;\n System.out.println(\"\\n\");\n }\n }", "public Set<String> getStopWords() throws Exception{\n\tFile file = new File(\"stopWords/stopwords.txt\");\n\tHashSet<String> stopwords = new HashSet<>();\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\tString line;\n\twhile((line=br.readLine())!=null){\n\t\tString[] tokens = line.split(\" \");\n\t\tfor(String token : tokens){\n\t\t\tif(!stopwords.contains(token)){\n\t\t\t\tstopwords.add(token);\n\t\t\t}\n\t\t}\n\t}\n\tbr.close();\n\treturn stopwords;\n\t}", "private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}", "public static Vector<Thought> loadWords(File f, int dimensions) {\r\n\t\t\r\n\t\tVector<Thought> ret = new Vector<Thought>();\r\n\t\t\r\n\t\tCSV csv = new CSV(f);\r\n\t\tString[] line;\r\n\t\t\r\n\t\tHashSet<String> words = new HashSet<String>();\r\n\t\t\r\n\t\twhile((line = csv.getLine()) != null) {\r\n\t\t\tString word = line[0].trim();\r\n\t\t\tword = word.replaceAll(\" ?\\\\(.*\\\\)\", \"\");\r\n\t\t\t\r\n\t\t\tif(word.indexOf(' ') != -1) {\r\n\t\t\t\t// Ignore sentences.\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tword = word.replaceAll(\"[^a-z]\", \"\");\r\n\t\t\t\t\r\n\t\t\t\t// Only add words without spaces.\r\n\t\t\t\tif(!words.contains(word)) {\r\n\t\t\t\t\twords.add(word);\r\n\t\t\t\t\t//float frequency = Float.parseFloat(line[line.length-1]);\r\n\t\t\t\t\tret.add(new Thought(word, dimensions));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}", "public void readWordList() {\n try {\n wordList = XmlStringArrayParser.parse(getAssets().open(Constant.WORDLISTFILE),\n settings.getInt(\"wordMaxLength\", 7));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public List<String> getStopWords(String path)\n\t {\n\t\t try \n\t\t {\n\t\t\t\tFileReader inputFile = new FileReader(path);\n\t\t\t\t@SuppressWarnings(\"resource\")\n\t\t\t\tBufferedReader br = new BufferedReader(inputFile);\n\n\t\t\t\tString line;\n\n\t\t\t\twhile ((line = br.readLine()) != null)\n\t\t\t\t{\n\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\t\t\t\t\twhile (tokenizer.hasMoreTokens())\n\t\t\t\t\t{\n\t\t\t\t\t\tstopWords.add(tokenizer.nextToken().trim());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t catch (Exception e)\n\t\t {\n\t\t\t\tSystem.out.println(\"Error while reading file by line:\"\n\t\t\t\t\t\t+ e.getMessage());\n\t\t } \n\t\t \n\t\t return stopWords; \n }", "private HashSet<String> buildsetofterms(String filename)\r\n\t{\r\n\t\tString readLine, terms[];\r\n HashSet<String> fileTerms = new HashSet<String>();\r\n try \r\n {\r\n BufferedReader reader = new BufferedReader(new FileReader(filename));\r\n while ((readLine = reader.readLine()) != null)\r\n {\r\n terms = (readLine.toLowerCase().replaceAll(\"[.,:;'\\\"]\", \" \").split(\" +\"));\r\n for (String term : terms)\r\n {\r\n if (term.length() > 2 && !term.equals(\"the\"))\r\n fileTerms.add(term);\r\n }\r\n }\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n return fileTerms;\r\n }", "public Set<String> getWords() {\n\t\treturn Collections.unmodifiableSet(this.invertedIndex.keySet());\n\t}", "public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }", "private Set<String> loadKeywords() throws FileNotFoundException {\n return new BufferedReader(new FileReader(KEYWORDS_FILE))\n .lines()\n .collect(Collectors.toSet());\n }", "public List<String> getStrings(String fileName) throws IOException {\n\n List<String> items = readFile (fileName);\n String text = String.join (\"\", items);\n\n return normalizeCsv (text + \" \");\n }", "public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<WordList> getAllWordLists() {\n userLogger.info(\"getting wordlists started\");\n\n // open file for reading\n InputStream inputStream = null;\n ArrayList<WordList> allWordlists = new ArrayList<>();\n\n try {\n inputStream = new FileInputStream(INPUT_DIRECTORY + filePath);\n Workbook wb = WorkbookFactory.create(inputStream);\n Sheet sheet = wb.getSheetAt(0);\n\n int rowNum = 0;\n int colNum = 1;\n\n // read all the headers with words' Meanings\n while (sheet.getRow(rowNum).getCell(colNum) != null) {\n if (Main.CONSOLE_SHOW_FOUND_MEANINGS_IN_INPUT_FILE) {\n userLogger.debug(\"meaning found: \" + sheet.getRow(rowNum).getCell(colNum).getStringCellValue());\n }\n allWordlists.add(this.composeWordList(sheet.getRow(rowNum).getCell(colNum).getStringCellValue()));\n colNum++;\n }\n inputStream.close();\n userLogger.info(colNum + \" wordlists are composed from input file\");\n return allWordlists;\n\n } catch (IOException e) {\n userLogger.error(e.toString());\n return null;\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tList<String> arrList = new ArrayList<String>();\n\t\tString [] arr;\n\t\tFileInputStream fis= new FileInputStream(\"coverletter.txt\");\n\t\tScanner file = new Scanner(fis);\n\t\t\n\t\twhile(file.hasNextLine()){\n\t\t\tString str = file.next();\n\t\t\t// separate each words from line and add to arraylist\n\t\t\tarr=str.split(\"\\\\s+ \");\n\t\t\t\n\t\t\tCollections.addAll(arrList, arr);\n\t\t\tSystem.out.println(str);\n\t\t}\n\t\tSystem.out.println(arrList.size());\n\t\tSystem.out.println(arrList);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*for(String s: arrList){\n\t\t\tSystem.out.println(s);\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// count the words in the arraylist\n\t\t\n\t\t\n\t\t\n\n\t}", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "public static void main(String[] args) throws IOException {\n File file = new File(\"input.txt\");\n BufferedReader buffer = new BufferedReader(new FileReader(file));\n String line;\n\n while ((line = buffer.readLine()) != null) {\n line = line.trim();\n\n char[] chars = line.toCharArray();\n boolean isSpaceAdded = false;\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0, len = chars.length; i < len; i++) {\n if (Character.isLetter(chars[i])) {\n sb.append(chars[i]);\n isSpaceAdded = false;\n } else {\n if (!isSpaceAdded) {\n sb.append(\" \");\n isSpaceAdded = true;\n }\n }\n }\n System.out.println(sb.toString().trim().toLowerCase());\n }\n }", "private List<String> getInputList(BufferedReader br) throws IOException {\n\t\tArrayList<String> inputWordsList = new ArrayList<String>();\n\t\tString tempInputWord = null;\n\t\twhile ((tempInputWord = br.readLine()) != null) {\n\t\t\tinputWordsList.add(tempInputWord);\n\t\t}\n\t\treturn inputWordsList;\n\t}", "public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}", "List<T> getWord();", "private LowercaseWordList() {\n\n }", "public static ArrayList<String> adverbs() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner adverber;\n try {\n adverber = new Scanner(new File(\"Adverbs.txt\"));\n adverber.useDelimiter(\", *\");\n while (adverber.hasNext()){\n temp.add(\" \"+adverber.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "public Iterator<String> words();", "public Set<String> getWords() {\n return wordMap.keySet();\n }", "private void loadStopWords() throws FileNotFoundException, IOException{\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/stopwords/English.txt\"));\n String sWord;\n while ((sWord = reader.readLine()) != null) \n {\n stopWordList.add(sWord);\n }\n reader.close();\n }", "public static void loadData(String fileData) throws IOException\r\n\r\n\t{\r\n\t\tScanner infile1 = new Scanner(new File(fileData));\r\n\r\n\t\twhile(infile1.hasNext())\r\n\t\t{\r\n\t\t\tString name = infile1.nextLine();\r\n\r\n\t\t\tString [ ] tokens = name.split(\" \");\r\n\r\n\t\t\tfor (String s : tokens )\r\n\t\t\t{\r\n\t\t\t\tString newWord = Utility.removeSpecialCharacters(s, wordList);\r\n\r\n\t\t\t\tif(newWord.length() > 0 && !newWord.equalsIgnoreCase(\"-1\")) {\r\n\t\t\t\t\tWord words = new Word(newWord,1);\r\n\t\t\t\t\twordList.add(words);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<String> getFilteredWords() {\r\n\t\tArrayList<String> filteredWords = new ArrayList<String>(16);\r\n\t\t\r\n\t\tfor (String word : allWords) {\r\n\t\t\tif (matchesFilter(word) == true) {\r\n\t\t\t\tfilteredWords.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filteredWords;\r\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 }", "public static String getStopWords() throws IOException{\n\t\tString filepath1 = \"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/stoplist.txt\";\n\t\tPath path1 = Paths.get(filepath1);\n\t\tScanner scanner1 = new Scanner(path1);\n\t\tStringBuffer stopWords = new StringBuffer();\n\t\t\n\t\twhile (scanner1.hasNextLine()){\n\t\t\tString line = scanner1.nextLine();\n\t\t\tstopWords.append(line);\n\t\t\tstopWords.append(\"|\");\n\t } \n\t\t\n\t\tstopWords.append(\"document|discuss|identify|report|describe|predict|cite\");\n\t\tString allStopwords = stopWords.toString();\n\t\t//System.out.println(\"\"+allStopwords);\n\t\treturn allStopwords;\n\t}", "public List<Word> getWordsStartingAt(int start);", "public ArrayList<String> getWords() {\n return words;\n }", "public Set<String> loadWordsFromCSV(final String filePath) {\n\t\treturn loadWords(filePath, \",\");\n\t}", "public static void loadStopWords(String file) { \n\t\t\n\t\ttry{\n\t\t\t FileInputStream fstream = new FileInputStream(file);\n\t\t\t DataInputStream in = new DataInputStream(fstream);\n\t\t\t BufferedReader br = new BufferedReader(new InputStreamReader(in));\n\t\t\t String strLine;\n\t\t\t \n\t\t\t while ((strLine = br.readLine()) != null) {\t\t\t\t \n\t\t\t\t stop_words.add(strLine.trim());\n\t\t\t }\n\t\t\t \n\t\t\t in.close();\n\t\t\t \n\t\t\t}\n\t\t\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\t}\n\t}", "public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public List<String> lowercase(List<String> terms) {\r\n\t\tfor(String i : terms)\r\n\t\t\ti.toLowerCase();\r\n\t\treturn terms;\r\n\t}", "public void countWords(File sourceFile) throws IOException {\n Scanner wordScanner = new Scanner(sourceFile);\n// wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n wordScanner.close(); // Close underlying file.\n }", "public static void main(String[] args){\n\n\n String fileName = \"allChar.txt\";\n FileReader file;\n BufferedReader buffer;\n String input;\n\n try {\n file = new FileReader(fileName);\n buffer = new BufferedReader(file);\n\n while((input = buffer.readLine()) != null){\n\n //remove all instances of spaces\n input = input.replaceAll(\"\\\\s+\", \"\");\n\n //remove \\n and \\r\n input = input.replace(\"\\n\", \"\");\n input = input.replace(\"\\r\", \"\");\n\n\n for(String word : input.split(\"\")){\n \n System.out.println(word);\n\n }\n\n }\n\n } catch (IOException error){\n System.out.println(error);\n }\n\n\n }", "public void inputForAnalysis() throws IOException\n {\n ArrayList<String> words = new ArrayList<String>(0);\n \n File fileName = new File(\"ciphertext.txt\");\n Scanner inFile = new Scanner(fileName);\n \n int index = 0;\n while(inFile.hasNext())\n {\n words.add(inFile.next());\n index++;\n }\n inFile.close();\n analyze(words);\n }", "private static void ReadText(String path) {\n\t\t//reads the file, throws an error if there is no file to open\n\t\ttry {\n\t\t\tinput = new Scanner(new File(path));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error opening file...\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString line; //stores the string of text from the .txt file\n\t\tString parsedWord; //Stores the word of the parsed word\n\t\tint wordLength; //Stores the length of the word\n\t\tint lineNum = 1; //Stores the number of line\n\t\ttry {\n\t\t\t//loops while there is still a new line in the .txt file\n\t\t\twhile ((line = input.nextLine()) != null) {\n\t\t\t\t//separates the lines by words\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t//loops while there are still more words in the line\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tparsedWord = st.nextToken();\n\t\t\t\t\twordLength = parsedWord.length();\n\t\t\t\t\t//Regex gets rid of all punctuation\n\t\t\t\t\tif (parsedWord.matches(\".*\\\\p{Punct}\")) {\n\t\t\t\t\t\tparsedWord = parsedWord.substring(0, wordLength - 1);\n\t\t\t\t\t}\n\t\t\t\t\t//add the word to the list\n\t\t\t\t\twordList.add(parsedWord);\n\t\t\t\t\tlineList.add(lineNum);\n\t\t\t\t}\n\t\t\t\tlineNum++;\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Do nothing\n\t\t}\n\t\tinput.close();\n\t}", "public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}", "private static List<Pair<String, Integer>> splitWords(String line) {\n // This is kinda silly: we read and parse the stop words file once for each chunk, but this is the way the book\n // does it, so better stay in line with that.\n Set<String> stopWords = Arrays.stream(readFile(\"../stop_words.txt\").split(\",\")).\n collect(Collectors.toCollection(HashSet::new));\n return Arrays.stream(line.replaceAll(\"[^a-zA-Z\\\\d\\\\s]\", \" \").toLowerCase().split(\" \")).\n filter(w -> w.length() >= 2 && !stopWords.contains(w)).\n map(w -> new Pair<>(w, 1)).\n collect(Collectors.toList());\n }", "private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }", "private static ArrayList<String> getAllKeyWord(String [] lignes){\n ArrayList<String> res= new ArrayList<>();\n\n // La recherche dans le pdf\n for(String ligne : lignes){\n for(String mot : ligne.split(\" |/|-|\\\\(|\\\\)|,\")){\n\n try{\n if(mot.toLowerCase(Locale.ENGLISH).equals(\"c#\".toLowerCase(Locale.ENGLISH)))\n res.add(\"csharp\");\n else\n if(mot.toLowerCase(Locale.ENGLISH).equals(\"c++\".toLowerCase(Locale.ENGLISH)))\n res.add(\"cpp\");\n else\n if(!mot.toLowerCase(Locale.ENGLISH).matches(\"| |à|de|je|un|et|une|en|d'un|d'une|le|la|avec|:|\\\\|\"))\n res.add(mot.toLowerCase(Locale.ENGLISH));\n }catch (IllegalArgumentException e){\n //System.out.println(e.getMessage());\n continue;\n }\n }\n //System.out.println(\"line: \"+s);\n }\n return (ArrayList) res.stream().distinct().collect(Collectors.toList());\n }", "public ArrayList <String> getWordList () {\r\n return words;\r\n }", "public static void read8() {\n List<String> list = new ArrayList<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(filePath))) {\n\n //1. filter line 3\n //2. convert all content to upper case\n //3. convert it into a List\n list = stream\n .filter(line -> !line.startsWith(\"line3\"))\n .map(String::toUpperCase)\n .collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "public static String[] readAllStrings() {\n // we could use readAll.trim().split(), but that's not consistent\n // because trim() uses characters 0x00..0x20 as whitespace\n String[] tokens = WHITESPACE_PATTERN.split(readAll());\n if (tokens.length == 0 || tokens[0].length() > 0)\n return tokens;\n\n // don't include first token if it is leading whitespace\n String[] decapitokens = new String[tokens.length-1];\n for (int i = 0; i < tokens.length - 1; i++)\n decapitokens[i] = tokens[i+1];\n return decapitokens;\n }", "public static ArrayList<String> verbs() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner verber;\n try {\n verber = new Scanner(new File(\"Verbs.txt\"));\n verber.useDelimiter(\", *\");\n while (verber.hasNext()){\n temp.add(\" \"+verber.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "public synchronized Set<String> getStopWords() throws Exception {\r\n\t\t\r\n\t\tif(stopWords == null){\r\n\t\t\tMTDArquivoEnum enumerado = MTDArquivoEnum.STOP_WORDS;\r\n\t\t\tstopWords = new HashSet<String>();\r\n\t\t\tMTDIterator<String> it = enumerado.lineIterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tstopWords.add(it.next());\r\n\t\t\t}\r\n\t\t\tit.close();\r\n\t\t}\r\n \r\n return stopWords;\r\n }", "public Set<String> getAllKnownWords() throws IOException {\n log.info(\"Reading all data to build known words set.\");\n Set<String> words = new HashSet<>();\n if (this.hasTrain()) {\n for (AnnoSentence sent : getTrainInput()) {\n words.addAll(sent.getWords());\n }\n }\n if (this.hasDev()) {\n for (AnnoSentence sent : getDevInput()) {\n words.addAll(sent.getWords());\n }\n }\n if (this.hasTest()) {\n for (AnnoSentence sent : getTestInput()) {\n words.addAll(sent.getWords());\n }\n }\n return words;\n }", "static List<String> read() {\n String fileName = getFilePath();\n List<String> urls = new ArrayList<>();\n \n if (Files.notExists(Paths.get(fileName))) {\n return urls;\n }\n \n try (Stream<String> stream = Files.lines(Paths.get(fileName))) {\n urls = stream\n // Excludes lines that start with # as that is used for comments\n // and must start with http:// as that is required by crawler4j.\n .filter(line -> !line.startsWith(\"#\") &&\n line.startsWith(\"http://\") || line.startsWith(\"https://\"))\n .map(String::trim)\n .map(String::toLowerCase)\n .collect(Collectors.toList());\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n return urls;\n }", "public RemoverStopWords() {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"stopwords_en.txt\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tstop_words.add(line.trim());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static List<String> readListOfStringsFromFile(String filePath) throws IOException {\n List<String> list = new ArrayList<>();\n Files.lines(Paths.get(filePath), StandardCharsets.UTF_8).forEach(list::add);\n return list;\n }" ]
[ "0.7495338", "0.7142414", "0.7085385", "0.7062436", "0.7045355", "0.70316905", "0.7025369", "0.7019679", "0.694021", "0.68274987", "0.6749561", "0.6745828", "0.6718432", "0.66928816", "0.66770667", "0.66683674", "0.66601205", "0.6644659", "0.66324514", "0.6623585", "0.65723556", "0.6431357", "0.6326278", "0.63191813", "0.6312956", "0.62956524", "0.6274908", "0.6217591", "0.6199893", "0.61962044", "0.618268", "0.6158033", "0.61479414", "0.6140673", "0.6128625", "0.61197245", "0.61083853", "0.6099004", "0.6082135", "0.6059254", "0.603025", "0.6029076", "0.6023993", "0.60206056", "0.5983598", "0.5977622", "0.59770966", "0.5973255", "0.5970506", "0.5951121", "0.59187776", "0.590649", "0.59019625", "0.5901243", "0.5898719", "0.5881103", "0.5879937", "0.5877532", "0.58761066", "0.5859462", "0.58523446", "0.5808262", "0.57911247", "0.5770112", "0.5767022", "0.57596916", "0.5748734", "0.57446796", "0.57422334", "0.57389486", "0.5717009", "0.5716574", "0.57017136", "0.5695999", "0.5694001", "0.5689134", "0.5679371", "0.5676649", "0.5665023", "0.56624067", "0.5647875", "0.56443954", "0.5638357", "0.5629277", "0.5623817", "0.561151", "0.5610248", "0.55947655", "0.55888003", "0.5587142", "0.5584244", "0.55661666", "0.55584556", "0.55516136", "0.555064", "0.5544724", "0.5543516", "0.55264306", "0.5521317", "0.5520734" ]
0.70924234
2
Reads in current data from the frequency file and fills the data map with it
private static void fillDataMapFromFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException { final BufferedReader frequencyReader = new BufferedReader(new FileReader(frequencyFile)); List<String> lines = frequencyReader.lines() .collect(Collectors.toList()); frequencyReader.close(); for(int i = 0, size = lines.size(); i < size; i++) { // Split each line at the delimiter, into word & frequency - put them in the data map final String[] dataSplit = lines.get(i).split(WORD_FREQUENCY_DELIMITER); final String word = dataSplit[0]; final long frequency = Long.parseLong(dataSplit[1]); dataMap.put(word, frequency); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "private static void updateFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedWriter frequencyWriter = new BufferedWriter(new FileWriter(frequencyFile));\n\n\t\tfor(Entry<String, Long> entry : dataMap.entrySet()) { // Write every entry to the frequency file\n\n\t\t\tfrequencyWriter.write(generateStringFromEntry(entry));\n\t\t\tfrequencyWriter.newLine();\n\t\t}\n\n\t\tfrequencyWriter.close();\n\t}", "@Override\r\n public Map getData(String fileName) {\r\n Map<String, Integer> map = new HashMap<>();\r\n \r\n File file = new File(fileName);\r\n \r\n try (BufferedReader bufferedReader =\r\n new BufferedReader(new FileReader(file))) {\r\n \r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n \r\n //if the word have already been in the map,\r\n //increases the number of occurances,\r\n //otherwise sets this number to 1\r\n //and puts a new value to the map\r\n String[] words = line.split(\" \");\r\n for (String word : words) {\r\n Integer value = map.get(word);\r\n if (value == null) {\r\n value = 1;\r\n } else {\r\n value++;\r\n }\r\n map.put(word, value);\r\n }\r\n }\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n return null;\r\n }\r\n \r\n return map;\r\n }", "private void parseAvailableFrequencies(){\n\t\tString str = parser.readFile(FREQ_AVAILABLE, 256);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] frestrs = str.split(\" \");\n\t\tint[] freqs = new int[frestrs.length - 1];\n\t\tfor(int i = 0; i < freqs.length; i++)\n\t\t\tfreqs[i] = Integer.valueOf(frestrs[i]);\n\t\t\n\t\tcpuFrequencies = freqs;\n\t}", "public static void DocumentFrequencies() throws FileNotFoundException {\n for (Entry<String, List<Integer>> entry : dictionary.entrySet()) {\n List<Integer> termfrequency = new ArrayList<>();\n\n termfrequency = entry.getValue();\t// getting each word's termfrequency list\n int i = 0;\n termfrequency.add(0); \t\t\t//maintaining documentfrequency at the 57th index\n Integer documentFrequency = termfrequency.get(totaldocument+1);\n while(i<56) { //iterate 0 to 55 all speeches term frequency\n if(termfrequency.get(i)>0) {\t\t//increment document frequency of that word if termfrequency is greater than 0.0\n documentFrequency++;\t\t\t//increment document frequency\n }\n i++;\t\t//increment index\n }\n termfrequency.set(57, documentFrequency);\t//re-set the documentfrequency and save the current maintained document frequency from 0 to calculated value\n dictionary.put(entry.getKey(), termfrequency);\t\t// place the incremented final value of that word back to the same list in dictionary hashmap\n }\n //save();\n }", "private HashMap<String, double[]> readFeature(String featurePath, int currCount){\n HashMap<String, double[]> fList = new HashMap<>();\n try{\n FileReader fr = new FileReader(featurePath);\n BufferedReader br = new BufferedReader(fr);\n\n String line = br.readLine();\n while(line != null){\n\n String[] split = line.trim().split(\"\\t\");\n if (split.length < 2)\n continue;\n double[] fs = new double[split.length - 1];\n for (int i = 1; i < split.length; i ++){\n fs[i-1] = Double.valueOf(split[i]);\n }\n\n fList.put(split[0], fs);\n \n // Update ProgressBar\n SoundEffectDemo.s_progressBar.setValue(currCount);\n \t\tdouble currPercentage = ((double) currCount / ((double) s_numTrainingData * 4.0)) * 100.0;\n \t\tSoundEffectDemo.s_progressBar.setString(String.format(\"%.2f\", currPercentage) + \"%\");\n \t\tcurrCount++;\n \t\t\n line = br.readLine();\n }\n br.close();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n return fList;\n }", "public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }", "private void loadDataMap() throws IOException {\n\t\tDaySleepDurationMap.getInstance().clear();\n\n\t\t// List of entries\n\t\tList<SleepEntry> entries = new ArrayList<SleepEntry>();\n\t\t\n\t\t// Get CSV file\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(DATA_LOCATION)));\n\t\tString line = \"\";\n\n\t\t// Ignore the first line (CSV header)\n\t\tbr.readLine();\n\n\t\twhile (((line = br.readLine()) != null)){\n\t\t\t// Convert the line from CSV to a SleepEntry\n\t\t\tSleepEntry se = SleepEntry.parseFromCSV(line);\n\t\t\t// Add it to the entry list\n\t\t\tentries.add(se);\n\t\t}\n\t\t\n\t\tfor (SleepEntry se : entries){\n\t\t\t// Add data from list to the map\n\t\t\tDaySleepDurationMap.getInstance().addToDay(se.getEffectiveDate(), se.getDuration());\n\t\t}\n\t\t\n\n\t\tbr.close();\n\t\t\n\t}", "public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void read(String filename) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\t\n\t\t//a variable that will increase by one each time another element is added to the array\n\t\t//to ensure array size is correct\n\t\tint numStation = 0;\n\t\t\n\t\t//ignores first 6 lines\n\t\tfor(int i = 0; i < 3; ++i){\n\t\t\tbr.readLine();\n\t\t}\n\t\t\n\t\t//sets String equal readline\n\t\tString lineOfData = br.readLine();\n\n\t\twhile(lineOfData != null)\n\t\t{\n\t\t\tString station = new String();\n\t\t\tstation = lineOfData.substring(10,14);\n\t\t\tMesoAsciiCal asciiAverage = new MesoAsciiCal(new MesoStation(station));\n\t\t\tint asciiAvg = asciiAverage.calAverage();\t\t\n\n\t\t\tHashMap<String, Integer> asciiVal = new HashMap<String, Integer>();\n\t\t\t//put the keys and values into the hashmap\n\t\t\tasciiVal.put(station, asciiAvg);\n\t\t\t//get ascii interger avg value\n\t\t\tInteger avg = asciiVal.get(station);\n\t\t\t\n\t\t\thashmap.put(station,avg);\n\t\t\t\n\t\t\tlineOfData = br.readLine();\n\t\t\t\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "private Map<String, Object> analysisMap(ArrayList<String> data) {\n Map<String, Object> map = new HashMap<>();\n map.put(DAILY, data);\n return map;\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "private void fillData() {\n\t\tfor(Entry<String, HashMap<String, Double>> entry : m.map.entrySet()) {\n\t\t\tfor(Entry<String, Double> subEntry : entry.getValue().entrySet()) {\n\t\t\t\tMappingData item = new MappingData(entry.getKey(), subEntry.getKey(), subEntry.getValue());\n\t\t\t\tdataList.add(item);\n\t\t\t}\n\t\t}\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public static void load(Context context) throws IOException {\n // read the file\n String raw = File.readFile(\"vaccine.txt\", context);\n\n // clear the map and load contents of file into the map\n map.clear();\n for (String line : raw.split(\"\\n\")) {\n if (line.equals(\"\")) {\n continue;\n }\n String[] data = line.split(\",\");\n if (data[0].equals(\"\") || data.length != 3) {\n continue;\n }\n map.put(data[0], Boolean.getBoolean(data[1]));\n dateMap.put(data[0], data[2]);\n }\n }", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public Begin(Map<String, String> data) throws NullPointerException, IOException{\n String filename = data.get(FileName.INPUT.getValue());\n outputData = Files.readAllBytes(Paths.get(filename));\n }", "public void getData() {\n\t\tfileIO.importRewards();\n\t\tfileIO.getPrefs();\n\t}", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "public Apriori(String dataPath, int supportThreshold){\n mThreshold = supportThreshold;\n mItemSet = new LinkedList<>();\n mDataList = new ArrayList<>();\n skipLines = new HashSet<>();\n\n // Construct a list of one item sets\n Map<Integer, Integer> atomicFIS = new HashMap<>();\n Map<Integer, Integer> sizeFrequency = new HashMap<>();\n\n try {\n BufferedReader dataBase\n = new BufferedReader(new InputStreamReader(new FileInputStream(new File(dataPath))));\n int lineCount = 0;\n int wordCount = 0;\n while (dataBase.ready()){\n String transaction = dataBase.readLine();\n StringTokenizer tokenizer = new StringTokenizer(transaction, \" \");\n List<Integer> line = new ArrayList<>();\n\n // Count of the number of items in this transaction\n int count = 0;\n\n while(tokenizer.hasMoreElements()){\n int item = Integer.parseInt(tokenizer.nextToken());\n line.add(item);\n //lineSet.add(item);\n if (atomicFIS.containsKey(item)){\n atomicFIS.put(item, atomicFIS.get(item) + 1);\n } else{\n atomicFIS.put(item, 1);\n }\n\n count ++;\n }\n\n if (sizeFrequency.containsKey(count)){\n sizeFrequency.put(count, sizeFrequency.get(count) + 1);\n } else{\n sizeFrequency.put(count, 1);\n }\n mDataList.add(line);\n //mDataSet.add(lineSet);\n wordCount += count;\n lineCount++;\n }\n averageCount = wordCount / lineCount;\n dataBase.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n oneDimensionFIS = new ArrayList<>();\n\n for (Map.Entry<Integer, Integer> entry : atomicFIS.entrySet()){\n if (entry.getValue() >= mThreshold){\n int[] temp = new int[1];\n temp[0] = entry.getKey();\n oneDimensionFIS.add(temp);\n // Put the Set - frequency entry in result\n mItemSet.add(entry.getKey() + \"(\" + entry.getValue() + \")\\n\");\n }\n }\n }", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "protected static void readIn(Path p, HashMap<String, Double> myMap, FileSystem fs) throws IOException {\n\t FSDataInputStream inputStream = fs.open(p);\n\t BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n\t // Read in all the lines and push into hashmap\n\t String line;\n\t while((line = br.readLine()) != null) {\n\t \tString[] sectors = line.trim().split(\"\\t\");\n\t \tif (sectors.length != 2)\n\t \t\tthrow new Error(\"Parsing of file does not match specified input -- readIn\");\n\t \tif (myMap.containsKey(sectors[0]))\n\t \t\tthrow new Error(\"Node is trying to be added more than once\");\n\t \t\n\t \tmyMap.put(sectors[0], Double.parseDouble(sectors[1]));\n\t }\n\t br.close();\n\t fs.close();\n\t}", "public static Map<String, Integer> getFrequencies() {\n return UNIGRAM;\n }", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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}", "private void loadData(ApplicationMode appMode) {\n rowKeys = new HashMap<Integer, Integer>();\n ptnKeys = new HashMap<Integer, Integer>();\n pattern = new byte[patternSize];\n ptnLink = new int[patternSize * rowSize * 2];\n\n String filepath = FileProperties.getFilepathWD();\n try (FileInputStream fin = new FileInputStream(filepath);\n FileChannel inChannel = fin.getChannel();) {\n ByteBuffer buf = inChannel.map(FileChannel.MapMode.READ_ONLY, 0, inChannel.size());\n buf.get(pattern);\n\n for (int i = 0; i < keySize; i++) {\n rowKeys.put(buf.getInt(), buf.getInt());\n }\n\n for (int i = 0; i < patternSize; i++) {\n ptnKeys.put(buf.getInt(), buf.getInt());\n }\n\n for (int i = 0; i < ptnLink.length; i++) {\n ptnLink[i] = buf.getInt();\n }\n } catch (BufferUnderflowException | IOException ex) {\n if (appMode == ApplicationMode.GUI) {\n System.err.println(\"\\n\\t*** Data files missing or corrupted, please download \"\n + \"from cloud drive. ***\");\n System.err.println(\"\\thttps://my.pcloud.com/publink/show?\"\n + \"code=kZSoaLZgNeLhO2eu0RQcu9D2aXeOFgtioUV\\n\");\n throw new UnsupportedOperationException();\n }\n int[] keyLink = genKeys();\n genPattern(keyLink);\n saveData(filepath);\n }\n }", "private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }", "private HashMap<Integer, HashMap<String,String>> getAllFrequencies() {\n HashMap<Integer,HashMap<String,String>> freq\n = dbController.getAllFrequencies();\n if (freq == null)\n return null;\n HashMap<Integer, HashMap<String, String>> response = new HashMap<Integer, HashMap<String, String>>();\n int i = 2;\n //Passing on any frequency and creates a message to send\n for (Map.Entry<Integer,HashMap<String,String>> objs : freq.entrySet()){\n HashMap<String,String> obj = objs.getValue();\n\n response.put(i, new HashMapBuilder<String, String>().put(\"name\", obj.get(\"name\"))\n .put(\"frequency\",obj.get(\"frequency\")).build());\n i++;\n }\n return response;\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "private void loadAllCountData(){\n // load from csv\n try{\n FileReader file = new FileReader(\"/home/ubuntu/user_counts_small.csv\");\n //FileReader file = new FileReader(\"/Users/YHWH/Desktop/cloud computing/team project/user_counts.csv\");\n BufferedReader buff = new BufferedReader(file);\n String line = \"\";\n boolean eof = false;\n\n while(!eof){\n line = buff.readLine();\n if(line == null){\n eof = true;\n }\n else{\n String[] data = line.split(\"\\t\"); //0->id, 1->selfCount, 2->prevCount\n wholeCountData.put(data[0], Integer.parseInt(data[2]));\n }\n }\n buff.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "public Map<Integer, Integer> getMap(String fileContent) {\n\t\tString[] words = fileContent.split(\" \");\n\t\tfor (String word : words) {\n\t\t\tint hash = word.hashCode();\n\t\t\tint frequency = 1;\n\t\t\tif (map.containsKey(hash)) {\n\t\t\t\tfrequency += map.get(hash);\n\t\t\t\tmap.put(hash, frequency);\n\t\t\t} else {\n\t\t\t\tmap.put(hash, frequency);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public void buildHuffmanList(File inputFile){\n try{\n Scanner sc = new Scanner(inputFile);\n while(sc.hasNextLine()){\n\n String line = sc.nextLine();\n for(int i =0;i<line.length();i++){\n \n if(freqTable.isEmpty())\n freqTable.put(line.charAt(i),1);\n else{\n if(freqTable.containsKey(line.charAt(i)) == false)\n freqTable.put(line.charAt(i),1);\n else{\n int oldValue = freqTable.get(line.charAt(i));\n freqTable.replace(line.charAt(i),oldValue+1);\n }\n }\n }\n }\n }\n catch(FileNotFoundException e){\n System.out.println(\"Can't find the file\");\n }\n }", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\t/**\n\t * Read data and store\n\t * @param data\n\t * \t\t\t\tThe map to store data read from ser file\n\t * @return Map<String, T>\n\t * \t\t\ta map of data that has all the ser file data\n\t * @throws ClassNotFoundException\n\t * @throws IOException\n\t */\n\tprotected Map<String, T> readFromFile(Map<String, T> data) throws ClassNotFoundException, IOException {\n\t\t\n\t\tInputStream file = new FileInputStream(filePath);\n\t\tInputStream buffer = new BufferedInputStream(file);\n\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t//deserialize the Map\n\t\tdata = (HashMap<String, T>) input.readObject();\n\t\tinput.close();\n\t\treturn data;\n\t}", "public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{\n\t\t//read File\n\t\t// go to letters directory\n\t\tString seriesLetterFolder = lettersInputFolder + File.separator + \"letters\";\n\t\tFile directory = new File(seriesLetterFolder); \n\t\tfileNames = directory.listFiles(new FileFilter() {\n\t\t @Override\n\t\t public boolean accept(File pathname) {\n\t\t String name = pathname.getName().toLowerCase();\n\t\t return name.endsWith(\".csv\") && pathname.isFile();\n\t\t }\n\t\t});\n\t\tfor (int i = 0; i < fileNames.length; i++) {\n\t\t\t\n\t\t\t// Overall structure is as follows:\n\t\t\t// On each row, for each word - we have a Map of String and List<Double> indicating a word\n\t\t\t// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.\n\t\t\t// the size of the list is 20. Eventually the global dictionary will be a List of such lists.\n\t\t\t// in case of sample data, the global dictionary is of 60 lists.\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(fileNames[i]));\n\t\t\t\n\t\t\t\n\t\t\t// for each document\n\t\t\tList<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>(); \n\t\t\t\n\t\t\tMap<String,List<Double>> wordMap = null; //per row \n\t\t\twhile(in.ready()) {\n\t\t\t\twordMap = new HashMap<String, List<Double>>(); //per rows\n\t\t\t\tString series = in.readLine();\n\t\t\t\tString letters[]= series.split(\",\");\n\t\t\t\tInteger lastLocationForRef = -1; // for padding\n\t\t\t\tdouble totalWordCountPerDocument = 0.0; \n\t\t\t\tfor (int curLineCharLocation = 0; curLineCharLocation < letters.length\n\t\t\t\t\t\t- wordLength + 1; curLineCharLocation = curLineCharLocation\n\t\t\t\t\t\t+ shiftLength) {\n\t\t\t\t\t// this for loop runs on each line and curLineCharLocation\n\t\t\t\t\t// indicates the current pointer\n\t\t\t\t\t// from which we should be forming the word\n\t\t\t\t\t// extract a word and move the shift length\n\t\t\t\t\tString currentWord = \"\";\n\t\t\t\t\tfor (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength\n\t\t\t\t\t\t\t+ curLineCharLocation; currentWordLocation++) {\n\t\t\t\t\t\t// this inner for loop denotes the current word to be\n\t\t\t\t\t\t// created\n\t\t\t\t\t\tcurrentWord = currentWord\n\t\t\t\t\t\t\t\t+ letters[currentWordLocation];\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, currentWord);\n\t\t\t\t\tlastLocationForRef = curLineCharLocation + shiftLength;\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t\t\t\t}\n\t\t\t\t// check to see if we have any leftover strings. If yes then pad that word using\n\t\t\t\t// the last character pointed by lastLocationForRef\n\t\t\t\tInteger difference = letters.length - lastLocationForRef;\n\t\t\t\tif (difference > 0) {\n\t\t\t\t\tString paddedWord = \"\";\n\t\t\t\t\tInteger extraPaddingSize = wordLength - difference;\n\t\t\t\t\twhile (difference > 0) {\n\t\t\t\t\t\t// this while loop will simply create the padded word \n\t\t\t\t\t\t// to be appended at the end\n\t\t\t\t\t\tpaddedWord = paddedWord + letters[lastLocationForRef];\n\t\t\t\t\t\tdifference = difference - 1;\n\t\t\t\t\t\tlastLocationForRef = lastLocationForRef + 1; //advance to next location\n\t\t\t\t\t}\n\t\t\t\t\twhile(extraPaddingSize > 0) {\n\t\t\t\t\t\t paddedWord = paddedWord + letters[lastLocationForRef-1];\n\t\t extraPaddingSize = extraPaddingSize - 1;\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, paddedWord);\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t }\n\t\t\t\twordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq\n\t\t\t\tmapPerGestureFile.add(wordMap);\t\t\t\t\n\t\t\t}\n\t\t\tgetTfMapArrayIDF().add(mapPerGestureFile);\n\t\t\t//count idf2 per document\n\t\t\tinitIDF2Map(mapPerGestureFile);\n\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\t\n\t\t//populate global map for IDF values List<LIst<Map>\n\t\t initIDFMap(getTfMapArrayIDF());\n\t\t //Generate IDF Files from Global Map * TF Values\n\t\t calculateIDFValues();\n\t\t //Generate IDF2 Files\n\t\t calculateIDF2Values();\n\t\t //normalize tfidf and tfidf2\n\t\t normalizeDictionary(); \n\t\t createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "public static void addtoHashMap (File filename){\n\t\tFileInputStream fin;\n\t\ttry{\n\t\t\tfin = new FileInputStream(filename);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\tString n;\n\t\t\ttry{\n\t\t\t\twhile ((n = br.readLine()) != null){\n\t\t\t\t\tif(h.containsKey(n)){\n\t\t\t\t\t\tint i = (Integer) h.get(n);\n\t\t\t\t\t\th.put(n, (i+1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\th.put(n, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void readMMap(File file) throws IOException {\n FileChannel channel = new RandomAccessFile(file, \"rw\").getChannel();\n MappedByteBuffer mmap = channel.map(FileChannel.MapMode.READ_WRITE, N, N);\n //mmap.load();\n byte[] buf = new byte[CHUNK];\n long t = System.nanoTime();\n for (int i = 0; i < N/CHUNK; i++) {\n mmap.get(buf);\n }\n System.out.println((System.nanoTime() - t) / 1_000_000 + \" ms \" + mmap.position() + \" bytes\");\n\n channel.close();\n }", "private void scanDocuments()\n{\n document_counts = new HashMap<>();\n kgram_counts = new HashMap<>();\n for (File f : root_files) {\n addDocuments(f);\n }\n}", "public void processFile(File rootFile) throws IOException {\n\t\tBufferedReader bf=new BufferedReader(new FileReader(rootFile));\r\n\t\tString lineTxt = null;\r\n\t\tint pos=1;\r\n\t\twhile((lineTxt = bf.readLine()) != null){\r\n String[] line=lineTxt.split(\" \");\r\n// System.out.println(line[0]);\r\n String hscode=line[0];\r\n \r\n \r\n TreeMap<String,Integer> word=null;\r\n if(!map.containsKey(hscode)){\r\n word=new TreeMap<String,Integer>();\r\n for(int i=1;i<line.length;i++){\r\n \tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n }\r\n map.put(hscode, word);\r\n }\r\n else{\r\n //\tSystem.out.println(\"sss\");\r\n \tword = map.get(hscode);\r\n \tfor(int i=1;i<line.length;i++){\r\n \t\tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n \t}\r\n \t\r\n \tmap.put(hscode, word);\r\n \t\r\n }\r\n\t\t}\r\n\t\tbf.close();\r\n//\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n//// \tSystem.out.println(\"hscode:\"+entry.getKey());\r\n// \tTreeMap<String, Integer> value = entry.getValue();\r\n// \tfor(Entry<String,Integer> e:value.entrySet()){\r\n//// \tSystem.out.println(\"单词\"+e.getKey()+\" 词频是\"+e.getValue());\r\n// \t}\r\n// }\r\n\t}", "public static void readDictionary()\r\n\t{\r\n\t\t//It trys to read over the file using try-catch in case of an Exception\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"english.0\");\r\n\t\t\tScanner scan = new Scanner(file);\r\n\t\t\t//It reads over the file as long as there are words to read and we insert them into the given storage\r\n\t\t\twhile(scan.hasNext()) {\r\n\t\t\t\tdata.insert(scan.next());\r\n\t\t\t}\r\n\t\t\tscan.close(); \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t}", "private static void feedMapWithWordList(List<String> wordList, HashMap<String, Long> dataMap) {\n\n\t\tfor(int i = 0, size = wordList.size(); i < size; i++) { // Go through the list of words being fed - if a word already exists, add 1 to its frequency; otherwise, create a new key and give it a value of 1\n\n\t\t\tfinal String word = wordList.get(i);\n\n\t\t\tif(dataMap.containsKey(word))\n\n\t\t\t\tdataMap.replace(word, dataMap.get(word) + 1);\n\n\t\t\telse\n\n\t\t\t\tdataMap.put(word, 1L);\n\t\t}\n\t}", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public static void main(String...args) {\n\n\t\ttry {\n\n\t\t\tList<String> wordList = getWordList(FEED_FILE);\n\n\t\t\tfinal File frequencyFile = new File(WORD_FREQUENCY);\n\t\t\tfrequencyFile.createNewFile(); // If the file already exists, this will not overwrite it\n\n\t\t\tfinal HashMap<String, Long> dataMap = new HashMap<>(); // HashMap that will have each word as a key and its frequency as a value\n\n\t\t\tfillDataMapFromFrequencyFile(frequencyFile, dataMap);\n\t\t\tfeedMapWithWordList(wordList, dataMap);\n\n\t\t\tupdateFrequencyFile(frequencyFile, dataMap);\n\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void readData(String fileName, boolean [] data, String wName){\n\t\tworld = new File(wName);\n\t\tDataProcessing dp = new DataProcessing(fileName, data);\n\t\tdp.findHotspots();\n\n\t\ttempVals = dp.hotspots;\n\t\t\t\n\t\t\t// create randomly permuted list of indices for traversal \n\t\t\tgenPermute(); \n\t\t\t\n\t\t\t// generate greyscale tempVals field image\n\t\t\tderiveImage();\n\n\t}", "public void load() {\n\t\n\t\tdataTable = new HashMap();\n\t\t\n\t\tArrayList musicArrayList = null;\n\t\tStringTokenizer st = null;\n\n\t\tMusicRecording myRecording;\n\t\tString line = \"\";\n\n\t\tString artist, title;\n\t\tString category, imageName;\n\t\tint numberOfTracks;\n\t\tint basePrice;\n\t\tdouble price;\n\n\t\tTrack[] trackList;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tlog(\"Loading File: \" + FILE_NAME + \"...\");\n\t\t\tBufferedReader inputFromFile = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\t\n\t\t\t// read until end-of-file\n\t\t\twhile ( (line = inputFromFile.readLine()) != null ) {\t\t\t\n\t\t\t\n\t\t\t\t// create a tokenizer for a comma delimited line\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\n\t\t\t\t// Parse the info line to read following items formatted as\n\t\t\t\t// - the artist, title, category, imageName, number of tracks\n\t\t\t\t//\n\t\t\t\tartist = st.nextToken().trim();\n\t\t\t\ttitle = st.nextToken().trim();\n\t\t\t\tcategory = st.nextToken().trim();\n\t\t\t\timageName = st.nextToken().trim();\n\t\t\t\tnumberOfTracks = Integer.parseInt(st.nextToken().trim());\n\t\t\t\t\t\t\n\t\t\t\t// read all of the tracks in\n\t\t\t\ttrackList = readTracks(inputFromFile, numberOfTracks);\n\n\t\t\t\t// select a random price between 9.99 and 15.99\n\t\t\t\tbasePrice = 9 + (int) (Math.random() * 7);\n\t\t\t\tprice = basePrice + .99;\n\n\t\t\t\t// create the music recording\n\t\t\t\tmyRecording = new MusicRecording(artist, trackList, title, \n\t\t\t\t\t\t\t\t\t\t\t\t price, category, imageName);\n\n\t\t\t\t// check to see if we have information on this category\n\t\t\t\tif (dataTable.containsKey(category)) {\n\t\t\t\t\n\t\t\t\t\t// get the list of recordings for this category\n\t\t\t\t\tmusicArrayList = (ArrayList) dataTable.get(category); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t// this is a new category. simply add the category\n\t\t\t\t\t// to our dataTable\n\t\t\t\t\tmusicArrayList = new ArrayList();\n\t\t\t\t\tdataTable.put(category, musicArrayList);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// add the recording\n\t\t\t\tmusicArrayList.add(myRecording);\n\t\t\t\t\n\t\t\t\t// move ahead and consume the line separator\n\t\t\t\tline = inputFromFile.readLine();\n\t\t\t}\n\n\t\t\tinputFromFile.close();\n\t\t\tlog(\"File loaded successfully!\");\n\t\t\tlog(\"READY!\\n\");\n\n\t\t}\n\t\tcatch (FileNotFoundException exc) {\n\t\t\tlog(\"Could not find the file \\\"\" + FILE_NAME + \"\\\".\");\n\t\t\tlog(\"Make sure it is in the current directory.\");\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\t\t\t\n\t\t}\n\t\tcatch (IOException exc) {\n\t\t\tlog(\"IO error occurred while reading file: \" + FILE_NAME);\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\n\t\t}\n\t\n\t}", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "public static void main(String[] args)\r\n {\r\n Map<Character, Integer> myMap = new TreeMap<>(); //initializes the map\r\n secondMap = new TreeMap<>(); //initializes the second map\r\n List<Character> myList = new ArrayList<>(); //creates the list\r\n\r\n //input validation loop to force the users to input an extension with .txt, also extracts the directoryPath\r\n //from the file path extension\r\n String filePath = \"\";\r\n String directoryPath = \"\";\r\n boolean keepRunning = true;\r\n Scanner myScanner = new Scanner(System.in);\r\n\r\n while (keepRunning)\r\n {\r\n System.out.println(\"Please provide the filepath to the file and make sure to include the '.txt' extension\");\r\n String z = myScanner.nextLine();\r\n\r\n //uses a substring to check the extension\r\n if (z.substring((z.length() - 4)).equalsIgnoreCase(\".txt\"))\r\n {\r\n filePath = z;\r\n\r\n for (int i = z.length()-1; i >= 0; i--)\r\n {\r\n if (z.charAt(i) == '\\\\')\r\n {\r\n directoryPath = z.substring(0, i);\r\n i = -1;\r\n }\r\n }\r\n\r\n //terminates the loop\r\n keepRunning = false;\r\n }\r\n else\r\n {\r\n System.out.print(\"Invalid Input! \");\r\n }\r\n }\r\n\r\n try\r\n {\r\n //makes the file\r\n File myFile = new File(filePath);\r\n FileInputStream x = new FileInputStream(myFile);\r\n\r\n //reads in from the file character by character\r\n while (x.available() > 0)\r\n {\r\n Character c = (char) x.read();\r\n myList.add(c);\r\n }\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n //loads all of the characters into a map with their respective frequency\r\n for (Character a : myList)\r\n {\r\n Integer value = myMap.get(a);\r\n\r\n if (!myMap.containsKey(a))\r\n {\r\n myMap.put(a, 1);\r\n }\r\n else\r\n {\r\n myMap.put(a, (value + 1));\r\n }\r\n }\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(myMap);\r\n\r\n PriorityQueue<Node> myQueue = new PriorityQueue<>();\r\n\r\n //creates a node for each Character/value in the map and puts it into the priority Queue\r\n for (Character a : myMap.keySet())\r\n {\r\n Node b = new Node(a, myMap.get(a));\r\n myQueue.add(b);\r\n }\r\n\r\n //removes and re-adds nodes to form the tree, remaining node is the root of the tree\r\n while (myQueue.size() > 1)\r\n {\r\n //removes first two nodes\r\n Node firstRemoved = myQueue.remove();\r\n Node secondRemoved = myQueue.remove();\r\n\r\n //the value for the new node being a sum of the first two removed node's respective frequencies\r\n int val = firstRemoved.frequency + secondRemoved.frequency;\r\n\r\n //creates the new node, set's its frequency to the value of the first two, then ties its left/right node values\r\n //to those originally removed nodes\r\n Node replacementNode = new Node();\r\n replacementNode.frequency = val;\r\n replacementNode.left = firstRemoved;\r\n replacementNode.right = secondRemoved;\r\n\r\n myQueue.add(replacementNode);\r\n }\r\n\r\n //does the recursion on the priorityQueue\r\n huffmanStringSplit(myQueue.peek(), \"\");\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(secondMap);\r\n\r\n //creates and writes to the .CODE file and the .HUFF file\r\n try\r\n {\r\n //PrintWriter for easily writing to a file\r\n String output = directoryPath + \"\\\\FILENAME.code\";\r\n PrintWriter myPrinter = new PrintWriter(output);\r\n\r\n //goes through the second map\r\n for (Character a : secondMap.keySet())\r\n {\r\n int ascii = (int) a;\r\n myPrinter.println(ascii);\r\n myPrinter.println(secondMap.get(a));\r\n }\r\n\r\n //closes printer\r\n myPrinter.close();\r\n\r\n //reopens the printer to the new file\r\n output = directoryPath + \"\\\\FILENAME.huff\";\r\n myPrinter = new PrintWriter(output);\r\n\r\n //outputs every value in the original list to the .huff file with the characters converted to huff code\r\n for (Character a : myList)\r\n {\r\n myPrinter.print(secondMap.get(a));\r\n myPrinter.flush();\r\n }\r\n\r\n //closes the printer after it's written\r\n myPrinter.close();\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}", "void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}", "public void readFileToTransitionMap(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMap();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }", "private int[][][] readData(int startElement, int startLine, int endElement, int endLine) throws AreaFileException {\r\n// int[][][]myData = new int[numBands][dir[AD_NUMLINES]][dir[AD_NUMELEMS]];\r\n int numLines = endLine - startLine;\r\n int numEles = endElement - startElement;\r\n// System.out.println(\"linePrefixLength: \" + linePrefixLength);\r\n int[][][] myData = new int[numBands][numLines][numEles];\r\n \r\n if (! fileok) {\r\n throw new AreaFileException(\"Error reading AreaFile data\");\r\n }\r\n\r\n short shdata;\r\n int intdata;\r\n boolean isBrit = \r\n areaDirectory.getCalibrationType().equalsIgnoreCase(\"BRIT\"); \r\n long newPos = 0;\r\n\r\n for (int i = 0; i<numLines; i++) {\r\n newPos = datLoc + linePrefixLength + lineLength * (i + startLine) + startElement * dir[AD_DATAWIDTH];\r\n position = newPos;\r\n// System.out.println(position);\r\n try {\r\n af.seek(newPos);\r\n } catch (IOException e1) {\r\n e1.printStackTrace();\r\n }\r\n \r\n for (int k=0; k<numEles; k++) {\r\n for (int j = 0; j<numBands; j++) {\r\n try {\r\n if (dir[AD_DATAWIDTH] == 1) {\r\n myData[j][i][k] = (int)af.readByte();\r\n if (myData[j][i][k] < 0 && isBrit) {\r\n myData[j][i][k] += 256;\r\n } \r\n// position = position + 1;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 2) {\r\n shdata = af.readShort();\r\n if (flipwords) {\r\n myData[j][i][k] = (int) ( ((shdata >> 8) & 0xff) | \r\n ((shdata << 8) & 0xff00) );\r\n } else {\r\n myData[j][i][k] = (int) (shdata);\r\n }\r\n// position = position + 2;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 4) {\r\n intdata = af.readInt();\r\n if (flipwords) {\r\n myData[j][i][k] = ( (intdata >>> 24) & 0xff) | \r\n ( (intdata >>> 8) & 0xff00) | \r\n ( (intdata & 0xff) << 24 ) | \r\n ( (intdata & 0xff00) << 8);\r\n } else {\r\n myData[j][i][k] = intdata;\r\n }\r\n// position = position + 4;\r\n } \r\n } \r\n catch (IOException e) {\r\n myData[j][i][k] = 0;\r\n }\r\n }\r\n }\r\n }\r\n return myData;\r\n }", "private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){\n\t\tfor (int i = 0; i < tfMap.size(); i++) {\n\t\t\tList<Map<String,List<Double>>> gestureDocument = tfMap.get(i);\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String,List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();\n\t\t\t\t while (it.hasNext()) {\n\t\t\t\t Map.Entry<String,Integer> pairs = (Map.Entry)it.next(); \n\t\t\t\t if(getTfIDFMapGlobal().containsKey(pairs.getKey()))\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);\n\t\t\t\t else\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), 1);\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "private void readDataFromUserLog(HashMap<String,TransactionData> hmap , String filename){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tString transaction = line.split(\",\")[1];\n\t\t\t/*\tString transactionKey = (transaction.length() > keyLength ) ?\n\t\t\t\t\t\ttransaction.substring(0,keyLength):\n\t\t\t\t\t\t\ttransaction;*/\n\t\t\t\tString transactionKey = formTransactionKey(transaction);\n\t\t\t\tdouble amount = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tif(hmap.containsKey(transactionKey)){\n\t\t\t\t\tTransactionData d = hmap.get(transactionKey);\n\t\t\t\t\td.addAnotherOccurence(amount);\n\t\t\t\t\thmap.put(transactionKey,d );\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar type = identifyTheTransactions(transaction);\n\t\t\t\t\tTransactionData d =new TransactionData(transaction,amount,type);\n\t\t\t\t\thmap.put(transactionKey,d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! File : \"+ filename +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"\\n\\nPlease try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void processFileEntries(final File filePath, Map<String, Integer> bigramHistogramMap) {\n\n BufferedInputStream bis = null;\n FileInputStream fis = null;\n\n try {\n\n // create FileInputStream object\n fis = new FileInputStream(filePath);\n\n // create object of BufferedInputStream\n bis = new BufferedInputStream(fis);\n\n String stringLine;\n\n BufferedReader br = new BufferedReader(new InputStreamReader(bis));\n\n String previousWord = \"\";\n\n while ((stringLine = br.readLine()) != null) {\n previousWord = addBigramHistogramEntry(stringLine, previousWord, bigramHistogramMap);\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found - \" + e);\n } catch (IOException ioe) {\n System.out.println(\"Exception while reading file - \" + ioe);\n } catch (Exception e) {\n System.out.println(\"Unable to load: \" + filePath.getName());\n } finally {\n // close the streams using close method\n try {\n if (fis != null) {\n fis.close();\n }\n if (bis != null) {\n bis.close();\n }\n } catch (IOException ioe) {\n System.out.println(\"Error while closing stream : \" + ioe);\n }\n }\n }", "public Map<String, Integer> getDataMap() {\n\t\tMap<String, Integer> dataMap = new HashMap<>();\n\t\tdataMap.putAll(temperature.getDataMap());\n\t\tdataMap.putAll(wind.getDataMap());\n\t\tdataMap.putAll(precipitation.getDataMap());\n\t\tdataMap.putAll(condition.getDataMap());\n\t\tdataMap.putAll(hazard.getDataMap());\n\t\tdataMap.putAll(wave.getDataMap());\n\t\t\n\t\treturn dataMap;\n\t}", "@Override\n\tpublic void run() {\n\t\t\n//\t\tFor counting the occurences of each key.\n\t\tfor (String key : this.keys) {\n\t\t\tthis.keysCounts.put(key, 0);\n\t\t}\n\t\t\n//\t\tFor reading the input file.\n\t\tScanner inputReader = null;\n\t\t\n\t\ttry {\n\t\t\t\n//\t\t\tInitializes the reader.\n\t\t\tinputReader = new Scanner(new FileInputStream(this.inputFile));\n\t\t\t\n//\t\t\tWe loop for each line of the input file (each line contains a word).\n\t\t\tString wordRead = null;\n\t\t\tInteger matchingCount = 0;\n\t\t\twhile (inputReader.hasNextLine()) {\t\n\t\t\t\t\n//\t\t\t\tWe check if the word is a member of the keys set, and if so we increment its \n//\t\t\t\tcurrent count in the Map.\n\t\t\t\tif ((matchingCount = this.keysCounts.get(\n\t\t\t\t\t\twordRead = inputReader.nextLine().split(\" \")[0])) != null) {\n\t\t\t\t\tthis.keysCounts.put(wordRead, matchingCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\tNow the partial job is done, the main thread will do the rest of the reducing.\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tinputReader.close();\n\t\t}\n\t\t\n\t\t\n\t}", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "public void getData(String filePath, Map<String, Object> map) {\n\t\treturn;\n\t}", "private void showWordFrequency() {\n\t\tWordFrequencyProcessor wordFreqProcessor = new WordFrequencyProcessor();\n\t\ttry {\n\t\t\twordFreqProcessor.readFile(FILE_NAME);\n\t\t} catch (IOException e) {\n\t\t\tshowErrorAlert(\"Error\", \"Error Reading File: \", FILE_NAME);\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\tList<WordFrequency> list = wordFreqProcessor.getFrequency();\n\t\tint size = list.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tWordFrequency wordFreq = (WordFrequency) list.get(i);\n\t\t\tfreqTable.getItems().add(wordFreq);\n\t\t} // for\n\t}", "private void loadDocStatFromFile(String path) {\n docStat = new HashMap<String, Integer>();\n List<String> stats = fu.textFileToList(path);\n int totLength = 0;\n for (String stat : stats) {\n String docID = stat.split(\" \")[0];\n int docLen = Integer.parseInt(stat.split(\" \")[1]);\n totLength += docLen;\n docStat.put(docID, docLen);\n }\n avdl = totLength / N;\n }", "public void read(String filename) throws IOException {\n // open the file\n BufferedReader r = new BufferedReader(new FileReader(filename));\n\n // load the number of terms\n int size = Integer.parseInt(r.readLine());\n\n // must divide by load factor (0.75) to not need to rehash\n index = new HashMap((int) (size / .75) + 1);\n\n // temporary variables\n String line;\n StringTokenizer tokens;\n String word;\n HashMap docList;\n String docid;\n int[] fArray;\n int lineNumber = 1;\n\n // while there are more lines in the document\n while ((line = r.readLine()) != null) {\n // increment the line number\n lineNumber++;\n\n // the word is the only thing on the line\n word = line;\n\n // load all documents containign this term\n docList = new HashMap();\n index.put(word, docList);\n\n line = r.readLine();\n while (line != null && !line.equals(\"\")) {\n fArray = new int[1];\n\n docid = line;\n fArray[0] = Integer.parseInt(r.readLine());\n\n docList.put(docid, fArray);\n line = r.readLine();\n }\n }\n\n // close the file\n r.close();\n }", "@Override\n\tprotected void updateDataFromRead(CountedData counter, final GATKSAMRecord gatkRead, final int offset, final byte refBase) {\n Object[][] covars;\n\t\ttry {\n\t\t\tcovars = (Comparable[][]) gatkRead.getTemporaryAttribute(getCovarsAttribute());\n\t\t\t// Using the list of covariate values as a key, pick out the RecalDatum from the data HashMap\n\t NestedHashMap data;\n\t data = dataManager.data;\n\t final Object[] key = covars[offset];\n\t\t\tBisulfiteRecalDatumOptimized datum = (BisulfiteRecalDatumOptimized) data.get( key );\n\t if( datum == null ) { // key doesn't exist yet in the map so make a new bucket and add it\n\t // initialized with zeros, will be incremented at end of method\n\t datum = (BisulfiteRecalDatumOptimized)data.put( new BisulfiteRecalDatumOptimized(), true, (Object[])key );\n\t }\n\n\t // Need the bases to determine whether or not we have a mismatch\n\t final byte base = gatkRead.getReadBases()[offset];\n\t final long curMismatches = datum.getNumMismatches();\n\t final byte baseQual = gatkRead.getBaseQualities()[offset];\n\n\t // Add one to the number of observations and potentially one to the number of mismatches\n\t datum.incrementBaseCounts( base, refBase, baseQual );\n\t increaseCountedBases(counter,1);\n\t\t\tincreaseNovelCountsBases(counter,1);\n\t\t\tincreaseNovelCountsMM(counter,(datum.getNumMismatches() - curMismatches));\n\t \n\t\t} catch (IllegalArgumentException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n //counter.novelCountsBases++;\n \n //counter.novelCountsMM += datum.getNumMismatches() - curMismatches; // For sanity check to ensure novel mismatch rate vs dnsnp mismatch rate is reasonable\n \n }", "private static HashMap<HitCategory, ArrayList<HitsPerClub>> readHitsFromFile(String fileName, boolean fillActiveHitMap) {\n String filePath = fileDirectory + \"/\" + fileName ;\n HashMap<HitCategory, ArrayList<HitsPerClub>> tempHitMap;\n\n tempHitMap = new HashMap<>();\n List<ArrayList<String>> csvLines = CsvFile.readFile(filePath, CSV_SEPARATOR);\n if (null != csvLines) {\n Iterator<ArrayList<String>> it = csvLines.iterator();\n while (it.hasNext()) {\n ArrayList<String> nextItem = it.next();\n HitCategory category = HitCategory.valueOf(nextItem.get(CATEGORY_POS));\n String clubName = nextItem.get(CLUB_NAME_POS);\n Integer qualityGood = Integer.valueOf(nextItem.get(QUALITY_GOOD_COUNTER_POS));\n Integer qualityNeutral = Integer.valueOf(nextItem.get(QUALITY_NEUTRAL_COUNTER_POS));\n Integer qualityBad = Integer.valueOf(nextItem.get(QUALITY_BAD_COUNTER_POS));\n\n ArrayList<HitsPerClub> hits = tempHitMap.get(category);\n if (null == hits) {\n hits = new ArrayList<>();\n }\n Club club = BagController.getClubByName(clubName);\n hits.add(new HitsPerClub(club, qualityGood, qualityNeutral, qualityBad));\n tempHitMap.put(category, hits);\n }\n }\n\n if (fillActiveHitMap) {\n hitMap = tempHitMap;\n }\n return tempHitMap;\n }", "private void updateDataFile() throws FileNotFoundException {\n \t\tfinal PrintWriter out = new PrintWriter(calendarDataFile);\n \t\tfor (int x = 0; x < CAL_WIDTH; x++) {\n \t\t\tfor (int y = 0; y < CAL_HEIGHT; y++) {\n \t\t\t\tif (contrib[y][x] == null ||\n \t\t\t\t\tcontrib[y][x].current - contrib[y][x].initial == 0)\n \t\t\t\t{\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tout.println(contrib[y][x]);\n \t\t\t}\n \t\t}\n \t\tout.close();\n \t}", "public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }", "public void read () throws IOException, ClassNotFoundException {\n BufferedReader reader = FileManager.getReader\n (JerboaProperties.getString(\"KeyFeatureContainer.filename\"));\n double kThreshold = JerboaProperties.getDouble(\"KeyFeatureContainer.keyThreshold\",0.0);\n double fThreshold = JerboaProperties.getDouble(\"KeyFeatureContainer.featureThreshold\",0.0);\n\n String line;\n String[] tokens;\n double x;\n line = reader.readLine();\n tokens = line.split(\"\\\\t\");\n \n sf = Double.parseDouble(tokens[2]);\n\n while ((line = reader.readLine()) != null) {\n tokens = line.split(\"\\\\t\");\n if (tokens.length == 2) {\n if ((! filterKeys) || kTable.containsKey(tokens[0])) {\n x = Double.parseDouble(tokens[1]);\n if (x >= kThreshold)\n kTable.put(tokens[0],x);\n else if (filterKeys)\n kTable.remove(tokens[0]);\n }\n } else {\n x = Double.parseDouble(tokens[1]);\n if (x >= fThreshold) {\n kfTable.put(tokens[0],x);\n fTable.put(tokens[0],Double.parseDouble(tokens[2]));\n }\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "public void cacheBusRouteData()\n\t{\t\n\t\tdataMap = BusRouteDataFileReader.readAndCacheBusRouteData(this.pathname);\n\t}", "private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public static void InvertedDocFrequency() throws FileNotFoundException {\n //int totalDoc = totaldocument;\n int i = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> docFrequency = new ArrayList<>();\n //\tList<Double> idfValue = new ArrayList<>();\n docFrequency = entry.getValue(); //again taking the list of word terms from the same dictionary hashmap\n int df = docFrequency.get(totaldocument+1); // it will save the idf of every word term at the 57th index\n double ans = Math.log10(df);\n ans /= totaldocument;\n\n idfFinal.add(i,ans); //updatin\n i++;\n }\n saveidf();\n }", "private static void readArff(String fileName) {\r\n\t\ttry {\r\n\t\t\tFileInputStream stream = new FileInputStream(fileName);\r\n\t\t\tInputStreamReader reader = new InputStreamReader(stream);\r\n\t\t\tBufferedReader buffer = new BufferedReader(reader);\r\n\t\t\t\r\n\t\t\tArrayList<String> tmpColumnName = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\tint userNo = 0; // sequence number of each user\r\n\t\t\tint attributeCount = 0;\r\n\t\t\t\r\n\t\t\tmaxValue = -1;\r\n\t\t\tminValue = 99999;\r\n\t\t\t\r\n\t\t\t// Read attributes:\r\n\t\t\twhile((line = buffer.readLine()) != null && !line.equals(\"TT_EOF\")) {\r\n\t\t\t\tif (line.contains(\"@ATTRIBUTE\")) {\r\n\t\t\t\t\tString name;\r\n\t\t\t\t\t\r\n\t\t\t\t\tline = line.substring(10).trim();\r\n\t\t\t\t\tif (line.charAt(0) == '\\'') {\r\n\t\t\t\t\t\tint idx = line.substring(1).indexOf('\\'');\r\n\t\t\t\t\t\tname = line.substring(1, idx+1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tint idx = line.substring(1).indexOf(' ');\r\n\t\t\t\t\t\tname = line.substring(0, idx+1).trim();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttmpColumnName.add(name);\r\n\t\t\t\t\tattributeCount++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.contains(\"@RELATION\")) {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.contains(\"@DATA\")) {\r\n\t\t\t\t\t// This is the end of attribute section!\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.length() <= 0) {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Set item count to data structures:\r\n\t\t\titemCount = (attributeCount - 1)/2;\r\n\t\t\tcolumnName = new String[attributeCount];\r\n\t\t\ttmpColumnName.toArray(columnName);\r\n\t\t\t\r\n\t\t\tint[] itemRateCount = new int[itemCount+1];\r\n\t\t\trateMatrix = new SparseMatrix(500000, itemCount+1); // Netflix: [480189, 17770]\r\n\t\t\t\r\n\t\t\t// Read data:\r\n\t\t\twhile((line = buffer.readLine()) != null && !line.equals(\"TT_EOF\")) {\r\n\t\t\t\tif (line.length() > 0) {\r\n\t\t\t\t\tline = line.substring(1, line.length() - 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringTokenizer st = new StringTokenizer (line, \",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile (st.hasMoreTokens()) {\r\n\t\t\t\t\t\tString token = st.nextToken().trim();\r\n\t\t\t\t\t\tint i = token.indexOf(\" \");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint movieID, rate;\r\n\t\t\t\t\t\tint index = Integer.parseInt(token.substring(0, i));\r\n\t\t\t\t\t\tString data = token.substring(i+1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (index == 0) { // User ID\r\n\t\t\t\t\t\t\t//int userID = Integer.parseInt(data);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tuserNo++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (data.length() == 1) { // Rate\r\n\t\t\t\t\t\t\tmovieID = index;\r\n\t\t\t\t\t\t\trate = Integer.parseInt(data);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (rate > maxValue) {\r\n\t\t\t\t\t\t\t\tmaxValue = rate;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (rate < minValue) {\r\n\t\t\t\t\t\t\t\tminValue = rate;\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(itemRateCount[movieID])++;\r\n\t\t\t\t\t\t\trateMatrix.setValue(userNo, movieID, rate);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse { // Date\r\n\t\t\t\t\t\t\t// Do not use\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\t\r\n\t\t\tuserCount = userNo;\r\n\t\t\t\r\n\t\t\t// Reset user vector length:\r\n\t\t\trateMatrix.setSize(userCount+1, itemCount+1);\r\n\t\t\tfor (int i = 1; i <= itemCount; i++) {\r\n\t\t\t\trateMatrix.getColRef(i).setLength(userCount+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println (\"Data File\\t\" + dataFileName);\r\n\t\t\tSystem.out.println (\"User Count\\t\" + userCount);\r\n\t\t\tSystem.out.println (\"Item Count\\t\" + itemCount);\r\n\t\t\tSystem.out.println (\"Rating Count\\t\" + rateMatrix.itemCount());\r\n\t\t\tSystem.out.println (\"Rating Density\\t\" + String.format(\"%.2f\", ((double) rateMatrix.itemCount() / (double) userCount / (double) itemCount * 100.0)) + \"%\");\r\n\t\t\t\r\n\t\t\tstream.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tSystem.out.println (\"No such file: \" + ioe);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void populateDataStructure() {\n\t\tfp.initiateFileProcessing();\r\n\t\tint length=0,i=0;\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tstr=fp.readOneLine();\r\n\t\t\tif(str==null){\r\n\t\t\t\t//System.out.println(\"------\");\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(str);\r\n\t\t\t\tString[] line=str.split(\"\\\\s+\");\r\n\t\t\t\t\r\n\t\t\t\tfor(i=0;i<line.length;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\tif(line[i].length()>0){\r\n\t\t\t\t\t\tsbbst.insert(line[i]);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//length--;\r\n\t\t\t\t\t//i++;\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(line.length);\r\n\t\t\t\t//while((length=line.length)>0 & i<=length-1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*while(true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(true){\r\n\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\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(line[i]);\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\t}*/\r\n\t\t\t\t\tlength--;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\t//System.out.println(length+\"\\n\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Total Words: \"+ count);\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Distinct Words: \"+ sbbst.distinctCount);\r\n\t\tfp.closeFiles();\r\n\t}", "public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}", "public void initialilzeMapEntry(String file){\n\t\tmap.put(file, new LinkedList<HashMap<Integer, Integer>>());\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "@Override\n\tpublic void doStuff(File fileName) {\n\t\tScanner s;\n\t\tint lineTotal=0;\n\t\ttry {\n\t\t\ts = new Scanner(fileName);\n\t\t\twhile(s.hasNext()){\n\t\t\t\ts.nextLine();\n\t\t\t\tlineTotal++;\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(lineTotal>0){\n\t\t\tInteger i = lineTotal;\n\t\t\tmap.put(fileName, i);\n\t\t}\n\t}", "private void readIndex() throws IOException {\n\t\t\tif (this.keys != null)\n\t\t\t\treturn;\n\t\t\tkeys = new HashMap<K, Long>(1024);\n\t\t\ttry {\n\t\t\t\twhile (index.hasNext()) {\n\t\t\t\t\tPair<K, Long> pair;// = new Pair<K, Long>(index.getSchema());\n\t\t\t\t\tpair = index.next();\n\t\t\t\t\tkeys.put(pair.key(), pair.value());\n\t\t\t\t\tif (firstKey == null)\n\t\t\t\t\t\tfirstKey = pair.key();\n\t\t\t\t\tfinalKey = pair.key();\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\n\t\t\t}finally {\n\t\t\t\tindexClosed = true;\n\t\t\t\tindex.close();\n\t\t\t}\n\t\t}", "public Frequency(ArrayList<LottoDay> list) {\n\n\t\tfill(list);//fill the maps\n\t}", "public abstract void readFromFile(String key, String value);", "@Override\n public List<Map<Frequency, DataForDetection>> getStuffReference() {\n return super.getStuffReference();\n }", "private void reLoadIndexesFromFileToIndexMap(File file) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n for (String line = reader.readLine(); line != null; line = reader\n .readLine()) {\n String[] termIndex = line.split(\" \");\n String key = termIndex[0];\n LinkedList<TermPositions> value = new LinkedList<>();\n String postingList = termIndex[1];\n // split the posting lists 1:1,2,4;2:4\n String[] subPostings = postingList.split(\";\");\n for (String posting : subPostings) {\n String[] docPosting = posting.split(\":\");\n int docId = Integer.parseInt(docPosting[0]);\n String[] positions = docPosting[1].split(\",\");\n LinkedList<Integer> positionsList = new LinkedList<>();\n for (String position : positions) {\n positionsList.add(Integer.parseInt(position));\n }\n TermPositions termPositions = new TermPositions(docId, positionsList);\n value.add(termPositions);\n }\n indexMap.put(key, value);\n\n }\n\n }", "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }", "private void getInitialGeneData(String fileName) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileReader(fileName));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n assert scanner != null;\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] parts = line.split(\",\");\n String geneName = parts[0];\n int geneDuration = Integer.parseInt(parts[1]);\n Gene gene = new Gene(geneName, geneDuration);\n genes.put(geneName, gene);\n if (!durationGenes.containsKey(geneDuration)) {\n durationGenes.put(geneDuration, new ArrayList<String>() {{\n add(geneName);\n }});\n }\n else {\n ArrayList<String> temp = durationGenes.get(geneDuration);\n temp.add(geneName);\n }\n }\n }" ]
[ "0.72216356", "0.69194174", "0.65786225", "0.6272899", "0.5941606", "0.59061587", "0.58715606", "0.5848092", "0.5838667", "0.57036936", "0.5700632", "0.56923777", "0.56619036", "0.5660752", "0.56014425", "0.5570459", "0.5569305", "0.5559316", "0.55322933", "0.5499499", "0.546806", "0.5457414", "0.5454982", "0.54363817", "0.54325545", "0.5403769", "0.5402652", "0.53963387", "0.53727686", "0.5333895", "0.53194773", "0.53161323", "0.52940583", "0.52854246", "0.52817917", "0.5264791", "0.52633685", "0.5261579", "0.5260377", "0.5255865", "0.5252618", "0.52516216", "0.5251316", "0.523323", "0.5222041", "0.5214144", "0.521374", "0.5204317", "0.52016145", "0.5193283", "0.5186477", "0.51770985", "0.5174629", "0.51720804", "0.51718515", "0.51630086", "0.51606417", "0.5152325", "0.5146576", "0.51459265", "0.51345825", "0.5130485", "0.5120825", "0.51165605", "0.5114929", "0.5110756", "0.51063764", "0.51056254", "0.51011026", "0.50997674", "0.5095905", "0.5090053", "0.5089347", "0.5077777", "0.5068828", "0.5059192", "0.5051906", "0.5050683", "0.50369275", "0.5024555", "0.5009809", "0.50048745", "0.5003944", "0.49985945", "0.499072", "0.4987981", "0.49826998", "0.4981307", "0.49693173", "0.49692774", "0.49635446", "0.4958285", "0.4951881", "0.4950673", "0.49483946", "0.49478218", "0.49446002", "0.4942911", "0.49422762", "0.4941151" ]
0.76735437
0
Add to values in the current data map using the provided text file
private static void feedMapWithWordList(List<String> wordList, HashMap<String, Long> dataMap) { for(int i = 0, size = wordList.size(); i < size; i++) { // Go through the list of words being fed - if a word already exists, add 1 to its frequency; otherwise, create a new key and give it a value of 1 final String word = wordList.get(i); if(dataMap.containsKey(word)) dataMap.replace(word, dataMap.get(word) + 1); else dataMap.put(word, 1L); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void fillDataMapFromFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedReader frequencyReader = new BufferedReader(new FileReader(frequencyFile));\n\n\t\tList<String> lines = frequencyReader.lines()\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tfrequencyReader.close();\n\n\t\tfor(int i = 0, size = lines.size(); i < size; i++) { // Split each line at the delimiter, into word & frequency - put them in the data map\n\n\t\t\tfinal String[] dataSplit = lines.get(i).split(WORD_FREQUENCY_DELIMITER);\n\t\t\tfinal String word = dataSplit[0];\n\t\t\tfinal long frequency = Long.parseLong(dataSplit[1]);\n\n\t\t\tdataMap.put(word, frequency);\n\t\t}\n\t}", "public void insertFromFile() throws IOException {\n File file = new File(Main.DATA_FILE_PATH);\n Scanner sc = new Scanner(file);\n\n dictionary = new Dictionary();\n TreeMap<String, ArrayList<String>> wordList = new TreeMap<>();\n String target = sc.nextLine().substring(1).trim();\n ArrayList<String> explain = new ArrayList<>();\n while (sc.hasNextLine()) {\n String str = sc.nextLine();\n if (str.indexOf(\"@\") == 0) {\n wordList.put(target, explain);\n target = str.substring(1).trim();\n explain = new ArrayList<>();\n } else if (str.indexOf(\"=\") == 0) {\n str = str.replace(\"+\", \" : \");\n String word = \" = \" + str.substring(1);\n explain.add(word);\n } else if (str.indexOf(\"#\") == 0 || str.indexOf(\"*\") == 0) {\n explain.add(str);\n } else {\n explain.add(\" \" + str);\n }\n }\n dictionary.setWordList(wordList);\n sc.close();\n }", "public static void addtoHashMap (File filename){\n\t\tFileInputStream fin;\n\t\ttry{\n\t\t\tfin = new FileInputStream(filename);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\tString n;\n\t\t\ttry{\n\t\t\t\twhile ((n = br.readLine()) != null){\n\t\t\t\t\tif(h.containsKey(n)){\n\t\t\t\t\t\tint i = (Integer) h.get(n);\n\t\t\t\t\t\th.put(n, (i+1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\th.put(n, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }", "@Override\r\n public Map getData(String fileName) {\r\n Map<String, Integer> map = new HashMap<>();\r\n \r\n File file = new File(fileName);\r\n \r\n try (BufferedReader bufferedReader =\r\n new BufferedReader(new FileReader(file))) {\r\n \r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n \r\n //if the word have already been in the map,\r\n //increases the number of occurances,\r\n //otherwise sets this number to 1\r\n //and puts a new value to the map\r\n String[] words = line.split(\" \");\r\n for (String word : words) {\r\n Integer value = map.get(word);\r\n if (value == null) {\r\n value = 1;\r\n } else {\r\n value++;\r\n }\r\n map.put(word, value);\r\n }\r\n }\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n return null;\r\n }\r\n \r\n return map;\r\n }", "protected static void readIn(Path p, HashMap<String, Double> myMap, FileSystem fs) throws IOException {\n\t FSDataInputStream inputStream = fs.open(p);\n\t BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n\t // Read in all the lines and push into hashmap\n\t String line;\n\t while((line = br.readLine()) != null) {\n\t \tString[] sectors = line.trim().split(\"\\t\");\n\t \tif (sectors.length != 2)\n\t \t\tthrow new Error(\"Parsing of file does not match specified input -- readIn\");\n\t \tif (myMap.containsKey(sectors[0]))\n\t \t\tthrow new Error(\"Node is trying to be added more than once\");\n\t \t\n\t \tmyMap.put(sectors[0], Double.parseDouble(sectors[1]));\n\t }\n\t br.close();\n\t fs.close();\n\t}", "protected void parseValues(File file){\r\n\t\ttry {\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\tString line;\r\n\t\t\tif(scanner.hasNext()) \r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\t\taddToSupplyValues(line);\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addToDictionary(InputStream f)\r\n throws IOException, FileNotFoundException {\r\n long t = System.currentTimeMillis();\r\n final int bufSize = 1000;\r\n int read;\r\n int numWords = 0;\r\n InputStreamReader fr = null;\r\n try {\r\n fr = new InputStreamReader(f);\r\n char[] buf = new char[bufSize];\r\n while ((read = fr.read(buf)) != -1) {\r\n // TODO modify this split regex to actually be useful\r\n String[] words = new String(buf, 0, read).split(\"\\\\W\");\r\n for (String s : words) {\r\n trie.insert(s);\r\n numWords++;\r\n }\r\n }\r\n } finally {\r\n if (fr != null) {\r\n try {\r\n fr.close();\r\n } catch (IOException e) {\r\n }\r\n }\r\n }\r\n System.out.println(\"Read from file and inserted \" + numWords + \" words into trie in \" +\r\n (System.currentTimeMillis() - t) / 1000.0 + \" seconds.\");\r\n }", "private void processFileEntries(final File filePath, Map<String, Integer> bigramHistogramMap) {\n\n BufferedInputStream bis = null;\n FileInputStream fis = null;\n\n try {\n\n // create FileInputStream object\n fis = new FileInputStream(filePath);\n\n // create object of BufferedInputStream\n bis = new BufferedInputStream(fis);\n\n String stringLine;\n\n BufferedReader br = new BufferedReader(new InputStreamReader(bis));\n\n String previousWord = \"\";\n\n while ((stringLine = br.readLine()) != null) {\n previousWord = addBigramHistogramEntry(stringLine, previousWord, bigramHistogramMap);\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found - \" + e);\n } catch (IOException ioe) {\n System.out.println(\"Exception while reading file - \" + ioe);\n } catch (Exception e) {\n System.out.println(\"Unable to load: \" + filePath.getName());\n } finally {\n // close the streams using close method\n try {\n if (fis != null) {\n fis.close();\n }\n if (bis != null) {\n bis.close();\n }\n } catch (IOException ioe) {\n System.out.println(\"Error while closing stream : \" + ioe);\n }\n }\n }", "public static void load(Context context) throws IOException {\n // read the file\n String raw = File.readFile(\"vaccine.txt\", context);\n\n // clear the map and load contents of file into the map\n map.clear();\n for (String line : raw.split(\"\\n\")) {\n if (line.equals(\"\")) {\n continue;\n }\n String[] data = line.split(\",\");\n if (data[0].equals(\"\") || data.length != 3) {\n continue;\n }\n map.put(data[0], Boolean.getBoolean(data[1]));\n dateMap.put(data[0], data[2]);\n }\n }", "public static Map readMap(File f)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n Scanner mapReader = new Scanner(f);\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "public void initialilzeMapEntry(String file){\n\t\tmap.put(file, new LinkedList<HashMap<Integer, Integer>>());\n\t}", "private static void updateFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedWriter frequencyWriter = new BufferedWriter(new FileWriter(frequencyFile));\n\n\t\tfor(Entry<String, Long> entry : dataMap.entrySet()) { // Write every entry to the frequency file\n\n\t\t\tfrequencyWriter.write(generateStringFromEntry(entry));\n\t\t\tfrequencyWriter.newLine();\n\t\t}\n\n\t\tfrequencyWriter.close();\n\t}", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "private void readDataFromUserLog(HashMap<String,TransactionData> hmap , String filename){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tString transaction = line.split(\",\")[1];\n\t\t\t/*\tString transactionKey = (transaction.length() > keyLength ) ?\n\t\t\t\t\t\ttransaction.substring(0,keyLength):\n\t\t\t\t\t\t\ttransaction;*/\n\t\t\t\tString transactionKey = formTransactionKey(transaction);\n\t\t\t\tdouble amount = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tif(hmap.containsKey(transactionKey)){\n\t\t\t\t\tTransactionData d = hmap.get(transactionKey);\n\t\t\t\t\td.addAnotherOccurence(amount);\n\t\t\t\t\thmap.put(transactionKey,d );\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar type = identifyTheTransactions(transaction);\n\t\t\t\t\tTransactionData d =new TransactionData(transaction,amount,type);\n\t\t\t\t\thmap.put(transactionKey,d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! File : \"+ filename +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"\\n\\nPlease try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "private void load(Path fileName) throws IOException {\n try(BufferedReader reader = Files.newBufferedReader(fileName)) {\n String line = \"\";\n\n // Matches lines with the format:\n // key=value\n // where the key is any sequence of lowercase letters. (a to z)\n // where value may be any letters from a to z (case insensitive) 0 to 9 or the letters '-' and '.'.\n Pattern validLine = Pattern.compile(\"^(?<key>[a-z]+)=(?<value>[a-zA-Z0-9-.]+)$\");\n\n // Read the file line by line\n while((line = reader.readLine()) != null) {\n if(line.startsWith(\";\")) { // Ignore lines that start with ;\n continue;\n }\n\n // Remove any whitespace\n line = line.trim();\n\n // Continue if our line is empty\n if(\"\".equals(line)) {\n continue;\n }\n\n Matcher matcher = validLine.matcher(line);\n\n if(!matcher.matches() || matcher.groupCount() != 2) {\n System.err.println(\"Unable to parse line: \" + line);\n continue;\n }\n\n String key = matcher.group(\"key\");\n String value = matcher.group(\"value\");\n\n map.put(key, value);\n }\n }\n }", "private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }", "private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void reLoadIndexesFromFileToIndexMap(File file) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n for (String line = reader.readLine(); line != null; line = reader\n .readLine()) {\n String[] termIndex = line.split(\" \");\n String key = termIndex[0];\n LinkedList<TermPositions> value = new LinkedList<>();\n String postingList = termIndex[1];\n // split the posting lists 1:1,2,4;2:4\n String[] subPostings = postingList.split(\";\");\n for (String posting : subPostings) {\n String[] docPosting = posting.split(\":\");\n int docId = Integer.parseInt(docPosting[0]);\n String[] positions = docPosting[1].split(\",\");\n LinkedList<Integer> positionsList = new LinkedList<>();\n for (String position : positions) {\n positionsList.add(Integer.parseInt(position));\n }\n TermPositions termPositions = new TermPositions(docId, positionsList);\n value.add(termPositions);\n }\n indexMap.put(key, value);\n\n }\n\n }", "@Override\n\tpublic void doStuff(File fileName) {\n\t\tScanner s;\n\t\tint lineTotal=0;\n\t\ttry {\n\t\t\ts = new Scanner(fileName);\n\t\t\twhile(s.hasNext()){\n\t\t\t\ts.nextLine();\n\t\t\t\tlineTotal++;\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(lineTotal>0){\n\t\t\tInteger i = lineTotal;\n\t\t\tmap.put(fileName, i);\n\t\t}\n\t}", "public abstract void readFromFile(String key, String value);", "public void store(final File f) throws IOException {\n BufferedOutputStream fos = null;\n try {\n fos = new BufferedOutputStream(new FileOutputStream(f));\n final StringBuilder line = new StringBuilder(64);\n for (final Map.Entry<String, String> entry : entrySet()) {\n line.delete(0, line.length());\n line.append(entry.getKey());\n line.append(\"=\");\n line.append(patternNewline.matcher(entry.getValue()).replaceAll(\"\\\\\\\\n\"));\n line.append(\"\\r\\n\");\n\n fos.write(UTF8.getBytes(line.toString()));\n }\n } finally {\n if (fos != null) {\n try {\n fos.flush();\n fos.close();\n } catch (final Exception e){}\n }\n }\n }", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "private void addFile(String file){\r\n\t\ttry(\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t){\r\n\t\t\tString html = \"\";\r\n\t\t\tString line = \"\";\r\n\t\t\t// read in html from passed file argument\r\n\t\t\twhile((line=reader.readLine())!=null){\r\n\t\t\t\thtml += line;\r\n\t\t\t}\r\n\t\t\t// retrieve all text content elements from page\r\n\t\t\tElements paragraphs = Jsoup.parse(html).select(\"p\");\r\n\t\t\tString content = \"\";\r\n\t\t\tfor (Element i : paragraphs){\r\n\t\t\t\tcontent += i.text()+\" \";\r\n\t\t\t}\r\n\t\t\t// tokenize and log all unique words\r\n\t\t\tMatcher matcher = pattern.matcher(content);\r\n\t\t\tString[] results = matcher.results().map(MatchResult::group).toArray(String[]::new);\r\n\t\t\tHashMap<String, Integer> count = new HashMap<String, Integer>();\r\n\t\t\tfor (int i = 0;i<results.length;++i){\r\n\t\t\t\tString word = results[i];\r\n\t\t\t\tif (count.get(word) != null){\r\n\t\t\t\t\tcount.put(word, count.get(word)+1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcount.put(word, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//create term objects with ids\r\n\t\t\tHashMap<Term, Integer> rCount = new HashMap<Term, Integer>();\r\n\t\t\tint id = 0;\r\n\t\t\tfor (Map.Entry<String, Integer> subset : count.entrySet()){\r\n\t\t\t\trCount.put(new Term(processWord(subset.getKey()),id), subset.getValue());\r\n\t\t\t}\r\n\t\t\t// store data from file\r\n\t\t\tindex.put(file, new IndexedDoc(rCount));\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static void fillDataset(Dataset d){\n try{\n\n BufferedReader in = new BufferedReader(new FileReader(\"src/points.txt\"));\n String str;\n while ((str = in.readLine()) != null){\n String[] tmp=str.split(\",\");\n d.addPoint(new Point(Double.parseDouble(tmp[0]), Double.parseDouble(tmp[1])));\n }\n in.close();\n }\n catch (IOException e){\n System.out.println(\"File Read Error\");\n }\n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tStringTokenizer tok = new StringTokenizer(value.toString(), \",\"); \n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(tok.hasMoreTokens())\n\t\t\t\t\ttok.nextToken();\n\t\t\t\tif(tok.hasMoreTokens())\n\t\t\t\t\tlocation.set(tok.nextToken());\n\t\t\t\tif(tok.hasMoreTokens())\n\t\t\t\t\tnew_cases.set(Long.parseLong(tok.nextToken()));\n\n\t\t\t\tcontext.write(location, new_cases);\n\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\t\n\t\t\t}\n\t\t}", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "public void getData(String filePath, Map<String, Object> map) {\n\t\treturn;\n\t}", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "public void writeFile(String filePath, Map input) {\n }", "private void addToMap(String line, HashMap<String, String> map) {\n if (!line.contains(\" \")) {\n return;\n }\n String[] parts = line.split(\" \");\n map.put(parts[0].toLowerCase(), parts[1]);\n }", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void addValueToStatMap(HashMap<String, ArrayList<Double>> map, String key, Double value) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new ArrayList<Double>());\r\n }\r\n map.get(key).add(value);\r\n }", "public void readKey(File file) throws FileNotFoundException {\n key = new double[CHAR_SET_SIZE][CHAR_SET_SIZE];\n Scanner in = new Scanner(file);\n int i = 0;\n while (in.hasNextLine()) {\n String line = in.nextLine();\n String [] vals = line.split(\" \");\n for (int j = 0; j < vals.length; j++) {\n key[i][j] = Double.parseDouble(vals[j]);\n }\n i++;\n }\n }", "public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void addEntry(String word, String file, int position, HashMap<String, ArrayList<Integer>> subIndex) {\n\t\tif (subIndex.containsKey(word)) {\r\n\t\t\t// checks if the file name is a key in the nested\r\n\t\t\t// hash map of the word\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t/*\r\n\t\t * if the word is not yet a key, create a new entry in the hash map.\r\n\t\t * Create new hash map to hold the file the word is found and an array\r\n\t\t * to find the position Then put that in the wordMap hash map as value\r\n\t\t * and the word as a key.\r\n\t\t */\r\n\t\t}else {\r\n\t\t\tsubIndex.put(word, new ArrayList<Integer>());\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t}\r\n\t\r\n\t}", "public void map(Object key, Text lineText, Context context) throws IOException, InterruptedException {\r\n\t\t\tString line = lineText.toString();\r\n\t\t\tString country = line.split(\",\")[1];\r\n\t\t\tString cases = line.split(\",\")[2];\r\n\t\t\tif(line.split(\",\")[0].equals(\"date\")) {}\r\n\t\t\telse{\r\n\t\t\t\tcontext.write(new Text(country), new LongWritable(Integer.parseInt(cases)));\r\n\t\t\t}\r\n\t\t}", "public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}", "private void read(String filename) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\t\n\t\t//a variable that will increase by one each time another element is added to the array\n\t\t//to ensure array size is correct\n\t\tint numStation = 0;\n\t\t\n\t\t//ignores first 6 lines\n\t\tfor(int i = 0; i < 3; ++i){\n\t\t\tbr.readLine();\n\t\t}\n\t\t\n\t\t//sets String equal readline\n\t\tString lineOfData = br.readLine();\n\n\t\twhile(lineOfData != null)\n\t\t{\n\t\t\tString station = new String();\n\t\t\tstation = lineOfData.substring(10,14);\n\t\t\tMesoAsciiCal asciiAverage = new MesoAsciiCal(new MesoStation(station));\n\t\t\tint asciiAvg = asciiAverage.calAverage();\t\t\n\n\t\t\tHashMap<String, Integer> asciiVal = new HashMap<String, Integer>();\n\t\t\t//put the keys and values into the hashmap\n\t\t\tasciiVal.put(station, asciiAvg);\n\t\t\t//get ascii interger avg value\n\t\t\tInteger avg = asciiVal.get(station);\n\t\t\t\n\t\t\thashmap.put(station,avg);\n\t\t\t\n\t\t\tlineOfData = br.readLine();\n\t\t\t\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "public void analysisAndImport(File uploadedFile)\n {\n Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();\n\n try\n {\n String[] keyArr = null;\n String key = null;\n String strKey = null;\n String strValue = null;\n InputStream is;\n is = new FileInputStream(uploadedFile);\n BufferedReader bf = new BufferedReader(new InputStreamReader(is));\n Properties prop = new Properties();\n prop.load(bf);\n Enumeration enum1 = prop.propertyNames();\n while (enum1.hasMoreElements())\n {\n // The key profile\n strKey = (String) enum1.nextElement();\n key = strKey.substring(0, strKey.lastIndexOf('.'));\n keyArr = strKey.split(\"\\\\.\");\n // Value in the properties file\n strValue = prop.getProperty(strKey);\n Set<String> keySet = map.keySet();\n if (keySet.contains(key))\n {\n Map<String, String> valueMap = map.get(key);\n Set<String> valueKey = valueMap.keySet();\n if (!valueKey.contains(keyArr[2]))\n {\n valueMap.put(keyArr[2], strValue);\n }\n }\n else\n {\n Map<String, String> valueMap = new HashMap<String, String>();\n valueMap.put(keyArr[2], strValue);\n map.put(key, valueMap);\n }\n }\n // Data analysis\n analysisData(map);\n }\n catch (Exception e)\n {\n logger.error(\"Failed to parse the file\", e);\n }\n }", "public HashMap readFile(String filePath, HashMap source){\n\t\tArrayList<String> temp1 = new ArrayList<String>();\n\t\tArrayList<String> temp2 = new ArrayList<String>();\n\t\tBufferedReader br = null;\n\t\t\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\t\n\t\t\t// \"Users/Jasmine/Documents/Eclipse/CacheDictionary/src/english.txt\"\n\t\t\tbr = new BufferedReader(new FileReader(filePath)); \n\t\t\t\n\t\t\t//str.matches(\".*\\\\d+.*\"); ==> string that contains numbers\n\t\t\t//.matches(\"[a-zA-Z]+\"); ==> string that only contains letter\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if the source file itself is not one word per line, we need to split the string\n\t\t\t\t * only letter(not single) will be stored in the array\n\t\t\t\t */\n\t\t\t\t//\n\t\t\t\tif(sCurrentLine.matches(\".*([ \\t]).*\")){ //check if the current line is a single word or not\n\t\t\t\t\ttemp1.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t\telse if(sCurrentLine.matches(\"[a-zA-Z]+\") && sCurrentLine.length()>1){\n\t\t\t\t\ttemp2.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t}// end of while loop\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(!temp1.isEmpty()){\n\t\t\tfor(int i = 0; i< temp1.size(); i++){\n\t\t\t\tString thisLine[] = temp1.get(i).split(\" \");\n\t\t\t\t//for each word in this line\n\t\t\t\tfor(int j = 0; j < thisLine.length; j++){\n\t\t\t\t\t//if it is a valid word\n\t\t\t\t\tif(thisLine[j].matches(\"[a-zA-Z]+\") && thisLine[j].length()>1 ){\n\t\t\t\t\t\tif( source.get(thisLine[j]) == null){\n\t\t\t\t\t\t\tsource.put(thisLine[j].toLowerCase(),thisLine[j].toLowerCase());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t} // end of if current word i valid\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // end of temp1\n\t\t\n\t\tif(!temp2.isEmpty()){\n\t\t\tfor(int i = 0; i< temp2.size(); i++){\n\t\t\t\tif(temp2.get(i).matches(\"[a-zA-Z]+\") && temp2.get(i).length()>1){\n\t\t\t\t\tif(source.get(temp2.get(i)) == null){\n\t\t\t\t\t\tsource.put(temp2.get(i).toLowerCase(),temp2.get(i).toLowerCase());\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn source;\n\t}", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "public static Map readMap(MapName s)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n System.out.println(s.toString());\n Scanner mapReader = new Scanner(run.getClass().getResourceAsStream(\"/\"+s.toString()+\".jwmap\"));\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "public static Map readingFilesMap(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n*/\n Map map = lines.collect(Collectors.toMap(\n line -> line.substring(line.lastIndexOf(\" \")),\n line -> line.substring(0, line.lastIndexOf(\" \"))\n ));//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n map.forEach((k, v) -> {\n System.out.println(\"key:\"+k+ \" Value=\"+v);\n } );\n return map;\n\n //set.forEach(System.out::print);\n\n\n }", "public void map(Object key, Text value, Context context)\n\t\t\t\t\tthrows IOException, InterruptedException\n\t\t\t\t\t{\n\t//Passing the string and splitting it by comma separated and storing it in string array\n\t\t\t\tString[] arr_new = value.toString().split(\",\");\n //Inserting the value at the 2nd position of the string array\n\t\t\t\tspeed.set(arr_new[14]);\n\t//Inserting the value at the 4th position of the string array and parsing it to integer\n\t\t\t\taccidents.set(Integer.parseInt(arr_new[6]));\n\t//Passing the key and value to context buffer of the Map output \n\t\t\t\tcontext.write(speed, accidents);\n\t\t\t\t\n\t\t\t\t\n\t\t}", "public void data() {\n\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\"/Users/macbook_user/Desktop/OOP Project/List.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return;\n }\n\n String[] columnName\n = {\"Id\", \"Name\", \"Amount\", \"Shelf#\", \"Position\"};\n int i, index;\n String line;\n try {\n br.readLine();\n while ((line = br.readLine()) != null) {\n index = 0;\n String[] se = line.split(\" \");\n Map<String, Object> item = new HashMap<>();\n for (i = 0; i < se.length; i++) {\n if (\"\".equals(se[i])) {\n continue;\n }\n if (index >= columnName.length) {\n continue;\n }\n item.put(columnName[index], se[i]);\n index++;\n }\n\n //get the amount of the item from the list\n int amount = Integer.parseInt((String) item\n .get(columnName[2]));\n\n // if amount greater than 0, Existence is Y, else N\n if (amount > 0) {\n item.put(\"Existence\", \"Y\");\n } else {\n item.put(\"Existence\", \"N\");\n }\n\n inventory.add(item);// add item to ArrayList\n }\n br.close();\n\n outPutFile();\n } catch (IOException e) {\n }\n\n }", "public static void main(String[] args) throws IOException{\n BufferedReader in = new BufferedReader(new FileReader(args[0]));\n //sc.close();\n\n SortedMap<String, Double> map = new TreeMap<String, Double>();\n String s = null;\n while ((s = in.readLine()) != null) {\n String key = s.split(\" \")[0];\n Double value = Double.parseDouble(s.split(\" \")[1]);\n Double currentValue = map.get(key);\n if (currentValue == null) currentValue = 0.0;\n map.put(key, value + currentValue);\n }\n in.close();\n\n Iterator<SortedMap.Entry<String, Double>> iterator = map.entrySet().iterator();\n while (iterator.hasNext()) {\n SortedMap.Entry<String, Double> entry = iterator.next();\n System.out.println(entry.getKey() + \" \" + entry.getValue());\n }\n }", "private void readFile(Path file, Charset charset) {\n\n BufferedReader reader = null;\n try {\n log.info(\"Reading file \" + file.getFileName().toString());\n reader = Files.newBufferedReader(file, charset);\n\n String line = null;\n while ((line = reader.readLine()) != null) {\n\n String[] splitLine = line.split(\",\");\n LocalDateTime ldt = LocalDateTime.parse(splitLine[0], DateTimeFormatter.ISO_DATE_TIME);\n\n /**\n * Creation of new map filtered to get all lines before the current date got from the current file line\n */\n Map<LocalDateTime, String> filteredMap = mapLines.entrySet().stream()\n .filter(entry -> entry.getKey().isBefore(ldt))\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (v1,v2) ->{ throw new RuntimeException(String.format(\"Duplicate key for values %s and %s\", v1, v2));},\n TreeMap::new));\n\n /**\n * Printing each line from filter map, also we delete those objects to maintain memory.\n */\n filteredMap.forEach((localDateTime, s) -> {\n System.out.println(s);\n mapLines.remove(localDateTime, s);\n });\n filteredMap.clear();\n\n mapLines.put(ldt, line);\n TimeUnit.SECONDS.sleep(1);\n }\n } catch (MalformedInputException m) {\n readFile(file, Charset.forName(\"Windows-1252\"));\n } catch (IOException e) {\n log.error(e, e);\n }\n catch (InterruptedException ie) {\n log.error(ie, ie);\n }\n }", "void addData(Map<String, List<Object>> values, Properties connectorMetadata)\n throws IOException;", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n public void writeData(String fileName, Map map) {\r\n File file = new File(fileName);\r\n \r\n if (!file.exists()) {\r\n try {\r\n file.createNewFile();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }\r\n \r\n try (BufferedWriter bufferedWriter =\r\n new BufferedWriter(new FileWriter(file))) {\r\n bufferedWriter.write(map.toString());\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public void readFile() throws IOException {\n String line;\n while ((line = fileReader.readLine()) != null) {\n wordStorage.addWords(line);\n }\n }", "public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}", "private static void fileRead(String file) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = \"\";\n\t\t\twhile((line=br.readLine())!=null) {\n\t\t\t\tString data[] = line.split(\"\\\\t\");\n\t\t\t\tint id = Integer.parseInt(data[0]);\n\t\t\t\tint groundTruth = Integer.parseInt(data[1]);\n\t\t\t\tactualClusters.put(id, groundTruth);\n\t\t\t\tArrayList<Double> temp = new ArrayList<>();\n\t\t\t\tfor(int i=2;i<data.length;i++) {\n\t\t\t\t\ttemp.add(Double.parseDouble(data[i]));\n\t\t\t\t}\n\t\t\t\tcols = data.length-2;\n\t\t\t\tgeneAttributes.put(id, temp);\n\t\t\t\tallClusters.add(id+\"\");\n\t\t\t\ttotalGenes++;\n\t\t\t}\n\t\t\ttotalCluster = totalGenes;\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "private void loadFrAfinnLibrary() throws FileNotFoundException, IOException{\n \n BufferedReader reader = new BufferedReader(new FileReader(\"src/language_libraries/AFINN-fr-165.txt\"));\n String line;\n \n while ((line = reader.readLine()) != null) \n {\n String[] parts = line.split(\"\t\", 2); //split each line into 2 parts separated by whitespace\n \n if(parts.length == 2){\n \n String key = parts[0].replaceAll(\"[\\\\s+|\\\\p{P}\\\\p{S}]\" ,\"\"); // part 1 is the words. replace any symbols or punctuation marks \"\"\n int value = Integer.parseInt(parts[1]); // part 2 is the word score\n afinnFrenchLibrary.put(key,value);//store in hashmap\n }\n }\n reader.close();\n }", "@Override\n\t\tprotected void map(Text key, Text value, Context context)throws IOException, InterruptedException {\n\t\t\tString val = value.toString();\n\t\t\t//String word = line.split(\",\")[0];\n\t\t\t//String docname = line.split(\",\")[1];\n\t\t\tdouble n = Double.parseDouble(val.split(\",\")[0]);\n\t\t\tdouble max = Double.parseDouble(val.split(\",\")[1]);\n\t\t\tdouble N = Double.parseDouble(val.split(\",\")[2]);\n\t\t\tdouble m = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t//System.out.println(\"n is:\"+n+\"max is:\"+max+\" N is:\"+N+\" m is:\"+m+\" D is:\"+D);\n\t\t\tdouble tf = n/max;\n\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t//String TF = \"tf: \"+tf;\n\t\t\tdouble idf = (Math.log(D/m)/Math.log(2));\n\t\t\tdouble tfidf = tf*idf;\n\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t//String IDF = \"idf: \"+idf;\n\t\t\tString word = key.toString().split(\",\")[0];\n\t\t\tString article = key.toString().split(\",\")[1];\n\t\t\tString new_val = word+\",\"+tf+\",\"+idf+\",\"+tfidf;\n\t\t\tcontext.write(new Text(article),new Text(new_val));\n\t\t}", "public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}", "private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\tMap<String, Integer> map = getMap();\r\n\r\n\t\t/*\r\n\t\t * The string tokenizer class allows an application to break a string into\r\n\t\t * tokens A token is nothing but a line in file\r\n\t\t */\r\n\t\tStringTokenizer split = new StringTokenizer(value.toString());\r\n\r\n\t\t/*\r\n\t\t * Tests if there are more tokens available from this tokenizer's string. If\r\n\t\t * this method returns true, then a subsequent call to nextToken with no\r\n\t\t * argument will successfully return a token.\r\n\t\t */\r\n\ttry {\r\n\t\twhile (split.hasMoreTokens())\r\n\r\n\t\t{\r\n\t\t\t// gives the next token from this string tokenizer\r\n\t\t\t//String token = itr.nextToken();\r\n\t\t\tString ntoken = split.nextToken();\r\n\t\t\tif (map.containsKey(ntoken))// true if this map has a mapping for the specified key\r\n\t\t\t{\r\n\t\t\t\tint sum = map.get(ntoken) + 1;\r\n\t\t\t\tmap.put(ntoken, sum);\r\n\t\t\t} else {\r\n\t\t\t\tmap.put(ntoken, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t\t\r\n\t}\r\n\t}", "public void processFile(File rootFile) throws IOException {\n\t\tBufferedReader bf=new BufferedReader(new FileReader(rootFile));\r\n\t\tString lineTxt = null;\r\n\t\tint pos=1;\r\n\t\twhile((lineTxt = bf.readLine()) != null){\r\n String[] line=lineTxt.split(\" \");\r\n// System.out.println(line[0]);\r\n String hscode=line[0];\r\n \r\n \r\n TreeMap<String,Integer> word=null;\r\n if(!map.containsKey(hscode)){\r\n word=new TreeMap<String,Integer>();\r\n for(int i=1;i<line.length;i++){\r\n \tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n }\r\n map.put(hscode, word);\r\n }\r\n else{\r\n //\tSystem.out.println(\"sss\");\r\n \tword = map.get(hscode);\r\n \tfor(int i=1;i<line.length;i++){\r\n \t\tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n \t}\r\n \t\r\n \tmap.put(hscode, word);\r\n \t\r\n }\r\n\t\t}\r\n\t\tbf.close();\r\n//\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n//// \tSystem.out.println(\"hscode:\"+entry.getKey());\r\n// \tTreeMap<String, Integer> value = entry.getValue();\r\n// \tfor(Entry<String,Integer> e:value.entrySet()){\r\n//// \tSystem.out.println(\"单词\"+e.getKey()+\" 词频是\"+e.getValue());\r\n// \t}\r\n// }\r\n\t}", "public synchronized void addHashToList(String file,HashMap<Integer,Integer> outcome){\n\t\tLinkedList<HashMap<Integer, Integer>> list = (LinkedList<HashMap<Integer,Integer>>)map.get(file);\n\t\tlist.add(outcome);\n\t}", "public void readFile(String filename) throws IOException {\n BufferedReader buffer = new BufferedReader(new FileReader(filename));\n\n String line;\n int row = 0;\n isFirstLine = true;\n\n while ((line = buffer.readLine()) != null) {\n String[] vals = line.trim().split(\"\\\\s+\");\n int length = vals.length;\n \n if(isFirstLine) {\n \tfor(int col = 0; col < 2; col++) {\n \t\tif(col == 0)\n \t\t\trowSize = Integer.parseInt(vals[col]);\n \t\telse\n \t\t\tcolSize = Integer.parseInt(vals[col]);\n \t}\n \tskiMap = new int[rowSize][colSize];\n \tisFirstLine = false;\n }\n else {\n \tfor (int col = 0; col < length; col++) {\n \tskiMap[row][col] = Integer.parseInt(vals[col]);\n }\n \t row++;\n }\n }\n \n if(buffer != null)\n \tbuffer.close();\n }", "public static void main(String[] args) throws IOException {\n BufferedReader file = new BufferedReader(new FileReader(args[0]));\n// bufferedReader.close();\n Map<String, Double> map = new TreeMap<String, Double>();\n String str = file.readLine();\n while (str != null)\n {\n String[] lines = str.split(\" \");\n if (!map.containsKey(lines[0]))\n map.put(lines[0], Double.parseDouble(lines[1]));\n else\n map.replace(lines[0], Double.parseDouble(lines[1]) + map.get(lines[0]));\n str = file.readLine();\n }\n file.close();\n double max = -1;\n for (Map.Entry<String, Double> entry : map.entrySet())\n {\n if (max < entry.getValue())\n max = entry.getValue();\n }\n for (Map.Entry<String, Double> entry : map.entrySet())\n {\n if (max == entry.getValue())\n System.out.println(entry.getKey());\n }\n }", "public static void RT() {////cada clase que tiene informacion en un archivo txt tiene este metodo para leer el respectivo archivoy guardarlo en su hashmap\n\t\treadTxt(\"peliculas.txt\", pelisList);\n\t}", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String line = value.toString().toLowerCase();\n line = line.replaceAll(regex, \" \");\n\n StringTokenizer itr = new StringTokenizer(line);\n while (itr.hasMoreTokens()) {\n word.set(itr.nextToken());\n context.write(word, one);\n }\n }", "protected void loadFeatureValues(String reposFilename){\n\t\trepos = new THashMap<String, TIntObjectHashMap<TIntDoubleHashMap>>();\n\t\tqidFeatureSpaceSizeMap = new TObjectIntHashMap<String>();\n\t\ttry{\n\t\t\tBufferedReader br = Files.openFileReader(reposFilename);\n\t\t\tString line = null;\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tString[] segments = line.split(\":\");\n\t\t\t\tif (segments.length<2)\n\t\t\t\t\tcontinue;\n\t\t\t\tString[] tokens = segments[0].trim().split(\" \");\n\t\t\t\tif (tokens.length>2)\n\t\t\t\t\tcontinue;\n\t\t\t\tString qid = tokens[0]; int docid = Integer.parseInt(tokens[1]);\n\t\t\t\tif (!repos.containsKey(qid))\n\t\t\t\t\trepos.put(qid, new TIntObjectHashMap<TIntDoubleHashMap>());\n\t\t\t\tTIntObjectHashMap<TIntDoubleHashMap> qFeatures = repos.get(qid);\n\t\t\t\tif (!qFeatures.containsKey(docid))\n\t\t\t\t\tqFeatures.put(docid, new TIntDoubleHashMap());\n\t\t\t\tTIntDoubleHashMap map = qFeatures.get(docid);\n\t\t\t\tTObjectDoubleHashMap<String> termWeightMap = null;\n\t\t\t\ttry{\n\t\t\t\t\ttermWeightMap = SingleLineTRECQuery.parseQueryStringWithWeights(segments[1]);\n\t\t\t\t}catch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tlogger.debug(line);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\tString[] terms = termWeightMap.keys(new String[termWeightMap.size()]);\n\t\t\t\tfor (String term : terms){\n\t\t\t\t\tmap.put(Integer.parseInt(term), termWeightMap.get(term));\n\t\t\t\t}\n\t\t\t\tterms = null; termWeightMap.clear(); termWeightMap=null;\n\t\t\t}\n\t\t\tbr.close();\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString[] qids = (String[])repos.keySet().toArray(new String[repos.keySet().size()]);\n\t\tfor (String qid : qids){\n\t\t\tthis.termFeatureMapping(qid, repos.get(qid));\n\t\t}\n\t}", "private void createMap(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\r\n\t\t// Chromosomes\r\n\t\tString[] chrms = in.readLine().split(\",\");\r\n\t\t// Marker positions\r\n\t\tString[] mrkrs = in.readLine().split(\",\");\r\n\t\tin.close();\r\n\r\n\r\n\t\t// Now rewrite it in Flapjack map format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"map\")));\r\n\t\tout.write(\"# fjFile = MAP\");\r\n\t\tout.newLine();\r\n\r\n\t\tfor (int i = 0; i < chrms.length; i++)\r\n\t\t{\r\n\t\t\tMarker m = new Marker(i, chrms[i], mrkrs[i]);\r\n\t\t\tmarkers.add(m);\r\n\r\n\t\t\tout.write(m.name + \"\\t\" + m.chr + \"\\t\" + m.pos);\r\n\t\t\tout.newLine();\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t\tmarkers.stream().forEach(marker -> {\r\n\r\n\t\t\tSystem.out.println(marker.name);\r\n\r\n\t\t});\r\n\t}", "private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while (in.hasNext()) {\n table.add(in.next());\n }\n }", "@Override\n\t\tpublic void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString elems[] = value.toString().split(\",\");\n\t\t\tint custID = Integer.parseInt(elems[1]);\n\t\t\tText result = new Text(filetag+elems[2]+\",\"+elems[3]);\n\t\t\tcontext.write(new IntWritable(custID), result);\n\t\t}", "@Override\n\t\tpublic void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString elems[] = value.toString().split(\",\");\n\t\t\tint custID = Integer.parseInt(elems[0]);\n\t\t\tText result = new Text(filetag+elems[1]+\",\"+elems[4]);\n\t\t\tcontext.write(new IntWritable(custID), result); \n\t\t}", "@Override\n\t\tpublic void map(Text key, Text value,\n\t\t\t\tOutputCollector<Text, Text> output, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\tfor (String word : words) {\n\t\t\t\tif (key.toString().equals(word)) {\n\t\t\t\t\tString[] outVals = parseOutValue(value.toString(), filemap)\n\t\t\t\t\t\t\t.split(\"\\n\");\n\t\t\t\t\tfor (String val : outVals) {\n\t\t\t\t\t\tString outkey = val.substring(0, val.indexOf('['));\n\t\t\t\t\t\tString outval = word + \"::\"\n\t\t\t\t\t\t\t\t+ val.substring(val.indexOf(':') + 1);\n\t\t\t\t\t\toutput.collect(new Text(outkey), new Text(outval));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void addToMap(Scanner in) {\n while(in.hasNext()) {\n myList.put(in.next(), 0);\n }\n }", "public void storeValue() {\n\t\tScanner s;\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\SubR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tSubR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\SubR2.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tSubR2.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\SubIRR.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tSubIRR.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PredR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPredR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PredR2.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPredR2.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PredR3.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPredR3.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\ObjR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tObjR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\ObjR2.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tObjR2.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PrepR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPrepR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\t/**\n\t * Read data and store\n\t * @param data\n\t * \t\t\t\tThe map to store data read from ser file\n\t * @return Map<String, T>\n\t * \t\t\ta map of data that has all the ser file data\n\t * @throws ClassNotFoundException\n\t * @throws IOException\n\t */\n\tprotected Map<String, T> readFromFile(Map<String, T> data) throws ClassNotFoundException, IOException {\n\t\t\n\t\tInputStream file = new FileInputStream(filePath);\n\t\tInputStream buffer = new BufferedInputStream(file);\n\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t//deserialize the Map\n\t\tdata = (HashMap<String, T>) input.readObject();\n\t\tinput.close();\n\t\treturn data;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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}", "@Override\n\tpublic void map(Text key, Text value, Context context) throws IOException,\n\t\tInterruptedException {\n\t\tText newKey = new Text();\n\t\tText newValue = new Text();\n\t\t\t\n\t for (String word: value.toString().toLowerCase().split(\"\\\\W+\")){\n\t\t\t\t// for each word emit a key value pair\n\t \tnewKey.set(word);\n\t \tnewValue.set(fileName + \"@\" + key);\n\t \tcontext.write(newKey, newValue);\n\t }\n\t}", "public void addToFilenameMap(String filename, Nodemapper nodemapper)\n {\n HashSet<Nodemapper> nodemappers = this.loadedFiles.get(filename);\n if (nodemappers != null)\n {\n nodemappers.add(nodemapper);\n } \n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public static void getInputFileData(){\n\t\t\t\n\t\t\t// editable fields\n\t\t\t\n\t\t\tString directDistanceFile = \"../data/direct_distance_1.txt\";\n\t\t\tString graphInputFile = \"../data/graph_input_1.txt\";\n\t\t\t\n\t\t\t\n\t\t\t// end of editable fields\n\t\t\t\n\t\t\t\n\t\t\tFile file1 = new File(directDistanceFile);\n\t\t\tFile file2 = new File(graphInputFile);\n\t\t\tfiles.add(file1);\n\t\t\tfiles.add(file2);\n\t\t\t\n\t\t\t/*// Directory where data files are\n\t\t\tPath dataPath = Paths.get(\"../data\");\n\t\t\t\n\t\t\tString path = dataPath.toAbsolutePath().toString();\n\t\t\t\n\t\t\tFile dir = new File (path);\n\t\t\t\t\t\n\t\t\tif (dir.listFiles() == null){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: No files found.\");\n\n\t\t\t} else if (dir.listFiles() != null && dir.listFiles().length == 2) {\n\t\t\n\t\t\t\tfor (File file : dir.listFiles()){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfiles.add(file.getName());\n\t\t\t\t\t} catch(Exception e) {\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} else {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: Data folder may only contain two files: direct_distance and\"\n\t\t\t\t\t\t+ \" graph_input. Please modify contents accordingly before proceeding for alorithm to execute.\");\n\t\t\t\t\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\tfor (File file: files){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// store direct distances in a hashmap\n\t\t\t\t\tif (file.toString().contains(\"distance\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder num = new StringBuilder();\n\t\t\t\t \tStringBuilder str = new StringBuilder();\n\t\t\t\t \n\t\t\t\t \tfor(char c : line.toCharArray()){\n\t\t\t\t \t\t//find the distance\n\t\t\t\t if(Character.isDigit(c)){\n\t\t\t\t num.append(c);\n\t\t\t\t } \n\t\t\t\t //find the associated letter\n\t\t\t\t else if(Character.isLetter(c)){\n\t\t\t\t str.append(c); \n\t\t\t\t }\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \t// add values into hashmap\n\t\t\t\t \tdistance.put(str.toString(), Integer.parseInt(num.toString()));\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(distance);\n\t\t\t\t \n\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t// store inputs in a \n\t\t\t\t\telse if (file.toString().contains(\"input\")){\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t \n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t int x=0; // keeps track of line to add\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \tString[] values = line.split(\"\\\\s+\");\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t if (matrix == null) {\n\t\t\t\t \t\t //instantiate matrix\n\t\t\t\t matrix = new String[widthOfArray = values.length]\n\t\t\t\t \t\t \t\t\t[lenghtOfArray = values.length];\n\t\t\t\t }\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t// add values into the matrix\n\t\t\t\t \tfor (int i=0; i < values.length; i++){\n\t\t\t\t \t\t\n\t\t\t\t \t\tmatrix[i][x] = values[i];\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \tx++; // next line\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 reader.close(); // close the reader\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\t\n\t\t\t\t\t// Store input combinations in a hashmap\n\t\t\t\t\tint y=1; \n\t\t\t\t\twhile (y < lenghtOfArray){\n\t\t\t\t\t\t\n\t\t\t\t\t\tinputNodes.add(matrix[0][y]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i=1; i < widthOfArray; i++){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tStringBuilder str = new StringBuilder();\n\t\t\t\t\t\t\tstr.append(matrix[0][y]);\n\t\t\t\t\t\t\tstr.append(matrix[i][0]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint inputValue = Integer.parseInt(matrix[i][y]);\n\n\t\t\t\t\t\t\tif (inputValue > 0){\n\t\t\t\t\t\t\t\tinputMap.put(str.toString(), inputValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ty++;\n\t\t\t\t\t}\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(\"WARNING: Please check: \"+ file.toString() + \". It was not found.\");\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void insertFile(Map<String, Object> map) {\n\t\t\r\n\t\tsqlSession.insert(namespace + \"insertFile\", map);\r\n\t}", "public WordMap generateWordMap(String filePath) {\n\n WordMap wm = new WordMap();\n Scanner sc;\n\n try {\n sc = new Scanner(new File(filePath));\n\n while (sc.hasNextLine()) {\n\n String line = sc.nextLine();\n String[] lineData = line.split(\" \");\n\n //Gets a string of the word we are currently parsing\n String word = lineData[colWord].split(\"=\")[1];\n\n wm.put(word, getWordFromLine(line));\n }\n\n } catch (Exception e) {\n System.err.println(\"Error in generateWordMap\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n sc.close();\n return wm;\n }", "public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }", "private void loadDataMap() throws IOException {\n\t\tDaySleepDurationMap.getInstance().clear();\n\n\t\t// List of entries\n\t\tList<SleepEntry> entries = new ArrayList<SleepEntry>();\n\t\t\n\t\t// Get CSV file\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(DATA_LOCATION)));\n\t\tString line = \"\";\n\n\t\t// Ignore the first line (CSV header)\n\t\tbr.readLine();\n\n\t\twhile (((line = br.readLine()) != null)){\n\t\t\t// Convert the line from CSV to a SleepEntry\n\t\t\tSleepEntry se = SleepEntry.parseFromCSV(line);\n\t\t\t// Add it to the entry list\n\t\t\tentries.add(se);\n\t\t}\n\t\t\n\t\tfor (SleepEntry se : entries){\n\t\t\t// Add data from list to the map\n\t\t\tDaySleepDurationMap.getInstance().addToDay(se.getEffectiveDate(), se.getDuration());\n\t\t}\n\t\t\n\n\t\tbr.close();\n\t\t\n\t}", "public static void processDataFile() {\n final String INPUT_FILENAME = \"input/assn6input1.txt\";\n File inputFile = null;\n Scanner inputScanner = null;\n System.out.println(\"Reading data from file: \" + INPUT_FILENAME);\n System.out.println();\n try {\n inputFile = new File(INPUT_FILENAME);\n inputScanner = new Scanner(inputFile);\n } catch(FileNotFoundException e) {\n System.err.println(\"Error opening file \" + INPUT_FILENAME);\n }\n while(inputScanner.hasNext()) {\n String[] dataLine = inputScanner.nextLine().split(\",\");\n // Is the first token \"REALTOR\"?\n if(dataLine[0].toUpperCase().equals(\"REALTOR\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addRealtor(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteRealtor(dataLine[2]);\n }\n else {\n \n }\n }\n // Is the first token \"PROPERTY\"?\n else if(dataLine[0].toUpperCase().equals(\"PROPERTY\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addProperty(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteProperty(Integer.parseInt(dataLine[2]));\n }\n else {\n \n }\n } else {\n // not realtor or property in the first token\n System.out.println(\"\\tNeither realtor, nor property in first\"\n + \" token\");\n }\n }\n inputScanner.close();\n }", "public void loadEntities (File entitiesFile){\n BufferedReader br = null;\n int lineNum = 0;\n try {\n String term;\n br = new BufferedReader(new FileReader(entitiesFile));\n String line = \"\";\n while ((line = (br.readLine())) != null) {\n lineNum++;\n if (!line.contains(\"--noEntities--\")) {\n String docId = line.substring(0, line.indexOf(\":\"));\n String [] entitiesStr = line.split(\"; \");\n if (entitiesStr.length > 0){\n entitiesStr[0] = entitiesStr[0].substring(line.indexOf(\":\") + 2);\n }\n HashMap <String, Integer> entitiesInfo = new HashMap<>();\n for (int i = 0; i < entitiesStr.length ; i++){\n String [] entitiesRankStr = entitiesStr[i].split(\" - \");\n if (entitiesRankStr.length < 2){\n System.out.println(lineNum + \" \" + entitiesRankStr[0]);\n }\n entitiesInfo.put(entitiesRankStr[0], Integer.parseInt(entitiesRankStr[1]));\n }\n entities.put(docId, entitiesInfo);\n }\n }\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static Map loadMap(String MapFile){\n int Bottle =0;\n int Bottle1= 0;\n Map Object = new Map(0,0);\n \n try {\n \n Scanner scan = new Scanner(new File(MapFile));\n FileReader fr = new FileReader(MapFile);\n while(scan.hasNextLine()){\n if (scan.hasNextInt()){\n Bottle = scan.nextInt();\n Bottle1 = scan.nextInt();\n\n }\n Object = new Map(Bottle,Bottle1);\n }\n fr.close();\n }\n \n catch (Exception e){\n System.out.println(\"Sorry Nothing Found\");\n System.out.println(e.toString());\n e.printStackTrace(); \n } \n \n return Object;\n }", "public void addFile(final String file);", "private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}", "private static void addToHashMap(String csvLine, HashMap<String, HashMap<String, String>> testData)\n {\n final String KEY_DELIMITER = \",\";\n final String RECORD_DELIMITER = \";\";\n final String VALUE_DELIMITER = \"=\";\n final int KEY = 0;\n final int VALUE = 1;\n\n //Get all keys available in line\n String[] keys = parseCSVLine(csvLine, KEY_DELIMITER);\n if (keys.length > 0)\n {\n HashMap<String,String> data = new HashMap<String, String>();\n String[] records = parseCSVLine(keys[1], RECORD_DELIMITER);\n for(String recordData : records)\n {\n String [] datavalues = parseCSVLine(recordData, VALUE_DELIMITER);\n if (datavalues.length > 0)\n {\n data.put(new String(datavalues[KEY]), new String(datavalues[VALUE]));\n }\n }\n testData.put(new String(keys[0]), data);\n }\n }" ]
[ "0.65534186", "0.62322426", "0.62035537", "0.6174466", "0.6141494", "0.6078921", "0.6069393", "0.60394615", "0.5996834", "0.5928372", "0.58985895", "0.58978295", "0.58826035", "0.58667856", "0.58606917", "0.58316725", "0.58160055", "0.58130085", "0.57844275", "0.5757693", "0.5744976", "0.57061493", "0.5700835", "0.56662095", "0.5641986", "0.55910397", "0.55899304", "0.5579647", "0.55766827", "0.55651784", "0.55627996", "0.55467415", "0.5544465", "0.5543276", "0.5540523", "0.55225056", "0.5472867", "0.54148155", "0.541398", "0.5409438", "0.54002714", "0.53930146", "0.53917974", "0.53870285", "0.53832805", "0.5370765", "0.536695", "0.53562504", "0.53493273", "0.5349", "0.5348989", "0.5346979", "0.5340108", "0.5339041", "0.53323084", "0.53279716", "0.53279537", "0.53044343", "0.52840286", "0.52835757", "0.52754724", "0.5269586", "0.5263258", "0.526161", "0.5261313", "0.5259581", "0.52590066", "0.52552485", "0.5238163", "0.52303636", "0.5224563", "0.5224561", "0.5223511", "0.52192837", "0.52151453", "0.5195917", "0.518285", "0.5180396", "0.5179343", "0.51790136", "0.5174656", "0.5168302", "0.5164823", "0.5163623", "0.51543134", "0.514863", "0.5147625", "0.5136291", "0.51246685", "0.51128167", "0.5110008", "0.5103328", "0.50874597", "0.5083842", "0.5079291", "0.5070292", "0.5070022", "0.5068508", "0.5065906", "0.50588626", "0.50585353" ]
0.0
-1
Rewrite frequency file with the data map
private static void updateFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException { final BufferedWriter frequencyWriter = new BufferedWriter(new FileWriter(frequencyFile)); for(Entry<String, Long> entry : dataMap.entrySet()) { // Write every entry to the frequency file frequencyWriter.write(generateStringFromEntry(entry)); frequencyWriter.newLine(); } frequencyWriter.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void fillDataMapFromFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedReader frequencyReader = new BufferedReader(new FileReader(frequencyFile));\n\n\t\tList<String> lines = frequencyReader.lines()\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tfrequencyReader.close();\n\n\t\tfor(int i = 0, size = lines.size(); i < size; i++) { // Split each line at the delimiter, into word & frequency - put them in the data map\n\n\t\t\tfinal String[] dataSplit = lines.get(i).split(WORD_FREQUENCY_DELIMITER);\n\t\t\tfinal String word = dataSplit[0];\n\t\t\tfinal long frequency = Long.parseLong(dataSplit[1]);\n\n\t\t\tdataMap.put(word, frequency);\n\t\t}\n\t}", "public static void DocumentFrequencies() throws FileNotFoundException {\n for (Entry<String, List<Integer>> entry : dictionary.entrySet()) {\n List<Integer> termfrequency = new ArrayList<>();\n\n termfrequency = entry.getValue();\t// getting each word's termfrequency list\n int i = 0;\n termfrequency.add(0); \t\t\t//maintaining documentfrequency at the 57th index\n Integer documentFrequency = termfrequency.get(totaldocument+1);\n while(i<56) { //iterate 0 to 55 all speeches term frequency\n if(termfrequency.get(i)>0) {\t\t//increment document frequency of that word if termfrequency is greater than 0.0\n documentFrequency++;\t\t\t//increment document frequency\n }\n i++;\t\t//increment index\n }\n termfrequency.set(57, documentFrequency);\t//re-set the documentfrequency and save the current maintained document frequency from 0 to calculated value\n dictionary.put(entry.getKey(), termfrequency);\t\t// place the incremented final value of that word back to the same list in dictionary hashmap\n }\n //save();\n }", "public static void InvertedDocFrequency() throws FileNotFoundException {\n //int totalDoc = totaldocument;\n int i = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> docFrequency = new ArrayList<>();\n //\tList<Double> idfValue = new ArrayList<>();\n docFrequency = entry.getValue(); //again taking the list of word terms from the same dictionary hashmap\n int df = docFrequency.get(totaldocument+1); // it will save the idf of every word term at the 57th index\n double ans = Math.log10(df);\n ans /= totaldocument;\n\n idfFinal.add(i,ans); //updatin\n i++;\n }\n saveidf();\n }", "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}", "public void flush(String filename) throws IOException {\n // open the file\n // the false part means that the buffer won't be automatically flushed\n // we flush after every term\n PrintStream out = new PrintStream(new BufferedOutputStream(\n new FileOutputStream(filename)), false);\n\n // STORE THE INDEX\n\n // an iterator over all terms\n Iterator i = index.keySet().iterator();\n\n // temporary variables\n Iterator docs;\n HashMap docList;\n String doc;\n int[] t;\n\n // the first line is the number of terms\n out.println(index.size());\n String word;\n\n // loop through each term\n while (i.hasNext()) {\n word = (String) i.next();\n\n // print the term\n out.println(word);\n\n // get variables to loop through documents containing the term\n docList = (HashMap) index.get(word);\n docs = docList.keySet().iterator();\n\n // loop through documents containing the term\n while (docs.hasNext()) {\n // get the document and frequency\n doc = (String) docs.next();\n t = (int[]) docList.get(doc);\n\n // store the document and frequency\n out.println(doc);\n out.println(t[0]);\n }\n\n // put another newline on there and flush the buffer\n out.println();\n out.flush();\n }\n\n // close the file\n out.close();\n }", "public void buildHuffmanList(File inputFile){\n try{\n Scanner sc = new Scanner(inputFile);\n while(sc.hasNextLine()){\n\n String line = sc.nextLine();\n for(int i =0;i<line.length();i++){\n \n if(freqTable.isEmpty())\n freqTable.put(line.charAt(i),1);\n else{\n if(freqTable.containsKey(line.charAt(i)) == false)\n freqTable.put(line.charAt(i),1);\n else{\n int oldValue = freqTable.get(line.charAt(i));\n freqTable.replace(line.charAt(i),oldValue+1);\n }\n }\n }\n }\n }\n catch(FileNotFoundException e){\n System.out.println(\"Can't find the file\");\n }\n }", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "void genIDFData(String vocabFile, String outFile) throws Exception {\n List<String> lines = FileUtils.readLines(new File(vocabFile), Charset.defaultCharset());\n BufferedWriter bw = new BufferedWriter(new FileWriter(outFile));\n int N = reader.numDocs();\n for (String line: lines) {\n String word = TrecDocIndexer.analyze(indexer.getAnalyzer(), line).trim();\n int df = reader.docFreq(new Term(TrecDocIndexer.FIELD_ANALYZED_CONTENT, word));\n bw.write(line.trim() + \"\\t\");\n bw.write(String.valueOf(Math.log(N/(double)df)));\n bw.newLine();\n }\n bw.close();\n }", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "private static void generateForSingleFile() throws IOException {\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename));\n\t\t\n\t\tIterator iter = countOne.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t\tBufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename));\n\t\titer = countTwo.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout1.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\t \n\t\tif(out1!=null)\n\t\t\tout1.close();\n\t}", "void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}", "public static void outputAndStatistics(String inputName, String outputName) throws IOException {\r\n\t\tFileReader input = new FileReader(inputName);\r\n\t\tBufferedReader reader = new BufferedReader(input);\r\n\t\tStringBuilder output = new StringBuilder();\r\n\r\n\t\tint x;\r\n\r\n\t\twhile((x = reader.read()) != -1) {\r\n\t\t\tif(x < 256) {\r\n\t\t\t\toutput.append(map.get((char)x));\r\n\t\t\t}\r\n\t\t}\r\n\t\treader.close();\r\n\t\t\r\n\t\tFile file = new File(outputName);\r\n\t\tfile.createNewFile();\r\n\t\t\r\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\twriter.write(output.toString());\r\n\t\twriter.close();\r\n\t\t\r\n\t\tint sum = 0;\r\n\t\tfor(Character j : map.keySet()) {\r\n\t\t\tif(map.containsKey('j')) {\r\n\t\t\t\tsum += map.get('j').length() * freqArr[j].frequency;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble savings = (1.0 - ((sum / nodeArrList.get(0).frequency) / 8.0)) * 100.0;\r\n\t\t\r\n\t\tString statisticsString = \"Savings: \" + savings + \"% \\n \\n\" + map.toString();\r\n\t\t\r\n\t\tFile file2 = new File(\"huffmanStatistics.txt\");\r\n\t\tfile2.createNewFile();\r\n\t\tBufferedWriter writer2 = new BufferedWriter(new FileWriter(file2));\r\n\t\twriter2.write(statisticsString);\r\n\t\twriter2.close();\r\n\t\t\r\n\t\tSystem.out.println(statisticsString);\r\n\t}", "private static void feedMapWithWordList(List<String> wordList, HashMap<String, Long> dataMap) {\n\n\t\tfor(int i = 0, size = wordList.size(); i < size; i++) { // Go through the list of words being fed - if a word already exists, add 1 to its frequency; otherwise, create a new key and give it a value of 1\n\n\t\t\tfinal String word = wordList.get(i);\n\n\t\t\tif(dataMap.containsKey(word))\n\n\t\t\t\tdataMap.replace(word, dataMap.get(word) + 1);\n\n\t\t\telse\n\n\t\t\t\tdataMap.put(word, 1L);\n\t\t}\n\t}", "private static void saveMapToFile(HashMap<String, Integer> posCounts, String fileName) throws FileNotFoundException, IOException {\n\t\tProperties properties = new Properties();\r\n\r\n\t for (Map.Entry<String,Integer> entry : posCounts.entrySet()) {\r\n\t properties.put(entry.getKey(), entry.getValue().toString());\r\n\t }\r\n\t \r\n\t properties.store(new FileOutputStream(fileName), null);\r\n\t}", "public static void writeInvertedIndex(Map<Integer, Multimap> map, String filename) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/\"+filename, true)));\n\t\tfor (Entry<Integer, Multimap> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}", "public void setFrequency(int f){\n this.frequency = f;\n }", "private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }", "public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private static void spaceSaver(FileWriter output) throws IOException {\n\t\tint totalFrequency = 0;\n\t\tint modifiedCode = 0;\n\t\t\n\t\tfor(int i = 0; i < resultIndex; i++) {\n\t\t\tmodifiedCode += (((String) results[i][1]).length()) * (Integer)(results[i][2]);\n\t\t\ttotalFrequency += (Integer)results[i][2];\n\t\t}\n\t\t\n\t\tint saved = (totalFrequency * 8) - modifiedCode;\n\t\toutput.write(\"Space Saved: \" + saved + \"bits\");\n\t}", "private void writeVocabPost(FlIndexer fi) throws IOException{\n this.docNormPow = new HashMap<>();\n \n LinkedList<Integer> tf;\n LinkedList<String> files;\n String token;\n int position=0;\n File file = new File(\"CollectionIndex/VocabularyFile.txt\");\n File Postingfile = new File(\"CollectionIndex/PostingFile.txt\");\n \n\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n FileWriter fw_posting = new FileWriter(Postingfile.getAbsolutePath());\n try (BufferedWriter bw = new BufferedWriter(fw)) {\n try (BufferedWriter bw_posting = new BufferedWriter(fw_posting)){\n for (Map.Entry<String, TermNode> entry : fi.mapTerms.entrySet()){\n double idf = ((double)this.docMap.size())/entry.getValue().getDf();\n //idf=log2(idf, 2);\n bw.write(entry.getValue().getTerm()+\" \"+entry.getValue().getDf()+\" \"+idf+\" \"+position+\"\\n\");\n \n tf=entry.getValue().getTfList();\n files=entry.getValue().getFileList();\n int i=tf.size();\n for (int j=0; j<i; j++){\n double tfidf=idf*((double)tf.get(j)/fi.getMaxTF(files.get(j)));\n double tfidfpow=Math.pow(tfidf, 2);\n\n \n if(this.docNormPow.containsKey(files.get(j))){\n //this.docNorm.put(files.get(j), this.docNorm.get(files.get(j))+tfidf);\n this.docNormPow.put(files.get(j), this.docNormPow.get(files.get(j))+tfidfpow);\n }\n else{\n //this.docNorm.put(files.get(j), tfidf);\n this.docNormPow.put(files.get(j), tfidfpow);\n }\n \n token=this.docMap.get(files.get(j))+\" \"+tf.get(j)+\" \"\n +entry.getValue().multiMap.get(files.get(j))+\" \"+tfidf+\"\\n\";\n position= position + token.length();\n \n bw_posting.write(token);\n }\n }\n }\n }\n \n System.out.println(\"Done creating VocabularyFile.txt\");\n System.out.println(\"Done creating PostingFile.txt\");\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void computeSaving(File inputFile, File outputFile){\n clearFile(outputFile);\n \n int normBits =0;\n int huffBits =0;\n try{\n Scanner sc = new Scanner(inputFile);\n BufferedWriter output = new BufferedWriter(new FileWriter(outputFile,true));\n while(sc.hasNextLine()){\n String line = sc.nextLine();\n \n for(int i =0; i<line.length();i++){\n Character toCaculate = line.charAt(i);\n \n huffBits = encodedTable.get(toCaculate).length()*freqTable.get(toCaculate);\n normBits = 8*freqTable.get(toCaculate);\n savings = normBits - huffBits;\n \n String encoded = \"\";\n encoded = encodedTable.get(toCaculate);\n output.write(encoded);\n }\n }\n output.close();\n }\n catch(IOException e){\n System.out.println(\"IOException\");\n }\n }", "private void reLoadIndexesFromFileToIndexMap(File file) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n for (String line = reader.readLine(); line != null; line = reader\n .readLine()) {\n String[] termIndex = line.split(\" \");\n String key = termIndex[0];\n LinkedList<TermPositions> value = new LinkedList<>();\n String postingList = termIndex[1];\n // split the posting lists 1:1,2,4;2:4\n String[] subPostings = postingList.split(\";\");\n for (String posting : subPostings) {\n String[] docPosting = posting.split(\":\");\n int docId = Integer.parseInt(docPosting[0]);\n String[] positions = docPosting[1].split(\",\");\n LinkedList<Integer> positionsList = new LinkedList<>();\n for (String position : positions) {\n positionsList.add(Integer.parseInt(position));\n }\n TermPositions termPositions = new TermPositions(docId, positionsList);\n value.add(termPositions);\n }\n indexMap.put(key, value);\n\n }\n\n }", "public void processFile(File rootFile) throws IOException {\n\t\tBufferedReader bf=new BufferedReader(new FileReader(rootFile));\r\n\t\tString lineTxt = null;\r\n\t\tint pos=1;\r\n\t\twhile((lineTxt = bf.readLine()) != null){\r\n String[] line=lineTxt.split(\" \");\r\n// System.out.println(line[0]);\r\n String hscode=line[0];\r\n \r\n \r\n TreeMap<String,Integer> word=null;\r\n if(!map.containsKey(hscode)){\r\n word=new TreeMap<String,Integer>();\r\n for(int i=1;i<line.length;i++){\r\n \tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n }\r\n map.put(hscode, word);\r\n }\r\n else{\r\n //\tSystem.out.println(\"sss\");\r\n \tword = map.get(hscode);\r\n \tfor(int i=1;i<line.length;i++){\r\n \t\tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n \t}\r\n \t\r\n \tmap.put(hscode, word);\r\n \t\r\n }\r\n\t\t}\r\n\t\tbf.close();\r\n//\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n//// \tSystem.out.println(\"hscode:\"+entry.getKey());\r\n// \tTreeMap<String, Integer> value = entry.getValue();\r\n// \tfor(Entry<String,Integer> e:value.entrySet()){\r\n//// \tSystem.out.println(\"单词\"+e.getKey()+\" 词频是\"+e.getValue());\r\n// \t}\r\n// }\r\n\t}", "public static void printMap(Map<String, Double> map, String filename) throws FileNotFoundException, UnsupportedEncodingException{\n\t\t\t\n\t\t\tPrintWriter writer = new PrintWriter(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/IndexWithStoppingAndWithStemming/\"+filename, \"UTF-8\");\n\t for (Entry<String, Double> entry : map.entrySet()){\n\t \t \n\t \t\twriter.println(entry.getKey()+\" \"+entry.getValue()+\" Exp\");\n\t }\n\t writer.close();\n\t }", "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "@Override\r\n public void writeData(String fileName, Map map) {\r\n File file = new File(fileName);\r\n \r\n if (!file.exists()) {\r\n try {\r\n file.createNewFile();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }\r\n \r\n try (BufferedWriter bufferedWriter =\r\n new BufferedWriter(new FileWriter(file))) {\r\n bufferedWriter.write(map.toString());\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void setFrequency(java.lang.Integer value) {\n this.frequency = value;\n }", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public static void getOriginalFrequencies(double[] f)\n {\n f[0] = 0.0866;\n f[1] = 0.0440;\n f[2] = 0.0391;\n f[3] = 0.0570;\n f[4] = 0.0193;\n f[5] = 0.0367;\n f[6] = 0.0581;\n f[7] = 0.0833;\n f[8] = 0.0244;\n f[9] = 0.0485;\n f[10] = 0.0862;\n f[11] = 0.0620;\n f[12] = 0.0195;\n f[13] = 0.0384;\n f[14] = 0.0458;\n f[15] = 0.0695;\n f[16] = 0.0610;\n f[17] = 0.0144;\n f[18] = 0.0353;\n f[19] = 0.0709;\n }", "public void map(LongWritable docID, Text value, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {\n FileSplit fileSplit = (FileSplit) reporter.getInputSplit();\n String filename = \"\" + fileSplit.getPath().getName();\n\n int argc = Integer.parseInt(conf.get(\"argc\"));\n java.util.Map<String, Integer> keywords = new HashMap<String, Integer>();\n\n for (int i = 0; i < argc; i++) {\n String inputString = conf.get(\"keyword\" + i);\n\n keywords.put(inputString, 0);\n\n\n }\n\n String line = value.toString();\n StringTokenizer tokenizer = new StringTokenizer(line);\n while (tokenizer.hasMoreTokens()) {\n\n String token = tokenizer.nextToken();\n for (java.util.Map.Entry<String, Integer> me : keywords.entrySet()) {\n if (token.equalsIgnoreCase(me.getKey())) {\n\n keywords.put(me.getKey(), me.getValue() + 1);\n\n }\n }\n }\n\n for (java.util.Map.Entry<String, Integer> me : keywords.entrySet()) {\n\n keyword.set(me.getKey());\n filenameCount.set(filename + \"_\" + me.getValue());\n\n output.collect(keyword, filenameCount);\n }\n }", "public static void addtoHashMap (File filename){\n\t\tFileInputStream fin;\n\t\ttry{\n\t\t\tfin = new FileInputStream(filename);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\tString n;\n\t\t\ttry{\n\t\t\t\twhile ((n = br.readLine()) != null){\n\t\t\t\t\tif(h.containsKey(n)){\n\t\t\t\t\t\tint i = (Integer) h.get(n);\n\t\t\t\t\t\th.put(n, (i+1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\th.put(n, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void updateFinalMaps() {\r\n\t\t//prints out probMap for each tag ID and makes new map with ln(frequency/denominator) for each\r\n\t\t//wordType in transMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> tagIDsFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.transMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.transMapTemp.get(key);\r\n\t\t\ttagIDsFinal.put(key, this.transMapTemp.get(key).map);\r\n\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\t\t\t\ttagIDsFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\tSystem.out.println(key + \": \" + key2 + \" \" + tagIDsFinal.get(key).get(key2));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//makes new map with ln(frequency/denominator) for each word in emissionMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> emissionMapFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.emissionMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.emissionMapTemp.get(key);\r\n\t\t\temissionMapFinal.put(key, this.emissionMapTemp.get(key).map);\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\r\n\t\t\t\temissionMapFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.transMap = tagIDsFinal;\r\n\t\tthis.emissionMap = emissionMapFinal;\t\t\r\n\t}", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "public void knnCSV(Map<String, Integer> map, String output)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tFileWriter fw = null;\r\n\t\tFile[] files = null;\r\n\r\n\t\tfiles = folder.listFiles();\r\n\t\tfw = new FileWriter(\"src/\" + output, false);\r\n\r\n\t\tfor (File file : files) {\r\n\r\n\t\t\tString fileName = file.getName();\r\n\t\t\tMap<Map<String, Integer>, Integer> wordFreqClass = documents\r\n\t\t\t\t\t.get(fileName);\r\n\t\t\tInteger classification = ERROR;\r\n\r\n\t\t\t// Assign class to file\r\n\t\t\tfor (Integer type : wordFreqClass.values()) {\r\n\t\t\t\tclassification = type;\r\n\t\t\t}\r\n\r\n\t\t\t// Create a temporary map of all words and counts in each test file\r\n\t\t\tMap<String, Integer> tempMap = new HashMap<String, Integer>();\r\n\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\ttry {\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line);\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (tempMap.containsKey(word)) {\r\n\t\t\t\t\t\t\ttempMap.put(word, tempMap.get(word) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttempMap.put(word, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tbr.close(); // Close BufferedReader\r\n\t\t\t}\r\n\r\n\t\t\t// Print value of words in tempMap for each word in fullMap\r\n\t\t\t// separated by commas\r\n\t\t\tIterator<HashMap.Entry<String, Integer>> entries = map.entrySet()\r\n\t\t\t\t\t.iterator();\r\n\t\t\twhile (entries.hasNext()) {\r\n\t\t\t\tHashMap.Entry<String, Integer> entry = entries.next();\r\n\t\t\t\tString word = entry.getKey();\r\n\t\t\t\tif (tempMap.containsKey(word)) {\r\n\t\t\t\t\tfw.write(tempMap.get(word).toString());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfw.write(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (entries.hasNext()) {\r\n\t\t\t\t\tfw.write(\",\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfw.write(\",\");\r\n\t\t\t\t\tfw.write(classification.toString());\r\n\t\t\t\t\tfw.write(\"\\r\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfw.close();\r\n\r\n\t}", "private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }", "private void CreateFreq(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr) {\n for (int key : freqY.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FY.append(\"/\");\n FY.append(auxs);\n auxs = Integer.toBinaryString(freqY.get(key));\n FY.append(\"/\");\n FY.append(auxs);\n }\n\n for (int key : freqCb.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCB.append(\"/\");\n FCB.append(auxs);\n auxs = Integer.toBinaryString(freqCb.get(key));\n FCB.append(\"/\");\n FCB.append(auxs);\n }\n\n for (int key : freqCr.keySet()) {\n int aux = key;\n String auxs = Integer.toBinaryString(aux);\n FCR.append(\"/\");\n FCR.append(auxs);\n auxs = Integer.toBinaryString(freqCr.get(key));\n FCR.append(\"/\");\n FCR.append(auxs);\n }\n FCR.append(\"/\");\n }", "public void set(int symbol, int freq);", "public void writeFile(HashMap<String, Float> results) throws IOException {\n for (Map.Entry<String, Float> entry : results.entrySet()) {\n writer.printf(\"%s %.2f\", entry.getKey(), entry.getValue());\n writer.println(\"%\");\n }\n writer.close();\n }", "private static void WriteMostFrequentTwoGramsToFile(List<String> input) throws IOException{\n\t\tFile file =new File(filewriteto);\n\t\tFileWriter writer = new FileWriter(file);\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tfor(int i=0; i<input.size();i++)\n\t\t\tbuffer.append(input.get(i)+'\\n');\n\t\twriter.write(buffer.toString());\n\t\twriter.close();\n\t}", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "public void ArtistAndSource() throws IOException{\r\n List<String> ArrangersAndTheirSongs=new ArrayList<>();\r\n HashMap <String,Integer> SongCountMap= new HashMap<>();\r\n String allsongs=\"\";\r\n String sourcesong=\"\";\r\n for(int id: ArrangersMap.keySet()){\r\n String ArrangerName=ArrangersMap.get(id);\r\n for(String song:ArrangerLinesList){\r\n String perform[];\r\n perform=song.split(\"/\");\r\n int arrangeid=Integer.parseInt(perform[1]);\r\n if(id==arrangeid){\r\n int songid= Integer.parseInt(perform[0]);\r\n String songname=test.getsongName(songid);\r\n sourcesong=test.SongToSource(songname);\r\n allsongs+=sourcesong+\",\";\r\n if (SongCountMap.get(sourcesong) !=null){ \r\n SongCountMap.put(sourcesong, SongCountMap.get(sourcesong)+1);\r\n }\r\n else{\r\n SongCountMap.put(sourcesong, 1);\r\n }\r\n } \r\n }\r\n for(String song:SongCountMap.keySet()){\r\n //System.out.println(song);\r\n }\r\n HashMap <String,Integer> SortedMap= sortByValues(SongCountMap);\r\n SongCountMap.clear();\r\n String allsongs2=\"\";\r\n for(String song:SortedMap.keySet()){\r\n //System.out.println(\"Number\"+SortedMap.get(song)+\"The song is\"+song);\r\n allsongs2+=\"#occurences:\"+SortedMap.get(song)+\"The song is\"+song+\"\\n\";\r\n //System.out.println(\"Number of times:\"+SortedMap.get(song)+\"The song is\"+song);\r\n }\r\n //System.out.println(allsongs2);\r\n // ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are:\"+allsongs);\r\n ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are: \"\r\n + \"\"+allsongs2);\r\n allsongs=\"\";\r\n SortedMap.clear();\r\n allsongs2=\"\";\r\n }\r\n //method is broken\r\n writeListToTextFile(\"d:\\\\documents\\\\textfiles\\\\ArrangersAndTheirSources.txt\",ArrangersAndTheirSongs);\r\n System.out.println(\"The size of the list is:\"+ArrangersAndTheirSongs.size());\r\n System.out.println(\"Artist and Their Source Complete\");\r\n }", "public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}", "public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void writeFile(String arg0, Map result) {\n\n // Initial variables\n ArrayList<HashMap> records;\n ArrayList<HashMap> recordT;\n ArrayList<HashMap> observeRecords; // Array of data holder for time series data\n BufferedWriter bwT; // output object\n StringBuilder sbData = new StringBuilder(); // construct the data info in the output\n HashMap<String, String> altTitleList = new HashMap(); // Define alternative fields for the necessary observation data fields; key is necessary field\n // P.S. Add alternative fields here\n HashMap titleOutput; // contain output data field id\n DssatObservedData obvDataList = DssatObservedData.INSTANCE; // Varibale list definition\n\n try {\n\n // Set default value for missing data\n setDefVal();\n\n // Get Data from input holder\n Object tmpData = getObjectOr(result, \"observed\", new Object());\n if (tmpData instanceof ArrayList) {\n records = (ArrayList) tmpData;\n } else if (tmpData instanceof HashMap) {\n records = new ArrayList();\n records.add((HashMap) tmpData);\n } else {\n return;\n }\n if (records.isEmpty()) {\n return;\n }\n\n observeRecords = new ArrayList();\n for (HashMap record : records) {\n recordT = getObjectOr(record, \"timeSeries\", new ArrayList());\n String trno = getValueOr(record, \"trno\", \"1\");\n if (!recordT.isEmpty()) {\n String[] sortIds = {\"date\"};\n Collections.sort(recordT, new DssatSortHelper(sortIds));\n for (HashMap recordT1 : recordT) {\n recordT1.put(\"trno\", trno);\n }\n observeRecords.addAll(recordT);\n }\n }\n\n // Initial BufferedWriter\n String fileName = getFileName(result, \"T\");\n if (fileName.endsWith(\".XXT\")) {\n String crid = DssatCRIDHelper.get2BitCrid(getValueOr(result, \"crid\", \"XX\"));\n fileName = fileName.replaceAll(\"XX\", crid);\n }\n arg0 = revisePath(arg0);\n outputFile = new File(arg0 + fileName);\n bwT = new BufferedWriter(new FileWriter(outputFile));\n\n // Output Observation File\n // Titel Section\n sbError.append(String.format(\"*EXP.DATA (T): %1$-10s %2$s\\r\\n\\r\\n\",\n fileName.replaceAll(\"\\\\.\", \"\").replaceAll(\"T$\", \"\"),\n getObjectOr(result, \"local_name\", defValBlank)));\n\n titleOutput = new HashMap();\n // TODO get title for output\n // Loop all records to find out all the titles\n for (HashMap record : observeRecords) {\n // Check if which field is available\n for (Object key : record.keySet()) {\n // check which optional data is exist, if not, remove from map\n if (obvDataList.isTimeSeriesData(key)) {\n titleOutput.put(key, key);\n\n } // check if the additional data is too long to output\n else if (key.toString().length() <= 5) {\n if (!key.equals(\"date\") && !key.equals(\"trno\")) {\n titleOutput.put(key, key);\n }\n\n } // If it is too long for DSSAT, give a warning message\n else {\n sbError.append(\"! Waring: Unsuitable data for DSSAT observed data (too long): [\").append(key).append(\"]\\r\\n\");\n }\n }\n // Check if all necessary field is available // P.S. conrently unuseful\n for (String title : altTitleList.keySet()) {\n\n // check which optional data is exist, if not, remove from map\n if (getValueOr(record, title, \"\").equals(\"\")) {\n\n if (!getValueOr(record, altTitleList.get(title), \"\").equals(\"\")) {\n titleOutput.put(title, altTitleList.get(title));\n } else {\n sbError.append(\"! Waring: Incompleted record because missing data : [\").append(title).append(\"]\\r\\n\");\n }\n\n } else {\n }\n }\n }\n\n // decompress observed data\n// decompressData(observeRecords);\n // Observation Data Section\n Object[] titleOutputId = titleOutput.keySet().toArray();\n Arrays.sort(titleOutputId);\n String pdate = getPdate(result);\n for (int i = 0; i < (titleOutputId.length / 39 + titleOutputId.length % 39 == 0 ? 0 : 1); i++) {\n\n sbData.append(\"@TRNO DATE\");\n int limit = Math.min(titleOutputId.length, (i + 1) * 39);\n for (int j = i * 39; j < limit; j++) {\n sbData.append(String.format(\"%1$6s\", titleOutput.get(titleOutputId[j]).toString().toUpperCase()));\n }\n sbData.append(\"\\r\\n\");\n\n for (HashMap record : observeRecords) {\n \n if (record.keySet().size() <= 2 && record.containsKey(\"trno\") && record.containsKey(\"date\")) {\n continue;\n }\n sbData.append(String.format(\" %1$5s\", getValueOr(record, \"trno\", \"1\")));\n sbData.append(String.format(\" %1$5s\", formatDateStr(getObjectOr(record, \"date\", defValI))));\n for (int k = i * 39; k < limit; k++) {\n\n if (obvDataList.isDapDateType(titleOutputId[k], titleOutput.get(titleOutputId[k]))) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(pdate, getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else if (obvDataList.isDateType(titleOutputId[k])) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else {\n sbData.append(\" \").append(formatNumStr(5, record, titleOutput.get(titleOutputId[k]), defValI));\n }\n\n }\n sbData.append(\"\\r\\n\");\n }\n }\n // Add section deviding line\n sbData.append(\"\\r\\n\");\n\n // Output finish\n bwT.write(sbError.toString());\n bwT.write(sbData.toString());\n bwT.close();\n } catch (IOException e) {\n LOG.error(DssatCommonOutput.getStackTrace(e));\n }\n }", "private static double freqOfKey(int index) {\n return 440 * Math.pow(2, (double) (index - 12) / 24);\n }", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){\n\t\tfor (int i = 0; i < tfMap.size(); i++) {\n\t\t\tList<Map<String,List<Double>>> gestureDocument = tfMap.get(i);\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String,List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();\n\t\t\t\t while (it.hasNext()) {\n\t\t\t\t Map.Entry<String,Integer> pairs = (Map.Entry)it.next(); \n\t\t\t\t if(getTfIDFMapGlobal().containsKey(pairs.getKey()))\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);\n\t\t\t\t else\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), 1);\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "public static void main(String [] args) throws IOException\n {\n System.out.println(\"PLAINTEXT FREQUENCY\");\n \n FrequencyAnalysis fa = new FrequencyAnalysis(); \n PrintWriter outFile1 = new PrintWriter (new File(\"plaintextfreq.txt\")); \n fa.readFile(\"plaintext.txt\"); \n int total1 = fa.getTotal();\n System.out.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n outFile1.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n int l = 0;\n for (int k : fa.getFrequency())\n {\n System.out.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total1) * 100));\n outFile1.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total1) * 100));\n l++;\n }\n outFile1.close();\n \n System.out.println();\n System.out.println();\n System.out.println(\"CIPHER FREQUENCY\");\n \n FrequencyAnalysis cfa = new FrequencyAnalysis(); \n PrintWriter outFile2 = new PrintWriter (new File(\"ciphertextfreq.txt\")); \n cfa.readFile(\"ciphertext.txt\"); \n int total2 = cfa.getTotal();\n System.out.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n outFile2.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n l = 0;\n for (int k : cfa.getFrequency())\n {\n System.out.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total2) * 100));\n outFile2.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total2) * 100));\n l++;\n }\n outFile2.close();\n \n \n }", "bool setFrequency(double newFrequency);", "public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}", "public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{\n\t\t//read File\n\t\t// go to letters directory\n\t\tString seriesLetterFolder = lettersInputFolder + File.separator + \"letters\";\n\t\tFile directory = new File(seriesLetterFolder); \n\t\tfileNames = directory.listFiles(new FileFilter() {\n\t\t @Override\n\t\t public boolean accept(File pathname) {\n\t\t String name = pathname.getName().toLowerCase();\n\t\t return name.endsWith(\".csv\") && pathname.isFile();\n\t\t }\n\t\t});\n\t\tfor (int i = 0; i < fileNames.length; i++) {\n\t\t\t\n\t\t\t// Overall structure is as follows:\n\t\t\t// On each row, for each word - we have a Map of String and List<Double> indicating a word\n\t\t\t// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.\n\t\t\t// the size of the list is 20. Eventually the global dictionary will be a List of such lists.\n\t\t\t// in case of sample data, the global dictionary is of 60 lists.\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(fileNames[i]));\n\t\t\t\n\t\t\t\n\t\t\t// for each document\n\t\t\tList<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>(); \n\t\t\t\n\t\t\tMap<String,List<Double>> wordMap = null; //per row \n\t\t\twhile(in.ready()) {\n\t\t\t\twordMap = new HashMap<String, List<Double>>(); //per rows\n\t\t\t\tString series = in.readLine();\n\t\t\t\tString letters[]= series.split(\",\");\n\t\t\t\tInteger lastLocationForRef = -1; // for padding\n\t\t\t\tdouble totalWordCountPerDocument = 0.0; \n\t\t\t\tfor (int curLineCharLocation = 0; curLineCharLocation < letters.length\n\t\t\t\t\t\t- wordLength + 1; curLineCharLocation = curLineCharLocation\n\t\t\t\t\t\t+ shiftLength) {\n\t\t\t\t\t// this for loop runs on each line and curLineCharLocation\n\t\t\t\t\t// indicates the current pointer\n\t\t\t\t\t// from which we should be forming the word\n\t\t\t\t\t// extract a word and move the shift length\n\t\t\t\t\tString currentWord = \"\";\n\t\t\t\t\tfor (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength\n\t\t\t\t\t\t\t+ curLineCharLocation; currentWordLocation++) {\n\t\t\t\t\t\t// this inner for loop denotes the current word to be\n\t\t\t\t\t\t// created\n\t\t\t\t\t\tcurrentWord = currentWord\n\t\t\t\t\t\t\t\t+ letters[currentWordLocation];\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, currentWord);\n\t\t\t\t\tlastLocationForRef = curLineCharLocation + shiftLength;\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t\t\t\t}\n\t\t\t\t// check to see if we have any leftover strings. If yes then pad that word using\n\t\t\t\t// the last character pointed by lastLocationForRef\n\t\t\t\tInteger difference = letters.length - lastLocationForRef;\n\t\t\t\tif (difference > 0) {\n\t\t\t\t\tString paddedWord = \"\";\n\t\t\t\t\tInteger extraPaddingSize = wordLength - difference;\n\t\t\t\t\twhile (difference > 0) {\n\t\t\t\t\t\t// this while loop will simply create the padded word \n\t\t\t\t\t\t// to be appended at the end\n\t\t\t\t\t\tpaddedWord = paddedWord + letters[lastLocationForRef];\n\t\t\t\t\t\tdifference = difference - 1;\n\t\t\t\t\t\tlastLocationForRef = lastLocationForRef + 1; //advance to next location\n\t\t\t\t\t}\n\t\t\t\t\twhile(extraPaddingSize > 0) {\n\t\t\t\t\t\t paddedWord = paddedWord + letters[lastLocationForRef-1];\n\t\t extraPaddingSize = extraPaddingSize - 1;\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, paddedWord);\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t }\n\t\t\t\twordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq\n\t\t\t\tmapPerGestureFile.add(wordMap);\t\t\t\t\n\t\t\t}\n\t\t\tgetTfMapArrayIDF().add(mapPerGestureFile);\n\t\t\t//count idf2 per document\n\t\t\tinitIDF2Map(mapPerGestureFile);\n\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\t\n\t\t//populate global map for IDF values List<LIst<Map>\n\t\t initIDFMap(getTfMapArrayIDF());\n\t\t //Generate IDF Files from Global Map * TF Values\n\t\t calculateIDFValues();\n\t\t //Generate IDF2 Files\n\t\t calculateIDF2Values();\n\t\t //normalize tfidf and tfidf2\n\t\t normalizeDictionary(); \n\t\t createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);\n\t}", "public static void printInvertedIndexToFile(Map<String, List<Posting>> stemMap, List<String> documentIds)\n {\n try\n {\n PrintWriter dictionaryPW = new PrintWriter(DICTIONARY_OUTPUT_FILE_PATH, \"UTF-8\");\n PrintWriter postingsPW = new PrintWriter(POSTINGS_OUTPUT_FILE_PATH, \"UTF-8\");\n PrintWriter docIdsPW = new PrintWriter(DOCUMENT_ID_OUTPUT_FILE_PATH, \"UTF-8\");\n\n int numStems = stemMap.size();\n int numPostingEntries = 0;\n int numDocuments = documentIds.size();\n \n for (List<Posting> posting: stemMap.values())\n {\n numPostingEntries += posting.size();\n }\n\n dictionaryPW.println(numStems);\n postingsPW.println(numPostingEntries);\n docIdsPW.println(numDocuments);\n\n for (Entry<String, List<Posting>> entrySet: stemMap.entrySet())\n {\n String stem = entrySet.getKey();\n List<Posting> postings = entrySet.getValue();\n\n dictionaryPW.println(String.format(\"%s %d\", stem, postings.size()));\n for (Posting posting: postings)\n {\n postingsPW.println(String.format(\"%d %d\", posting.documentId, posting.termFrequency));\n numPostingEntries++;\n }\n }\n\n for (String docId: documentIds)\n {\n docIdsPW.print(docId);\n }\n\n dictionaryPW.close();\n postingsPW.close();\n docIdsPW.close();\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n }\n }", "public void Report() throws IOException {\n\t\tFile outputFile = new File(outputPath);\n\n\t\tif(!outputFile.exists()) {\n\t\t\toutputFile.createNewFile();\n\t\t}\n\t\t\n\t\tFileWriter writer = new FileWriter(outputPath);\n\t\tLinkedHashMap<Word, Integer> sortedResult = sortByValue();\n\t\tfloat frequency;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(Map.Entry<Word, Integer> entry: sortedResult.entrySet()) {\n\t\t\tsb.setLength(0);\n\t\t\t\n\t\t\tfor(char c: entry.getKey().getCharacters()) {\n\t\t\t\tsb.append(c + \", \");\n\t\t\t}\n\t\t\t\n\t\t\tsb.delete(sb.length()-2, sb.length());\n\t\t\tfrequency = (float)entry.getValue()/(float)total_targets;\n\t\t\twriter.write(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\\n\");\n\t\t\t\n\t\t\tSystem.out.println(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\");\n\t\t}\n\t\tfrequency = (float)total_targets/(float)total;\n\t\t\n\t\tSystem.out.println(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\");\n\t\twriter.write(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\\n\");\n\t\t\n\t\twriter.close();\n\t}", "java.lang.String getFrequency();", "@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }", "private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "public void writeOut(Map<String, Integer> wordCount) {\r\n Path file = Paths.get(filename + \"_word_count.txt\");\r\n Charset charset = Charset.forName(\"UTF-8\");\r\n try (BufferedWriter writer = Files.newBufferedWriter(file, charset)) {\r\n for (Map.Entry<String, Integer> entry : wordCount.entrySet())\r\n {\r\n writer.write(entry.getKey() + \" : \" + entry.getValue());\r\n writer.newLine();\r\n }\r\n } catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n }", "public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void write() throws IOException {\n // Find the domains that occur in the union of the top N domains for any month.\n SortedSet<String> topEntryNames = new TreeSet<>();\n Iterator<Map.Entry<String, DateEntry>> dateEntriesIterator = this.dateEntries.entrySet().iterator();\n while (dateEntriesIterator.hasNext()) {\n Map.Entry<String, DateEntry> dateEntry = dateEntriesIterator.next();\n topEntryNames.addAll(dateEntry.getValue().topNEntries(this.finalN()));\n }\n\n // Now sort them by their all-time total.\n // Collect totals.\n Map<String, Long> topDomainSums = new HashMap<>();\n for (Map.Entry<String, DateEntry> dateEntry : this.dateEntries.entrySet()) {\n Map<String, Long> domainEntries = dateEntry.getValue().getEntriesDictionary();\n\n for (String domain : topEntryNames) {\n topDomainSums.put(domain, topDomainSums.getOrDefault(domain, 0L) + domainEntries.getOrDefault(domain, 0L));\n }\n }\n\n // Sort domains by their totals.\n List<WeightedString> sortedDomains = new ArrayList<>();\n for (Map.Entry<String, Long> domainSum : topDomainSums.entrySet()) {\n sortedDomains.add(new WeightedString(domainSum.getKey(), domainSum.getValue()));\n }\n Collections.sort(sortedDomains, Collections.reverseOrder());\n\n // Write sorted domains header\n this.outputFile.write(\"Date\");\n this.outputFile.write(\",\");\n\n // Iterate over the domains sorted by total.\n Iterator<WeightedString> entryNamesIterator = sortedDomains.iterator();\n while(entryNamesIterator.hasNext()) {\n String entryName = entryNamesIterator.next().getValue();\n this.outputFile.write(entryName);\n\n if (entryNamesIterator.hasNext()) {\n this.outputFile.write(\",\");\n }\n }\n this.outputFile.write(\"\\n\");\n\n // Now write counts for only those top entry names for each date.\n dateEntriesIterator = this.dateEntries.entrySet().iterator();\n while (dateEntriesIterator.hasNext()) {\n Map.Entry<String, DateEntry> dateEntryName = dateEntriesIterator.next();\n String date = dateEntryName.getKey();\n DateEntry entry = dateEntryName.getValue();\n Map<String, Long> entryCounts = entry.getEntriesDictionary();\n \n this.outputFile.write(date);\n this.outputFile.write(\",\");\n\n entryNamesIterator = sortedDomains.iterator();\n while(entryNamesIterator.hasNext()) {\n String entryName = entryNamesIterator.next().getValue();\n\n Long count = entryCounts.get(entryName);\n if (count == null) {\n // System.err.format(\"ERROR failed to fetch %s on %s. Increase preN.\\n\", entryName, date);\n count = 0L;\n }\n \n this.outputFile.write(count.toString());\n\n if (entryNamesIterator.hasNext()) {\n this.outputFile.write(\",\");\n }\n }\n\n this.outputFile.write(\"\\n\");\n }\n }", "private void createFreqVector(Path file) {\r\n\t\t\tVector vector = new Vector(vocabulary.size());\r\n\t\t\tList<String> lines;\r\n\t\t\ttry {\r\n\t\t\t\tlines = Files.readAllLines(file);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSet<String> words = new HashSet<>();\r\n\t\t\t//create frequency vector of words in single document -> tf(w,d)\r\n\t\t\tfor (String line : lines) {\r\n\t\t\t\tif (line.isEmpty()) continue;\r\n\t\t\t\tString[] values = p.split(line);\r\n\t\t\t\tfor (String value : values) { \r\n\t\t\t\t\tif (value.isEmpty()) continue;\r\n\t\t\t\t\tString lowWord = value.toLowerCase().trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tInteger[] arr = vocabulary.get(lowWord);\r\n\t\t\t\t\tif (arr == null) continue;\r\n\t\t\t\t\tvector.incrementValueAt(arr[0]);\r\n\t\t\t\t\tif (words.add(lowWord)) {\r\n\t\t\t\t\t\t arr[1] += 1;\t//first time occurrence of this word in document\r\n\t\t\t\t\t\tvocabulary.put(lowWord, arr);\t//increment number of documents for this word\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfreqVectors.put(file, vector);\t\t\r\n\t\t}", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "public void sinkCounterMap(){\n for(int i=1; i<(sinkCounter+1); i++){\n sinkCounterMap.put(i,1); //sink is included in basin count;\n \n }\n }", "private void updateDataFile() throws FileNotFoundException {\n \t\tfinal PrintWriter out = new PrintWriter(calendarDataFile);\n \t\tfor (int x = 0; x < CAL_WIDTH; x++) {\n \t\t\tfor (int y = 0; y < CAL_HEIGHT; y++) {\n \t\t\t\tif (contrib[y][x] == null ||\n \t\t\t\t\tcontrib[y][x].current - contrib[y][x].initial == 0)\n \t\t\t\t{\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tout.println(contrib[y][x]);\n \t\t\t}\n \t\t}\n \t\tout.close();\n \t}", "public void setFrequencies(Set<Frequency> arg0) {\n \n }", "public static void main(String[] args) {\n\t\t\n\t\tHashMap<String,Integer> hm = new HashMap<String,Integer>();\n\t\tint index = 1;\n\t\ttry {\n\t\t\t\n\t\t\tint[][] adjmatrix = new int[760][760];\n\t\t\t\n\t\t\tfor(int i=1;i<=750;i++)\n\t\t\t{\n\t\t\t\tfor(int j=1;j<=750;j++)\n\t\t\t\t{\n\t\t\t\t\tadjmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tFile file2 = new File(\"/home/swijal/Desktop/social/kavanamutual.txt\");\n\t\t\tFileReader fileReader2 = new FileReader(file2);\n\t\t\tBufferedReader bufferedReader2 = new BufferedReader(fileReader2);\n\t\t\t\n\t\t\tFile fout = new File(\"/home/swijal/Desktop/social/kavana_mapping_out.txt\");\n\t\t\tFileOutputStream fos = new FileOutputStream(fout);\n\t\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos));\n\t\t\t\n\t\t\tFile fout1 = new File(\"/home/swijal/Desktop/social/adjmat_kavana.txt\");\n\t\t\tFileOutputStream fos1 = new FileOutputStream(fout1);\n\t\t\tBufferedWriter bw1 = new BufferedWriter(new OutputStreamWriter(fos1));\n\t\t\t\n\t\t\tFile file = new File(\"/home/swijal/Desktop/social/numbering_kavana.txt\");\n\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\tString friend1 = \"\";\n\t\t\tString friend2 = \"\";\n\n\t\t\t//numbering\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tif(!hm.containsKey(line))\n\t\t\t\t{\n\t\t\t\t\thm.put(line, index);\n\t\t\t\t\tbw.write(line+\", \"+index);\n\t\t\t\t\tbw.newLine();\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(hm.size());\n\t\t\t//adj matrix\n\t\t\twhile ((line = bufferedReader2.readLine()) != null) {\n\t\t\t\tfriend1 = \"\";\n\t\t\t\tfriend2 = \"\";\n\t\t\t\t\n\t\t\t\tString[] ar=line.split(\",\");\n\t\t\t\t\n\t\t\t\tfriend1 = ar[0];\n\t\t\t\tfriend2 = ar[1];\n\t\t\t\tSystem.out.println(friend1 +\" : \"+ friend2);\n\t\t\t\tint p=0,q=0;\n\t\t\t\t\n\t\t\t\tif(hm.containsKey(friend1))\n\t\t\t\t\tp = hm.get(friend1);\n\t\t\t\t\n\t\t\t\tif(hm.containsKey(friend2))\n\t\t\t\t\tq = hm.get(friend2);\n\t\t\t\t\n\t\t\t\tadjmatrix[p][q] = 1;\n\t\t\t\tadjmatrix[q][p] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=1;i<=750;i++)\n\t\t\t{\n\t\t\t\tbw1.newLine();\n\t\t\t\tfor(int j=1;j<=750;j++)\n\t\t\t\t{\n\t\t\t\t\tbw1.write(adjmatrix[i][j]+\",\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*for(int i=0;i<750;i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tfor(int j=0;j<750;j++)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(adjmatrix[i][j]+ \" \");\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tfileReader2.close();\n\t\t\tfileReader.close();\n\t\t\tbw.close();\n\t\t\tbw1.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void allartongs() throws IOException{\r\n writefiles data=new writefiles(\"d:\\\\documents\\\\textfiles\\\\AllArtSongs.txt\",true);\r\n Map<String,String> ArrangerNamesLineMap=new HashMap<>();\r\n for(int songid:ArrangerLinesMap.keySet()){\r\n int arrangerid=ArrangerLinesMap.get(songid);\r\n ArrangersMap.get((songid));\r\n ArrangerNamesLineMap.put(test.getsongName(songid), ArrangersMap.get(arrangerid));\r\n }\r\n for(String songname:ArrangerNamesLineMap.keySet()){\r\n System.out.println(\"The artist is:\"+ArrangerNamesLineMap.get(songname)+\" The song is:\"+songname);\r\n data.writeToFile(\"The artist is:\"+ArrangerNamesLineMap.get(songname)+\" The song is:\"+songname);\r\n }\r\n System.out.println(ArrangerNamesLineMap.size());\r\n }", "public static void main(String[] args) {\n\t\tMap<String, Integer> map = new HashMap<>();\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(\"story.txt\")))) {\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString tokens[] = line.split(\" \");\r\n\t\t\t\tfor (String token : tokens) {\r\n\t\t\t\t\tif (map.containsKey(token)) {\r\n\t\t\t\t\t\tInteger freq = map.get(token);\r\n\t\t\t\t\t\tmap.put(token, ++freq);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmap.put(token, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\r\n\t\tSet<Entry<String, Integer>> entry = map.entrySet();\r\n\t\tfor (Entry<String, Integer> entryset : entry) {\r\n\t\t\tSystem.out.println(entryset.getKey() + \" : \" + entryset.getValue());\r\n\t\t}\r\n\t}", "public void writeLengthHistogram(String fileName) {\n\t\tString contents = \"Length,Frequency\\n\";\n\t\tint literalLength = 0;\n\t\tint frequency = 0;\n\t\tfor(String literal : literalsList) {\n\n\t\t\tliteral = literal.substring(literal.indexOf(\"\\\"\")+1, literal.lastIndexOf(\"\\\"\"));\n\t\t\t\n\t\t\tif(literal.length() == literalLength) {\n\t\t\t\tfrequency++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcontents += Integer.toString(literalLength) + \",\" + \n\t\t\t\t\t\t\tInteger.toString(frequency) + \"\\n\";\n\t\t\t\tfrequency = 1;\n\t\t\t\tliteralLength = literal.length();\n\t\t\t}\n\t\t}\n\t\tFileManager.writeToFile(fileName, contents);\n\t}", "public static void exportScores(String filePath, Map<String, List<DenovoHit>> resultsMap) throws IOException {\r\n // Init the buffered writer.\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(new File(filePath)));\r\n try {\r\n\r\n int count = 1;\r\n\r\n // header\r\n writer.append(getScoreHeader());\r\n writer.newLine();\r\n\r\n for (String spectrum : resultsMap.keySet()) {\r\n\r\n for (DenovoHit denovoHit : resultsMap.get(spectrum)) {\r\n\r\n // Get the protein hit.\r\n writer.append(spectrum + SEP);\r\n writer.append(denovoHit.getIndex() + SEP);\r\n writer.append(denovoHit.getSequence() + SEP);\r\n writer.append(denovoHit.getLength() + SEP);\r\n writer.append(denovoHit.getCharge() + SEP);\r\n writer.append(denovoHit.getNTermGap() + SEP);\r\n writer.append(denovoHit.getCTermGap() + SEP);\r\n writer.append(denovoHit.getPepNovoScore() + SEP);\r\n writer.append(denovoHit.getRankScore() + SEP);\r\n writer.newLine();\r\n writer.flush();\r\n }\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n } finally {\r\n writer.close();\r\n }\r\n }", "private Integer updateFrequency(int freq, Denominator moneyType) {\r\n\t\tif(freq == 0){\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, ++freq));\r\n\t\t}else{\r\n\t\t\tDenominatorCombination value = this.denominatorFrequencyMap.get(moneyType);\r\n\t\t\tint frequency = 0;\r\n\t\t\tif(value != null){\r\n\t\t\t\tfrequency = value.getFrequency();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, frequency +1));\r\n\t\t\tfreq++;\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "@Override\n\t\tprotected void map(Text key, Text value, Context context)throws IOException, InterruptedException {\n\t\t\tString val = value.toString();\n\t\t\t//String word = line.split(\",\")[0];\n\t\t\t//String docname = line.split(\",\")[1];\n\t\t\tdouble n = Double.parseDouble(val.split(\",\")[0]);\n\t\t\tdouble max = Double.parseDouble(val.split(\",\")[1]);\n\t\t\tdouble N = Double.parseDouble(val.split(\",\")[2]);\n\t\t\tdouble m = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t//System.out.println(\"n is:\"+n+\"max is:\"+max+\" N is:\"+N+\" m is:\"+m+\" D is:\"+D);\n\t\t\tdouble tf = n/max;\n\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t//String TF = \"tf: \"+tf;\n\t\t\tdouble idf = (Math.log(D/m)/Math.log(2));\n\t\t\tdouble tfidf = tf*idf;\n\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t//String IDF = \"idf: \"+idf;\n\t\t\tString word = key.toString().split(\",\")[0];\n\t\t\tString article = key.toString().split(\",\")[1];\n\t\t\tString new_val = word+\",\"+tf+\",\"+idf+\",\"+tfidf;\n\t\t\tcontext.write(new Text(article),new Text(new_val));\n\t\t}", "public void updateScoreFile() {\n try {\n outputStream = new ObjectOutputStream(new FileOutputStream(HIGHSCORE_FILE));\n outputStream.writeObject(scores);\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n } finally {\n try {\n if (outputStream != null) {\n outputStream.flush();\n outputStream.close();\n }\n } catch (IOException e) {\n }\n }\n }", "public static void createFeatureWeightFile(String inputFile, String outpurFile){\n\t\t\n\t\tBufferedReader reed=null;\n\t\tPrintWriter pr= null;\n\t\t\n\t\tHashMap<String,HashMap<String,Integer>> itemId_featureId_count= new HashMap<>();\n\t\ttry {\n\t\t\treed= new BufferedReader(new FileReader(inputFile));\n\t\t\t\n\t\t\tpr= new PrintWriter(new File(outpurFile));\n\t\t\t\n\t\t\tString line=null;\n\t\t\t\n\t\t\treed.readLine();//header\n\t\t\twhile((line=reed.readLine())!=null){\n\t\t\t\tString[] splitted=line.split(\"\\t\");\n\t\t\t\tString itemId=splitted[1];\n\t\t\t\tString featureId=splitted[2];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!itemId_featureId_count.containsKey(itemId)){\n\t\t\t\t\titemId_featureId_count.put(itemId,new HashMap<>());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tHashMap<String,Integer> itemHashmap = itemId_featureId_count.get(itemId);\n\t\t\t\tif(!itemHashmap.containsKey(featureId)){\n\t\t\t\t\titemHashmap.put(featureId, 1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\titemHashmap.put(featureId, itemHashmap.get(featureId)+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfor (String itemId : itemId_featureId_count.keySet()) {\n\t\t\t\tHashMap<String,Integer> itemHashmap = itemId_featureId_count.get(itemId);\n\t\t\t\tfor (String featureId : itemHashmap.keySet()) {\n\t\t\t\t\t// item-id;feature-id:weight feature-id weight\n\t\t\t\t\tInteger weight = itemHashmap.get(featureId);\n\t\t\t\t\tif (weight > 3) {\n\t\t\t\t\t\tString outputLine = itemId + \";\" + featureId + \":\"\n\t\t\t\t\t\t\t\t+ weight;\n\n\t\t\t\t\t\tpr.println(outputLine);\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}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tif(reed!=null)\n\t\t\t\ttry {reed.close();} \n\t\t\tcatch (IOException e) {}\n\t\t\tif(pr!=null){\n\t\t\t\tpr.close();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n \n \n File textBank = new File(\"textbank/\");\n Hashtable<Integer,Integer> frequency;\n Hashtable<Integer, String> table;\n table = new Hashtable<>();\n frequency = new Hashtable<>();\n Scanner input = new Scanner(new File(\"stoplist.txt\"));\n int max=0;\n while (input.hasNext()) {\n String next;\n next = input.next();\n if(next.length()>max)\n max=next.length();\n table.put(next.hashCode(), next); //to set up the hashmap with the wordsd\n \n }\n \n System.out.println(max);\n \n Pattern p0=Pattern.compile(\"[\\\\,\\\\=\\\\{\\\\}\\\\\\\\\\\\\\\"\\\\_\\\\+\\\\*\\\\#\\\\<\\\\>\\\\!\\\\`\\\\-\\\\?\\\\'\\\\:\\\\;\\\\~\\\\^\\\\&\\\\%\\\\$\\\\(\\\\)\\\\]\\\\[]\") \n ,p1=Pattern.compile(\"[\\\\.\\\\,\\\\@\\\\d]+(?=(?:\\\\s+|$))\");\n \n \n \n wor = new ConcurrentSkipListMap<>();\n \n ConcurrentMap<String , Map<String,Integer>> wordToDoc = new ConcurrentMap<String, Map<String, Integer>>() {\n @Override\n public Map<String, Integer> putIfAbsent(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean remove(Object key, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean replace(String key, Map<String, Integer> oldValue, Map<String, Integer> newValue) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> replace(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public int size() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean isEmpty() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsKey(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsValue(Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> get(Object key) {\n return wor.get((String)key);//To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> put(String key, Map<String, Integer> value) {\n wor.put(key, value); // this saving me n \n //if(frequency.get(key.hashCode())== null)\n \n //frequency.put(key.hashCode(), )\n return null;\n }\n\n @Override\n public Map<String, Integer> remove(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void putAll(Map<? extends String, ? extends Map<String, Integer>> m) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<String> keySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Collection<Map<String, Integer>> values() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<Map.Entry<String, Map<String, Integer>>> entrySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n totalFiles = textBank.listFiles().length;\n for (File textFile : textBank.listFiles()) {\n totalReadFiles++;\n //checking whether file has txt extension and file size is higher than 0\n if(textFile.getName().contains(\".txt\") && textFile.length() > 0){\n docName.add(textFile.getName().replace(\".txt\", \".stp\"));\n StopListHandler sp = new StopListHandler(textFile, table,System.currentTimeMillis(),p0,p1,wordToDoc);\n sp.setFinished(() -> {\n \n tmp++;\n \n if(tmp==counter)\n //printTable(counter);\n \n if(totalReadFiles == totalFiles)\n {\n printTable(counter);\n }\n \n });\n \n sp.start();\n counter ++;}\n \n \n }\n System.out.println(counter);\n //while(true){if(tmp==counter-1) break;}\n System.out.println(\"s\");\n \n }", "public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "public static void setAuthFreq(Map<String, AuthorMod> models)\n\t{\n\t\tfor (AuthorMod curAuth: models.values()) \n\t\t{\n\t\t\tfor(String uGram: curAuth.ug.getAll()) \n\t\t\t{\n\t\t\t\tint ucount = curAuth.ug.getCount(uGram);\n/*>>>>\t \t\tif (ucount<2) {curAuth.unks++;\t\t\t\t*** unkown word handling\n \t\t\t\tif (curAuth.ug.contains(\"<unk>\")) \n\t\t\t\t\t{ curAuth.ug.updateSeen(\"<unk>\");}\n\t\t\t\t\telse{ curAuth.ug.addNew(\"<unk>\");}\n*/\n\t\t\t\tdouble ufreq= ((double)ucount/curAuth.trainSize);\n\t\t\t\tcurAuth.ug.setFreq(uGram, ufreq);\n\t\t\t}\n\n\t\t//set bigram HT entries for frequency, \n\t\t//calculated by normalizing BG count by prefix count\n\t\t\tfor(Pair<String, String> bGram: curAuth.bg.getAll())\n\t\t\t{\n/*\t>>>\t\t\t\t-first, need a test to see if the unigram count for either word in bigram is less than 2. If yes, we will replace with <unk> tag\n\t\t\t\t\t\t\t- code to get counts for each word in bigram would look like curAuth.ug.getCount(bgram.getFirst()) \n\t\t\t\t\t-make new bg, with the count 1 word replaced with <Unk> tag. Use the parametered Pair<String, String> constructor with arguements (word, <unk>) depending on which is unk (or both)\n\t\t\t\t\t-do an updateSeen(bigram) or addNew(bigram) on curAuth.bg depending on if this new bigram has been seen (use curAuth.bg.contains(**this new bigram**)) \n\t\t\t\t\t-use data structure to remember what still needs updating (some type of set. we want something with no duplicates) \n\t\t\t\t\t-remove original bigram, put updated bigram in set\n\t\t\t\t\t-skip rest of loop for this bigram, and update the freq for the set after the loop */\n\t\t\t\t\t\n\t\t\t\t\tint bcount = curAuth.bg.getBgCount(bGram);\n\t\t\t\t\tint pcount = curAuth.ug.getCount(bGram.getFirst()); //sets p count to count of prefix from unigram table\n\t\t\t\t\tdouble bfreq = ((double)bcount)/pcount;\n\t\t\t\t\tcurAuth.bg.setFreq(bGram, bfreq);\n\t\t\t}\n\t\t\t//set frequncies for items we placed in set of bigrams containing the <unk> tag\n\t\t}\n\t}", "@Override\n\tpublic void write(Map<String, String> redisData) {\n\t\tlogger.traceEntry();\n\n\t\tsynchronized (dataOutputStreams) {\n\t\t\tfor (String name : redisData.keySet()) {\n\t\t\t\ttry {\n\t\t\t\t\twrite(redisData.get(name));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Error writing data in HDFS\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogger.traceExit();\n\n\t}", "java.lang.String getFrequencyOffset();", "public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n StringTokenizer itr = new StringTokenizer(value.toString(), \"\\n\");\n\n // Loop through all lines\n while (itr.hasMoreTokens()) {\n String filteredSentence;\n String sentence = itr.nextToken().toLowerCase(Locale.ROOT);\n\n // Remove all special characters from the word and replace them with *\n filteredSentence = sentence.replaceAll(\"[^a-zA-Z ]\", \"*\");\n // Add a space at the end of every line to also represent the end of the last word in the sentence in the bigrams\n filteredSentence += \" \";\n\n // Write every lineCount + a map of the bigram and frequency of 1 to the context\n for(int i = 0; i < filteredSentence.length() - 1; i++){\n String pair = filteredSentence.substring(i, i + 2);\n context.write(new IntWritable(lineCount), new StringDoubleWritable(pair, 1.0));\n }\n lineCount++;\n }\n }", "private Map<Double, List<String>> getScoreMap() {\n\t\t//dfMap = new HashMap<String, Integer>();\n\t\t\n\t\tfor (Map.Entry<String, FreqAndLists> entry: map.entrySet()) {\n\t\t\tString term = entry.getKey();\n\t\t\tif (originalTerms.contains(term)) { // expanded terms should not contain original terms\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble totalScore = 0;\n\t\t\tList<PositionList> postingList = entry.getValue().getPostingList();\n\t\t\tfor (PositionList positionList : postingList) {\n\t\t\t\tlong dr = positionList.getDocID();\n\t\t\t\tint rawDf = GetRawDf.getRawDf(qryId, term);\n\t\t\t\t//dfMap.put(term, rawDf);\n\t\t\t\ttotalScore += sf.getScore(term, dr, rawDf);\n\t\t\t}\n\t\t\t//System.out.println(term + \" \" + totalScore);\n\t\t\tif (scoreMap.containsKey(totalScore)) {\n\t\t\t\tscoreMap.get(totalScore).add(term);\n\t\t\t} else {\n\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\tlist.add(term);\n\t\t\t\tscoreMap.put(totalScore, list);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*for (Map.Entry<Double, List<String>> entry : scoreMap.entrySet()) {\n\t\t\tSystem.out.println(\"000 \" + entry.getKey());\n\t\t\tList<String> list = entry.getValue();\n\t\t\tfor (String term : list) {\n\t\t\t\tSystem.out.println(\" \" + term);\n\t\t\t}\n\t\t}*/\n\t\t\n\t\t//writeToFile();\n\t\treturn scoreMap;\n\t}", "public static File produceTocFile(File file) throws FileNotFoundException {\n if (!file.exists()) {\n throw new FileNotFoundException(\"Input file is not valid!\");\n }\n\n TreeMap<String, Set<Integer>> map = new TreeMap<>();\n\n\n LongAdder lineCounter = new LongAdder();\n lineCounter.increment(); // First line is line1\n File newFile = null;\n\n Path filePath = file.toPath();\n String fullFileName = filePath.getFileName().toString();\n System.out.println(\"full file name: \" + filePath);\n String fileName = fullFileName.substring(0, fullFileName.lastIndexOf(\".\")) + \".toc\";\n System.out.println(\"new file: \" + fileName);\n\n try (Stream<String> lines = Files.lines(filePath)) {\n Path path = Paths.get(filePath.getParent().toString() + \"\\\\\" + fileName);\n\n if (Files.exists(path)) Files.delete(path);\n newFile = Files.createFile(Paths.get(filePath.getParent().toString() + \"\\\\\" + fileName)).toFile();\n\n lines.forEach(e -> {\n String[] wordsInEachLIne = e.split(\"\\\\W+\");\n for (String element : wordsInEachLIne) {\n int counter = lineCounter.intValue();\n\n if (map.containsKey(element)) {\n map.get(element).add(counter);\n } else {\n Set<Integer> valueSet = new HashSet<>();\n valueSet.add(counter);\n map.put(element, valueSet);\n }\n }\n lineCounter.increment();\n });\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n while (!map.isEmpty()) {\n Map.Entry<String, Set<Integer>> entry = map.pollFirstEntry();\n String text = entry.getKey() + \":\" + entry.getValue().toString() + \" \";\n try {\n Files.write(newFile.toPath(), text.getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return newFile;\n }", "SortComparator(Map<Integer, Integer> tFreqMap) { \n this.freqMap = tFreqMap; \n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\ttry {\r\n\t\t\tin = new FileReader(\"Pride & Prejudice.txt\");\r\n\t\t\treader = new BufferedReader(in);\r\n\r\n\t\t\twhile(reader.readLine()!=null){\r\n\t\t\t\tline=reader.readLine().split(\" \");\r\n\t\t\t\tfor(int index=0;index<line.length;index++){\r\n\t\t\t\t\tif(map.containsKey(line[index])){\r\n\t\t\t\t\t\tint value= map.get(line[index])+1;\r\n\t\t\t\t\t\tmap.put(line[index],value);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tmap.put(line[index],1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\tfor(String key: map.keySet()){\r\n\t\t\tSystem.out.println(\"The word \"+key+\" occurs \"+map.get(key)+\" times\");\r\n\t\t}\r\n\t}", "private static void SetAttributes( DataSet ds,\n String filename,\n SNS_Tof_to_Q_map mapper )\n {\n int[] RunNums = new int[1];\n RunNums[0] = getRunNumber( filename );\n\n float L1 = mapper.getL1();\n float T0 = mapper.getT0();\n Attribute L1Attr = new FloatAttribute( Attribute.INITIAL_PATH, L1);\n Attribute T0Attr = new FloatAttribute( Attribute.T0_SHIFT, T0);\n Attribute RunsAttr = new IntListAttribute( Attribute.RUN_NUM, RunNums );\n\n float TotTotCount = 0;\n\n for( int i = 0; i < ds.getNum_entries(); i++)\n {\n Data D = ds.getData_entry(i);\n D.setAttribute( RunsAttr );\n D.setAttribute( L1Attr );\n D.setAttribute( T0Attr);\n\n float[] yvals = D.getY_values();\n float TotCount =0;\n for( int j = 0; j < yvals.length; j++ )\n TotCount +=yvals[j];\n \n TotTotCount +=TotCount;\n D.setAttribute( new FloatAttribute( Attribute.TOTAL_COUNT, TotCount));\n // TO DO: Add effective position and pixel info list\n // TO DO: Add delta 2 theta\n // TO DO: Add Total Solid Angle\n // TO DO: Add list of Bank IDs\n // TO DO: Add list of Pixel IDs\n }\n\n ds.setAttribute( new StringAttribute( Attribute.FILE_NAME, filename));\n\n String instr = FileIO.getSNSInstrumentName( filename );\n if( instr != null && instr.length()>2)\n ds.setAttribute( new StringAttribute(Attribute.INST_NAME, instr));\n\n ds.setAttribute( new StringAttribute( Attribute.FACILITY_NAME, \"SNS\"));\n\n // TO DO: add Instrument Type\n\n ds.setAttribute( \n new StringAttribute( Attribute.DS_TYPE, Attribute.SAMPLE_DATA));\n\n // TO DO: add run title\n\n ds.setAttribute( RunsAttr );\n\n AddDateTimeAttribute( ds, (new File( filename )).lastModified());\n\n ds.setAttribute( new FloatAttribute(Attribute.TOTAL_COUNT, TotTotCount ));\n // TO DO: add number of pulses\n // TO DO: add proton count \n // TO DO: add user name\n\n }", "public static void pageRankmain() {\n\t\t\t\n\t\t\tstopWordStore();\n\t\t\t//File[] file_read= dir.listFiles();\n\t\t\t//textProcessor(file_read);// Will be called from LinkCrawler\n\t\t\t//queryProcess();\n\t\t\t//System.out.println(\"docsave \"+ docsave);\n\t\t\t/*for ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t List<String> values = entry.getValue();\n\t\t\t System.out.print(\"Key = \" + key);\n\t\t\t System.out.println(\" , Values = \"+ values);\n\t\t\t}*/\n\t\t\t//########## RESPOINSIBLE FOR CREATING INVERTED INDEX OF TERMS ##########\n\t\t\tfor(int i=0;i<vocabulary.size();i++) {\n\t\t\t\tint count=1;\n\t\t\t\tMap<String, Integer> nestMap = new HashMap<String, Integer>();\n\t\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t\t String keyMain = entry.getKey();\n\t\t\t\t List<String> values = entry.getValue();\n\t\t\t\t if(values.contains(vocabulary.get(i)))\n\t\t\t\t \t{\n\t\t\t\t \tentryDf.put(vocabulary.get(i), count);//entryDf stores documents frequency of vocabulary word \\\\it increase the count value for specific key\n\t\t\t\t \tcount++;\n\t\t\t\t \t}\n\t\t\t\t \n\t\t\t\t nestMap.put(keyMain, Collections.frequency(values,vocabulary.get(i)));\n\t\t\t \t\n\t\t\t \t//System.out.println(\"VOC \"+ vocabulary.get(i)+ \" KeyMain \" +keyMain+ \" \"+ Collections.frequency(values,vocabulary.get(i)));\n\t\t\t\t\t}\n\t\t\t\t\ttfList.put(vocabulary.get(i), nestMap);\n\t\t\t}\n\t\t\t//########## RESPOINSIBLE FOR CREATING A MAP \"storeIdf\" TO STORE IDF VALUES OF TERMS ##########\n\t\t\tfor ( Map.Entry<String, Integer> endf : entryDf.entrySet()) {\n\t\t\t\tString keydf = endf.getKey();\n\t\t\t\tint valdf = endf.getValue();\n\t\t\t\t//System.out.print(\"Key = \" + \"'\"+keydf+ \"'\");\n\t\t\t //System.out.print(\" , Values = \"+ valdf);\n\t\t\t double Hudai = (double) (docsave.size())/valdf;\n\t\t\t //System.out.println(\"docsave size \"+docsave.size()+ \" valdf \"+ valdf + \" Hudai \"+ Hudai+ \" log Value1 \"+ Math.log(Hudai)+ \" log Value2 \"+ Math.log(2));\n\t\t\t double idf= Math.log(Hudai)/Math.log(2);\n\t\t\t storeIdf.put(keydf, idf);\n\t\t\t //System.out.print(\" idf-> \"+ idf);\n\t\t\t //System.out.println();\n\t\t\t} \n\t\t\t\n\t\t\t//############ Just for Printing ##########NO WORK HERE########\n\t\t\tfor (Map.Entry<String, Map<String, Integer>> tokTf : tfList.entrySet()) {\n\t\t\t\tString keyTf = tokTf.getKey();\n\t\t\t\tMap<String, Integer> valTF = tokTf.getValue();\n\t\t\t\tSystem.out.println(\"Inverted Indexing by Key Word = \" + \"'\"+keyTf+ \"'\");\n\t\t\t\tfor (Map.Entry<String, Integer> nesTf : valTF.entrySet()) {\n\t\t\t\t\tString keyTF = nesTf.getKey();\n\t\t\t\t\tInteger valTf = nesTf.getValue();\n\t\t\t\t\tSystem.out.print(\" Document Consists This Key Word = \" + \"'\"+ keyTF+ \"'\");\n\t\t\t\t\tSystem.out.println(\" , Term Frequencies in This Doc = \"+ valTf);\n\t\t\t\t} \n\t\t\t}\n\t\t\t//########### FOR CALCULATING DOCUMENT LENTH #############//\n\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry_new : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t{\n\t\t\t\tString keyMain_new = entry_new.getKey();\n\t\t\t\t//int countStop=0;\n\t\t\t\tdouble sum=0;\n\t\t\t\t for(Map.Entry<String, Map<String, Integer>> tokTf_new : tfList.entrySet()) // Iterating through the vocabulary\n\t\t\t\t { \n\t\t\t\t\t Map<String, Integer> valTF_new = tokTf_new.getValue();\n\t\t\t\t\t for (Map.Entry<String, Integer> nesTf_new : valTF_new.entrySet()) // Iterating Through the Documents\n\t\t\t\t\t {\n\t\t\t\t\t\t if(keyMain_new.equals(nesTf_new.getKey())) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t double val = nesTf_new.getValue()* (Double) storeIdf.get(tokTf_new.getKey());\n\t\t\t\t\t\t\t sum = sum+ Math.pow(val, 2);\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 //countStop++;\n\t\t\t\t }\n\t\t\t\t docLength.put(keyMain_new, Math.sqrt(sum));\n\t\t\t\t sum=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Document Length \"+ docLength);\n\t\t\t//System.out.println(\"tfList \"+tfList);\n\t\t\t\n\t\t\t //########### FOR CALCULATING QUERY LENTH #############///\n\t\t\t\tdouble qrySum=0;\n\t\t\t\t for(String qryTerm: queryList) // Iterating through the vocabulary\n\t\t\t\t {\n\t\t\t\t\t//entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));// VUl ase\n\t\t\t\t\t \n\t\t\t\t\t\t if(storeIdf.get(qryTerm) != null) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));\n\t\t\t\t\t\t\t double val = entryQf.get(qryTerm)* (Double) storeIdf.get(qryTerm);\n\t\t\t\t\t\t\t qrySum = qrySum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t System.out.println(qryTerm+\" \"+entryQf.get(qryTerm)+ \" \"+ (Double) storeIdf.get(qryTerm));\n\t\t\t\t }\n\t\t\t\t qrySum=Math.sqrt(qrySum);\n\t\t\t\t System.out.println(\"qrySum \" + qrySum);\n\t\t\t\t \n\t\t\t\t//########### FOR CALCULATING COSINE SIMILARITY #############///\n\t\t\t\t for ( Map.Entry<String, ArrayList<String>> entry_dotP : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble sumProduct=0;\n\t\t\t\t\t\tdouble productTfIdf=0;\n\t\t\t\t\t\tString keyMain_new = entry_dotP.getKey(); //Geting Doc Name\n\t\t\t\t\t\t for(Map.Entry<String, Integer> qryTermItr : entryQf.entrySet()) // Iterating through the vocabulary\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t Map<String, Integer> matchTerm = tfList.get(qryTermItr.getKey()); // Getting a map of doc Names by a Query Term as value of tfList\n\n\t\t\t\t\t\t\t\t if(matchTerm.containsKey(keyMain_new)) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t //System.out.println(\"Test \"+ matchTerm.get(keyMain_new) +\" keyMain_new \" + keyMain_new);\n\t\t\t\t\t\t\t\t\t double docTfIdf= matchTerm.get(keyMain_new) * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t double qryTfIdf= qryTermItr.getValue() * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t productTfIdf = docTfIdf * qryTfIdf;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t sumProduct= sumProduct+productTfIdf;\n\t\t\t\t\t\t\t //System.out.println(\"productTfIdf \"+productTfIdf+\" sumProduct \"+ sumProduct);\n\t\t\t\t\t\t\t productTfIdf=0;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t cosineProd.put(entry_dotP.getKey(), sumProduct/(docLength.get(entry_dotP.getKey())*qrySum));\n\t\t\t\t\t\t sumProduct=0;\n\t\t\t\t\t\t //System.out.println(entry_dotP.getKey()+ \" \" + docLength.get(entry_dotP.getKey()));\n\t\t\t\t\t}\n\t\t\t\t System.out.println(\"cosineProd \"+ cosineProd);\n\t\t\t\t \n\t\t\t\t System.out.println(\"Number of Top Pages you want to see\");\n\t\t\t\t int topRank = Integer.parseInt(scan.nextLine());\n\t\t\t\t Map<String, Double> result = cosineProd.entrySet().stream()\n\t\t\t .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).limit(topRank)\n\t\t\t .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n\t\t\t (oldValue, newValue) -> oldValue, LinkedHashMap::new));\n\n\t\t\t\t scan.close();\n\t\t\t //Alternative way\n\t\t\t //Map<String, Double> result2 = new LinkedHashMap<>();\n\t\t\t //cosineProd.entrySet().stream().sorted(Map.Entry.<String, Double>comparingByValue().reversed()).limit(2).forEachOrdered(x -> result2.put(x.getKey(), x.getValue()));\n\n\t\t\t System.out.println(\"Sorted...\");\n\t\t\t System.out.println(result);\n\t\t\t //System.out.println(result2);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "private void saveBlock() throws IOException {\n\t\tFileWriter blockFile = new FileWriter(StoragePath + Path.blockIdxDir + blockNumber++);\n\t\t\n\t\tfor(Map.Entry<String, LinkedHashMap<Integer, Integer>> record:token.entrySet()){\n\t\t\tString word = record.getKey();\n\t\t\tLinkedHashMap<Integer, Integer> docFreq = record.getValue();\n\t\t\t\n\t\t\tint colFreq = 0;\t\t\t\n\n\t\t\tfor(Map.Entry<Integer, Integer> freq: docFreq.entrySet()){\n\t\t\t\tcolFreq += freq.getValue();\n\t\t\t\tblockFile.append(freq.getKey() + \":\" + freq.getValue() + \",\");\n\t\t\t}\n\t\t\tblockFile.append(\"\\n\");\n\t\t\tblockFile.flush();\n\t\t\t\n\t\t\tif(termDic.containsKey(word))\n\t\t\t\ttermDic.put(word, termDic.get(word) + colFreq);\n\t\t\telse\n\t\t\t\ttermDic.put(word, colFreq);\n\t\t\t\n\t\t\ttoken.put(word, new LinkedHashMap<Integer, Integer>());\n\t\t}\n\t\tblockFile.flush();\n\t\tblockFile.close();\n\t}", "public void crearIndiceInvertido() throws IOException {\n BufferedReader archivoVocabulario = new BufferedReader(new InputStreamReader(new FileInputStream(this.rutaVocabulario), \"utf-8\"));\n String lineaVocabularioActual = archivoVocabulario.readLine();\n\n while(lineaVocabularioActual != null){\n String[] entradaVocabulario = lineaVocabularioActual.split(\"\\\\s\");\n this.archivoIndice.escribirEnArchivo(entradaVocabulario[0] + \" \" + this.posicionActual + \" \" + entradaVocabulario[1], true);\n this.posicionActual += Integer.parseInt(entradaVocabulario[1]);\n\n System.out.println(\"Palabra: \" + entradaVocabulario[0] + \" agregada al índice\\n\");\n\n Integer archivosEncontrados = 0;\n Integer archivoFrecuenciaActual = 0;\n while(archivoFrecuenciaActual < this.cantidadDocumentos){\n System.out.println(\"Archivo \" + archivoFrecuenciaActual + \"\\n\");\n if(archivosEncontrados < Integer.parseInt(entradaVocabulario[1])){\n /** Carga el archivo de frecuencia */\n BufferedReader archivoFrecuencia = new BufferedReader(new InputStreamReader(new FileInputStream(this.rutaFrecuencias + \"/\" + archivoFrecuenciaActual + \".freq\"), \"utf-8\"));\n String lineaFrecuenciaActual = archivoFrecuencia.readLine();\n\n while(lineaFrecuenciaActual != null){\n String[] entradaFrecuencia = lineaFrecuenciaActual.split(\"\\\\s\");\n\n if(entradaFrecuencia[0].equals(entradaVocabulario[0])){\n Double tf = 1 + log(Double.parseDouble(entradaFrecuencia[1]));\n Double idf = log(1 + (cantidadDocumentos/Integer.parseInt(entradaVocabulario[1])));\n Double peso = tf*idf;\n\n this.archivoPostings.escribirEnArchivo(archivoFrecuenciaActual + \" \" + peso, true);\n archivosEncontrados++;\n System.out.println(\"posting agregado\\n\");\n break;\n }\n\n lineaFrecuenciaActual = archivoFrecuencia.readLine();\n }\n\n archivoFrecuencia.close();\n }\n else{\n System.out.println(\"no más postings\\n\");\n break;\n }\n archivoFrecuenciaActual++;\n }\n lineaVocabularioActual = archivoVocabulario.readLine();\n }\n\n archivoVocabulario.close();\n }", "public static void main(String[] args)\r\n {\r\n Map<Character, Integer> myMap = new TreeMap<>(); //initializes the map\r\n secondMap = new TreeMap<>(); //initializes the second map\r\n List<Character> myList = new ArrayList<>(); //creates the list\r\n\r\n //input validation loop to force the users to input an extension with .txt, also extracts the directoryPath\r\n //from the file path extension\r\n String filePath = \"\";\r\n String directoryPath = \"\";\r\n boolean keepRunning = true;\r\n Scanner myScanner = new Scanner(System.in);\r\n\r\n while (keepRunning)\r\n {\r\n System.out.println(\"Please provide the filepath to the file and make sure to include the '.txt' extension\");\r\n String z = myScanner.nextLine();\r\n\r\n //uses a substring to check the extension\r\n if (z.substring((z.length() - 4)).equalsIgnoreCase(\".txt\"))\r\n {\r\n filePath = z;\r\n\r\n for (int i = z.length()-1; i >= 0; i--)\r\n {\r\n if (z.charAt(i) == '\\\\')\r\n {\r\n directoryPath = z.substring(0, i);\r\n i = -1;\r\n }\r\n }\r\n\r\n //terminates the loop\r\n keepRunning = false;\r\n }\r\n else\r\n {\r\n System.out.print(\"Invalid Input! \");\r\n }\r\n }\r\n\r\n try\r\n {\r\n //makes the file\r\n File myFile = new File(filePath);\r\n FileInputStream x = new FileInputStream(myFile);\r\n\r\n //reads in from the file character by character\r\n while (x.available() > 0)\r\n {\r\n Character c = (char) x.read();\r\n myList.add(c);\r\n }\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n //loads all of the characters into a map with their respective frequency\r\n for (Character a : myList)\r\n {\r\n Integer value = myMap.get(a);\r\n\r\n if (!myMap.containsKey(a))\r\n {\r\n myMap.put(a, 1);\r\n }\r\n else\r\n {\r\n myMap.put(a, (value + 1));\r\n }\r\n }\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(myMap);\r\n\r\n PriorityQueue<Node> myQueue = new PriorityQueue<>();\r\n\r\n //creates a node for each Character/value in the map and puts it into the priority Queue\r\n for (Character a : myMap.keySet())\r\n {\r\n Node b = new Node(a, myMap.get(a));\r\n myQueue.add(b);\r\n }\r\n\r\n //removes and re-adds nodes to form the tree, remaining node is the root of the tree\r\n while (myQueue.size() > 1)\r\n {\r\n //removes first two nodes\r\n Node firstRemoved = myQueue.remove();\r\n Node secondRemoved = myQueue.remove();\r\n\r\n //the value for the new node being a sum of the first two removed node's respective frequencies\r\n int val = firstRemoved.frequency + secondRemoved.frequency;\r\n\r\n //creates the new node, set's its frequency to the value of the first two, then ties its left/right node values\r\n //to those originally removed nodes\r\n Node replacementNode = new Node();\r\n replacementNode.frequency = val;\r\n replacementNode.left = firstRemoved;\r\n replacementNode.right = secondRemoved;\r\n\r\n myQueue.add(replacementNode);\r\n }\r\n\r\n //does the recursion on the priorityQueue\r\n huffmanStringSplit(myQueue.peek(), \"\");\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(secondMap);\r\n\r\n //creates and writes to the .CODE file and the .HUFF file\r\n try\r\n {\r\n //PrintWriter for easily writing to a file\r\n String output = directoryPath + \"\\\\FILENAME.code\";\r\n PrintWriter myPrinter = new PrintWriter(output);\r\n\r\n //goes through the second map\r\n for (Character a : secondMap.keySet())\r\n {\r\n int ascii = (int) a;\r\n myPrinter.println(ascii);\r\n myPrinter.println(secondMap.get(a));\r\n }\r\n\r\n //closes printer\r\n myPrinter.close();\r\n\r\n //reopens the printer to the new file\r\n output = directoryPath + \"\\\\FILENAME.huff\";\r\n myPrinter = new PrintWriter(output);\r\n\r\n //outputs every value in the original list to the .huff file with the characters converted to huff code\r\n for (Character a : myList)\r\n {\r\n myPrinter.print(secondMap.get(a));\r\n myPrinter.flush();\r\n }\r\n\r\n //closes the printer after it's written\r\n myPrinter.close();\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public void map(Text key, DynamoDBItemWritable value, OutputCollector<Text, Text> output,\n Reporter reporter) throws IOException {\n if (itemCount % MAX_ITEM_COUNT_PER_FILE == 0) {\n long start = time.getNanoTime();\n if (recordWriter != null) {\n flusher.close(recordWriter, reporter);\n }\n\n String newOutputFilename = generateFilename();\n recordWriter = outputFormat.getRecordWriter(null, jobConf, newOutputFilename, reporter);\n\n long duration = time.getTimeSinceMs(start);\n log.info(\"Rotated over to file: \" + newOutputFilename + \" in \" + (duration / 1000.0) + \" \"\n + \"seconds.\");\n\n // When the reducer collects these filenames we want them to be\n // shuffled around - both to increase write spread on DynamoDB and\n // read spread on S3 when we later consume the data. We achieve this\n // by providing the reverse of the filename as the key in the mapper\n // output.\n String sortKey = new StringBuilder(newOutputFilename).reverse().toString();\n output.collect(new Text(sortKey), new Text(newOutputFilename));\n reporter.incrCounter(Counters.OUTPUT_FILES, 1);\n }\n\n // Write item to output file\n recordWriter.write(NullWritable.get(), value);\n reporter.incrCounter(Counters.DYNAMODB_ITEMS_READ, 1);\n\n itemCount++;\n }" ]
[ "0.6584115", "0.63383335", "0.63360125", "0.5928132", "0.5841916", "0.58104247", "0.5809916", "0.5747677", "0.5738897", "0.5732238", "0.5722358", "0.56811076", "0.5660628", "0.55207574", "0.551754", "0.55126804", "0.54972166", "0.54923236", "0.5473843", "0.5472662", "0.5462123", "0.54254997", "0.53587484", "0.53508633", "0.53469265", "0.5341823", "0.5321864", "0.531775", "0.531287", "0.5303404", "0.5301648", "0.5285594", "0.52745247", "0.5273415", "0.52668667", "0.5258949", "0.5253965", "0.52445614", "0.5241008", "0.52107185", "0.52098", "0.5201575", "0.5181492", "0.51737165", "0.5165316", "0.5151133", "0.5145108", "0.5123773", "0.5118456", "0.51140994", "0.5109325", "0.51065475", "0.5104233", "0.5101009", "0.5094647", "0.50717705", "0.5066111", "0.5058417", "0.5051825", "0.50493175", "0.5041793", "0.5028752", "0.502815", "0.50198054", "0.501882", "0.500214", "0.49977085", "0.49924466", "0.49924132", "0.49883005", "0.49853733", "0.49834064", "0.4978774", "0.49764296", "0.49701354", "0.49686012", "0.49663603", "0.49635214", "0.49634746", "0.4962459", "0.4956912", "0.49281093", "0.4925533", "0.49207476", "0.49193367", "0.49177462", "0.49140424", "0.49137706", "0.4909236", "0.49089175", "0.49087724", "0.4907349", "0.49064386", "0.49048424", "0.48996368", "0.48945296", "0.4890252", "0.48891595", "0.48885044", "0.48882666" ]
0.7765206
0
Returns a String representing an entry, using the frequency file delimiter
private static String generateStringFromEntry(Entry<String, Long> entry) { return entry.getKey() + WORD_FREQUENCY_DELIMITER + entry.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString()\n\t{\n\t\tString sTr = this.str + \":\" + this.freq;\n\t\treturn sTr;\n\t}", "java.lang.String getFrequency();", "public String toString() {\n\t\treturn this.getData().toLowerCase() + \": \" + this.frequency;\n\t}", "java.lang.String getFrequencyOffset();", "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public String toString()\n\t{\n\t\tString line=\"\";\n\t\tIterator<Integer> keySetIterator = recordMap.keySet().iterator(); \n\t\tInteger key;\n\t\twhile(keySetIterator.hasNext())\n\t\t{ \n\t\t\tkey = keySetIterator.next(); \n\t\t\tif (key == 0) line+=recordMap.get(key);\n\t\t\telse line+=DELIMITER+recordMap.get(key); \n\t\t}\n\t\treturn line;\n\t}", "private static String fileFormat(Favourite f) {\n\t\treturn f.getIdF()+Constants.KEY_DB_SEPARATOR+\n\t\t\t\tf.getUserId()+Constants.KEY_DB_SEPARATOR\n\t\t\t\t+f.getIdRes() + Constants.KEY_DB_SEPARATOR+\n\t\t\t\t\"\\n\";\n\t}", "@Override\n\tpublic String toString() {\n\t\tString st = \"(\";\n\t\tfor (int i = 0; i < m_elems.length; i++){\n\t\t\tif (i>0)\n\t\t\t\tst+=\",\";\n\t\t\tst += m_elems[i];\n\t\t}\n\t\tst += \"):\" + String.valueOf(m_frequency);\n\t\treturn st;\n\t}", "public String toString(){\n\t\tIterator<Integer> iter = getLines().iterator();\n\t\tString word = getWord() + \"(\" + getLines().size() + \"): \";\n\t\twhile (iter.hasNext()){\n\t\t\tword += iter.next() + \", \";\n\t\t} \n\t\tword = word.substring(0, word.length() - 2);\n\t\treturn word;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\r\n\t\treturn String.format(\"%s (%d)\", getTagName(), getFreq());\r\n\t}", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n }\n }", "@Override\n public String toFileEntry() {\n return \"T\" + \"/next\" + super.isDone + \"/next\" + super.description;\n }", "public String toString(){\r\n return (\"The word '\" + wordSearched + \"' appears: \" + occurrences + \", time(s) in the file.\"); \r\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\t\n\t\tCIntMap termsFrequencies = null;\n\t\tfor( String tag : keySet()) {\n\t\t\tbuf.append(tag);\n\t\t\tbuf.append(\"\\n\");\n\t\t\ttermsFrequencies = get(tag);\n\t\t\tbuf.append(termsFrequencies);\n\t\t}\n\t\t\n\t\treturn buf.toString();\n\t}", "public java.lang.String getFrequencyOffset() {\n java.lang.Object ref = frequencyOffset_;\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 frequencyOffset_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private static String formatEntry(Object entry){\n return QUOTE + entry.toString() + QUOTE + DELIM;\n }", "@Override\n public String toString() {\n String r = \"\" + value[0];\n for (int i = 1; i < DIM; i++) {\n r += DELIMITER + value[i];\n }\n \n r += DELIMITER + count;\n\n return r;\n }", "public static String compareFreq(double fileFreq)\n\t{\n\t\tfor(int i = 0; i <= 8; i++)\n\t\t{\n\t\t\tif(fileFreq <= 1.025 * constantTones[11] * (Math.pow(2,i)) )\n\t\t\t{\n\t\t\t\t//If the note appears to be in this octave, the program attempts to determine the note\n\t\t\t\tfor(int j = 0; j < constantTones.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(fileFreq <= (1.025 * constantTones[j] * (Math.pow(2,i)) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tnum = 0;\n\t\t\t\t\t\tString note = findNoteValue(j);\n\t\t\t\t\t\tnum = (i*7) + num;\n\n\t\t\t\t\t\tSystem.out.println(num + \", Octave = \" + i);\n\t\t\t\t\t\tString fullNote = note + i;\n\t\t\t\t\t\treturn fullNote;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn \"Invalid\";\n\t}", "public java.lang.String getFrequencyOffset() {\n java.lang.Object ref = frequencyOffset_;\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 frequencyOffset_ = s;\n }\n return s;\n }\n }", "private void traverseLine(String str) {\n\t\tFrequencyCount f ;\r\n\t\tint prev = 0;\r\n\t\tString docid = \"\";\r\n\t\tint flag = 0,flag1 = 0;\r\n\t\tfor(int k = 0;k<str.length();k++)\r\n\t\t{\r\n\t\t\t//System.out.print(str.charAt(k));\r\n\t\t\tif(str.charAt(k) == ':'){\r\n\t\t\t\tflag = 1;k++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(flag == 1){\r\n\t\t\t\tint indexid;\r\n\t\t\t\tif(flag1 == 0){\r\n\t\t\t\t\tcounter = \"\";\r\n\t\t\t\t\tindexid = str.indexOf(':', k);\r\n\t\t\t\t\tcounter = str.substring(k, indexid);\r\n\t\t\t\t\tk = indexid+1;\r\n\t\t\t\t\tflag1 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tindexid = str.indexOf('#', k);\r\n\t\t\t\tdocid = String.valueOf(Integer.parseInt(str.substring(k, indexid))+prev);\r\n\t\t\t\tprev = Integer.parseInt(docid);\r\n\t\t\t\t\r\n\t\t\t\tf = new FrequencyCount(docid);\r\n\t\t\t\tk = indexid+1;\r\n\t\t\t\twhile(str.charAt(k) != '|'){\r\n\t\t\t\t\tif(k+1 == str.length()){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(str.charAt(k) == '#') {k++;continue;}\r\n\t\t\t\t\tint flagop = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch(str.charAt(k)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcase 't' : flagop = 1;\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\tcase 'i' : flagop = 2;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'b' : flagop = 3;\r\n\t\t\t\t \t\t \t\t\tbreak;\r\n\t\t\t\t\t\tcase 'r' : flagop = 6;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'L' : flagop = 5;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'c' : flagop = 4;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'l' : flagop = 7;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault : flagop = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(flagop != 0){\r\n\t\t\t\t\t\tindexid = Math.min(str.indexOf('#', k), str.indexOf('|', k));\r\n\t\t\t\t\t\tif(indexid == -1){\r\n\t\t\t\t\t\t\tindexid = str.indexOf('|', k);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tint count = Integer.parseInt(str.substring(k+1, indexid));\r\n\t\t\t\t\t\t//System.out.print(count +\" \");\r\n\t\t\t\t\t\tfor(int j = 0;j<count;j++)\r\n\t\t\t\t\t\t\tf.incrementCounter(flagop);\r\n\t\t\t\t\t\tk = indexid;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e){e.printStackTrace();\r\n\t\t\t\t\t\t\tSystem.out.println(\"EXCEPTION : \"+e.getMessage());\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\tfc.add(f);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tword = word+str.charAt(k);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String toString(String delimiter) {\r\n\t\tString queueList = \"\", prefix = \"\";\r\n\t\tArrayList<T> dataCopy = new ArrayList<T>();\r\n\t\tdataCopy = data;\r\n\r\n\t\tfor(T e: dataCopy) {\r\n\t\t\tqueueList += (prefix+e);\r\n\t\t\tprefix = delimiter;\r\n\t\t}\r\n\t\treturn queueList;\r\n\t}", "public String[] buildEntries(String a) {\n try {\n File file = new File(a);\n Scanner input = new Scanner(file);\n while (input.hasNextLine()) {\n String line=input.nextLine();\n String name=line.substring(line.indexOf(\"\\t\"));\n name=name.substring(0,name.lastIndexOf(\"H\"));\n name=name.substring(0,name.lastIndexOf(\"\\t\"));\n int entries=Integer.parseInt(line.substring(line.lastIndexOf(\"\\t\")+1,line.lastIndexOf(\"E\")));\n while (entries>0) {\n entryList.add(name);\n entries--;\n System.out.println(\"Added: \"+name);\n }\n}\n return drawBE(entryList,a);\n }\n catch(FileNotFoundException b) {\n System.out.println(\"Error, no entries\"); \n String ret[] = new String[6];\n ret[0]=\"NOFILE\";\n return ret;\n }\n }", "@Override\r\n public String toString() {\n return this.name + \":\" + this.score + \":\" + this.freq;\r\n }", "public String toString()\n\t{\n\t\treturn \"Character: \" + characters + \" Frequency: \" + frequency;\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Index: \" + getIndex() + \"\\n\");\n\t\tsb.append(\"Freq : \" + getFreq() + \"\\n\");\n\t\treturn sb.toString();\n\t}", "String filterEntry(String entry) {\n String result = \"<?>\";\n try {\n StringTokenizer stok = new StringTokenizer(entry, \"=\");\n result = (String)stok.nextElement();\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n return result;\n }", "@Override\n public String toString () {\n StringBuilder output = new StringBuilder( \"name=\" );\n output.append( this.name );\n output.append( \", entries=\" );\n output.append( this.dictionary.size() );\n output.append( \";\" );\n\n return output.toString();\n }", "public void displayFrequency(int[] frequencyCount) {\n\t\tStringBuffer toPrint = new StringBuffer();\n\t\t// For every character...\n\t\tfor (int i = 0; i < frequencyCount.length; i++) {\n\t\t\tif (frequencyCount[i] > 0) { // if it appears at least once..\n\t\t\t\t// tabs have a char value of 9\n\t\t\t\tif (i == 9) {\n\t\t\t\t\ttoPrint.append(\"\\\\t\");\n\t\t\t\t\t// new lines have a char value of 10\n\t\t\t\t} else if (i == 10) {\n\t\t\t\t\ttoPrint.append(\"\\\\n\");\n\t\t\t\t} else {\n\t\t\t\t\t// everything else is simply the same but as a char.\n\t\t\t\t\t// the index i is the char values\n\t\t\t\t\ttoPrint.append((char) i);\n\t\t\t\t}\n\t\t\t\t// the values at i is (char)i's frequency.\n\t\t\t\ttoPrint.append(\":\" + frequencyCount[i] + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(toPrint.toString());\n\t}", "public String toString()\n {\n if (this.isEmpty())\n {\n //the thesaurus is empty\n return \"\\nThere are no entries in the thesaurus\\n\";\n }\n //the accumulating string being returned\n String returnString = \"\\n\";\n //current position in the linkedList\n int index = 0;\n //current entry in the linkedList\n Entry current;\n while (index < entryList.size())\n {\n //for each entry add its toString\n current = entryList.get(index);\n returnString += current.toString() + \"\\n\";\n index++;\n }\n\n return returnString;\n }", "public void buildHuffmanList(File inputFile){\n try{\n Scanner sc = new Scanner(inputFile);\n while(sc.hasNextLine()){\n\n String line = sc.nextLine();\n for(int i =0;i<line.length();i++){\n \n if(freqTable.isEmpty())\n freqTable.put(line.charAt(i),1);\n else{\n if(freqTable.containsKey(line.charAt(i)) == false)\n freqTable.put(line.charAt(i),1);\n else{\n int oldValue = freqTable.get(line.charAt(i));\n freqTable.replace(line.charAt(i),oldValue+1);\n }\n }\n }\n }\n }\n catch(FileNotFoundException e){\n System.out.println(\"Can't find the file\");\n }\n }", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "public static String histogram(ArrayList<Integer> frequency)\r\n {\r\n int maxFrequency;\r\n int starRepresent;\r\n maxFrequency = 0;\r\n \r\n for (int i = 0; i < frequency.size() -1; i++)\r\n {\r\n if (frequency.get(i) > maxFrequency)\r\n maxFrequency = frequency.get(i);\r\n }\r\n \r\n starRepresent = maxFrequency / 10;\r\n \r\n System.out.printf(\"%10s\", \"Frequency Distrubution\");\r\n System.out.println();\r\n System.out.printf(\"%10s\", \"( max freq is \" + maxFrequency + \")\");\r\n System.out.println();\r\n \r\n for (int i = 10; i > 0; i--)\r\n {\r\n for (int index = 0; index <= frequency.size() - 1; index++)\r\n {\r\n if (frequency.get(index) / starRepresent >= i)\r\n System.out.print(\"* \");\r\n else\r\n System.out.print(\" \");\r\n }\r\n System.out.print(\"\\n\");\r\n }\r\n return \"\";\r\n }", "@Test\n\tpublic void testInlinerWithFile() throws Exception {\n\t\tString input = new String(Files.readAllBytes(new File(\"../warre.txt\").toPath()));\n\t\tInliner inliner = new Inliner();\n\t\tList<Part> parts = new Tokenizer(inliner).split(input);\n\t\tList<HTreeNode> freq = new FrequencyAnalyzer().analyzeFrequency(parts);\n\t\tString result = inliner.encode(parts, freq, 'X');\n\n\t\tSystem.out.println(\"\\nInput size : \" + input.length());\n\t\tSystem.out.println(\"Output size : \" + result.length());\n\t\tSystem.out.println(\"Num tokens : \" + freq.stream().filter(a -> a.prevalence > 1).count());\n\n//\t\tSystem.out.println(input);\n\t\tSystem.out.println(result);\n//\t\tSystem.out.println(inliner.decode(result, 'X'));\n\t}", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String toString() {\r\n \treturn \"(\"+f.toString()+\")'\";\r\n }", "public String toString() {\r\n if(t!=null && t.getLettre()!=System.getProperty(\"line.separator\").charAt(0))\r\n {\r\n return \"(f= \"+String.valueOf(this.frequence)+\" L= \"+this.t.getLettre()+\")\";\r\n }\r\n else if(t!=null && t.getLettre()==System.getProperty(\"line.separator\").charAt(0)){\r\n return \"(f= \"+String.valueOf(this.frequence)+\" L=[saut_ligne])\";\r\n }\r\n else {\r\n return \"(f= \" + String.valueOf(this.frequence) + \" g= \" + this.getGauche() + \" d= \" + this.getDroite()+\"\";\r\n }\r\n }", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "public String read() {\n\t\tString Line = \"\";\n\t\tInteger[] byteCodes = compressFileReader();\n\t\tif (byteCodes == null)\n\t\t\treturn null;\n\t\tint index = 0;\n\t\tint nextCode = byteCodes[index++];\n\t\tString val = readingMap[nextCode];\n\n\t\twhile (index < byteCodes.length - 1) {\n\t\t\tLine += val;\n\t\t\tnextCode = byteCodes[index++];\n\t\t\tString s = readingMap[nextCode];\n\t\t\tif (s == null) {\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tint i = 0;\n\t\t\t}\n\t\t\tif (readingkeysCount == nextCode)\n\t\t\t\ts = val + val.charAt(0);\n\t\t\tif (readingkeysCount < 256 + keysPossible)\n\t\t\t\treadingMap[readingkeysCount++] = val + s.charAt(0);\n\t\t\tval = s;\n\t\t}\n\t\tLine += val;\n\t\treturn Line + '\\n';\n\t}", "public String getEventLine(){\r\n\t\t\twhile(name.length()<20){\r\n\t\t\t\tname+= \" \";\r\n\t\t\t}\r\n\t\t\tString Tword;\r\n\t\t\tTword = String.format(\"%05d\", ticket);\r\n\t\t return Integer.toString(date)+ \" \" +Tword+\" \"+name;\r\n\t }", "public synchronized String getType(long entry) throws IOException,\n EOFException {\n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n idx.seek(startOfEntry);\n if (idx.readChar() == '\\n')\n throw new IllegalStateException(\"No data at address \" + entry);\n idx.skipBytes(bytesPerId - 2);\n \n byte[] bytes = new byte[bytesPerType];\n idx.read(bytes);\n for (int i = 0; i < bytes.length; i++) {\n if (bytes[i] == 0)\n return new String(bytes, 0, i);\n }\n \n throw new IllegalStateException(\"Found type without delimiter\");\n }", "public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }", "public String getStringRecord() {\n NumberFormat nf = new DecimalFormat(\"0000.00\");\n String delimiter = \",\";\n\n return String.format(\"%05d\", orderLineId) + delimiter + String.format(\"%05d\", orderId) + delimiter\n + String.format(\"%05d\", userId) + delimiter + String.format(\"%05d\", productId) + delimiter\n + String.format(\"%05d\", orderLineQuantity) + delimiter + nf.format(salesPrice)\n + System.getProperty(\"line.separator\");\n }", "GuitarString(double frequency)\n\t{\n\t\tint qLen = (int) Math.round( SAMPLE_RATE / frequency );\n\t\trb = new RingBuffer(qLen);\n\t\ttotalTick = 0;\n\t\t\n\t\tfor(int i = 0; i < qLen; i++)\n\t\t\trb.enqueue(0);\n\t\t\t\n\t}", "public String getEventLine(){\r\n\t\t\twhile(name.length()<20){\r\n\t\t\t\tname+= \" \";\r\n\t\t\t}\r\n\t\t\tString Tword;\r\n\t\t\tTword = String.format(\"%05d\", ticket);\r\n\t\t\treturn Integer.toString(date)+ \" \" +Tword+\" \"+name;\r\n\t\t}", "public String toString() {\n\t\tString str = word + \":\";\n\t\tfor (int i = 0; i < list.size() - 1; i++)\n\t\t\tstr += list.get(i) + \",\";\n\t\tif (list.size() != 0)\n\t\t\tstr += list.get(list.size() - 1);\n\t\treturn str;\n\t}", "public static HashMap<String,String> topics(){\n HashMap<String,String> temp = new HashMap<String,String>();\n Scanner topicer;\n try {\n topicer = new Scanner(new File(\"Topics.txt\"));\n topicer.useDelimiter(\",~ *\\n*\");\n while (topicer.hasNext()){\n String key = \" \"+topicer.next()+\" \";\n String value = \"\";\n if(topicer.hasNext())\n value = topicer.next();\n temp.put(key, value);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "public String toString() {\r\n\t\tString[] analysis = new String[26];\r\n\t\tString bigLine = String.format(\"LETTER ANALYSIS: \" + '\\n' + \"%-6s\" + '\\t' + \"%-6s\" + '\\t' + \"%-6s\" +\r\n\t\t\t\t\t\t\t'\\t' + \"%-6s\" + '\\t' + \"%-6s\" + '\\n', \"Letter\", \"Freq\", \"Freq%\", \"AvFreq%\", \"Diff\");\r\n\t\tfor(int i = 0; i < 26; i++) {\r\n\t\t\tanalysis[i] = returnAnArray(i);\r\n\t\t\tbigLine+=analysis[i];\r\n\t\t} bigLine += \"The most frequent letter is \" + mostFrequent + \" at \" + formatDoubles(max);\r\n\t\treturn bigLine;\r\n\t\t\r\n\t}", "public synchronized String toString() {\n\t\tString nl = System.lineSeparator();\n\t\t\n\t\t// get list of all peers for all files\n\t\tString files = \"\";\n\t\tfor(String filename : peerRecord.keySet()) {\n\t\t\tfiles += \"- \" + filename + \": \";\n\t\t\tfor(PeerConnection peer : peerRecord.get(filename)) {\n\t\t\t\tfiles += peer + \" \";\n\t\t\t}\n\t\t\tfiles += nl;\n\t\t\t\n\t\t}\n\t\treturn \"[TRACKER]\" + nl + files;\n\t}", "String toStringStartValues();", "com.google.protobuf.ByteString\n getFrequencyBytes();", "public FrequencyList (String input){\n\tadd(input);\n }", "public String EventMapStringRepresentation(){\n ArrayList<String> lines = new ArrayList<String>();\n ArrayList<String> idsSorted = sort(eventIdsList);\n for(String id : idsSorted){\n String line = toStringEvent(id);\n lines.add(line);\n }\n String totalString = \"\";\n Integer i = 1;\n for(String line: lines){\n totalString += i + \") \" + line + System.lineSeparator();\n i++;\n }\n return totalString;\n }", "void genIDFData(String vocabFile, String outFile) throws Exception {\n List<String> lines = FileUtils.readLines(new File(vocabFile), Charset.defaultCharset());\n BufferedWriter bw = new BufferedWriter(new FileWriter(outFile));\n int N = reader.numDocs();\n for (String line: lines) {\n String word = TrecDocIndexer.analyze(indexer.getAnalyzer(), line).trim();\n int df = reader.docFreq(new Term(TrecDocIndexer.FIELD_ANALYZED_CONTENT, word));\n bw.write(line.trim() + \"\\t\");\n bw.write(String.valueOf(Math.log(N/(double)df)));\n bw.newLine();\n }\n bw.close();\n }", "public java.lang.String getLocalizedFrequencyString(java.lang.String r3) {\n /*\n r2 = this;\n int r0 = r3.hashCode()\n r1 = -791707519(0xffffffffd0cf8081, float:-2.78504428E10)\n if (r0 == r1) goto L_0x0028\n r1 = 95346201(0x5aede19, float:1.6444467E-35)\n if (r0 == r1) goto L_0x001e\n r1 = 1236635661(0x49b5900d, float:1487361.6)\n if (r0 == r1) goto L_0x0014\n goto L_0x0032\n L_0x0014:\n java.lang.String r0 = \"monthly\"\n boolean r3 = r3.equals(r0)\n if (r3 == 0) goto L_0x0032\n r3 = 2\n goto L_0x0033\n L_0x001e:\n java.lang.String r0 = \"daily\"\n boolean r3 = r3.equals(r0)\n if (r3 == 0) goto L_0x0032\n r3 = 0\n goto L_0x0033\n L_0x0028:\n java.lang.String r0 = \"weekly\"\n boolean r3 = r3.equals(r0)\n if (r3 == 0) goto L_0x0032\n r3 = 1\n goto L_0x0033\n L_0x0032:\n r3 = -1\n L_0x0033:\n switch(r3) {\n case 0: goto L_0x0054;\n case 1: goto L_0x0046;\n case 2: goto L_0x0038;\n default: goto L_0x0036;\n }\n L_0x0036:\n r3 = 0\n return r3\n L_0x0038:\n android.content.Context r3 = r2.context\n android.content.res.Resources r3 = r3.getResources()\n r0 = 2131888385(0x7f120901, float:1.9411404E38)\n java.lang.String r3 = r3.getString(r0)\n return r3\n L_0x0046:\n android.content.Context r3 = r2.context\n android.content.res.Resources r3 = r3.getResources()\n r0 = 2131889601(0x7f120dc1, float:1.941387E38)\n java.lang.String r3 = r3.getString(r0)\n return r3\n L_0x0054:\n android.content.Context r3 = r2.context\n android.content.res.Resources r3 = r3.getResources()\n r0 = 2131886962(0x7f120372, float:1.9408518E38)\n java.lang.String r3 = r3.getString(r0)\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.myfitnesspal.shared.service.reminders.RemindersServiceImpl.getLocalizedFrequencyString(java.lang.String):java.lang.String\");\n }", "private List<Integer> printTopValue() throws IOException {\n\t\t lines++;\r\n\t\t Iterator<Entry<String, MergeClass>> it = t_map.entrySet().iterator();\r\n\t\t Entry<String, MergeClass> me = it.next();\r\n content.append(me.getKey() + \":\");\r\n content.append(me.getValue().getCounter() + \":\");\r\n //System.out.print(me.getKey()+\":\");\r\n int previd = 0;\r\n MergeClass mc = me.getValue();\r\n List<FrequencyCount> fc = mc.listfc;\r\n List<Integer> filefc = mc.file;\r\n for(FrequencyCount f : fc){\r\n \t content.append(Integer.parseInt(f.getId())-previd);\r\n \t previd = Integer.parseInt(f.getId());\r\n \t if(f.getTitle() != 0){\r\n \t\t content.append(\"#t\"+f.getTitle());\r\n \t }\r\n \t if(f.getInfo() != 0){\r\n \t\t content.append(\"#i\"+f.getInfo());\r\n \t }\r\n \t if(f.getBody() != 0){\r\n \t\t content.append(\"#b\"+f.getBody());\r\n \t }\r\n \t if(f.getreferences() != 0){\r\n \t\t content.append(\"#r\"+f.getreferences());\r\n \t }\r\n \t if(f.getLink() != 0){\r\n \t\t content.append(\"#L\"+f.getLink());\r\n \t }\r\n \t if(f.getCategory() != 0){\r\n \t\t content.append(\"#c\"+f.getCategory());\r\n \t }\r\n \t if(f.getinlinks() != 0){\r\n \t\t content.append(\"#l\"+f.getinlinks());\r\n \t }\r\n \t content.append(\"|\");\r\n \t if(content.length() > 500){\r\n \t bw.write(content.toString());\r\n \t content = new StringBuilder(\"\");\r\n \t \r\n }\r\n \t \r\n \t //System.out.print(f.getId() + \" - T \" + f.getTitle() + \" | I \" + f.getInfo()+\" | B \" + f.getBody()+\" | R \" + f.getreferences()\r\n \t//\t\t +\" | L \" + f.getLink() +\" | C \" + f.getCategory() + \" #### \");\t\t\t\t \t\r\n }\r\n content.append(\"\\n\");\r\n //System.out.println();\r\n if(content.length() > 500){\r\n \t bw.write(content.toString());\r\n \t content = new StringBuilder(\"\");\r\n \t \r\n }\t\r\n t_map.remove(me.getKey());\r\n return filefc;\r\n\t}", "private String getSeparator(List<String> file)\n {\n String line = file.get(0);\n \n if (line.contains(\" \") || line.contains(\" ,\")) {\n /* for these delimeters the \"data\" and \"quantidade\" column are not\n * separated correctly, so we need to add one space to support them.\n */\n for (int i = 0; i < file.size(); i++) {\n String l = file.get(i);\n String a = l.substring(0, 16);\n String b = l.substring(16, l.length() - 1);\n file.set(i, a + \" \" + b);\n }\n }\n\n return FileUtil.SEPARATOR(line);\n }", "public String getFormattedFileContents ();", "public String toFileString()\n {\n return ( cyl + \",\" + fuel );\n }", "public void createCsvString(StringBuilder builder, Frequency e) {\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getName() != null ? e.getName().replace(\",\", \"\") : \"\")\r\n\t\t\t\t+ \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getQtyPerDay() != null ? e.getQtyPerDay() : \"\") + \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\r\\n\");\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn this.getStringEventId()+\"-\"+this.getOccurrenceMark();\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\tIterator<HuffmanPair> temp;\r\n\t\tString result = \"\";\r\n\t\ttemp = super.iteratorPreOrder();\r\n\t\twhile (temp.hasNext()) {\r\n\t\t\tresult += temp.next().toString();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public com.google.protobuf.ByteString\n getFrequencyOffsetBytes() {\n java.lang.Object ref = frequencyOffset_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequencyOffset_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String nameFrequencyBin(int t) {\r\n\t switch(t) {\r\n\t case 0x00: return \"Delta (2-4)\";\r\n\t case 0x01: return \"Theta (4-8)\";\r\n\t case 0x02: return \"Alpha (8-13)\";\r\n\t case 0x03: return \"Beta1 (13-18)\";\r\n\t case 0x04: return \"Beta2 (18-21)\";\r\n\t case 0x05: return \"Beta3 (11-14)\";\r\n\t case 0x06: return \"Gamma (30-50)\";\r\n\t default: return \"-\";\r\n\t }\r\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\tfinal Iterator< Entry< Double, V > > iterator = iterator();\n\t\twhile( iterator.hasNext() )\n\t\t{\n\t\t\tfinal Entry< Double, V > entry = iterator.next();\n\t\t\tbuffer.append( entry.getKey().toString() + \", \" );\n\t\t\tbuffer.append( entry.getElement().toString() + \"\\n\" );\n\t\t}\n\t\t\n\t\treturn buffer.toString();\n\t}", "private String histogram() {\n\t\tStringBuilder sb = new StringBuilder(\"[\");\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint size = 0;\n\t\t\tfor (int j = 0; j < myBuckets.size(); j++) {\n\t\t\t\tif (myBuckets.get(j).size() == i) size++;\n\t\t\t}\n\t\t\tsb.append(size + \", \");\n\t\t}\n\t\tsb.replace(sb.length() - 2, sb.length(), \"]\");\n\t\treturn sb.toString();\n\t}", "public String getString_entries_id() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,11)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_entries_id(i) == (char)0) break;\n carr[i] = (char)getElement_entries_id(i);\n }\n return new String(carr,0,i);\n }", "public static Frequency parse(String line) {\n\n double value = -1;\n Unit unit = null;\n Frequency freq = null;\n\n try {\n Scanner s = new Scanner(line);\n s.useDelimiter(\"[\\\\p{Lower}\\\\p{Upper}\\\\p{javaWhitespace}]\");\n\n value = s.nextDouble();\n\n s.reset();\n s.useDelimiter(\"[\\\\p{Digit}\\\\p{Punct}\\\\p{javaWhitespace}]\");\n\n long multiplier = Unit.HZ.getMagnitude();\n String unitString = \"\";\n\n if(s.hasNext()) {\n unitString = s.next();\n unit = Unit.parse(unitString);\n multiplier = unit.getMagnitude();\n }\n\n if(s.hasNext()) {\n throw new IllegalArgumentException(\n String.format(\"Invalid Frequency Format: %s\", line));\n }\n\n freq = new Frequency((long)(value * multiplier), unit);\n freq.originalString = line;\n }\n catch(Exception e) {\n throw new IllegalArgumentException(\"Error parsing: \" + line);\n }\n\n return freq;\n }", "public String toString()\n\t{\n\t\tString output;\n\t\tif (value == null)\n\t\t\toutput = \"Null\";\n\t\telse\n\t\t\toutput = value.toString() + frequency;\n\t\tif (isLeaf())\n\t\t\treturn output;\n\t\t//don't need to check cases if only right or left is null\n\t\t//don't need to print out frequency\n\t\telse\n\t\t\treturn output + \"(\" + left.toString() + \",\" + right.toString() + \")\";\n\t}", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public String getAsString(String key) {\n return entries.getProperty(key);\n }", "public com.google.protobuf.ByteString\n getFrequencyOffsetBytes() {\n java.lang.Object ref = frequencyOffset_;\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 frequencyOffset_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic String getFortune() {\n\t\t\n\t\t\tString[] tokens = null;\n\n\t\ttry {\n\t\t\n\t\tFileReader in=new FileReader(inputFile);\n\t\t\n\t\tBufferedReader inputStream=new BufferedReader(in);\n\t\t\n\t\tString l;\n\t\t\n\t\twhile((l=inputStream.readLine()) != null)\n\t\t\t\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t tokens = l.split(\",\");\n\t\t\t\t}\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint l=tokens.length;\n\t\tl=l-1;\n\t\tint i=(int) ((Math.random() * ((l- 0) + 1)) + 0);\n\t\treturn tokens[i];\n\t}", "public String formatDirectoryListing(FileSystemEntry fileSystemEntry);", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public String toString()\n\t{\n\t\treturn this.dataLineType.toStringLong() + \" (\" + this.count + \" items)\";\n\t}", "public String toString() {\n return songLine;\n }", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }", "private double calIDF(String key) throws IOException {\n\t\tList<String> in = FileHelper.readFile(Constants.inputpath);\r\n\t\tint doccount=0;\r\n\t\tfor(String line:in){\r\n\t\t\tString[] l = line.split(\" \");\r\n\t\t\tfor(String word:l){\r\n\t\t\t\tif (word.equals(key)){\r\n\t\t\t\t\tdoccount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble idf=Math.log((double)in.size()/doccount);\r\n\t\treturn idf;\r\n\t}", "String getKeyFormat();", "@Override\n\tpublic void display() {\n\t\tStringBuilder string = new StringBuilder();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hashArray[i] == null)\n\t\t\t\tstring.append(\"** \");\n\t\t\telse if (hashArray[i] == deleted)\n\t\t\t\tstring.append(hashArray[i].value + \" \");\n\t\t\telse\n\t\t\t\tstring.append(\"[\" + hashArray[i].value + \", \"\n\t\t\t\t\t\t+ hashArray[i].frequency + \"] \");\n\t\t}\n\t\tSystem.out.println(string.toString());\n\t}", "@Override\n public String toString() {\n if (!isEmpty()){\n String saida = \"\";\n int pos = head;\n\n for(int i = 1;i <= total;i++){\n saida += memo[pos].toString();\n \n if (i != total)\n saida += \", \";\n \n pos++;\n if (pos >= MAX){\n pos = 0;\n }\n }\n return (\"F: [ \" + saida + \" ]\");\n }\n else{\n return (\"F: []\");\n }\n }", "String getDelimiter();", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder s = new StringBuilder();\n\t\tjava.util.Iterator<java.util.Map.Entry<String, Object>> iterator = entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tjava.util.Map.Entry<String, Object> entry = iterator.next();\n\n\t\t\ts.append('\\n');\n\t\t\ts.append(\"\\t\");\n\t\t\ts.append(entry.getKey());\n\t\t\ts.append(':');\n\t\t\ts.append(' ');\n\t\t\ts.append(entry.getValue().toString());\n\t\t}\n\t\treturn s.toString();\n\t}", "public void readFile(String fileName)\r\n {\n String key = new String();\r\n String value = new String();\r\n\r\n boolean readInfo = false;\r\n String out =\"\";\r\n String infoTag = \"\";\r\n String infoTagContent = \"\";\r\n\r\n try{\r\n System.out.println(\"Readig file \"+fileName+\" ...\");\r\n BufferedReader filereader = new BufferedReader(new FileReader(fileName));\r\n\r\n String line = new String();\r\n line = filereader.readLine();\r\n\r\n while(line != null){\r\n infoTag = \"\";\r\n infoTagContent = \"\";\r\n\r\n if((line.indexOf(\"=\") != -1) && (line.indexOf(\"#\") == -1))\r\n {\r\n key = line.substring(0, line.indexOf(\"=\"));\r\n value = line.substring(line.indexOf(\"=\")+1);\r\n\r\n key = key.trim();\r\n value = value.trim();\r\n\r\n if(key.equals(\"PREFIX\")){\r\n this.tagPrefix = value;\r\n } else {\r\n value = tagPrefix+\".\"+value;\r\n tagHash.put(key, value);\r\n }\r\n\r\n readInfo = false;\r\n infoHash.put(key, out);\r\n out = \"\";\r\n }\r\n\r\n\r\n if((line.indexOf(\"#\") == 0) && (line.indexOf(\"@\") != -1) && (line.indexOf(\"=\") != -1))\r\n {\r\n readInfo = true;\r\n infoTag = line.substring(line.indexOf(\"@\"), line.indexOf(\"=\"));\r\n infoTag.trim();\r\n infoTagContent = line.substring(line.indexOf(\"=\")+1);\r\n if(infoTagContent.trim().length() > 0) infoTagContent = infoTagContent+NL;\r\n out = out+infoTag+\": \"+NL+infoTagContent;\r\n }else if((line.indexOf(\"#\") == 0) && readInfo){\r\n // alreadey reading a tagInfo, means NL between entries\r\n out = out+line.substring(line.indexOf(\"#\")+1)+NL;\r\n }\r\n\r\n line = filereader.readLine();\r\n }\r\n\r\n filereader.close();\r\n\r\n //System.out.println(tagHash);\r\n\r\n }catch (Exception e){\r\n System.out.println(\"Exception in readFile: \"+e);\r\n }\r\n }", "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "public String toString() {\n return( \"entry_id:\" + entry_id + \",bmrb_id:\" + bmrb_id + \n \",pdb_id:\" + pdb_id + General.eol );\n }", "public String toString() {\n\t\t\tStringBuilder sb = new StringBuilder(\"%\");\n\t\t\t// Flags.UPPERCASE is set internally for legal conversions.\n\t\t\tFlags dupFlag = flag.dup().remove(Flags.UPPERCASE);\n\t\t\tsb.append(dupFlag.toString());\n\t\t\tif (index > 0) {\n\t\t\t\tsb.append(index).append('$');\n\t\t\t}\n\t\t\tif (width != -1) {\n\t\t\t\tsb.append(width);\n\t\t\t}\n\t\t\tif (precision != -1) {\n\t\t\t\tsb.append('.').append(precision);\n\t\t\t}\n\t\t\tif (isDateConversion) {\n\t\t\t\tsb.append(flag.contains(Flags.UPPERCASE) ? 'T' : 't');\n\t\t\t}\n\t\t\tsb.append(flag.contains(Flags.UPPERCASE)\n\t\t\t\t\t? Character.toUpperCase(conversionChar) : conversionChar);\n\t\t\treturn sb.toString();\n\t\t}", "public String toString(){\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\t\r\n\t\tsb.append(String.format(\" initial pairs: %8d\\n\",num[0]));\r\n\t\t\r\n\t\tsb.append(\" time(day) samples Dxx(km) Dyy(km) Dis(km) Kxx(10^7cm^2/s) Kyy(10^7cm^2/s)\\n\");\r\n\t\t\r\n\t\tfor(int l=0,L=num.length;l<L;l++)\r\n\t\tsb.append(String.format(\r\n\t\t\t\" %5.1f %6d %7.3f %7.3f %7.3f %7.3f %7.3f\\n\",\r\n\t\t\tl*dt/86400f,num[l],Dxx[l]/1e6,Dyy[l]/1e6,Dis[l]/1e6,Kxx[l],Kyy[l]\r\n\t\t));\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t}", "String getFormatter();", "public String listFinance() {\n Set<String> keySet = finance.keySet();\n StringBuilder returnString = new StringBuilder();\n for(String k : keySet) {\n returnString.append(k + \", \");\n }\n int length = returnString.length();\n returnString.delete(length-2, length);\n returnString.append(\"\\n\");\n return returnString.toString();\n }", "private String getNomeArquivoItem(File ordem, long numItem)\n\t{\n\t\tDecimalFormat \tdf \t\t\t= new DecimalFormat(\"000\");\n\t\tString\t\t\tnomeArquivo\t= null;\n\t\tPattern \t\tpattern \t= null;\n\t\tPatternMatcher \tmatcher \t= new AwkMatcher();\n\t\tPatternCompiler compiler \t= new AwkCompiler();\n\t\tSubstitution \tsub\t\t\t= new StringSubstitution(\"_\"+df.format(numItem)+\".dat\");\n\t\ttry\n\t\t{\n\t\t\tpattern = compiler.compile(\"[.]dat\");\n\t\t\tnomeArquivo = Util.substitute(matcher,pattern,sub,ordem.getAbsolutePath());\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t/* Caso algum erro ocorra na troca da extensao do arquivo, entao\n\t\t\t * o arquivo fica com o nome original acrescido da extensao .zip\n\t\t\t */\n\t\t\tSystem.out.println(\"Erro ao criar o nome do arquivo do item para concatenacao. \"+e);\n\t\t\tnomeArquivo = ordem.getAbsolutePath()+\".\"+df.format(numItem);\n\t\t}\n\t\treturn nomeArquivo;\n\t\t//return nomeArquivo.replaceAll(\"[.]dat\",\"_\"+df.format(numItem)+\".dat\");\n\t}", "private String rowOfEntriesToString(TableEntry<K, V> element) {\r\n\t\tString s = \"\";\r\n\r\n\t\twhile (element != null) {\r\n\t\t\ts += \", \" + element.toString();\r\n\t\t\telement = element.next;\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\t}", "public synchronized String getPath(long entry) throws IOException,\n EOFException {\n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n idx.seek(startOfEntry);\n if (idx.readChar() == '\\n')\n throw new IllegalStateException(\"No data at address \" + entry);\n idx.skipBytes(bytesPerId + bytesPerType - 2);\n \n byte[] bytes = new byte[bytesPerPath];\n idx.read(bytes);\n String line = new String(bytes, \"utf-8\");\n int delimiter = line.indexOf('\\n');\n if (delimiter < 1)\n throw new IllegalStateException(\"Found path without delimiter\");\n return new String(bytes, 0, delimiter - 1);\n }", "public String toString() {\n String name = null;\n if (font != null)\n name = font.getName();\n return super.getPObjectReference() + \" FONTDESCRIPTOR= \" + entries.toString() + \" - \" + name;\n }", "String getFieldString(VcfEntry vcfEntry) {\n\t\t// Field from first 10 columns\n\t\t// if (name.equals(\"CHROM\")) return vcfEntry.getChromosomeName();\n\t\tif (name.equals(\"CHROM\")) return vcfEntry.getChromosomeNameOri();\n\t\tif (name.equals(\"ID\")) return vcfEntry.getId();\n\t\tif (name.equals(\"REF\")) return vcfEntry.getRef();\n\t\tif (name.equals(\"ALT\")) return vcfEntry.getAltsStr();\n\t\tif (name.equals(\"FILTER\")) return vcfEntry.getFilter();\n\t\tif (name.equals(\"FORMAT\")) return vcfEntry.getFormat();\n\t\tif (name.equals(\"POS\")) return \"\" + (vcfEntry.getStart() + 1);\n\t\tif (name.equals(\"QUAL\")) return \"\" + vcfEntry.getQuality();\n\n\t\t// Is there a filed 'name'\n\t\tif (vcfInfo == null) {\n\t\t\tvcfInfo = vcfEntry.getVcfFileIterator().getVcfHeader().getVcfHeaderInfo(name);\n\t\t\tif (vcfInfo == null) return (String) fieldHeaderNotFound(vcfEntry);\n\t\t}\n\n\t\t// Get field value\n\t\tString value = vcfEntry.getInfo(name);\n\t\tif (value == null) return (String) fieldNotFound(vcfEntry);\n\n\t\treturn value;\n\t}", "public String toString()\n\t{\n\t\treturn myFilename;\n\t}", "public String toString()\n {\n //creates a string of the class's variables in a readable format.\n String s = String.format(\"%-14s%-3d%3s\" +lineNums.toString(), word, count,\"\");\n return s.toString();\n }" ]
[ "0.5819448", "0.58183736", "0.58057886", "0.56343347", "0.55558723", "0.54657066", "0.5439878", "0.5430922", "0.5425091", "0.5398604", "0.5374728", "0.5315293", "0.5231597", "0.5207402", "0.52028483", "0.51441485", "0.5098753", "0.50922227", "0.5078941", "0.50530404", "0.50472933", "0.5031406", "0.5025181", "0.4991375", "0.4989964", "0.49290565", "0.49290016", "0.49235126", "0.4921884", "0.49146163", "0.49085125", "0.48917368", "0.48873237", "0.48652926", "0.48582786", "0.48513407", "0.48443854", "0.48225194", "0.47659928", "0.4760795", "0.4753242", "0.4746835", "0.47295555", "0.46965438", "0.46859053", "0.46843114", "0.46774438", "0.46763027", "0.46729434", "0.46637645", "0.46491438", "0.46480167", "0.46471813", "0.46470538", "0.4640634", "0.46321285", "0.4628118", "0.46208134", "0.46050474", "0.46005303", "0.4600137", "0.4594586", "0.45933935", "0.45852882", "0.45852143", "0.45810357", "0.45712", "0.45709836", "0.45528772", "0.45438793", "0.45413098", "0.45291582", "0.45291", "0.4528915", "0.45119798", "0.45103905", "0.4509103", "0.45076308", "0.4507", "0.4506237", "0.44974744", "0.4487903", "0.44869906", "0.44824558", "0.44806194", "0.44770318", "0.4475053", "0.44743714", "0.44620207", "0.44548774", "0.44490504", "0.4446986", "0.44376776", "0.44333816", "0.4423052", "0.44100606", "0.4408838", "0.4403637", "0.44031286", "0.4400173" ]
0.66401076
0
Row is swiped from recycler view remove it from adapter
@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n adapter.arrayList.remove(position);\n adapter.notifyDataSetChanged();\n\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n PinItem item = pinItems.remove(position);\n // delete the item from the DB\n dbHelper.deleteItem(item);\n mRecyclerView.getAdapter().notifyItemRemoved(position);\n\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n userList.remove(position);\n if (userList!=null && userList.size()>0)\n {\n userBinding.tvNoDataFound.setVisibility(View.GONE);\n userListAdapter = new UserListAdapter(userList,UserActivity.this);\n userBinding.recyclerList.setAdapter(userListAdapter);\n }\n else\n {\n userBinding.tvNoDataFound.setVisibility(View.VISIBLE);\n }\n userListAdapter.notifyDataSetChanged();\n\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n int position = (viewHolder.getAdapterPosition());\n mMainViewModel.delete(mShoppingListItems.get(position));\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n\n id = (int) viewHolder.itemView.getTag();\n\n\n final CustomCursorAdapter adapter = (CustomCursorAdapter) mRecyclerView.getAdapter();\n // int position = viewHolder.getAdapterPosition();\n\n if (!pending.contains(id)) {\n pending.add(id);\n adapter.pendingRemoval(id);\n // findViewById(R.id.include_regular).setVisibility(View.GONE);\n\n } else {\n // pending.remove(id);\n\n }\n\n getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, MainActivity.this);\n\n }", "@Override\n public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {\n\n viewModel.delete(adapter.getNoteAtPosition(viewHolder.getAdapterPosition()));\n Toast.makeText(MainActivity.this, \"Drink deleted!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n //Get the index corresponding to the selected position\n int position = (viewHolder.getAdapterPosition());\n if (swipeDir == ItemTouchHelper.LEFT) {\n getAnswer(true, position);\n removeItem(position);\n } else if (swipeDir == ItemTouchHelper.RIGHT) {//swipe right\n getAnswer(false, position);\n removeItem(position);\n }\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder,\n int direction) {\n int position = viewHolder.getAdapterPosition();\n Anime myAnime = mAdapter.getAnimeAtPosition(position);\n Toast.makeText(MainActivity.this, \"Deleting \" +\n myAnime.getTitle(), Toast.LENGTH_LONG).show();\n\n // Delete the word\n mAnimeViewModel.deleteAnime(myAnime);\n }", "@Override\n public void onClick(View v) {\n listItems.remove(position);\n //close the swipe layout\n holder.swipeLayout.close();\n //update adapter\n activity.updateAdapter();\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n Company toBeRestoredCompany = comparisonCompaniesAdapter\n .getItem(viewHolder.getAdapterPosition());\n Company a = null;\n for (Company c : selectedCompanies) {\n if (toBeRestoredCompany.getIdentifiers().getTicker().equalsIgnoreCase(c.getIdentifiers().getTicker())) {\n horizontalCompanyListAdapter.addItem(toBeRestoredCompany);\n a = c;\n }\n }\n if (a != null) {\n selectedCompanies.remove(a);\n }\n comparisonCompaniesAdapter.removeItem(viewHolder.getAdapterPosition());\n }", "void onItemSwiped(RecyclerView.ViewHolder viewHolder, int direction);", "@Override\n public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {\n contactViewModel.delete(adapter.getContactAt(viewHolder.getAdapterPosition()));\n Toast.makeText(getContext(), \"Contact deleted successfully!\", Toast.LENGTH_SHORT).show();\n }", "@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n }", "@Override\n public void onSwiped(ViewHolder viewHolder, int direction) {\n }", "private void enableSwipe() {\n ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) {\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {\n return false;\n }\n\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n int position = viewHolder.getAdapterPosition();\n\n if (direction == ItemTouchHelper.LEFT) {\n final CartProduct deletedModel = cartProducts.get(position);\n final int deletedPosition = position;\n adapter.removeItem(position);\n // showing snack bar with Undo option\n Snackbar snackbar = Snackbar.make(getWindow().getDecorView().getRootView(), \" removed from Recyclerview!\", Snackbar.LENGTH_LONG);\n snackbar.setAction(\"UNDO\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // undo is selected, restore the deleted item\n adapter.restoreItem(deletedModel, deletedPosition);\n }\n });\n snackbar.setActionTextColor(Color.YELLOW);\n snackbar.show();\n }\n\n// else {\n// final CartProduct deletedModel = cartProducts.get(position);\n// final int deletedPosition = position;\n// adapter.removeItem(position);\n// // showing snack bar with Undo option\n// Snackbar snackbar = Snackbar.make(getWindow().getDecorView().getRootView(), \" removed from Cart!\", Snackbar.LENGTH_LONG);\n// snackbar.setAction(\"UNDO\", new View.OnClickListener() {\n// @Override\n// public void onClick(View view) {\n//\n// // undo is selected, restore the deleted item\n// adapter.restoreItem(deletedModel, deletedPosition);\n// }\n// });\n// snackbar.setActionTextColor(Color.YELLOW);\n// snackbar.show();\n// }\n }\n\n @Override\n public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {\n\n Bitmap icon;\n if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {\n\n View itemView = viewHolder.itemView;\n float height = (float) itemView.getBottom() - (float) itemView.getTop();\n float width = height / 3;\n\n if (dX > 0) {\n// try {\n// p.setColor(Color.parseColor(\"#388E3C\"));\n// RectF background = new RectF((float) itemView.getLeft(), (float) itemView.getTop(), dX, (float) itemView.getBottom());\n// c.drawRect(background, p);\n//\n// icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_delete_forever);\n// RectF icon_dest = new RectF((float) itemView.getLeft() + width, (float) itemView.getTop() + width, (float) itemView.getLeft() + 2 * width, (float) itemView.getBottom() - width);\n// c.drawBitmap(icon, null, icon_dest, p);\n// } catch (Exception e) {\n// Log.e(\"xxxxxxxxxxxxxxxxxxxx\", e.toString());\n// }\n } else {\n p.setColor(Color.parseColor(\"#D32F2F\"));\n\n RectF background = new RectF((float) itemView.getRight() + dX, (float) itemView.getTop(), (float) itemView.getRight(), (float) itemView.getBottom());\n c.drawRect(background, p);\n icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_delete_forever);\n RectF icon_dest = new RectF((float) itemView.getRight() - 2 * width, (float) itemView.getTop() + width, (float) itemView.getRight() - width, (float) itemView.getBottom() - width);\n c.drawBitmap(icon, null, icon_dest, p);\n }\n }\n super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);\n }\n };\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback);\n itemTouchHelper.attachToRecyclerView(recyclerView);\n }", "@Override\n public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) {\n\n realm = RealmMedicineReminderController.getInstance().getRealm();\n\n // get the article\n final MedicineReminder medicineReminder = getItem(position);\n // cast the generic view holder to our specific one\n final CardViewHolder holder = (MedicineReminderAdapter.CardViewHolder) viewHolder;\n\n // set the title and the snippet\n holder.textMedicine.setText(medicineReminder.getMedicineName());\n holder.textInterval.setText(medicineReminder.getDaysInterval());\n holder.textOther.setText(medicineReminder.getOther());\n holder.textTime.setText(medicineReminder.getTime());\n\n\n\n //remove single match from realm\n holder.card.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n\n RealmResults<MedicineReminder> results = realm.where(MedicineReminder.class).findAll();\n\n // Get the book title to show it in toast message\n MedicineReminder b = results.get(position);\n String title = b.getMedicineName();\n\n // All changes to data must happen in a transaction\n realm.beginTransaction();\n\n results.remove(position);\n realm.commitTransaction();\n\n if (results.size() == 0) {\n Prefs.with(context).setPreLoad(false);\n }\n\n notifyDataSetChanged();\n\n Toast.makeText(context, title + \" is removed from Realm\", Toast.LENGTH_SHORT).show();\n return false;\n }\n });\n\n }", "void onSwiped(RecyclerView.ViewHolder viewHolder, T t, int direction);", "@Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {\n return false;\n }", "@Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {\n return false;\n }", "@Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {\n return false;\n }", "@Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {\n return false;\n }", "@Override\n public boolean onMove(RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n //do nothing\n return true;\n }", "@Override\n public void onSwiped(final ViewHolder viewHolder, final int direction) {\n final int position = viewHolder.getAdapterPosition();\n final HistoryAdapter adapter = (HistoryAdapter) connections.getAdapter();\n final HistoricalConnection removed = adapter.remove(position);\n\n // make the removal undoable\n Undoable.from(connections, adapter)\n .remove(removed, position)\n .withLabel(getString(R.string.removed_history, removed.toString()))\n .onDelete(new Action1<HistoricalConnection>() {\n @Override\n public void call(final HistoricalConnection o) {\n Log.v(TAG, \"Delete \" + o);\n historian.delete(o);\n }\n })\n .perform();\n }", "@Override\n public void onClick(View v) {\n\n getRef(viewHolder.getAdapterPosition()).removeValue();\n\n adapter.notifyDataSetChanged();\n\n toastMessage(\"Movie removed\");\n }", "@Override\npublic void applyFunctionality(AdvancedAdapter<T, ?> adapter, RecyclerView recyclerView) {\n\tandroidx.recyclerview.widget.ItemTouchHelper itemTouchHelper;\n\tif (canSwipeBetweenPages(recyclerView)) {\n\t\titemTouchHelper = new ItemTouchHelper(new ItemRemoveCallback());\n\t} else {\n\t\titemTouchHelper = new androidx.recyclerview.widget.ItemTouchHelper(new ItemRemoveCallback());\n\t}\n\titemTouchHelper.attachToRecyclerView(recyclerView);\n\t\n\t// Red background when erasing\n\tBackgroundDecoration backgroundDecoration = new BackgroundDecoration();\n\trecyclerView.addItemDecoration(backgroundDecoration);\n\t\n}", "@Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n return false;\n }", "@Override\n public void removeFirstObjectInAdapter() {\n Log.d(\"LIST\", \"removed object!\");\n rowItem.remove(0);\n arrayAdapter.notifyDataSetChanged();\n }", "@Override\n public void onSwiped(final RecyclerView.ViewHolder viewHolder,\n final int direction) {\n }", "private void initListItems() {\n RecyclerView recyclerView = findViewById(R.id.recyclerView);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setHasFixedSize(true);\n\n List<Food> foods = database.getAll();\n\n List<ListItem> items = new ArrayList<>();\n foods.sort(Comparator.comparing(Food::getExpiration));\n\n for(int i = 0; i < foods.size(); i++) {\n items.add(i, new ListItem(foods.get(i)));\n //items.add(idx, new ListItem(\"Section 1\", true));\n }\n\n ListAdapter adapter = new ListAdapter(this, items);\n recyclerView.setAdapter(adapter);\n\n adapter.setOnItemClickListener(new ListAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(View view, ListItem obj, int position) {\n// database.removeFood(items.get(position).getFood());\n// items.remove(position);\n// adapter.notifyDataSetChanged();\n// Toast.makeText(getApplicationContext(),\"Item Removed!\", Toast.LENGTH_SHORT).show();\n }\n });\n\n // Swipe handler for the rows in the listview\n ItemTouchHelper touchHelper = new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n\n if (swipeDir == ItemTouchHelper.LEFT) {\n Toast.makeText(getApplicationContext(),\"Item Removed!\", Toast.LENGTH_SHORT).show();\n database.removeFood(items.get(position).getFood());\n adapter.notifyDataSetChanged();\n items.remove(position);\n recreate();\n\n }\n else if (swipeDir == ItemTouchHelper.RIGHT) {\n Toast.makeText(getApplicationContext(),\"Frozen toggled!\", Toast.LENGTH_SHORT).show();\n database.freezeFood(items.get(position).getFood());\n adapter.notifyDataSetChanged();\n recreate();\n }\n }\n\n @Override\n public void onChildDraw (Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {\n new RecyclerViewSwipeDecorator.Builder(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)\n .addSwipeRightActionIcon(R.drawable.snowflake)\n .addSwipeRightBackgroundColor(ContextCompat.getColor(MainActivity.this, R.color.freeze_blue))\n .addSwipeLeftActionIcon(R.drawable.ic_baseline_delete_24)\n .addSwipeLeftBackgroundColor(ContextCompat.getColor(MainActivity.this, R.color.design_default_color_error))\n .setActionIconTint(ContextCompat.getColor(MainActivity.this, R.color.white))\n .create()\n .decorate();\n\n super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);\n }\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { return false; }\n });\n touchHelper.attachToRecyclerView(recyclerView);\n\n // Check item list size to display empty view\n if (items.isEmpty()) {\n emptyList.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.GONE);\n }\n else {\n recyclerView.setVisibility(View.VISIBLE);\n emptyList.setVisibility(View.GONE);\n }\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n inMealRecipes.remove(i);\n adapterM.notifyDataSetChanged();\n }", "@Override\n\tpublic void onSwiped(final RecyclerView.ViewHolder viewHolder, final int direction) {\n\t}", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, FirstAidListActivity.this);\n }", "@Override\n public void onClick(View view) {\n adapter.restoreItem(deletedModel, deletedPosition);\n }", "@Override\r\n public void onClick(View view) {\n entries.remove(position);\r\n notifyItemRemoved(position);\r\n notifyItemRangeChanged(position, entries.size());\r\n Toast.makeText(mContext, \"Rejected : \" + u, Toast.LENGTH_SHORT).show();\r\n }", "void onSwiping(RecyclerView.ViewHolder viewHolder, float ratio, int direction);", "@Override\n public void onItemDismiss(int position) {\n taskAndTurnpointsViewModel.deleteTaskTurnpoint(position);\n notifyDataSetChanged();\n }", "@Override\n public void onViewRecycled(RecyclerView.ViewHolder holder) {\n super.onViewRecycled(holder);\n if (holder instanceof TvShowViewHolder) {\n ((TvShowViewHolder) holder).cleanup();\n }\n\n }", "@Override\n public void onViewRecycled(RecyclerView.ViewHolder holder) {\n if (holder instanceof BaseViewHolder) {\n ((BaseViewHolder) holder).mRelativeLayout.removeAllViews();\n }\n super.onViewRecycled(holder);\n }", "public void onDetachAdapter(RecyclerView.Adapter<?> adapter) {\n }", "@Override\n public void deleteItem(int position) {\n originalData.remove(currentData.get(position));\n //Removed of the current data using the current position gotten from the click listener\n currentData.remove(position);\n\n //Notify changes to adapter through presenter\n }", "@Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {\n int fromPosition = viewHolder.getAdapterPosition();\n int toPosition = target.getAdapterPosition();\n Collections.swap(mAdapter.mItems, fromPosition, toPosition);\n mAdapter.notifyItemMoved(fromPosition, toPosition);\n\n // Move in underlying list used by loader\n SelectedBuses.moveBusInList(\n getContext(),\n ((BusViewHolder) viewHolder).mBusIdInApi,\n ((BusViewHolder) target).mBusIdInApi\n );\n\n // Dismiss Snackbar\n if (mSnackbar != null) {\n mSnackbar.dismiss();\n }\n return true;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mAdapter.notifyItemRemoved(position); //item removed from recylcerview\n mAdapter.removeItem(position);\n dataList.remove(position); //then remove item\n mAdapter.notifyDataSetChanged();\n deleteEntry(dataList.get(position).getDocId());\n }", "@Override\n public void onClick(View view) {\n mIngredients.remove(getAdapterPosition());\n\n // Update the items in the RecyclerView\n notifyItemRemoved(getAdapterPosition());\n notifyItemRangeChanged(getAdapterPosition(), mIngredients.size());\n }", "@Override public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n return false;\n }", "private void bindSwipeToDelete() {\n ItemTouchHelper itemTouchHelper = new\n ItemTouchHelper(new SwipeToDeleteCallback(getContext(),basketListAdapter));\n itemTouchHelper.attachToRecyclerView(binding.recyclerViewVirtualBasket);\n }", "public interface ItemViewHolderListener {\n\n /**\n * Called when the first registers an item as being moved or swiped.\n * Implementations should update the item view to indicate it's active state.\n */\n void onItemSelected();\n\n\n /**\n * Called when the has completed the move or swipe, and the active item\n * state should be cleared.\n */\n void onItemClear();\n}", "public void onItemUnsetSelection(AdapterView<?> parent, View view, int position);", "@Override\n public void onItemDismiss(int position) {\n dummyDataList.remove(position);\n notifyItemRemoved(position);\n\n }", "public void deleteReminderItem(int position){\n reminderItems.remove(position);\n recyclerAdapter.notifyDataSetChanged();\n }", "public void swipeItem(int adapterIndex)\n\t{\n\t\tfinal TiTableView tableView = getTableView();\n\n\t\tif (tableView != null) {\n\t\t\tfinal TableViewRowProxy row = tableView.getAdapterItem(adapterIndex);\n\t\t\tfinal TableViewSectionProxy section = (TableViewSectionProxy) row.getParent();\n\n\t\t\trow.fireSyncEvent(TiC.EVENT_DELETE, null);\n\n\t\t\tsection.remove(row);\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n mAdapter.restoreItem(deletedItem, deletedIndex);\n }", "@Override\n public void onClick(View view) {\n mAdapter.restoreItem(deletedItem, deletedIndex);\n }", "public void removeItem() {\n tvItem.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n // Notify the listener which position was long pressed.\n longClickListener.onItemLongClicked(getBindingAdapterPosition());\n return true;\n }\n });\n }", "void onSwipedClear();", "@Override\n public void onItemLongClicked(int position) {\n items.remove(position);\n // Notify the adapter\n itemsAdapter.notifyItemRemoved(position);\n Toast.makeText(getContext(), \"Item was removed\", Toast.LENGTH_SHORT).show();\n saveItems();\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n visDialog(viewHolder);\n\n }", "@Override\r\n public void onItemsRemoved(RecyclerView recyclerView, int positionStart, int itemCount) {\r\n if(isBeforePreLayout){\r\n if(firstChangedPosition > positionStart || firstChangedPosition == -1)\r\n firstChangedPosition = positionStart;\r\n if(firstChangedPosition < firstAttachedItemPosition)\r\n removedTopAndBoundPositionCount += itemCount;\r\n }\r\n }", "@Override\r\n public void removeFirstObjectInAdapter() {\n Log.d(\"LIST\", \"removed object!\");\r\n al.remove(0);\r\n arrayAdapter.notifyDataSetChanged();\r\n }", "void onItemDelete(int position);", "public void itemRemoved(boolean wasSelected);", "@Override\n public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {\n return false;\n }", "private void setUpRecyclerView() {\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new SwipeToDeleteCallback(this));\n itemTouchHelper.attachToRecyclerView(recyclerView);\n }", "@Override\n public void deleteItem(int position) {\n GlobalValue.arrMyMenuShop.remove(position);\n shopAdapter.notifyDataSetChanged();\n }", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = (viewHolder.getAdapterPosition());\n String Europe = inEurope(position);\n if (swipeDir == ItemTouchHelper.LEFT) {\n Toast.makeText(MainActivity.this, Europe + GeoObject.ObjectNames[position].toString() + \")\", Toast.LENGTH_SHORT).show();\n result(viewHolder, \"left\", position);\n } else {\n Toast.makeText(MainActivity.this, Europe + GeoObject.ObjectNames[position].toString() + \")\", Toast.LENGTH_SHORT).show();\n result(viewHolder, \"right\", position);\n }\n goAdapter.notifyItemChanged(position);\n }", "public interface ItemTouchSwipeListener {\n /**\n * Callback triggered when the user swipes away a RecyclerView item\n *\n * @param viewHolder ViewHolder swiped by the user\n * @param direction Direction of the swipe. Corresponds to an ItemTouchHelper direction constant\n * @see androidx.recyclerview.widget.ItemTouchHelper\n */\n void onItemSwiped(RecyclerView.ViewHolder viewHolder, int direction);\n}", "public interface BaseRecyclerViewAdapter<T> {\n void itemRemoved(T t);\n}", "private void dragDownToAdd() {\n ItemTouchHelper.SimpleCallback itemTouchHelperCallback =\n new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.DOWN) {\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n return true;\n }\n\n @Override\n public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {\n if (viewHolder != null) {\n final View cardView =\n ((HorizontalCompanyListAdapter.ViewHolder) viewHolder).cardView;\n getDefaultUIUtil().onSelected(cardView);\n }\n }\n\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n\n final Company temp = dashboardCompanies.get(viewHolder.getAdapterPosition());\n\n if (!checkDuplicate(comparisonCompaniesAdapter.getDataSet(), temp.getIdentifiers().getTicker())) {\n selectedCompanies.add(temp);\n //adapter.notifyDataSetChanged();\n horizontalCompanyListAdapter.removeItem(viewHolder.getAdapterPosition());\n comparisonCompaniesAdapter.addItem(temp);\n }\n }\n\n @Override\n public void clearView(RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder) {\n final View cardView =\n ((HorizontalCompanyListAdapter.ViewHolder) viewHolder).cardView;\n getDefaultUIUtil().clearView(cardView);\n }\n\n @Override\n public void onChildDraw(Canvas c, RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder, float dX, float dY,\n int actionState, boolean isCurrentlyActive) {\n\n final View cardView =\n ((HorizontalCompanyListAdapter.ViewHolder) viewHolder).cardView;\n\n getDefaultUIUtil().onDraw(c, recyclerView,\n cardView, dX, dY, actionState, isCurrentlyActive);\n }\n\n @SuppressWarnings(\"EmptyMethod\")\n @Override\n public int convertToAbsoluteDirection(int flags, int layoutDirection) {\n return super.convertToAbsoluteDirection(flags, layoutDirection);\n }\n };\n\n // attaching the touch helper to recycler view\n ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(itemTouchHelperCallback);\n mItemTouchHelper.attachToRecyclerView(dashboardCompaniesRecyclerView);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mAdapter.notifyItemRemoved(position + 1); //notifies the RecyclerView Adapter that data in adapter has been removed at a particular position.\n mAdapter.notifyItemRangeChanged(position, mAdapter.getItemCount()); //notifies the RecyclerView Adapter that positions of element in adapter has been changed from position(removed element index to end of list), please update it.\n }", "void onStartDrag(RecyclerView.ViewHolder viewHolder);", "void onStartDrag(RecyclerView.ViewHolder viewHolder);", "@Override\n public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {\n return false;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListCinemaTicketBean.remove(position);\n\t\t\t\tCinemaTicketAdapter.this.notifyDataSetChanged();\n\n\t\t\t}", "public void doRemoveItem() {\n doRemoveItem(this.mSrcPos - getHeaderViewsCount());\n }", "@Override\n public void onScrolled (RecyclerView recyclerView, int dx, int dy){\n }", "@Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n }", "@Override\n public ItemDraggableRange onGetItemDraggableRange(Holder holder, int position) {\n return null;\n }", "void notifyListItemRemoved(int position);", "public interface ItemTouchHelperViewHolder {\n /**\n * Implementations should update the item view to indicate it's active state.\n */\n void onItemSelected();\n\n\n /**\n * state should be cleared.\n */\n void onItemClear();\n}", "void onItemDeleted();", "@Override\r\n public void destroyItem( ViewGroup container, int position, Object object ){\n container.removeView( (View) object );\r\n }", "@Override\n public boolean onItemLongClick(AdapterView<?> arg0,\n View arg1,\n int position,\n long arg3){\n arrayTasks.remove(position);\n //apply changes on the adapter\n adapter.notifyDataSetChanged();\n return true;\n }", "@Override\n public void onSwipeRight() {\n getFragmentManager().beginTransaction().remove(LongAddFragment.this).commit();\n super.onSwipeRight();\n }", "@Override\n public void onCardSwiped(Direction direction) {\n Log.d(TAG, \"onCardSwiped: p=\" + manager.getTopPosition() + \" d=\" + direction);\n if (direction == Direction.Right){\n //add into like list\n swipeLike();\n }\n if (direction == Direction.Top){\n //add into like list\n swipeLike();\n }\n if (direction == Direction.Left){\n\n }\n if (direction == Direction.Bottom){\n\n }\n // Paginating if top position exceed max item count\n if (manager.getTopPosition() == adapter.getItemCount() - 5){\n paginate();\n }\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n myIngredients.remove(i);\n updateIngredientListView();\n }", "void onDeleteItem(E itemElementView);", "void onStopEditingItem(E itemElementView);", "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n if (this.mSwiper != null) {\n this.mSwiper.onSwiped(viewHolder, direction);\n }\n }", "public interface RecyclerTouchHelperListener {\n void onSwipe(RecyclerView.ViewHolder viewHolder, int direction, int position);\n}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object)\n {\n \n container.removeView(mPagersList.get(position));\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t\t\tmSMSDao.deleteSMS(String.valueOf(mSMSList.get(position).getSort()));\n\t\t\t\t\t\tmSMSList.remove(position);\n\t\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t\t\tmSMSDao.deleteSMS(String.valueOf(mSMSList.get(position).getSort()));\n\t\t\t\t\t\tmSMSList.remove(position);\n\t\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t\t}", "@Override\n public void removeFirstObjectInAdapter() {\n eventsArray.remove(0);\n lastRemovedEventId = eventIds.get(0);\n lastRemovedEventTitle = eventTitles.get(0);\n lastRemovedEventDesc = eventDescriptions.get(0);\n lastRemovedEventStartTime = eventStartTimes.get(0);\n lastRemovedEventEndTime = eventEndTimes.get(0);\n lastRemovedEventLocation = eventLocations.get(0);\n //Log.d(LOG_MESSAGE, lastRemovedEventId + \" - before\");\n eventIds.remove(0);\n eventTitles.remove(0);\n eventDescriptions.remove(0);\n eventStartTimes.remove(0);\n eventEndTimes.remove(0);\n eventLocations.remove(0);\n arrayAdapter.notifyDataSetChanged();\n //Log.d(LOG_MESSAGE, lastRemovedEventId + \" - after\");\n }", "public void invalidate()\n\t{\n\t\tif (this.holder != null) {\n\t\t\tthis.holder.bind(this, this.holder.itemView.isActivated());\n\t\t}\n\t}", "@Override\r\n\tpublic void onRemove() {\n\r\n\t}", "@Override\n public void notifyDataRemoved(int count, int viewType) {\n List<Integer> toSaved = new ArrayList<>();\n\n for (int i = 0; i < types.size(); ++i) {\n // Log.w(TAG, \"notifyDataRemoved: READ \" + types.get(i) + \"/\" + viewType);\n\n if (types.get(i) != viewType) {\n toSaved.add(types.get(i));\n // Log.i(TAG, \"notifyDataRemoved: REMOVED \" + i + \"/\" + types.size());\n }\n }\n types.clear();\n types.addAll(toSaved);\n // Log.v(TAG, \"notifyDataRemoved: \" + getItemCount());\n\n /*Notificar al adapter previa eliminación [EN] Notify adapter after elimination*/\n super.notifyDataRemoved(count, viewType);\n\n }", "public void deleteRow(MyItem row) {\n\n\t\tif (MyItemAdapter.rows.contains(row)) {\n\t\t\tMyItemAdapter.rows.remove(row);\n\t\t}\n\n\t}", "private void setUpItemTouchHelper() {\n ItemTouchHelper.SimpleCallback itemTouchHelperCallback =\n new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) {\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n return true;\n }\n\n @Override\n public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {\n if (viewHolder != null) {\n final View foreground =\n ((CompanyListAdapter.ViewHolder) viewHolder).getForeground();\n\n getDefaultUIUtil().onSelected(foreground);\n }\n }\n\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n // Row is swiped from recycler view remove it from adapter\n // comparisonCompaniesAdapter.removeItem(viewHolder.getAdapterPosition());\n Company toBeRestoredCompany = comparisonCompaniesAdapter\n .getItem(viewHolder.getAdapterPosition());\n Company a = null;\n for (Company c : selectedCompanies) {\n if (toBeRestoredCompany.getIdentifiers().getTicker().equalsIgnoreCase(c.getIdentifiers().getTicker())) {\n horizontalCompanyListAdapter.addItem(toBeRestoredCompany);\n a = c;\n }\n }\n if (a != null) {\n selectedCompanies.remove(a);\n }\n comparisonCompaniesAdapter.removeItem(viewHolder.getAdapterPosition());\n }\n\n @Override\n public void clearView(RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder) {\n final View foreground = ((ViewHolder) viewHolder).getForeground();\n getDefaultUIUtil().clearView(foreground);\n }\n\n @Override\n public void onChildDraw(Canvas c, RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder, float dX, float dY,\n int actionState, boolean isCurrentlyActive) {\n\n final View foreground = ((ViewHolder) viewHolder).getForeground();\n getDefaultUIUtil().onDraw(\n c, recyclerView, foreground, dX, dY, actionState, isCurrentlyActive);\n }\n\n @Override\n public int convertToAbsoluteDirection(int flags, int layoutDirection) {\n return super.convertToAbsoluteDirection(flags, layoutDirection);\n }\n };\n\n // attaching the touch helper to recycler view\n ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(itemTouchHelperCallback);\n mItemTouchHelper.attachToRecyclerView(comparisonCompaniesRecyclerView);\n }", "@Override\npublic void remove(ObjectAdapter compAdapter) {\n\t\n}" ]
[ "0.79451454", "0.7729708", "0.7472296", "0.7409784", "0.7388089", "0.714877", "0.70501405", "0.7029718", "0.69555146", "0.69389147", "0.6867484", "0.67230785", "0.6659221", "0.66400975", "0.6617995", "0.6596967", "0.658272", "0.6513041", "0.6513041", "0.6513041", "0.6513041", "0.64742815", "0.6467064", "0.6445284", "0.64304096", "0.64256436", "0.6407518", "0.6395932", "0.6376132", "0.6368081", "0.6362698", "0.6314164", "0.6309956", "0.63099194", "0.62719", "0.62614346", "0.62600374", "0.6250658", "0.6225749", "0.6217117", "0.6216671", "0.61991227", "0.6192713", "0.6190394", "0.6180186", "0.6158288", "0.6147605", "0.6121538", "0.6087629", "0.6081301", "0.60798985", "0.60798985", "0.6068194", "0.6061991", "0.6008072", "0.598354", "0.5977455", "0.59667337", "0.59467065", "0.59171563", "0.5915774", "0.5907401", "0.59007984", "0.58817095", "0.5869953", "0.5815283", "0.58094704", "0.5803742", "0.57929134", "0.57929134", "0.57875824", "0.57848495", "0.57768446", "0.5771879", "0.57710683", "0.5769982", "0.5714979", "0.57039547", "0.5699949", "0.5687933", "0.5676204", "0.566709", "0.56626177", "0.56596977", "0.56523603", "0.5648244", "0.5632611", "0.5626217", "0.5622158", "0.56162065", "0.56162065", "0.5611832", "0.56097424", "0.560606", "0.5597591", "0.5590671", "0.55894375", "0.5588962" ]
0.66885394
14
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n 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.790433", "0.78052884", "0.7766116", "0.77269244", "0.7631314", "0.76214564", "0.75844425", "0.7530182", "0.748751", "0.7457498", "0.7457498", "0.7438209", "0.74215984", "0.74033666", "0.7391367", "0.7386547", "0.7378906", "0.73700386", "0.73624307", "0.73555857", "0.734534", "0.7341001", "0.7329573", "0.7328464", "0.732542", "0.73187584", "0.73161364", "0.73133296", "0.730374", "0.730374", "0.7301578", "0.7297925", "0.72935253", "0.7286381", "0.728296", "0.7280917", "0.7278273", "0.72595716", "0.72595716", "0.72595716", "0.72594506", "0.7258975", "0.7249544", "0.7224888", "0.7219197", "0.7216406", "0.72040117", "0.7201528", "0.72002995", "0.71931463", "0.7184822", "0.7177731", "0.7168134", "0.71670145", "0.71535766", "0.7152848", "0.71356684", "0.7134476", "0.7134476", "0.7128907", "0.7128605", "0.7123538", "0.7122872", "0.7122704", "0.7121557", "0.71169186", "0.71169186", "0.71169186", "0.71169186", "0.7116654", "0.71165264", "0.71160054", "0.71144056", "0.71118295", "0.71092284", "0.7108203", "0.7104891", "0.7099518", "0.7097655", "0.7095719", "0.7093119", "0.7093119", "0.7085876", "0.70827055", "0.70806557", "0.7079835", "0.7073702", "0.70676506", "0.706124", "0.70596653", "0.7059546", "0.70508295", "0.7037259", "0.7037259", "0.70355344", "0.70347226", "0.70347226", "0.70325696", "0.7030457", "0.70290285", "0.7018263" ]
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); SharedPreferences sp = getSharedPreferences("dadosCompartilhados", Context.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); if (id == R.id.nav_inicio) { Intent intent = new Intent(this, InicioActivity.class); startActivity(intent); }else if (id == R.id.nav_camera) { Intent intent = new Intent(this, PerfilActivity.class); startActivity(intent); } else if (id == R.id.nav_gallery) { Intent intent = new Intent(this, ListaAnimesActivity.class); startActivity(intent); } else if (id == R.id.nav_slideshow) { Intent intent = new Intent(this, ListaNoticiasActivity.class); startActivity(intent); } else if (id == R.id.nav_manage) { Intent intent = new Intent(this, ConfiguracaoActivity.class); startActivity(intent); }else if (id == R.id.nav_modera) { // custom dialog final Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.dialog_denuncias); dialog.setTitle("Title..."); Button dialogButton = (Button) dialog.findViewById(R.id.dialogBurronOK); ListView denunciasList = (ListView) dialog.findViewById(R.id.listDenuncias); // if button is clicked, close the custom dialog dialogButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); } }); dialog.show(); }else if (id == R.id.nav_send) { editor.remove("emailLogado"); editor.remove("nickLogado"); editor.remove("biographLogado"); editor.remove("dateLogado"); editor.remove("qntLogado"); editor.remove("isModera"); editor.apply(); Intent intent = new Intent(this, LoginActivity.class); startActivity(intent); } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}", "@Override\n public void OnItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }", "void onMenuItemClicked();", "private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "@Override\n public void onItemClick(View view, String data) {\n }", "abstract public void onSingleItemClick(View view);", "@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }", "@Override\n public void itemClick(int pos) {\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }", "@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }", "@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "public void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }", "@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "void onLinkClicked(@Nullable ContentId itemId);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "void onItemClick(int position);", "void onItemClick(View view, int position);", "@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}", "@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "void clickItem(int uid);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }", "@Override\n public void onItemClick(View view, int position) {\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }", "public void onItemClick(View view, int position) {\n\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}", "void onClick(View item, View widget, int position, int which);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "public void menuClicked(MenuItem menuItemSelected);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\n public void onItemClick(int position) {\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}" ]
[ "0.78824425", "0.72363925", "0.69870526", "0.69464594", "0.69168895", "0.69168895", "0.6884302", "0.68745536", "0.6868239", "0.6766278", "0.67426", "0.67219543", "0.67180467", "0.67139757", "0.66987735", "0.669814", "0.6680063", "0.66605985", "0.6660478", "0.6647546", "0.6642551", "0.6624797", "0.66242564", "0.66213894", "0.66030335", "0.6602666", "0.66005653", "0.6599541", "0.65946263", "0.6585237", "0.65845793", "0.6581586", "0.65769845", "0.65752995", "0.6569577", "0.65621644", "0.65589714", "0.65588206", "0.6553249", "0.6553249", "0.65501434", "0.6540031", "0.65347695", "0.65345526", "0.6524178", "0.6524178", "0.65226656", "0.6521167", "0.6520909", "0.6517542", "0.6516591", "0.6515937", "0.6503259", "0.64982665", "0.64982665", "0.64967453", "0.64922017", "0.6487871", "0.6487759", "0.64870596", "0.64859915", "0.6482179", "0.6481739", "0.64755696", "0.6464651", "0.6455272", "0.64459115", "0.6443916", "0.6443916", "0.6443916", "0.6443916", "0.6443916", "0.64382523", "0.6437478", "0.6436119", "0.6432646", "0.6431156", "0.6428718", "0.64257467", "0.64257467", "0.6412531", "0.64109886", "0.6409913", "0.6409913", "0.64096224", "0.64087987", "0.64063615", "0.64011335", "0.6396026", "0.6393612", "0.63913673", "0.63912463", "0.6388822", "0.6388822", "0.6386458", "0.6368968", "0.6368968", "0.636473", "0.636473", "0.636473", "0.63589436" ]
0.0
-1
This is the listener to the server event if server request errors it returns error
@Override public void onResponseRecieved(String reply) { if(!reply.equals("error")) { Context context = getApplicationContext(); CharSequence text = reply; int duration = Toast.LENGTH_LONG; Toast toast = Toast.makeText(context, text, duration); toast.show(); EditText serverReply = (EditText) findViewById(R.id.editTextServerReply); serverReply.setText((CharSequence) serverReply, EditText.BufferType.NORMAL); //Deserializing response and pulling session data out Response r = new Gson().fromJson(reply, Response.class); account.sessionID = r.result.session_id; AccountMan.AccountMan a = new AccountMan.AccountMan(); a.AddAccount(account); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void visitError(@NonNull ServerError error) {\n Log.d(\"Serv err\", error.toString());\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n try{\n Log.d(\"wsrong\",error.getMessage());\n }catch(NullPointerException ex)\n {\n Toast.makeText(context,\"Server issue try later\", Toast.LENGTH_LONG).show();\n Log.d(\"wsrong\",ex.getMessage());\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onErrorResponse(VolleyError error) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLog.e(\"Exception json\", \"\"+error);;\n\t\t\t\t\t\t\tshowProgress(false);\n\t\t\t\t\t\t\tToast.makeText(getBaseContext(), \"Error in connecting to Server\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void onReceivedError();", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n listener.onChangeDeliveredError();\n }", "@Override\n public void onErrorResponse(VolleyError volleyError) { //when error listener is activated\n Log.i(\"volley\", volleyError.toString());\n }", "@Override\n public void onErrorResponse(VolleyError volleyError) { //when error listener is activated\n Log.i(\"volley\", volleyError.toString());\n }", "public void OnConnectionError();", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error!!\",\"Connection To server error \"+error.toString());\n }", "@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\tpublic void onError(Request request, Throwable exception) {\n\t\t\t\t\n\t\t\t}", "public void onConnectionError()\n\t\t{\n\t\t}", "@Override\n\tpublic void onError(ErrorResponse errorResponse) {\n\t\t\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n }", "protected void onConnectionError() {\n\t}", "@Override\n\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\tpublic void onError(Request request, Throwable exception) {\n\n\t\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n\n NetworkResponse networkResponse = error.networkResponse;\n Log.i(\"Checking\", new String(error.networkResponse.data));\n if(networkResponse != null && networkResponse.data != null)\n {\n switch (networkResponse.statusCode)\n {\n\n default:\n break;\n }\n }\n }", "@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onErrorResponse(String errorResponse) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onError(Exception e) {\n\t\t\t\t\t\tLog.e(\"HttpPost\", \"LIES \" + e.getMessage());\r\n\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\n\t\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"ERRO: \"+ error.getMessage());\n }", "@Override\n\tpublic void onErrorResponse(VolleyError error) {\n\n\t}", "@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n handleVolleyError(error);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity(), \"Error Servidor: \" + error.getMessage(), Toast.LENGTH_LONG).show();\n if (error.getMessage() != null) {\n Log.i(\"Error Servidor: \", error.getMessage());\n } else {\n Log.i(\"Error Servidor: \", \"Error desconocido\");\n }\n }", "@Override\n\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\n\t\t\t}", "public void onRequestFailure(Request request, IOException e) { }", "@Override\r\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\tonMyError(arg0);\r\n\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\r\n\t\t\t\t\t\t}", "public interface OnError{void onReqError();}", "@Override\n public void onErrorResponse(VolleyError arg0) {\n }", "@Override\n public void onErrorResponse(VolleyError arg0) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.i(\"TAG\", \"onErrorResponse=\" + error.getMessage());\n progress.dismissAllowingStateLoss();\n if (error instanceof TimeoutError)\n ToastUtils.showToast(ResetActivity.this, \"请求超时\");\n else if (error instanceof NoConnectionError)\n ToastUtils.showToast(ResetActivity.this, \"没有网络连接\");\n else if (error instanceof ServerError)\n ToastUtils.showToast(ResetActivity.this, \"服务器异常 注册失败\");\n if (tag == 0) {\n\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\r\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n System.out.println(error.toString());\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n System.out.println(error.toString());\n }", "@Override\n public void onErrorResponse(VolleyError volleyError) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), \"Server not connected\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }", "public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }", "@Override\r\n\t\t\tpublic void onNetworkError(NetworkError networkError) {\n\r\n\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n\n NetworkResponse networkResponse = error.networkResponse;\n if (networkResponse != null) {\n String statusCode = String.valueOf(networkResponse.statusCode);\n switch (statusCode) {\n case \"400\":\n Toast.makeText(CreateTour.this, \"ERROR 400\", Toast.LENGTH_SHORT).show();\n break;\n case \"500\":\n Toast.makeText(CreateTour.this, \"ERROR 500\", Toast.LENGTH_SHORT).show();\n break;\n default:\n Toast.makeText(CreateTour.this, \"ERROR\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"WAFAA\", error.toString());\n }", "@Override\n public void onError(VolleyError error) {\n Toast.makeText(self, ErrorNetworkHandler.processError(error), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onError(VolleyError error) {\n Toast.makeText(self, ErrorNetworkHandler.processError(error), Toast.LENGTH_LONG).show();\n }", "void onErrorResponse(VolleyError errorResponse, int requestId);", "public void requestFailed(RequestFailureEvent e);", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), Settings.getword(getActivity(),\"server_not_connected\"), Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "protected void serverError() throws IOException {\n cleanup();\n throw new IOException(\"Recieved error message from server:\\n\" + new String(_text_buffer));\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onError(final Request request, final Throwable exception) {\n LOGGER.severe(\"Server part (poptavka-core) doesn't respond during user logging, exception=\"\n + exception.getMessage());\n eventBus.setErrorMessage(Storage.MSGS.loginUnknownError());\n }", "@Override\r\n public void onError(Exception e) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"ERROR111\", \"error => \" + error.toString());\n\n }", "@Override\n public void onError(Exception e) {\n\n }", "@Override\r\n\t\t\tpublic void onErrorResponse(String errorMessage) {\n\r\n\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"getDataFromUrl.onErrorResponse: \" + error);\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"Events: \", error.toString());\n\n Toast.makeText(context,\n error.toString(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"Events: \", error.toString());\n\n Toast.makeText(context,\n error.toString(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"INTERNET\", error.toString());\n\n toastIt(\"Internet Failure: \" + error.toString());\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"INTERNET\", error.toString());\n\n toastIt(\"Internet Failure: \" + error.toString());\n }", "@Override\n public void onError(Exception e) {\n }", "protected Response.ErrorListener getErrorListener() {\n\t\tLog.e(TAG, \"error\");\n\t\treturn new Response.ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\tshowProgressBar(false);\n\t\t\t\thandleOnError(arg0);\n\t\t\t}\n\t\t};\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n try{\n Log.e(\"wsrong\", error.toString());\n }\n catch (Exception ex)\n {\n Toast.makeText(context,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n try{\n Log.e(\"wsrong\", error.toString());\n }\n catch (Exception ex)\n {\n Toast.makeText(context,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n System.out.println();\n Log.d(\"ERROR\", error.toString());\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }" ]
[ "0.7337239", "0.7260835", "0.7225681", "0.7174958", "0.713204", "0.7120899", "0.7120899", "0.7067733", "0.70275456", "0.70223224", "0.7016691", "0.70053667", "0.6987205", "0.6978398", "0.6978398", "0.6978398", "0.6978398", "0.69708645", "0.6969529", "0.6942234", "0.6925265", "0.68784285", "0.68762946", "0.6873776", "0.6860424", "0.6853376", "0.68533105", "0.68373454", "0.68356913", "0.68267506", "0.68267506", "0.68220735", "0.67913324", "0.67795557", "0.6775613", "0.6769752", "0.6767395", "0.67532444", "0.6733923", "0.6733923", "0.67237246", "0.67119485", "0.67119485", "0.67119485", "0.67119485", "0.67119485", "0.67119485", "0.67119485", "0.67119485", "0.67106014", "0.6706199", "0.6706199", "0.66856205", "0.66695803", "0.6665896", "0.6665196", "0.6665196", "0.6659772", "0.6659772", "0.66581714", "0.6631973", "0.66309434", "0.6623491", "0.6623491", "0.6621944", "0.66204", "0.6615911", "0.6613511", "0.66043264", "0.66043264", "0.66043264", "0.66043264", "0.6597816", "0.65972215", "0.6596934", "0.6596934", "0.6596934", "0.658821", "0.65867025", "0.6575437", "0.65710473", "0.65703404", "0.65703404", "0.65703404", "0.65670025", "0.6560301", "0.6560301", "0.6551342", "0.6551342", "0.65470314", "0.65470314", "0.65450627", "0.65281934", "0.65204865", "0.65204865", "0.65202594", "0.65132177", "0.65132177", "0.65132177", "0.65132177", "0.65132177" ]
0.0
-1
This method is only for development testing puposes
public void ToastPopper(String t){ Context context = getApplicationContext(); CharSequence text = t; int duration = Toast.LENGTH_LONG; Toast toast = Toast.makeText(context, text, duration); toast.show(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before\n\t public void setUp() {\n\t }", "private ProtomakEngineTestHelper() {\r\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Before\n\tpublic void setUp() {\n\t}", "public void setUp() {\n\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Override\n public void setUp() {\n }", "@Before\n public void setUp () {\n }", "@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }", "@Before\r\n\tpublic void setUp() {\n\t}", "private void test() {\n\n\t}", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "@Override\n public void setUp() throws Exception {}", "protected void setUp() {\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Before public void setUp() { }", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\r\n\tpublic void before() {\r\n\t}", "@Before\n public void setUp() throws Exception {\n\n }", "protected void setUp() {\n\n }", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "private stendhal() {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "@Before\r\n\t public void setUp(){\n\t }", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "protected void setup() {\r\n }", "@Before\n public void setUp() throws Exception {\n\n }", "protected void setUp() throws Exception {\n \n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\n public void before() {\n }", "@Before\n public void before() {\n }", "@Before\n public void setUp()\n throws Exception\n {\n super.setUp();\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "protected void onFirstUse() {}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Override\n protected void setup() {\n }", "public void setUp()\r\n {\r\n //empty on purpose\r\n }", "protected void setupLocal() {}", "@Override\n\tpublic void beforeClassSetup() {\n\t\t\n\t}", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "private test5() {\r\n\t\r\n\t}", "@Before\n public void setUp() {\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\n protected void startUp() {\n }", "@Override\n protected void tearDown() {\n }", "protected void setUp() throws Exception {\n }", "public void setup() {\n }", "@Before\r\n public void before() throws Exception {\r\n }", "protected void setUp() throws Exception {\n super.setUp();\n }", "@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunch() throws Throwable {\n\t}", "public void testSetBasedata() {\n }", "@Override\n public void test() {\n \n }", "@Before\n\tpublic void setUp() throws Exception\n\t{\n\t}", "@Before\n\tpublic void setup() \n\t{\n\t\tsuper.setup();\n\t\t\n }", "@Before\r\n\tpublic void set_up(){\n\t}", "@Before\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void sssDoLwTestInit() {\n\r\n\t}", "@Before\n @Override\n public void init() {\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }" ]
[ "0.660375", "0.6590373", "0.6501213", "0.64420545", "0.64290565", "0.64189", "0.638968", "0.6388786", "0.638838", "0.6383061", "0.63791233", "0.63581", "0.6351156", "0.6348096", "0.63449425", "0.63449425", "0.63449425", "0.63449425", "0.63449425", "0.6342892", "0.634209", "0.6339762", "0.63315123", "0.6330434", "0.6330434", "0.6330434", "0.6330434", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6324836", "0.6319782", "0.631875", "0.631875", "0.631875", "0.63180244", "0.63142955", "0.6295816", "0.6291868", "0.62913525", "0.62913525", "0.6278203", "0.6278203", "0.627761", "0.6262094", "0.62543434", "0.6252849", "0.62488425", "0.6239694", "0.62370235", "0.6223173", "0.6223173", "0.62151486", "0.62151486", "0.6207945", "0.62055856", "0.62016106", "0.6198866", "0.6198866", "0.61945134", "0.6193683", "0.6181305", "0.6141605", "0.611117", "0.611117", "0.611117", "0.611117", "0.611117", "0.61035573", "0.6097611", "0.60897696", "0.60883206", "0.6085776", "0.60752517", "0.60590655", "0.60474604", "0.6031824", "0.60298663", "0.6021948", "0.6016268", "0.6013618", "0.6013412", "0.60053205", "0.60016656", "0.59981847", "0.5993843", "0.59819114" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_add_account, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\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\n onBackPressed();\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 == 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\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79033595", "0.7804288", "0.7765498", "0.77259207", "0.76304305", "0.7621137", "0.75833404", "0.7529789", "0.7487063", "0.74565315", "0.74565315", "0.7437683", "0.7421245", "0.7402311", "0.7390894", "0.7386079", "0.737815", "0.7369255", "0.736113", "0.735479", "0.7344447", "0.734025", "0.7329128", "0.73270583", "0.7324825", "0.7317847", "0.73155415", "0.7312412", "0.7303026", "0.7303026", "0.73007256", "0.7297113", "0.729233", "0.7285319", "0.72823304", "0.7280138", "0.7277586", "0.7258777", "0.7258777", "0.7258777", "0.72585803", "0.7258243", "0.7248879", "0.72234964", "0.72184324", "0.7215719", "0.72033244", "0.7200154", "0.7198401", "0.71922433", "0.71840334", "0.7176206", "0.71674716", "0.7166383", "0.71526295", "0.7152371", "0.7134688", "0.7133906", "0.7133906", "0.7128449", "0.7128042", "0.7122815", "0.7122077", "0.7121844", "0.7121112", "0.71162665", "0.71162665", "0.71162665", "0.71162665", "0.71161425", "0.7115744", "0.71155477", "0.7113714", "0.7111134", "0.710854", "0.7107651", "0.71046424", "0.7098247", "0.70971054", "0.70954835", "0.70927733", "0.70927733", "0.7085175", "0.70818853", "0.70799553", "0.707917", "0.7072562", "0.7067317", "0.70607203", "0.7059167", "0.70591426", "0.70505077", "0.7036854", "0.7036854", "0.7034675", "0.7034399", "0.7034399", "0.7030972", "0.70300573", "0.7028323", "0.70180345" ]
0.0
-1
Todo ............................................................................................ /////////// Convert Date
@Override public void onWeekChange(List<Calendar> weekCalendars) { String firstDateString = weekCalendars.get(0).toString(); try { firstDateOfWeek = sdfLibraryDate.parse(firstDateString); } catch (ParseException e) { e.printStackTrace(); } assert firstDateOfWeek != null; firstDateString = sdfMyDate.format(firstDateOfWeek); try { firstDateOfWeek = sdfMyDate.parse(firstDateString); } catch (ParseException e) { e.printStackTrace(); } Log.e("HDT0309", "firstDateOfWeek " + firstDateOfWeek); //Oke /// for (Calendar calendar : weekCalendars) { //Log.e("HDT0309", "(3)onWeekChange:" + calendar.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }", "private java.sql.Date convert(Date datet) {\n\t\treturn null;\n\t}", "private String convertDate(String date){\r\n String arrDate[] = date.split(\"/\");\r\n date = arrDate[2] + \"-\" + arrDate[1] + \"-\" + arrDate[0];\r\n return date;\r\n }", "public Date getConvertedDate(String dateToBeConverted) {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yy hh:mm:ss\");\n\t\ttry{\n\t\t\tbookedDate = sdf.parse(dateToBeConverted);\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn bookedDate;\n\t}", "public static String dateConv(int date) {\n\t\tDate mills = new Date(date*1000L); \n\t\tString pattern = \"dd-MM-yyyy\";\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\tsimpleDateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT+1\"));\n\t\tString formattedDate = simpleDateFormat.format(mills);\n\t\treturn formattedDate;\n\t}", "public static String convertDate(String dbDate) throws ParseException //yyyy-MM-dd\n {\n String convertedDate = \"\";\n\n Date date = new SimpleDateFormat(\"yyyy-MM-dd\").parse(dbDate);\n\n convertedDate = new SimpleDateFormat(\"MM/dd/yyyy\").format(date);\n\n return convertedDate ;\n }", "private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}", "private String convertDateVN(String date) {\r\n String arrDate[] = date.split(\"-\");\r\n date = arrDate[2] + \"/\" + arrDate[1] + \"/\" + arrDate[0];\r\n return date;\r\n }", "private static String convertDate(String date) {\n\t\tlong dateL = Long.valueOf(date);\n\t\tDate dateTo = new Date(dateL);\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\tString formatted = format.format(dateTo);\n\t\tSystem.out.println(\"Date formatted: \" + formatted);\n\t\treturn formatted;\n\t}", "protected static java.sql.Date getConvertedDate(java.util.Date date) {\n\t\tif (date == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new java.sql.Date(date.getTime());\n\t\t}\n\t}", "public String convertDateFormate(String dt) {\n String formatedDate = \"\";\n if (dt.equals(\"\"))\n return \"1970-01-01\";\n String[] splitdt = dt.split(\"-\");\n formatedDate = splitdt[2] + \"-\" + splitdt[1] + \"-\" + splitdt[0];\n \n return formatedDate;\n \n }", "public static String convertDateToSend(String gotdate){\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(Long.parseLong(gotdate));\n SimpleDateFormat inputFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n SimpleDateFormat outputFormat = new SimpleDateFormat(\"dd MMM yyyy\");\n /*Date parsedDate = null;\n try {\n parsedDate = inputFormat.parse(gotdate);\n } catch (ParseException e) {\n e.printStackTrace();\n }*/\n String formattedDate = outputFormat.format(calendar.getTime());\n return formattedDate;\n }", "public String toDate(Date date) {\n DateFormat df = DateFormat.getDateInstance();\r\n String fecha = df.format(date);\r\n return fecha;\r\n }", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }", "protected static java.util.Date getConvertedDate(java.sql.Date date) {\n\t\tif (date == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new java.util.Date(date.getTime());\n\t\t}\n\t}", "public static String dateTran(String dateOri){\n\t\tDateFormat formatter1 ; \n\t\tDate date ; \n\t\tString newDate=null;\n\t\tformatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t\tdate=formatter1.parse(dateOri);\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat ( \"M/d/yy\" );\n\t\t\tnewDate = formatter.format(date);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newDate;\n\t}", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "public Date ToDate(String line){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd\");\n try {\n Date d = sdf.parse(line);\n return d;\n } catch (ParseException ex) {\n\n Log.v(\"Exception\", ex.getLocalizedMessage());\n return null;\n }\n }", "public static String convert( Date date )\r\n {\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat( \"yyyy-MM-dd\" );\r\n\r\n return simpleDateFormat.format( date );\r\n }", "private String toDate(Date appDate) throws ParseException {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(appDate);\n\t\tString formatedDate = cal.get(Calendar.DATE) + \"/\" + (cal.get(Calendar.MONTH) + 1) + \"/\" + cal.get(Calendar.YEAR);\n\t\tSystem.out.println(\"formatedDate : \" + formatedDate); \n\t\treturn formatedDate;\n\t}", "private static String convertDate(String dateString) {\n String date = null;\n\n try {\n //Parse the string into a date variable\n Date parsedDate = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").parse(dateString);\n\n //Now reformat it using desired display pattern:\n date = new SimpleDateFormat(DATE_FORMAT).format(parsedDate);\n\n } catch (ParseException e) {\n Log.e(TAG, \"getDate: Error parsing date\", e);\n e.printStackTrace();\n }\n\n return date;\n }", "@Test\n public void dateUtilTest() {\n String orgStr = \"2016-01-05 10:00:17\";\n Date orgDate = new Date(1451959217000L);\n Assert.assertTrue(DateStrValueConvert.dateFormat(orgDate).equals(orgStr));\n Assert.assertTrue(DateStrValueConvert.dateConvert(orgStr).equals(orgDate));\n }", "public static Date parseDate(String date)\n {\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date dt = null;\n try {\n dt = format.parse(date);\n } \n catch (ParseException ex) \n {\n System.out.println(\"Unexpected error during the conversion - \" + ex);\n }\n return dt;\n }", "@Override\n\tpublic Date convert(String source) {\n\t\tif (StringUtils.isValid(source)) {\n\t\t\tDateFormat dateFormat;\n\t\t\tif (source.indexOf(\":\") != -1) {\n\t\t\t\tdateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t} else {\n\t\t\t\tdateFormat = new SimpleDateFormat(\"yyyy-MM-dd\"); \n\t\t\t}\n\t\t\t//日期转换为严格模式\n\t\t dateFormat.setLenient(false); \n\t try {\n\t\t\t\treturn dateFormat.parse(source);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\t\treturn null;\n\t}", "private java.sql.Date convertirDeDateUtilaDateSql(java.util.Date uDate) {\r\n java.sql.Date sDate = new java.sql.Date(uDate.getTime());\r\n return sDate;\r\n }", "private String convertDateToCron(Date date) {\n if (date == null)\n return \"\";\n Calendar calendar = java.util.Calendar.getInstance();\n calendar.setTime(date);\n\n String hours = String.valueOf(calendar.get(Calendar.HOUR_OF_DAY));\n\n String mins = String.valueOf(calendar.get(Calendar.MINUTE));\n\n String days = String.valueOf(calendar.get(Calendar.DAY_OF_MONTH));\n\n String months = new java.text.SimpleDateFormat(\"MM\").format(calendar.getTime());\n\n String years = String.valueOf(calendar.get(Calendar.YEAR));\n\n return \"0 \" + mins+ \" \" + hours + \" \" + days + \" \" + months + \" ? \" + years;\n }", "private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}", "public void testConvertDate() throws Exception {\n String[] message= {\n \"from Date\",\n \"from Calendar\",\n \"from SQL Date\",\n \"from SQL Time\",\n \"from SQL Timestamp\"\n };\n \n long now = System.currentTimeMillis();\n \n Object[] date = {\n new Date(now),\n new java.util.GregorianCalendar(),\n new java.sql.Date(now),\n new java.sql.Time(now),\n new java.sql.Timestamp(now)\n };\n \n // Initialize calendar also with same ms to avoid a failing test in a new time slice\n ((GregorianCalendar)date[1]).setTimeInMillis(now);\n \n for (int i = 0; i < date.length; i++) {\n Object val = makeConverter().convert(getExpectedType(), date[i]);\n assertNotNull(\"Convert \" + message[i] + \" should not be null\", val);\n assertTrue(\"Convert \" + message[i] + \" should return a \" + getExpectedType().getName(),\n getExpectedType().isInstance(val));\n assertEquals(\"Convert \" + message[i] + \" should return a \" + date[0],\n now, ((Date) val).getTime());\n }\n }", "private static Date toUtilDate(Date date) {\n return (date != null) ? new Date(date.getTime()) : null;\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic static Timestamp convertToDate(Date convert) {\n\t\tif (convert.toString().startsWith(\"00\")) convert.setYear(2014 - 1900);\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.setTime(convert);\n\t\tTimestamp t = new Timestamp(c.getTimeInMillis());\n\t\treturn t;\n\t}", "private Date convertStringToDate(String dateInString){\n DateFormat format = new SimpleDateFormat(\"d-MM-yyyy HH:mm\", Locale.ENGLISH);\n Date date = null;\n try {\n date = format.parse(dateInString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return date;\n }", "public static String convertDateToStandardFormat(String inComingDateformat, String date)\r\n\t{\r\n\t\tString cmName = \"DateFormatterManaager.convertDateToStandardFormat(String,String)\";\r\n\t\tString returnDate = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (date != null && !date.trim().equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tif (inComingDateformat != null && !inComingDateformat.trim().equals(\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(inComingDateformat);\r\n\t\t\t\t\tDate parsedDate = sdf.parse(date);\r\n\t\t\t\t\tSimpleDateFormat standardsdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\t\t\treturnDate = standardsdf.format(parsedDate);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\treturnDate = date;\r\n\t\t\t\t\tlogger.cterror(\"CTBAS00113\", cmName, date);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tlogger.ctdebug(\"CTBAS00114\", cmName);\r\n\t\t\t}\r\n\t\t} catch (ParseException pe) // just in case any runtime exception occurred just return input datestr as it is\r\n\t\t{\r\n\t\t\treturnDate = date;\r\n\t\t\tlogger.cterror(\"CTBAS00115\", pe, cmName, date, inComingDateformat);\r\n\t\t}\r\n\t\treturn returnDate;\r\n\t}", "public String changeDateFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy\";\n String outputPattern = \"MMMM dd, yyyy\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "public static String convertDateFormat(String date) {\n DateFormat originalFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n DateFormat targetFormat = new SimpleDateFormat(\"MMMM dd, yyyy\", Locale.ENGLISH);\n Date oldDate;\n try {\n oldDate = originalFormat.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n return targetFormat.format(oldDate);\n }", "private String changeDateFormat (String oldDate) throws ParseException {\n // Source: https://stackoverflow.com/questions/3469507/how-can-i-change-the-date-format-in-java\n final String OLD_FORMAT = \"MM/dd/yyyy\";\n final String NEW_FORMAT = \"yyyyMMdd\";\n String newDateString;\n SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);\n Date d = sdf.parse(oldDate);\n sdf.applyPattern(NEW_FORMAT);\n newDateString = sdf.format(d);\n return newDateString;\n }", "java.lang.String getToDate();", "private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }", "public static LocalDate convertDate(Date dateToConvert) {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n return LocalDate.parse(format.format(dateToConvert));\n }", "public String convertDateToString(Date date) {\n\t\tString dateTime = SDF.format(date);\n\t\treturn dateTime;\t\n\t}", "private long convertDate(String date) {\n\tDateFormat fm = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\n\tString dateS = date;\n\tString[] dateArray = dateS.split(\"T\");\n\tdateS = \"\";\n\tfor (String s : dateArray) {\n\t if (dateS != \"\") {\n\t\tdateS += \" \" + s;\n\t } else {\n\t\tdateS += s;\n\t }\n\t}\n\tdateArray = dateS.split(\"Z\");\n\tdateS = \"\";\n\tfor (String s : dateArray) {\n\t dateS += s;\n\t}\n\tDate d = null;\n\ttry {\n\t d = fm.parse(dateS);\n\t} catch (ParseException e) {\n\t if (parent.globals._DEBUG)\n\t\te.printStackTrace();\n\t}\n\treturn d.getTime();\n }", "public static String convertDateTo(String sDate, String sOldFormat, String sNewFormat)\r\n\t{\r\n\t\tString cmName = \"DateFormatterManager.convertDateTo(String,String,String)\";\r\n\t\tlogger.ctdebug(\"CTBAS00116\", cmName, sDate, sOldFormat, sNewFormat);\r\n\t\tSimpleDateFormat newDateFormat = new SimpleDateFormat(sNewFormat);\r\n\t\tSimpleDateFormat oldDateFormat = new SimpleDateFormat(sOldFormat);\r\n\t\tString sOldDate = sDate;\r\n\t\tDate date = null;\r\n\t\tString sNewDate = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tdate = oldDateFormat.parse(sOldDate);\r\n\t\t} catch (ParseException pException)\r\n\t\t{\r\n\t\t\tlogger.cterror(\"CTBAS00117\", pException, cmName, sDate, sOldFormat, sNewFormat);\r\n\t\t}\r\n\t\tsNewDate = newDateFormat.format(date);\r\n\t\tlogger.ctdebug(\"CTBAS00118\", sNewDate);\r\n\t\treturn sNewDate;\r\n\t}", "public static Date String2Date(String date){\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Date currentDate = null;\n try {\n currentDate = format.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return currentDate;\n }", "private String convertToDateFormat(String inputDateString) throws DateTimeParseException {\n\t\treturn inputDateString;\n\t}", "public static Date stringToDate(String date)\r\n/* 29: */ {\r\n/* 30: 39 */ log.debug(\"DateUtil.stringToDate()\");\r\n/* 31: */ try\r\n/* 32: */ {\r\n/* 33: 41 */ return sdfDate.parse(date);\r\n/* 34: */ }\r\n/* 35: */ catch (ParseException e)\r\n/* 36: */ {\r\n/* 37: 43 */ log.fatal(\"DateUtil.stringToDate抛出异常\", e);\r\n/* 38: */ }\r\n/* 39: 44 */ return new Date();\r\n/* 40: */ }", "java.lang.String getFromDate();", "public static java.sql.Date convertDate(java.util.Date utilDate) {\n\t\tif (utilDate != null) {\n\t\t\treturn new java.sql.Date(utilDate.getTime());\n\t\t}\n\t\treturn null;\n\t}", "@Test\n\t@DisplayName(\"date to string\")\n\tpublic void testDateToString()\n\t{\n\t\tString dateInString = \"2000-04-12\";\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t date1 = formatter.parse(dateInString);\n\t\t} catch (ParseException e) {\n\t\t //handle exception if date is not in \"dd-MMM-yyyy\" format\n\t\t}\n\t\tDateConverter s = new DateConverter(date1);\n\t\tassertEquals(\"2000-04-12\", s.getDateAsString());\n\t}", "private static Date getFormattedDate(String date){\n\t\tString dateStr = null;\n\t\tif(date.length()<11){\n\t\t\tdateStr = date+\" 00:00:00.0\";\n\t\t}else{\n\t\t\tdateStr = date;\n\t\t}\n\t\tDate formattedDate = null;\n\t\ttry {\n\t\t\tformattedDate = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.S\").parse(dateStr);\n\t\t} catch (ParseException e) {\n\t\t\tCommonUtilities.createErrorLogFile(e);\n\t\t}\n\t\treturn formattedDate;\n\n\t}", "private Date stringToSQLDate(String fecha){\n\t\t\n\t\t\n\t\tint ano=Integer.parseInt(fecha.substring(0,4));\n\t\tint mes =Integer.parseInt(fecha.substring(5,7));\n\t\tint dia =Integer.parseInt( fecha.substring(8));\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tDate tmp = new Date(ano-1900,mes-1,dia);\n\t\t\n\t\treturn tmp;\n\t}", "@TypeConverter\n public static Date toDate(String value) {\n if (value == null) return null;\n\n try {\n return df.parse(value);\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n }", "private String convertDate2String(Date date) {\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n return dateFormat.format(date);\n }", "public static Date strToDate(String strDate)\r\n/* 127: */ {\r\n/* 128:178 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 129:179 */ ParsePosition pos = new ParsePosition(0);\r\n/* 130:180 */ Date strtodate = formatter.parse(strDate, pos);\r\n/* 131:181 */ return strtodate;\r\n/* 132: */ }", "public static Date converteStringInvertidaSemBarraAAMMDDParaDate(String data) {\r\n\t\tDate retorno = null;\r\n\r\n\t\tString dataInvertida = data.substring(4, 6) + \"/\" + data.substring(2, 4) + \"/20\" + data.substring(0, 2);\r\n\r\n\t\tSimpleDateFormat dataTxt = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\ttry {\r\n\t\t\tretorno = dataTxt.parse(dataInvertida);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tthrow new IllegalArgumentException(data + \" não tem o formato dd/MM/yyyy.\");\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "private String convertToDate(final long millis) {\n final Date date = new Date(millis);\n java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat(\n \"MMM dd, yyyy\", Locale.US);\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"PST\")); //TODO should be TZ of the user???\n return dateFormat.format(date);\n }", "public static Date convertStringToDate(String strDate)\n\t {\n\t Date myDate = null;\n\t if (strDate.length() > 0)\n\t {\n\t DateFormat formatter = new SimpleDateFormat(EProcurementConstants.INPUT_DATE_FORMAT);\n\t try\n\t {\n\t myDate = formatter.parse(strDate);\n\t } catch (ParseException e)\n\t {\n\t LOGGER.error(\"Not able to parse \" + strDate + \" into date ..\" + e.getMessage());\n\t }\n\t }\n\t return myDate;\n\t }", "public static Date converteStringInvertidaSemBarraAAAAMMDDParaDate(String data) {\r\n\t\tDate retorno = null;\r\n\r\n\t\tString dataInvertida = data.substring(6, 8) + \"/\" + data.substring(4, 6) + \"/\" + data.substring(0, 4);\r\n\r\n\t\tSimpleDateFormat dataTxt = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\ttry {\r\n\t\t\tretorno = dataTxt.parse(dataInvertida);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tthrow new IllegalArgumentException(data + \" não tem o formato dd/MM/yyyy.\");\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public static String formartDate(String mDate) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"mm/dd/yyyy\");\n\t\t\t SimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-mm-dd\");\n\n\t\t\t \n\t\t\t String outDate = \"\";\n\t\t\t \n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t \n\t\t\t \n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "public Date getNormalizedDate(Date date)\n/* */ {\n/* 208 */ return new Date(date.getTime());\n/* */ }", "public static String convertDate(String input) {\n String res = \"\";\n\n String[] s = input.split(\" \");\n\n res += s[2] + \"-\";\n switch (s[1]) {\n case \"January\":\n res += \"01\";\n break;\n case \"February\":\n res += \"02\";\n break;\n case \"March\":\n res += \"03\";\n break;\n case \"April\":\n res += \"04\";\n break;\n case \"May\":\n res += \"05\";\n break;\n case \"June\":\n res += \"06\";\n break;\n case \"July\":\n res += \"07\";\n break;\n case \"August\":\n res += \"08\";\n break;\n case \"September\":\n res += \"09\";\n break;\n case \"October\":\n res += \"10\";\n break;\n case \"November\":\n res += \"11\";\n break;\n case \"December\":\n res += \"12\";\n break;\n default:\n res += \"00\";\n break;\n }\n\n res += \"-\";\n if (s[0].length() == 1) {\n res += \"0\" + s[0];\n }\n else {\n res += s[0];\n }\n return res;\n }", "@TypeConverter\n public Date toDate(long l){\n return new Date(l);\n }", "private XMLGregorianCalendar convertDateIntoXmlDate(Date date) {\n\n GregorianCalendar cal = new GregorianCalendar();\n cal.setTime(date);\n XMLGregorianCalendar xmlCalendar = null;\n try {\n xmlCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);\n } catch (DatatypeConfigurationException e) {\n e.printStackTrace();\n }\n return xmlCalendar;\n }", "public static Object changeDateFormat(String date)\r\n\t{\n\t\tString temp=\"\";\r\n\t\tint len = date.length();\r\n\t\tfor(int i=0;i<len;i++)\r\n\t\t{\r\n\t\t\tchar ch = date.charAt(i);\r\n\t\t\tif(ch == ',')\r\n\t\t\t{\r\n\t\t\t\ttemp = temp+'/';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttemp = temp+ch;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString n=\"\"+temp.charAt(3)+temp.charAt(4);\r\n\t\tint month=Integer.parseInt(n);\r\n\t\tString m=\"\";\r\n\t\tswitch(month)\r\n\t\t{\r\n\t\t\tcase 1:\r\n\t\t\t\tm=\"jan\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tm=\"feb\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tm=\"mar\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tm=\"apr\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tm=\"may\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tm=\"jun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tm=\"jul\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\tm=\"aug\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\tm=\"sep\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\tm=\"oct\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\tm=\"nov\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 12:\r\n\t\t\t\tm=\"dec\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Enter a valid month\");\r\n\t\t\t}\r\n\t\t\tString s=(temp.substring(0, 3)+ m +temp.substring(5));\r\n\t\t\treturn s;\r\n\t\t}", "public Date formatForDate(String data) throws ParseException{\n //definindo a forma da Data Recebida\n DateFormat formatUS = new SimpleDateFormat(\"dd-MM-yyyy\");\n return formatUS.parse(data);\n }", "public static java.util.Date convertToUDate(String dateInString) {\n\t\tif (dateInString == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tjava.util.Date uDate = null;\n\t\t\ttry {\n\t\t\t\tuDate = dateFormat.parse(dateInString);\n\t\t\t} catch (ParseException e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn uDate;\n\t\t}\n\t}", "@Test\n void test7(){\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = new Date();\n String dString = formatter.format(date);\n System.out.println(\"dString=\"+dString);\n\n Date datas = java.sql.Date.valueOf(dString);\n System.out.println(\"datas=\"+datas);\n\n\n }", "public static String convertDate(String inputdate, String fromtimezone, String totimezone)\n\n {\n String sDateinto = \"\";\n try {\n SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);\n\n String dateInString = inputdate.substring(0, 22) ;\n\n formatter.setTimeZone(TimeZone.getTimeZone(fromtimezone));\n Date date = formatter.parse(dateInString);\n Log.i(\"FromDate String : \", formatter.format(date));\n\n\n SimpleDateFormat totime = new SimpleDateFormat(DATE_FORMAT);\n //TimeZone tzlocaltime = TimeZone.getDefault();\n totime.setTimeZone(TimeZone.getTimeZone(totimezone));\n\n sDateinto = totime.format(date); // Convert to String first\n Date dateInTo = formatter.parse(sDateinto); // Create a new Date object\n\n // Log.i(\"ToDate String: \", sDateinto);\n Log.i(\"ToDate Object: \", formatter.format(dateInTo));\n return sDateinto ;\n }\n catch (ParseException e)\n {\n Log.i(\"Date Conversion\" ,\"Error in parsing\" );\n return \"Date parsing error\" ;\n }\n\n }", "public static java.util.Date convertFromStringToDate(String strDate){\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\"); /*This stringDate is come from UI*/\n\t\tjava.util.Date date = null;\n\t\tif(strDate != null && !strDate.trim().isEmpty()){\n\t\t\ttry {\n\t\t\t\tdate = format.parse(strDate);\n\t\t\t\tSystem.out.println(strDate);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\treturn date;\n\t}", "private Date convertirStringEnFecha(String dia, String hora)\n {\n String fecha = dia + \" \" + hora;\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy hh:mm\");\n Date fecha_conv = new Date();\n try\n {\n fecha_conv = format.parse(fecha);\n }catch (ParseException e)\n {\n Log.e(TAG, e.toString());\n }\n return fecha_conv;\n }", "public static Date convertStringToDate(String date) throws ParseException {\n\t return new SimpleDateFormat(\"yyyy-MM-dd\").parse(date); \n\t}", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "@Override\n\t\tpublic java.sql.Date convert(String s) throws ParseException {\n\t\t\ts = supportHtml5DateTimePattern(s);\n\t\t\t\n\t\t\tif (timeStampWithoutSecPatternLen == s.length()) {\n\t\t\t\ts = s + \":00\";\n\t\t\t}\n\t\t\tif (s.length() > dateLen) {\t// if (x < timeStampLen) 改用 datePattern 转换,更智能\n\t\t\t\t// return new java.sql.Date(java.sql.Timestamp.valueOf(s).getTime());\t// error under jdk 64bit(maybe)\n\t\t\t\treturn new java.sql.Date(getFormat(timeStampPattern).parse(s).getTime());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// return new java.sql.Date(java.sql.Date.valueOf(s).getTime());\t// error under jdk 64bit\n\t\t\t\treturn new java.sql.Date(getFormat(datePattern).parse(s).getTime());\n\t\t\t}\n\t\t}", "private static Date getDate(String sdate)\n\t{\n\t\tDate date = null;\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\ttry {\n\t\t\tdate = formatter.parse(sdate);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn date;\n\t}", "public static Date stringToDate(String string_date){\n Date myDate = null;\n \n try {\n java.util.Date utilDate = new SimpleDateFormat(\"yyyy-MM-dd\").parse(string_date);\n myDate = new java.sql.Date(utilDate.getTime());\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return myDate;\n }", "private Date convertMongoToDate(String dateString, String timeString) {\n int year = Integer.parseInt(dateString.substring(0, 4));\n //Log.e(\"KARA\", \"year \" + year);\n int month = Integer.parseInt(dateString.substring(5, 7));\n //Log.e(\"KARA\", \"month \" + month);\n int day = Integer.parseInt(dateString.substring(8, 10));\n //Log.e(\"KARA\", \"day \" + day);\n int hour = Integer.parseInt(timeString.substring(0, 2));\n //Log.e(\"KARA\", \"hour \" + hour);\n int min = Integer.parseInt(timeString.substring(3, 5));\n return new Date(year - 1900, month - 1, day, hour, min);\n }", "public static String formartDateMpesa(String mDate) {\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t\t String outDate = \"\";\n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "public Date datePickerConverter(DatePicker datePicker) throws ParseException, DateTimeException {\n DatePicker newDatePicker = new DatePicker(datePicker.getConverter().fromString(datePicker.getEditor().getText()));\n\n String formatted = newDatePicker.getValue().format((DateTimeFormatter.ofPattern(\"dd/MM/yyyy\")));\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n return sdf.parse(formatted);\n }", "public Date stringToDate(String date) throws ParseException {\n String[] splitDate = date.split(\"T\");\n String day = splitDate[0];\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date dayDate = dateFormat.parse(day);\n return dayDate;\n }", "public static java.util.Date convertDate(java.sql.Date sqlDate) {\n\t\tif (sqlDate != null) {\n\t\t\treturn new java.util.Date(sqlDate.getTime());\n\t\t}\n\t\treturn null;\n\t}", "public static String convertDateFormat(Date sourceDate, SimpleDateFormat dateForm) {\n return dateForm.format(sourceDate);\n }", "public String dateFormatter(String fromDate) {\n\t\tString newDateString=\"\";\n\t\ttry {\n\t\t\tfinal String oldFormat = \"yyyy/MM/dd\";\n\t\t\tfinal String newFormat = \"yyyy-MM-dd\";\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(oldFormat);\n\t\t\tDate d = sdf.parse(fromDate);\n\t\t\tsdf.applyPattern(newFormat);\n\t\t\tnewDateString = sdf.format(d);\n\t\t} catch(Exception exp) {\n\t\t\tthrow ExceptionUtil.getYFSException(ExceptionLiterals.ERRORCODE_INVALID_DATE, exp);\n\t\t}\n\t\treturn newDateString;\n\t}", "public static Date convertToDate(long value) {\r\n return new Date(value);\r\n }", "public static Date toDateFormat_1(String dateString) {\r\n\t\treturn stringToDate(dateString, DATE_FORMAT_1);\r\n\t}", "public static String convertDateToString(Date aDate) {\n\t\treturn getDateTime(getDatePattern(), aDate);\n\t}", "public Date stringToDate(String d)\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"MMM-yyyy\");\n\t\t\n\t\tDate date = new Date();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tdate = format.parse(d);\n\t\t} \n\t\tcatch (ParseException e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn date;\n\t}", "public String getDDMMMYYYYDate(String date) throws Exception {\n HashMap<Integer, String> month = new HashMap<Integer, String>();\n month.put(1, \"Jan\");\n month.put(2, \"Feb\");\n month.put(3, \"Mar\");\n month.put(4, \"Apr\");\n month.put(5, \"May\");\n month.put(6, \"Jun\");\n month.put(7, \"Jul\");\n month.put(8, \"Aug\");\n month.put(9, \"Sep\");\n month.put(10, \"Oct\");\n month.put(11, \"Nov\");\n month.put(12, \"Dec\");\n\n try {\n String[] dtArray = date.split(\"-\");\n return dtArray[1] + \"-\" + month.get(Integer.parseInt(dtArray[1])) + \"-\" + dtArray[0];\n } catch (Exception e) {\n throw new Exception(\"getDDMMMYYYYDate : \" + date + \" : \" + e.toString());\n }\n\n }", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "Date getForDate();", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "static String getReadableDate(LocalDate date){\r\n\t\tString readableDate = null;\r\n\t\t//convert only if non-null\r\n\t\tif(null != date){\r\n\t\t\t//convert date to readable form\r\n\t\t\treadableDate = date.toString(\"MM/dd/yyyy\");\r\n\t\t}\r\n\t\t\r\n\t\treturn readableDate;\r\n\t}", "static String localDate(String date){\n Date d = changeDateFormat(date, \"dd/MM/yyyy\");\n DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return dateFormat.format(d);\n }", "public static String formartDateforGraph(String mDate) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n\t\t\t \n\t\t\t String outDate = \"\";\n\t\t\t \n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t \n\t\t\t \n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "private Calendar convertDateToCalendar(Date date) {\n Calendar calendar = GregorianCalendar.getInstance();\n calendar.setTime(date);\n return calendar;\n }", "private static final Date convertStringToDate(String aMask, String strDate) {\n SimpleDateFormat df = null;\n Date date = null;\n df = new SimpleDateFormat(aMask);\n try {\n date = df.parse(strDate);\n } catch (ParseException pe) {\n throw new ValidateException(\"日期转换出现异常,\"+pe.getMessage(), pe);\n }\n\n return (date);\n }", "public static String formartDateYOB(String mDate) {\n\t\t\t\t\n\t\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"dd/mm/yyyy\");\n\t\t\t\t SimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-mm-dd\");\n\n\t\t\t\t \n\t\t\t\t String outDate = \"\";\n\t\t\t\t \n\t\t\t\t if (mDate != null) {\n\t\t\t\t try {\n\t\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t\t outDate = outSDF.format(date);\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t } catch (Exception ex){ \n\t\t\t\t \tex.printStackTrace();\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return outDate;\n\t\t\t}", "public static java.sql.Date convertToSDate(String dateInString) {\n\t\tif (dateInString == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tjava.util.Date uDate = null;\n\t\t\tjava.sql.Date sDate = null;\n\t\t\ttry {\n\t\t\t\tuDate = dateFormat.parse(dateInString);\n\t\t\t\tsDate = new java.sql.Date(uDate.getTime());\n\t\t\t} catch (ParseException e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn sDate;\n\t\t}\n\t}", "@Override\n\tpublic Timestamp convert(Date source) {\n\t\treturn new Timestamp(source.getTime());\n\t}", "Date getDate();", "Date getDate();", "Date getDate();", "java.lang.String getDate();", "private java.sql.Timestamp convert(java.util.Date date){\r\n \tjava.sql.Timestamp result = null;\r\n \tif(date!=null){\r\n \t\tresult = new java.sql.Timestamp(date.getTime()); \t\t\r\n \t}\r\n \treturn result;\r\n }" ]
[ "0.7456802", "0.73293275", "0.7279352", "0.70076764", "0.6945127", "0.6933493", "0.6908316", "0.68740326", "0.6793049", "0.6773673", "0.6765756", "0.67615604", "0.6739989", "0.6663927", "0.66485167", "0.664726", "0.6634661", "0.66301644", "0.6619235", "0.66052026", "0.65586156", "0.6399837", "0.63663906", "0.6337939", "0.6324727", "0.63053095", "0.6299474", "0.6296127", "0.62851", "0.62788194", "0.62684596", "0.6264713", "0.62397254", "0.6232229", "0.62281865", "0.62228626", "0.6219815", "0.6201118", "0.6191663", "0.61845696", "0.61815417", "0.6177829", "0.6169422", "0.61652136", "0.61579436", "0.6138567", "0.61350566", "0.61262035", "0.61221087", "0.61029947", "0.6098914", "0.60977495", "0.6096603", "0.6093675", "0.60927683", "0.6085237", "0.60780543", "0.6076134", "0.60649204", "0.6056434", "0.6054439", "0.6040864", "0.60309035", "0.6026115", "0.6024572", "0.6009579", "0.60072184", "0.60064703", "0.59831864", "0.5982863", "0.59612834", "0.59592754", "0.59425116", "0.593409", "0.5924844", "0.59022003", "0.5897461", "0.5891002", "0.5889465", "0.5881702", "0.586567", "0.5863095", "0.5836977", "0.5829724", "0.5828387", "0.58266425", "0.58252037", "0.58203715", "0.58201784", "0.5815776", "0.5813557", "0.5806118", "0.5805386", "0.580095", "0.57977754", "0.5789325", "0.57753533", "0.57753533", "0.57753533", "0.5771467", "0.5770619" ]
0.0
-1
Recebe a string bidireccional com varios parametros e reencaminhaos para o servidor
public String comunicarServidor(String[][] parametros) { String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; xmlString += "<" + parametros[0][0] + " id=\"" + parametros[0][1] + "\">"; for (int i = 1; i < parametros.length; i++) { xmlString += "<" + parametros[i][0] + ">" + parametros[i][1] + "</" + parametros[i][0] + ">"; } xmlString += "</" + parametros[0][0] + ">"; return clienteTCP(this.host, this.port, xmlString); // Retorna a mensagem de resposta do servidor }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBloqueado(java.lang.String param){\n \n this.localBloqueado=param;\n \n\n }", "public static String getString(String metodo, RequestBody formBody) {\n\n try {\n URL url = new URL(\"http://0.0.0.0:5000/\" + metodo);\n Request request = new Request.Builder().url(url).post(formBody).build();\n Response response = webClient.newCall(request).execute();//Aqui obtiene la respuesta en dado caso si hayas pues un return en python\n String respuesta = response.body().string();//y este seria el string de las respuesta\n return respuesta;\n } catch (MalformedURLException ex) {\n java.util.logging.Logger.getLogger(com.servlet.conexionl_login.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n java.util.logging.Logger.getLogger(com.servlet.conexionl_login.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarCompromisoRequest actualizarCompromisoRequest = new ActualizarCompromisoRequest();\r\n\t\tactualizarCompromisoRequest.listaInventarioCompromiso = this.listaInventarioCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPosicionCompromiso = this.listaPosicionCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPresentacionCompromiso = this.listaPresentacionCompromiso;\r\n\t\tactualizarCompromisoRequest.updateInformacionAdicionalTO = this.updateInformacionAdicionalTO;\r\n\t\tactualizarCompromisoRequest.codigoCabecera = this.codigoCabecera;\r\n\t\tString request = JSONHelper.serializar(actualizarCompromisoRequest);\r\n\t\treturn request;\r\n\t}", "private static String descifrarBase64(String arg) {\n Base64.Decoder decoder = Base64.getDecoder();\n byte[] decodedByteArray = decoder.decode(arg);\n\n return new String(decodedByteArray);\n }", "public String getParameterFromP();", "public String encode_dados_acesso(){\n\n String result = \"\";\n\n try {\n String iddispositivo = Settings.Secure.getString(myContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n Uri.Builder builder = new Uri.Builder()\n .appendQueryParameter(TAG_IDDIUSPOSITIVO, iddispositivo)\n //.appendQueryParameter(TAG_EMAIL, v_email)\n //.appendQueryParameter(TAG_SENHA, v_senha)\n .appendQueryParameter(TAG_TEXTO, vTexto);\n\n result = builder.build().getEncodedQuery();\n Log.d(\"workshop encode:\",result);\n\n } catch (Exception e) {\n //Log.d(\"InputStream\", e.getLocalizedMessage());\n }\n\n // 11. return result\n return result;\n }", "public String encode_dados_acesso(){\n\n String result = \"\";\n\n try {\n String iddispositivo = Settings.Secure.getString(myContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n Uri.Builder builder = new Uri.Builder()\n .appendQueryParameter(TAG_IDDIUSPOSITIVO, iddispositivo)\n //.appendQueryParameter(TAG_EMAIL, v_email)\n //.appendQueryParameter(TAG_SENHA, v_senha)\n .appendQueryParameter(TAG_TEXTO, vTexto);\n\n result = builder.build().getEncodedQuery();\n Log.d(\"workshop encode:\",result);\n\n } catch (Exception e) {\n //Log.d(\"InputStream\", e.getLocalizedMessage());\n }\n\n // 11. return result\n return result;\n }", "@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}", "public static String complieRequest(String message){\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString[] args = message.split(\" \");\n\t\t sb.append('*');\n\t\t sb.append(args.length);\n\t\t sb.append(\"<br>\");\n\t\t for (String arg : args) {\n\t\t sb.append('$');\n\t\t sb.append(arg.length());\n\t\t sb.append(\"<br>\");\n\t\t sb.append(arg);\n\t\t sb.append(\"<br>\");\n\t\t }\n\t\treturn sb.toString();\n\t}", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString urlParameters=null;\n\t\t\ttry {\n\t\t\t\turlParameters= \"busno=\"+URLEncoder.encode(sbsno,\"UTF-8\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresplist = Connectivity.excutePost(Constants.BUSSTOPFETCH_URL,\n urlParameters);\n\t\t\treturn resplist;\n\t\t}", "public String getParameter(String paramString) {\n/* 191 */ return this.stub.getParameter(paramString);\n/* */ }", "private void StringRequest_POST() {\n\t\tString POST = \"http://api.juheapi.com/japi/toh?\";\n\t\trequest = new StringRequest(Method.POST, POST, new Listener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}, new ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}){@Override\n\t\tprotected Map<String, String> getParams() throws AuthFailureError {\n\t\t\tHashMap< String , String> map = new HashMap<String,String>();\n\t\t\tmap.put(\"key\", \"7bc8ff86168092de65576a6166bfc47b\");\n\t\t\tmap.put(\"v\", \"1.0\");\n\t\t\tmap.put(\"month\", \"11\");\n\t\t\tmap.put(\"day\", \"1\");\n\t\t\treturn map;\n\t\t}};\n\t\trequest.addMarker(\"StringRequest_GET\");\n\t\tMyApplication.getHttpRequestQueue().add(request);\n\t}", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarClienteRequest actualizarClienteRequest = new ActualizarClienteRequest();\r\n\t\tactualizarClienteRequest.setCliente(codigo);\r\n\t\tactualizarClienteRequest.setFechaAniversario(fechAniv);\r\n\t\tactualizarClienteRequest.setObservaciones(observaciones);\r\n\t\tactualizarClienteRequest.setRazonComercial(razonComercial);\r\n\t\tactualizarClienteRequest.setReferencia(referencia);\r\n\t\tactualizarClienteRequest.setUsuario(usuario);\r\n\t\t\r\n\t\tString request = JSONHelper.serializar(actualizarClienteRequest);\r\n\t\treturn request;\r\n\t}", "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }", "private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}", "public String getParameterFromR();", "private String ExecuteRest(String urlServer,String params){\t\n\t\t\ttry {\t\t\t\n\t\t\t\tURL url = new URL(urlServer);\n\t\t\t\t\n\t\t\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\t \n\t if(params!=null){\n\t \tlog.warning(\"Requete post=\"+params);\n\t\t connection.setRequestProperty(\"Content-Length\", \"\"+params.getBytes().length);\n\t\t connection.setRequestProperty(\"Content-Type\",\"application/x-www-form-urlencoded\");\n\t\t connection.setRequestProperty(\"Content-Language\", \"en-US\"); \n\t\t connection.setUseCaches(false);\n\t\t connection.setDoOutput(true);\n\t\t connection.setDoInput(true);\n\t\t connection.setRequestMethod(\"POST\");\n\t\t DataOutputStream writer = new DataOutputStream(connection.getOutputStream());\n\t\t writer.writeBytes(params);\n\t\t writer.flush();\n\t\t writer.close();\n\t } else {\n\t \tconnection.setRequestMethod(\"GET\");\n\t }\n\t \n\t log.warning(\"Appel de \"+url+\" avec param=\"+params);\n\t \t\n\t //Delai de réponse fixé à 30 secondes\n\t connection.setReadTimeout(30*1000);\n\t connection.connect();\n\n\t //Récuperation de la réponse\n\t\t BufferedReader buffer=new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t String line=\"\";\n\t\t\t\tStringWriter writer=new StringWriter();\n\t\t\t\twhile ( null!=(line=buffer.readLine()))writer.write(line);\n\t\t \n\t\t\t\tint reponseCode=connection.getResponseCode();\n\t\t if (reponseCode == HttpURLConnection.HTTP_OK) { \t\n\t\t\t\t\tif(reponseCode==200)\t\t\t\t\t\n\t\t\t\t\t\tonSuccess(writer.toString()); \t\t\n\t\t\t\t\telse \n\t\t\t\t\t\tonFailure(reponseCode);\n\t\t }\n\t\t else onFailure(reponseCode); \n\t } \n\t\t\tcatch (MalformedURLException e) {} \n\t\t\tcatch (IOException e) {}\t\n\t\t\t\t\n\t\treturn null;\t\n\t}", "public String getParameters() {\n String parameters = \"\";\n try {\n String firstParameter = \"username=\" + URLEncoder.encode(username, \"UTF-8\");\n String secondParameter = \"password=\" + URLEncoder.encode(password, \"UTF-8\");\n String thirdParameter = \"grant_type=\" + URLEncoder.encode(\"password\", \"UTF-8\");\n parameters = firstParameter + \"&&\" + secondParameter + \"&&\" + thirdParameter;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return parameters;\n }", "private String composeParams(List<NameValuePair> params) {\n List<NameValuePair> baseParams = baseParams();\n if (params != null)\n baseParams.addAll(params);\n return \"?\" + URLEncodedUtils.format(baseParams, \"UTF-8\");\n }", "public static void main(String args[])\r\n\t{\n\t\ttry {\r\n\t\t\tString s = \"{\\\"wfycdwmc\\\":\\\"河西单位0712\\\",\\\"sfbj\\\":\\\"0\\\"}\";\r\n\t\t sun.misc.BASE64Encoder necoder = new sun.misc.BASE64Encoder(); \r\n\t\t String ss = necoder.encode(s.getBytes());\r\n\t\t System.out.println(ss);\r\n\t\t sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();\r\n\t\t byte[] bt = decoder.decodeBuffer(ss); \r\n\t\t ss = new String(bt, \"UTF-8\");\r\n\t\t System.out.println(ss);\r\n//\t\t\tClient client = new Client(new URL(url));\r\n////\t\t\tObject[] token = client.invoke(\"getToken\",new Object[] {tokenUser,tokenPwd});//获取token\r\n//\t\t\tObject[] zyjhbh = client.invoke(apiName,new Object[] {\"120000\"});\r\n//\t\t\tSystem.out.println(zyjhbh[0].toString());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract String toURLParam();", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString urlParameters=null;\n\t\t\ttry {\n\t\t\t\turlParameters= \"busno=\"+URLEncoder.encode(sbsno,\"UTF-8\")+\"&&\"\n\t\t\t\t\t\t+\"stop=\"+URLEncoder.encode(s_bstop,\"UTF-8\")+\"&&\"\n\t\t\t\t\t\t+\"bustime=\"+URLEncoder.encode(s_btime,\"UTF-8\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tupresp = Connectivity.excutePost(Constants.BUSSTOPUPDATE_URL,\n urlParameters);\n\t\t\treturn upresp;\n\t\t}", "private final String m43294b(String str) {\n return str != null ? str : ManagerWebServices.PARAM_TEXT;\n }", "private static String prepareURL(String message, String mobileNumber) {\n\n\t\ttry {\n\t\t\tmessage = URLEncoder.encode(message, \"UTF-8\").replace(\"+\", \"%20\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tlog(\"UnsupportedEncodingException.. plz change the encoding algo..\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*HariKrishna*/\n\t\treturn \"http://smshorizon.co.in/api/sendsms.php?user=HariKrishna&apikey=RaI23VZXtffNRHSIieYO&type=txt&senderid=PC-TXTMSG&mobile=\" + mobileNumber + \"&message=\" + message;\n\t}", "private String buildParams(){\n HashMap<String,String> items = new HashMap<>();\n if(paramValid(param1name,param1value))\n items.put(param1name,param1value);\n if(paramValid(param2name,param2value))\n items.put(param2name,param2value);\n if(paramValid(param3name,param3value))\n items.put(param3name,param3value);\n return JsonOutput.toJson(items);\n }", "private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public String c(String str) {\n String str2;\n String str3 = null;\n if (TextUtils.isEmpty(str)) {\n return null;\n }\n try {\n String host = Uri.parse(str).getHost();\n String aBTestValue = TUnionTradeSDK.getInstance().getABTestService().getABTestValue(\"config\");\n if (!TextUtils.isEmpty(aBTestValue)) {\n String optString = new JSONObject(aBTestValue).optString(\"domain\");\n TULog.d(\"abTestRequestUrl, url: \" + str + \" host: \" + host + \" domains: \" + optString, new Object[0]);\n if (!TextUtils.isEmpty(host) && !TextUtils.isEmpty(optString)) {\n JSONArray jSONArray = new JSONArray(optString);\n if (jSONArray.length() > 0) {\n int length = jSONArray.length();\n int i = 0;\n while (true) {\n if (i >= length) {\n break;\n } else if (host.contains(jSONArray.getString(i))) {\n String encode = URLEncoder.encode(str, \"utf-8\");\n try {\n TULog.d(\"abTestRequestUrl, loginJumpUrl :\" + str2, new Object[0]);\n } catch (Exception unused) {\n }\n str3 = str2;\n break;\n } else {\n i++;\n }\n }\n }\n }\n }\n } catch (Exception unused2) {\n }\n return str3;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id\", idb);\n params.put(\"correo\", correob);\n return params;\n }", "private void sendToClient(String string) {\n\t\r\n}", "@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}", "private void buildBS60Url() {\n url = \"http://q.lizone.net/index/index/BSline/res/60/label/\" + dataItem.label;//API 2.0\n }", "Bd(String baseDatos) {\n\t\tthis.servidor = \"jdbc:mysql://\" + this.maquina + \":\" + this.puerto\n\t\t\t\t+ \"/\" + baseDatos;\n\n\t\t// Registrar el driver\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"ERROR AL REGISTRAR EL DRIVER\");\n\t\t\tSystem.exit(0); // parar la ejecución\n\t\t}\n\n\t\t// Establecer la conexión con el servidor\n\t\ttry {\n\t\t\tconexion = DriverManager.getConnection(this.servidor, this.usuario,\n\t\t\t\t\tthis.clave);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"ERROR AL CONECTAR CON EL SERVIDOR\");\n\t\t\tSystem.exit(0); // parar la ejecución\n\t\t}\n\t\tSystem.out.println(\"Conectado a \" + baseDatos);\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"buslabel\", sShareBusLable);\n params.put(\"direction\", sShareDirection);\n params.put(\"ss\", sSharestopSerial);\n params = CGlobals_lib_ss.getInstance().getBasicMobileParamsShort(params,\n Constants_bus.SHARE_BUS_LOCATION_URL, mActivity);\n String delim = \"\";\n StringBuilder getParams = new StringBuilder();\n for (Map.Entry<String, String> entry : params.entrySet()) {\n getParams.append(delim + entry.getKey() + \"=\"\n + entry.getValue());\n delim = \"&\";\n }\n String url1 = Constants_bus.SHARE_BUS_LOCATION_URL;\n try {\n String url = url1 + \"?\" + getParams.toString()\n + \"&verbose=Y\";\n System.out.println(\"url \" + url);\n\n } catch (Exception e) {\n SSLog_SS.e(TAG + \" callBusTrip\", e.getMessage());\n }\n return CGlobals_BA.getInstance().checkParams(params);\n }", "String serverRequest() throws UnsupportedEncodingException {\n String text = \"\";\n String urlData = reqestUrl +\n \"?pid=\" + patientId;\n HttpURLConnection conn = null;\n InputStream stream = null;\n // Send data\n try {\n\n // Defined URL where to send data\n URL url = new URL(urlData);\n\n // Send GET data request\n\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n conn.connect();\n if (conn.getResponseCode() == 200) {\n\n stream = conn.getInputStream();\n Log.d(\"Get Request\", \"inside try -if\");\n if (stream != null) {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(stream));\n StringBuilder builder = new StringBuilder();\n Log.d(\"click\", \"inside tr4y\");\n String line = null;\n while ((line = bufferedReader.readLine()) != null) {\n\n builder.append(line + \"\\n\");\n Log.d(\"line\", line);\n\n }\n\n text = builder.toString();\n Log.d(\"Response: \",text);\n }\n }\n }\n catch (Exception ex) {\n Log.d(\"ServerRequest Error\", \"error occurred\" + ex);\n\n }\n finally {\n try {\n if (stream != null) {\n stream.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (conn != null) {\n conn.disconnect();\n }\n }\n return text;\n }", "public String getParameterFromH();", "String getParamsAsString();", "private void sendLocalParamData(){\n String json = gson.toJson(parameters);\n getJSON(hostUrl + sendLocalParamScript.getFilename() + \"?matchId=\" + matchId + \"&param=\" + json, 2000);\n }", "@Override\n\tpublic String bajarFichero(String URLdiscoCliente, int idFichero, int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\" + direccion + \":\" + puerto + \"/almacen\");\n\t\t\n\t\t//se deberia comprobar si el fichero realmente es el del cliente\n\t\t\n\t\tMetadatos m = datos.descargarFichero(idFichero,idSesionCliente);\n\t\tint idCliente = datos.sesion2id(idSesionCliente);\n\t\tint idSesionRepo = datos.dimeRepositorio(idCliente);\n\t\tif (m != null){\n\t\t\t\n\t\t\tInterfaz.imprime(\"Se ha notificado que el fichero \" + m.getNombreFichero() + \" va a ser descargado\");\n\t\t\tString URLservicioSrOperador = \"rmi://\" + direccionServicioSrOperador + \":\" + puertoServicioSrOperador + \"/sroperador/\" + idSesionRepo;\n\t\t\n\t\t\t//ahora buscamos el Servicio SrOperador y le pasamos la URL del DiscoCliente y el id de cliente que es el nombre de la carpeta\n\t\t\tServicioSrOperadorInterface servicioSrOperador =(ServicioSrOperadorInterface)Naming.lookup(URLservicioSrOperador);\n\t\t\t//el tercer parametro es la carpeta donde esta el fichero real, en caso de compartido es la carpeta dequien comparte evidentemente.\n\t\t\tservicioSrOperador.bajarFichero(URLdiscoCliente,m.getNombreFichero(),m.getIdCliente());\n\t\t\treturn m.getNombreFichero();\n\t\t}else return null;\t\t\n\t}", "public String getObtieneParametrosReformaTribu()throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n String result = new String();\n\n try {\n\n conn = this.getConnection();\n\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n call = conn.prepareCall(\"{? =call PKG_OBTIENE_PARAM.obtieneParametroReformaTribu}\");\n call.registerOutParameter(1, OracleTypes.VARCHAR);\n call.execute();\n\n result = call.getObject(1).toString();\n \n call.close(); \n \n }catch (Exception e) {\n e.printStackTrace();\n }\n finally{\n this.closeConnection();\n }\n\t\treturn result;\n }", "public String getParameters() {\n String parameters = \"\";\n try {\n String username = GetSetSharedPreferences.getDefaults(\"username\", getApplicationContext());\n String password = GetSetSharedPreferences.getDefaults(\"password\", getApplicationContext());\n String firstParameter = \"username=\" + URLEncoder.encode(username, \"UTF-8\");\n String secondParameter = \"password=\" + URLEncoder.encode(password, \"UTF-8\");\n String thirdParameter = \"grant_type=\" + URLEncoder.encode(\"password\", \"UTF-8\");\n parameters = firstParameter + \"&&\" + secondParameter + \"&&\" + thirdParameter;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return parameters;\n }", "private String getString(String paramString) {\n }", "@PostMapping(\"/finalizar\")\r\npublic String finalizar(\r\n@RequestParam(\"ava_1\") String ava_1,\r\n@RequestParam(\"ava_2\") String ava_2,\r\n@RequestParam(\"ava_3\") String ava_3,\r\n@RequestParam(\"ava_4\") String ava_4,\r\n@RequestParam(\"ava_5\") String ava_5,\r\n@RequestParam(\"ava_6\") String ava_6,\r\n@RequestParam(\"ava_7\") String ava_7,\r\n@RequestParam(\"ava_8\") String ava_8,\r\n@RequestParam(\"ava_9\") String ava_9,\r\n@RequestParam(\"ava_10\") String ava_10,\r\n@RequestParam(\"ava_11\") String ava_11,\r\n@RequestParam(\"ava_12\") String ava_12,\r\n@RequestParam(\"ava_13\") String ava_13,\r\n@RequestParam(\"ava_14\") String ava_14,\r\n\r\n@RequestParam(\"gonio_1\") String gonio_1,\r\n@RequestParam(\"gonio_2\") String gonio_2,\r\n@RequestParam(\"gonio_3\") String gonio_3,\r\n@RequestParam(\"gonio_4\") String gonio_4,\r\n@RequestParam(\"gonio_5\") String gonio_5,\r\n@RequestParam(\"gonio_6\") String gonio_6,\r\n@RequestParam(\"gonio_7\") String gonio_7,\r\n@RequestParam(\"gonio_8\") String gonio_8,\r\n@RequestParam(\"gonio_9\") String gonio_9,\r\n@RequestParam(\"gonio_10\") String gonio_10,\r\n@RequestParam(\"gonio_11\") String gonio_11,\r\n@RequestParam(\"gonio_12\") String gonio_12,\r\n@RequestParam(\"gonio_13\") String gonio_13,\r\n@RequestParam(\"gonio_14\") String gonio_14,\r\n@RequestParam(\"gonio_15\") String gonio_15,\r\n@RequestParam(\"gonio_16\") String gonio_16,\r\n@RequestParam(\"gonio_17\") String gonio_17,\r\n@RequestParam(\"gonio_18\") String gonio_18,\r\n@RequestParam(\"gonio_19\") String gonio_19,\r\n@RequestParam(\"gonio_20\") String gonio_20,\r\n@RequestParam(\"gonio_21\") String gonio_21,\r\n@RequestParam(\"gonio_22\") String gonio_22,\r\n@RequestParam(\"gonio_23\") String gonio_23,\r\n@RequestParam(\"gonio_24\") String gonio_24,\r\n@RequestParam(\"gonio_25\") String gonio_25,\r\n@RequestParam(\"gonio_26\") String gonio_26,\r\n@RequestParam(\"gonio_27\") String gonio_27,\r\n@RequestParam(\"gonio_28\") String gonio_28,\r\n@RequestParam(\"gonio_29\") String gonio_29,\r\n@RequestParam(\"gonio_30\") String gonio_30,\r\n@RequestParam(\"gonio_31\") String gonio_31,\r\n@RequestParam(\"gonio_32\") String gonio_32,\r\n@RequestParam(\"gonio_33\") String gonio_33,\r\n@RequestParam(\"gonio_34\") String gonio_34,\r\n@RequestParam(\"gonio_35\") String gonio_35,\r\n@RequestParam(\"gonio_36\") String gonio_36,\r\n@RequestParam(\"gonio_37\") String gonio_37,\r\nModel model) {\r\n\r\n model.addAttribute(\"ava_1\", ava_1);\r\n model.addAttribute(\"ava_2\", ava_2);\r\n model.addAttribute(\"ava_3\", ava_3);\r\n model.addAttribute(\"ava_4\", ava_4);\r\n model.addAttribute(\"ava_5\", ava_5);\r\n model.addAttribute(\"ava_6\", ava_6);\r\n model.addAttribute(\"ava_7\", ava_7);\r\n model.addAttribute(\"ava_8\", ava_8);\r\n model.addAttribute(\"ava_9\", ava_9);\r\n model.addAttribute(\"ava_10\", ava_10);\r\n model.addAttribute(\"ava_11\", ava_11);\r\n model.addAttribute(\"ava_12\", ava_12);\r\n model.addAttribute(\"ava_13\", ava_13);\r\n model.addAttribute(\"ava_14\", ava_14);\r\n\r\n model.addAttribute(\"gonio_1\", gonio_1);\r\n model.addAttribute(\"gonio_2\", gonio_2);\r\n model.addAttribute(\"gonio_3\", gonio_3);\r\n model.addAttribute(\"gonio_4\", gonio_4);\r\n model.addAttribute(\"gonio_5\", gonio_5);\r\n model.addAttribute(\"gonio_6\", gonio_6);\r\n model.addAttribute(\"gonio_7\", gonio_7);\r\n model.addAttribute(\"gonio_8\", gonio_8);\r\n model.addAttribute(\"gonio_9\", gonio_9);\r\n model.addAttribute(\"gonio_10\", gonio_10);\r\n model.addAttribute(\"gonio_11\", gonio_11);\r\n model.addAttribute(\"gonio_12\", gonio_12);\r\n model.addAttribute(\"gonio_13\", gonio_13);\r\n model.addAttribute(\"gonio_14\", gonio_14);\r\n model.addAttribute(\"gonio_15\", gonio_15);\r\n model.addAttribute(\"gonio_16\", gonio_16);\r\n model.addAttribute(\"gonio_17\", gonio_17);\r\n model.addAttribute(\"gonio_18\", gonio_18);\r\n model.addAttribute(\"gonio_19\", gonio_19);\r\n model.addAttribute(\"gonio_20\", gonio_20);\r\n model.addAttribute(\"gonio_21\", gonio_21);\r\n model.addAttribute(\"gonio_22\", gonio_22);\r\n model.addAttribute(\"gonio_23\", gonio_23);\r\n model.addAttribute(\"gonio_24\", gonio_24);\r\n model.addAttribute(\"gonio_25\", gonio_25);\r\n model.addAttribute(\"gonio_26\", gonio_26);\r\n model.addAttribute(\"gonio_27\", gonio_27);\r\n model.addAttribute(\"gonio_28\", gonio_28);\r\n model.addAttribute(\"gonio_29\", gonio_29);\r\n model.addAttribute(\"gonio_30\", gonio_30);\r\n model.addAttribute(\"gonio_31\", gonio_31);\r\n model.addAttribute(\"gonio_32\", gonio_32);\r\n model.addAttribute(\"gonio_33\", gonio_33);\r\n model.addAttribute(\"gonio_34\", gonio_34);\r\n model.addAttribute(\"gonio_35\", gonio_35);\r\n model.addAttribute(\"gonio_36\", gonio_36);\r\n model.addAttribute(\"gonio_37\", gonio_37);\r\n\r\n //return \"dashboard\"; //padrao apos login\r\n //return \"result_dashboard\"; //para visualizar os campos crus (teste)\r\n return \"dashboard_ficha\"; //para travar os campos e exportar para Excel\r\n}", "private static String[][] decodificarCadenaParametros(String cadena) {\n ArrayList resultado = new ArrayList();\n StringTokenizer stringTokenizer = new StringTokenizer(cadena, \"&\");\n String aux = null;\n int index = 0;\n String[] atributo = null; //Un atributo se compone de un nombre y un valor asociado \n String attrtmp; // [1] atributo temporal para conoces si tenia un & en el string original\n while (stringTokenizer.hasMoreElements()) {\n aux = stringTokenizer.nextToken();\n index = aux.indexOf('=');\n\n if (index == -1) {\n throw new IllegalArgumentException(\"Al parametro le falta el =\");\n } else {\n atributo = new String[2];\n atributo[0] = aux.substring(0, index); //A la izquierda del =\n attrtmp = aux.substring(index + 1, aux.length()); // [1] a la derecha del =\n attrtmp = attrtmp.replaceAll(\";druida;amp;\",\"&\");//[1]\n atributo[1] = attrtmp; //[1]\n //[1] atributo[1] = aux.substring(index + 1, aux.length()); //A la derecha del =\n resultado.add(atributo); //Añadimos el atributo recien creado a la lista\n }\n }\n\n return listToArray(resultado);\n }", "@Override\r\n\tprotected String requestText() {\n\t\tConsultarIndiceEjecucionAnioRequest consultarIndiceEjecucionAnioRequest = new ConsultarIndiceEjecucionAnioRequest();\r\n\t\tconsultarIndiceEjecucionAnioRequest.setPeriodo(periodo);\r\n\t\tString request = JSONHelper.serializar(consultarIndiceEjecucionAnioRequest);\r\n\t\treturn request;\r\n\t}", "String getQuery(HashMap<String, String> params) throws UnsupportedEncodingException {\n StringBuilder query=new StringBuilder();\n boolean first = true;\n for (Map.Entry<String, String> entry : params.entrySet()) {\n if (first)\n first=false;\n else\n query.append('&');\n\n String key=entry.getKey();\n Log.d(\"NetworkCall\",key);\n query.append(URLEncoder.encode(key, \"UTF-8\"));\n query.append(\"=\");\n query.append(URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n }\n return query.toString();\n }", "private String getStringParamEncoded(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\n System.exit(1);\n }\n if (!stringParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter isn't a String parameter...\");\n System.exit(1);\n }\n\n return stringParams.get(name);\n }", "private static void doRequestLogic(Map<String, String[]> requestParameters) {\n if (requestParameters.containsKey(\"fortuneRequest\") && requestParameters.containsKey(\"msisdn\")) {\n String[] fortuneRequestStringArray = requestParameters.get(\"fortuneRequest\");\n if (fortuneRequestStringArray.length == 0) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"Request was attempted with no parameters\");\n } else {\n String fortuneRequest = fortuneRequestStringArray[0]; // get the bytecode data\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Received the ByteCode: {0}\", fortuneRequest);\n if (fortuneRequest.equalsIgnoreCase(\"0\")) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Request is for Fortune Data\");\n\n String outStream = null;\n String errStream = null;\n String fortune = null;\n try {\n // run the Fortune command\n Process p = Runtime.getRuntime().exec(\"/usr/local/bin/fortune\");\n\n BufferedReader stdIn = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));\n\n while ((outStream = stdIn.readLine()) != null) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"STDOUT: {0}\", outStream);\n if(!outStream.equalsIgnoreCase(\"null\")) {\n fortune += outStream;\n }\n }\n\n while ((errStream = stdErr.readLine()) != null) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"STDERR: {0}\", errStream);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"IOException when attmpeting to process Fortune command.\", ex);\n }\n \n if (fortune != null) {\n if (0 != fortune.length()) {\n\n ByteString bs = null;\n\n try {\n\n // regex by alex to replace any patters of > 2 spaces with 1 space\n \n fortune = fortune.trim().replaceAll(\" +\", \" \");\n\n if (fortune.length() > 70) {\n fortune = fortune.substring(0, 67) + \"...\";\n }\n\n byte[] fortuneAscii = fortune.getBytes(\"ASCII\");\n bs = new ByteString(fortuneAscii);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.SEVERE, null, ex);\n doRequestLogic(requestParameters);\n }\n\n\n if (bs == null) {\n doRequestLogic(requestParameters);\n }\n\n // transmit the fortune message to the handset\n CardSettings cs = new CardSettings(\n \"0000\",\n \"NONE\",\n \"NONE\",\n \"1\",\n \"NONE\",\n \"NONE\",\n \"1\",\n \"555559\",\n \"0000000000\",\n \"0\",\n \"0\",\n requestParameters.get(\"msisdn\")[0]);\n \n String toHex = bs.toHex();\n \n toHex = toHex.replace(\"6E756C6C\", \"\");\n \n String transmit = \"0A010000\" + \n ((toHex.length() / 2 < 0x0F) ? \"0\" + Integer.toHexString(toHex.length() / 2) : Integer.toHexString(toHex.length() / 2)) + toHex;\n\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Transmitting APDU: {0}\", transmit);\n\n if (SendSms.sendMessage(transmit, cs, \"http://simulity.co.uk/ota/ram/command\")) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"The SMS {0} transmitted successfully.\", fortune);\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The SMS failed to transmit.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The Fortune length was zero.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The Fortune data was not set.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The request is not supported.\");\n }\n }\n }\n }", "public void getbtnDataFromDB(final String stringVar, final String string,final String stringVar2, final String string2) {\n StringRequest request = new StringRequest(Request.Method.POST, getUrl(), new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //progressDialog.dismiss();\n getArray().get(0).setText(response);\n String[] strArray = getArray().get(0).getText().toString().split(\",\");\n setStrArray(strArray);\n if(stringVar==\"book\" && stringVar2 != \"chapter\") {\n setTextBtnInt();\n }\n else{\n setTextBtn();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //progressDialog.dismiss();\n Toast.makeText(getActivity(), error.toString(), Toast.LENGTH_SHORT).show();\n }\n }\n ) {\n public Map<String, String> getParams() throws AuthFailureError {\n HashMap<String, String> param = new HashMap<>();\n param.put(stringVar, string);\n param.put(stringVar2,string2);\n return param;\n }\n };\n request.setRetryPolicy(new DefaultRetryPolicy(0, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n MySingleton.getmInstance(getActivity()).addToRequestQueue(request);\n }", "protected static String getParams(Map<String, Object> param) {\n String res = \"\";\n if (param != null && !param.isEmpty()){\n for (String key:param.keySet()){\n res += key + \"=\" + param.get(key)+\"&\";\n }\n res = res.substring(0,res.length()-1);\n }\n return res;\n }", "private String fill(String url, String requestPath, String... parameters) {\n String filledUrl = url.replaceFirst(\"\\\\{url\\\\}\", requestPath.substring(1,requestPath.length()));\n for (String parameter : parameters) {\n filledUrl = filledUrl.replaceFirst(\"\\\\{[^}]*\\\\}\", parameter);\n }\n\n return filledUrl;\n }", "public String enviarInvitacion(String url, String numero, String numero2) {\r\n\t\t // Create a new HttpClient and Post Header\r\n\t\t HttpClient httpclient = new DefaultHttpClient();\r\n\t\t HttpPost httppost = new HttpPost(url);\r\n\t\t httppost.setHeader(\"User-Agent\", \"mimesic company\");\r\n\t\t String output = null;\r\n\t\t\r\n\t\t try {\r\n\t\t \r\n\t\t \t\r\n\t\t List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);\r\n\t\t nameValuePairs.add(new BasicNameValuePair(\"numero\", numero));\r\n\t\t nameValuePairs.add(new BasicNameValuePair(\"invitado\", numero2));\r\n\t\t \r\n\t\t httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\r\n\t\t\r\n\t\t // Execute HTTP Post Request\r\n\t\t HttpResponse response = httpclient.execute(httppost);\r\n\t\t \r\n\t\t HttpEntity httpEntity = response.getEntity();\r\n\t output = EntityUtils.toString(httpEntity);\r\n\t \r\n\t\t \t \r\n\t\t } catch (ClientProtocolException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t } catch (IOException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t }\r\n\t\t return output;\r\n\t\t \t \r\n\t\t}", "String getBarcharDataQuery();", "String toParameter();", "@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }", "private void enviarLlaveSimetricaYReto() {\n\t\tString reto = \"reto\";\n\n\t\ttry {\n\t\t\tllaveSecreta = generarLlave(algSimetrica);\n\t\t\tbyte[] llaveSim=llaveSecreta.getEncoded();\n\t\t\tbyte[] simetrica = encriptarAsimetrico(llaveSim, llavePublica, algAsimetrica);\n\t\t\tout.println(printBase64Binary(simetrica));\n\t\t\tout.println(reto);\n\t\t\tString linea = in.readLine();\n\t\t\tbyte[] msg = parseBase64Binary(linea);\n\t\t\tbyte[] msgDecifrado = decriptadoSimetrico(msg, llaveSecreta, algSimetrica);\n\t\t\tSystem.out.println(\"Este es el mensaje descifrado:\" +printBase64Binary(msgDecifrado));\n\t\t\tif(!printBase64Binary(msgDecifrado).equals(\"reto\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error al decifrar el mensaje\");\n\t\t\t\tout.println(ERROR);\n\t\t\t}\n\t\t\tout.println(OK);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error generando llave simetrica\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public void testSendGetParameterRequest() {\n String expected = \"GET_PARAMETER rtsp://172.10.20.30:554 RTSP/1.0\\r\\n\" + (((((((\"session: 2547019973447939919\\r\\n\" + \"cseq: 3\\r\\n\") + \"content-length: 31\\r\\n\") + \"content-type: text/parameters\\r\\n\") + \"\\r\\n\") + \"stream_state\\r\\n\") + \"position\\r\\n\") + \"scale\\r\\n\");\n byte[] content = (\"stream_state\\r\\n\" + (\"position\\r\\n\" + \"scale\\r\\n\")).getBytes(UTF_8);\n FullHttpRequest request = new io.netty.handler.codec.http.DefaultFullHttpRequest(RTSP_1_0, GET_PARAMETER, \"rtsp://172.10.20.30:554\");\n request.headers().add(SESSION, \"2547019973447939919\");\n request.headers().add(CSEQ, \"3\");\n request.headers().add(CONTENT_LENGTH, (\"\" + (content.length)));\n request.headers().add(CONTENT_TYPE, \"text/parameters\");\n request.content().writeBytes(content);\n EmbeddedChannel ch = new EmbeddedChannel(new RtspEncoder());\n ch.writeOutbound(request);\n ByteBuf buf = ch.readOutbound();\n String actual = buf.toString(UTF_8);\n buf.release();\n Assert.assertEquals(expected, actual);\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"name\", cityNameInput.getText().toString());\n // volley will escape this for you\n playerName = playerNameInput.getText().toString();\n //params.put(\"randomFieldFilledWithAwkwardCharacters\", \"{{%stuffToBe Escaped/\");\n params.put(\"playerName\", playerNameInput.getText().toString());\n params.put(\"civilAmount\", civilAmountInput.getText().toString());\n params.put(\"mafiaAmount\", mafiaAmountInput.getText().toString());\n\n return params;\n }", "public abstract String toFORMParam();", "private byte[] stringToBytes(String bytesInStringForm) {\n byte[] bytes = new byte[16];\n String[] byteValues = bytesInStringForm.split(\",\");\n for (int byteIndex = 0; byteIndex < 16; byteIndex++) {\n bytes[byteIndex] = (byte) Integer.parseInt(byteValues[byteIndex]);\n }\n return bytes;\n\n }", "public String pedirHibe(String url, String clave, String valor){\r\n \t // Create a new HttpClient and Post Header\r\n\t HttpClient httpclient = new DefaultHttpClient();\r\n\t HttpPost httppost = new HttpPost(url);\r\n\t httppost.setHeader(\"User-Agent\", \"mimesic company\");\r\n\t String output = null;\r\n\t\r\n\t try {\r\n\t \r\n\t \t\r\n\t List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\r\n\t nameValuePairs.add(new BasicNameValuePair(clave, valor));\r\n\t \r\n\t \r\n\t httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\r\n\t\r\n\t // Execute HTTP Post Request\r\n\t HttpResponse response = httpclient.execute(httppost);\r\n\t \r\n\t HttpEntity httpEntity = response.getEntity();\r\n output = EntityUtils.toString(httpEntity);\r\n \r\n \r\n\t \r\n\t \t \r\n\t } catch (ClientProtocolException e) {\r\n\t // TODO Auto-generated catch block\r\n\t } catch (IOException e) {\r\n\t // TODO Auto-generated catch block\r\n\t }\r\n\t return output;\r\n \t\r\n }", "java.lang.String getBunho();", "java.lang.String getBunho();", "public void Enviar_String_Bluetooth(String datos)\n {\n if (Bluetooth_Conectado == true && Bluetooth_Encendido == true)\n {\n conexionBluetooth.enviar_string(datos);\n }\n }", "public void enviar() {\r\n\r\n Socket sock = null;\r\n\r\n try {\r\n sock = new Socket(host, PORT);\r\n\r\n InputStream inputStream = sock.getInputStream();\r\n ObjectInputStream in = new ObjectInputStream(inputStream);\r\n\r\n PrintWriter out = new PrintWriter(sock.getOutputStream(),true);\r\n //muestro en consola el script\r\n out.println(scriptSQL);\r\n\r\n //recibe el objeto mandado por el socket del server\r\n Lista<Object> objectLista = (Lista<Object>) in.readObject();\r\n\r\n //se lo envia al controlador para graficar el resultado\r\n Control_PantallaComprobante.recibirParaMostrarConfirmacion(objectLista);\r\n\r\n\r\n }\r\n catch (IOException | ClassNotFoundException error){\r\n error.printStackTrace();\r\n System.out.println(error);\r\n }\r\n finally {\r\n try{\r\n sock.close();\r\n }catch (IOException error){\r\n error.printStackTrace();\r\n }\r\n }\r\n\r\n\r\n }", "protected String cargarRecepcionBHCs(String url, String username,\n String password) throws Exception {\n try {\n getRecepcionBHCs();\n if(mRecepcionBHCs.size()>0){\n saveRecepcionBHCs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/bhcs\";\n RecepcionBHC[] envio = mRecepcionBHCs.toArray(new RecepcionBHC[mRecepcionBHCs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<RecepcionBHC[]> requestEntity =\n new HttpEntity<RecepcionBHC[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveRecepcionBHCs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveRecepcionBHCs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }", "@Override\r\n public Bitmap doInBackground(String... params) {\r\n\t\t\t// FIXME you need to actually do whatever with your errors\r\n\t\t\tInetAddress serverAddr;\r\n\t\t\tBitmap decodedImage = null;\r\n\t\t\ttry {\r\n serverAddr = InetAddress.getByName(SERVER_IP);\r\n\t\t\t\tSocket socket = new Socket(serverAddr,SERVER_PORT);\r\n\t\t\t\tPrintWriter printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);\r\n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n\t\t\t\t// Send librarycard\r\n\t\t\t\tString librarycard = params[0];\r\n\t\t\t\tprintWriter.println(librarycard);\r\n\t\t\t\t// FIXME I wasn't super sure what exactly was going on here, but you\r\n\t\t\t\t// need to return decodedImage when it is all good\r\n\t\t\t\tString line = null;\r\n\t\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\t\tfinal String strReceived = line;\r\n\t\t\t\t\tbyte[] imageBytes = Base64.decode(strReceived, Base64.DEFAULT);\r\n\t\t\t\t\tdecodedImage = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n // FIXME handle error however you want\r\n\t\t\t}\r\n\t\t\t// return decodedImage here\r\n\t\t\treturn decodedImage;\r\n\t\t}", "private String cadenaABinario(String cadena){\n String cb = \"\";\n int longitud;\n for(int i = 0; i < cadena.length(); i++){\n cb += String.format(\"%8s\",Integer.toBinaryString(cadena.charAt(i)));\n }\n cb = formato(cb);\n return cb;\n }", "private String post(String addr, String param, boolean auth) {\n\t\tboolean sent = false;\n\t\tString response = \"\";\n\n\t\twhile (!sent) {\n\t\t\tsent = true;\n\t\t\tURLConnection connection = null;\n\t\t\tDataOutputStream output = null;\n\t\t\tBufferedReader input = null;\n\t\t\tString charset = \"UTF-8\";\n\n\t\t\ttry {\n\t\t\t\tconnection = new URL(addr).openConnection();\n\t\t\t\tconnection.setRequestProperty(\"User-Agent\", \"Cex.io Java API\");\n\t\t\t\tconnection.setRequestProperty(\"Content-Type\",\n\t\t\t\t\t\t\"application/x-www-form-urlencoded\");\n\t\t\t\tconnection.setRequestProperty(\"Accept-Charset\", charset);\n\t\t\t\tconnection.setRequestProperty(\"Charset\", charset);\n\n\t\t\t\tif (auth) {\n\t\t\t\t\t// generate post variables and catch errors\n\t\t\t\t\tString tSig = this.signature();\n\t\t\t\t\tString tNon = String.valueOf(this.nonce);\n\n\t\t\t\t\tconnection.setDoOutput(true);\n\t\t\t\t\toutput = new DataOutputStream(connection.getOutputStream());\n\t\t\t\t\tString content = \"key=\"\n\t\t\t\t\t\t\t+ URLEncoder.encode(this.apiKey, charset)\n\t\t\t\t\t\t\t+ \"&signature=\" + URLEncoder.encode(tSig, charset)\n\t\t\t\t\t\t\t+ \"&nonce=\" + URLEncoder.encode(tNon, charset);\n\n\t\t\t\t\tif (param.contains(\",\")) {\n\t\t\t\t\t\tString[] temp = param.split(\",\");\n\n\t\t\t\t\t\tfor (int a = 0; a < temp.length; a += 2) {\n\t\t\t\t\t\t\tcontent += \"&\" + temp[a] + \"=\" + temp[a + 1] + \"&\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontent = content.substring(0, content.length() - 1);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.writeBytes(content);\n\t\t\t\t\toutput.flush();\n\t\t\t\t\toutput.close();\n\t\t\t\t}\n\n\t\t\t\tString temp = \"\";\n\t\t\t\tinput = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tconnection.getInputStream()));\n\n\t\t\t\twhile ((temp = input.readLine()) != null) {\n\t\t\t\t\tresponse += temp;\n\t\t\t\t}\n\n\t\t\t\tinput.close();\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tsent = false;\n\t\t\t\te.printStackTrace();\n\n\t\t\t\t// This will happen if cloudflare is active/api is down.\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn response;\n\t}", "public static String CombineCommand(String paramString1,String paramString2,String paramString3,String paramString4,String paramString5,String paramString6){\n String str1 = intToHex(Integer.valueOf((4+(2+(paramString1.length()+paramString2.length()+paramString3.length()+paramString4.length()))+paramString5.length())));\n String str2 = \"00\"+intToHex(Integer.valueOf(Integer.valueOf(2 + (4 + (2 + (paramString1.length() + paramString2.length() + paramString3.length() + paramString4.length())) + paramString5.length() + paramString6.length()))));\n String str3 = getCheckNumber(paramString1.toUpperCase()+paramString2+paramString3+paramString4+str1.toUpperCase()+str2.toUpperCase()+paramString5+paramString6);\n\n return paramString1.toUpperCase()+paramString2+paramString3+paramString4+str1.toUpperCase()+str2.toUpperCase()+paramString5+paramString6+str3.toUpperCase();\n\n }", "public static String constructQuery(int port, int uploaded, int downloaded, int left){\n \t String url_string = \"\";\n \t try{\n \t \n String escaped_hash = Helpers.toURLHex(INFO_HASH);\n String ip = \"128.6.5.130\";\n url_string = TORRENT_INFO.announce_url.toString()\n + \"?port=\" + port\n + \"&peer_id=\" + PEER_ID\n + \"&info_hash=\" + escaped_hash \n + \"&uploaded=\" + uploaded\n + \"&downloaded=\" + downloaded\n + \"&left=\" + left\n + \"&ip=\" + ip;\n \n } catch (Exception e){\n System.out.println(e);\n }\n \n return url_string;\n \t}", "private void sendCustomMessage(String message, String alli) {\n String frontA = \"V\" + alli;\n String gobbleDeGuck = \"<ID 0><CLR><WIN 0 0 287 31><POS 0 0><SL><S S><BL N><CS 3><GRN><T>\";\n String mid = message;\n String ender = \"</T>\";\n String sendableMsgString = frontA + gobbleDeGuck + mid + ender;\n //\n sendRawMessage(sendableMsgString);\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tSystem.out.println(Login.ipServer);\n\t\t\tHttpClient cliente=new DefaultHttpClient();\n\t\t String s=\"http://\"+Login.ipServer+\"/Registro.php?user=\"+params[0]+\"&email=\"+params[1]+\"&nombre=\"+params[2]\n\t\t \t\t+\"&apellido=\"+params[3]+\"&pass=\"+params[4];\n\t\t\tHttpGet hget=new HttpGet(s);\n\t\t respuesta =getValores(cliente, hget);\n\t\t return respuesta;\n\t\t}", "@Override\n\tpublic Element bind(String arg0, final String arg1) {\n\t\tfinal Element e[] = { null };\n\t\tfinal Comunitat c[] = { null };\n\t\tfinal String comunitat = arg1.substring(0, arg1.indexOf('&'));\n\t\tfinal String element = arg1.substring(arg1.indexOf('&') + 1);\n\t\tJPA.withTransaction(new F.Callback0() {\n\t\t\t@Override\n\t\t\tpublic void invoke() throws Throwable {\n\t\t\t\tc[0] = (Comunitat.recercaPerNif(comunitat));\n\t\t\t\te[0] = (Element.recercaPerCodi(c[0], element));\n\t\t\t}\n\t\t});\n\n\t\treturn (e[0]);\n\t}", "private void cargardatos() {\n String link = \"http://192.168.43.30:8080/appLavanderia/subidadatos.php?\";\n\n //Toast.makeText(getApplicationContext(), \"1\", Toast.LENGTH_SHORT).show();\n respuesta = new StringRequest(Request.Method.POST, link, new Response.Listener<String>() {\n\n @Override //En caso que si se pudo hacer la conexion\n public void onResponse(String response) {\n if (response.equalsIgnoreCase(\"registra\")){\n Toast.makeText(getApplicationContext(), \"Registro Exitoso\", Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(getApplicationContext(), \"errorr\", Toast.LENGTH_SHORT).show();\n }\n //Toast.makeText(getApplicationContext(), \"2\", Toast.LENGTH_SHORT).show();\n\n }//En dado caso que no se pueda guardar\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"No \"+error.toString(), Toast.LENGTH_SHORT).show();\n\n }\n }){\n @Override //Contiene la informacion para enviar\n protected Map<String, String> getParams() throws AuthFailureError {\n\n String nombre = nombreimagen.getText().toString();\n String descripcion = descricpion.getText().toString();\n String fecha = fechaexp.getText().toString();\n String Foto = ConvertImagenTexto(imagenpro);\n\n //enviar los datos al servidor\n Map<String, String> datosparaenviar = new HashMap<>();\n datosparaenviar.put(\"Nombre\",nombre);\n datosparaenviar.put(\"DescripcionPromo\",descripcion);\n datosparaenviar.put(\"FechaPromo\",fecha);\n datosparaenviar.put(\"ImagenPromo\",Foto);\n return datosparaenviar;\n }\n };\n envio.add(respuesta);\n }", "private String reserver() {\n\t\tScanner scan2 = new Scanner(System.in);\n\t\tSystem.out.println(\"\\n---------------------------------------\\nNotre première chambre libre est : |\\n\"+this.chambresVides().get(0).toString()+\"\\n\");\n\t\tSystem.out.print(\"Pourtant, pour réserver une chambre, il faut que vous soiez inscrit ou admin!\\nEtes vous admin ? O/N : \");\n\t\tString rep = scan2.next();\n\t\tString inscription=\"\";\n\t\tif(rep.equalsIgnoreCase(\"o\")) {\n\t\t\tint check = this.adminLogin();\n\t\t\tif(check==1) {\n\t\t\t\tSystem.out.println(\"\\n------------------\\n| Bonjour Ibobai |\\n------------------\");\n\t\t\t\tthis.reserveChambre();\n\t\t\t\tinscription = \"\\n-------------------------------\\nC'est bien fait Admin, bon travail!\\n-------------------------------\";\n\t\t\t}else {\n\t\t\t\tSystem.err.print(\"\\n-------------------------------\\n\\t XXX\\nVous n'êtes pas un admin!\\n-------------------------------\");\n\t\t\t}\n\t\t}else if (rep.equalsIgnoreCase(\"n\")) {\n\t\t\tSystem.out.print(\"\\nVoulez vous vous inscrire O/N ? \");\n\t\t\tinscription = scan2.next();\n\t\t\tif(inscription.equalsIgnoreCase(\"o\")) {\n\t\t\t\tif(this.userLoing() == 1) {\n\t\t\t\t\tSystem.out.println(\"\\n-----------------------------------------------\\nInscription fini!\\n-----------------------------------------------\");\n\t\t\t\t\t//if the user wanted to reserve a room\n\t\t\t\t\t\tSystem.out.println(\"Mr/Mme Utilisateur.\");\n\t\t\t\t\t\tthis.reserveChambre();\n\t\t\t\t\t\tinscription=\"\\n-------------------------------\\nMerci pour votre réservation!\\n-------------------------------\";\n\t\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tinscription=\"\\n-------------------------------\\nVotre inscription a été annulée\\n-------------------------------\";\n\t\t\t\t}\n\t\t\t}else if(inscription.equalsIgnoreCase(\"n\")) {\n\t\t\t\tinscription= \"\\n-------------------------------\\nVotre inscription a été annulée\\n-------------------------------\";\n\t\t\t} else {\n\t\t\t\tinscription = \"-------------------------------\\nVotre saisie n'est pas correct!\\n-------------------------------\";\n\t\t\t}\n\t\t}else if(rep.equalsIgnoreCase(\"q\") || rep.equalsIgnoreCase(\"quit\")) {\n\t\t\tinscription = \"q\";\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println();\n\t\t\tSystem.err.print(\"---------------------------\\nVotre saisie est incorrect!\\n---------------------------\");\n\t\t}\n\t\t\n\t\treturn inscription;\n\t\t\n\t}", "protected String cargarDatosPartoBB(String url, String username,\n String password) throws Exception {\n try {\n getDatosPartoBB();\n if(mDatosPartoBB.size()>0){\n saveDatosPartoBB(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/datospartobb\";\n DatosPartoBB[] envio = mDatosPartoBB.toArray(new DatosPartoBB[mDatosPartoBB.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<DatosPartoBB[]> requestEntity =\n new HttpEntity<DatosPartoBB[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveDatosPartoBB(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveDatosPartoBB(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }", "public void caricaPartita(String partita) {\n\r\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n String id_compra=request.getParameter(\"id_compra\");id_compra = id_compra==null?\"\":id_compra; \r\n String id_usuario=request.getParameter(\"id_usuario\");id_usuario = id_usuario==null?\"\":id_usuario;\r\n String id_comprobante=request.getParameter(\"id_comprobante\");id_comprobante = id_comprobante==null?\"\":id_comprobante;\r\n String num_comp=request.getParameter(\"num_comp\");num_comp = num_comp==null?\"\":num_comp;\r\n String id_forma_pago=request.getParameter(\"id_forma_pago\");id_forma_pago = id_forma_pago==null?\"\":id_forma_pago;\r\n String id_moneda=request.getParameter(\"id_moneda\");id_moneda = id_moneda==null?\"\":id_moneda;\r\n String id_proveedor=request.getParameter(\"id_proveedor\");id_proveedor = id_proveedor==null?\"\":id_proveedor;\r\n String proveedor=request.getParameter(\"proveedor\");proveedor = proveedor==null?\"\":proveedor;//busqueda....\r\n String fecha_comp=request.getParameter(\"fecha_comp\");fecha_comp = fecha_comp==null?\"\":fecha_comp; \r\n String igv=request.getParameter(\"igv\");igv = igv==null?\"\":igv;\r\n String flete=request.getParameter(\"flete\");flete = flete==null?\"\":flete;\r\n String descripcion=request.getParameter(\"descripcion\");descripcion = descripcion==null?\"\":descripcion;\r\n String opcion = request.getParameter(\"opcion\");opcion = opcion == null ? \"\" : opcion;\r\n String mensaje=\"\";\r\n String alert=\"\";\r\n \r\n String nombres=request.getParameter(\"nombres\");nombres = nombres==null?\"\":nombres;\r\n String razon_social=request.getParameter(\"razon_social\");razon_social = razon_social==null?\"\":razon_social;\r\n String apellidos=request.getParameter(\"apellidos\");apellidos = apellidos==null?\"\":apellidos;\r\n String genero=request.getParameter(\"genero\");genero = genero==null?\"\":genero;\r\n String fecha_nacimiento=request.getParameter(\"fecha_nac\");fecha_nacimiento = fecha_nacimiento==null?\"\":fecha_nacimiento;\r\n String telefono=request.getParameter(\"telefono\");telefono = telefono==null?\"\":telefono;\r\n String celular=request.getParameter(\"celular\");celular = celular==null?\"\":celular;\r\n String t_doc=request.getParameter(\"t_doc\");t_doc = t_doc==null?\"\":t_doc;\r\n String num_doc=request.getParameter(\"num_doc\");num_doc = num_doc==null?\"\":num_doc;\r\n String ruc=request.getParameter(\"ruc\");ruc = ruc==null?\"\":ruc;\r\n String direccion=request.getParameter(\"direccion\");direccion = direccion==null?\"\":direccion;\r\n String estado=request.getParameter(\"estado\");estado = estado == null ? \"\" : estado;\r\n String correo=request.getParameter(\"correo\");correo = correo == null ? \"\" : correo;\r\n String num_cuenta=request.getParameter(\"num_cuenta\");num_cuenta = num_cuenta == null ? \"\" : num_cuenta;\r\n \r\n \r\n Persona persona=new Persona();\r\n PersonaDao dao=new PersonaDaoImpl();\r\n Compra compra = new Compra();\r\n CompraDao cd = new CompraDaoImpl();\r\n Proveedor proveed = new Proveedor();\r\n \r\n \r\n switch(opcion){\r\n \r\n case \"Iniciar\":\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n break;\r\n \r\n case \"RegistrarProveedor\":\r\n if((!nombres.equals(\"\") || !razon_social.equals(\"\")) && (!num_doc.equals(\"\")||!ruc.equals(\"\"))){ \r\n\r\n persona.setNombres(nombres);\r\n persona.setApellidos(apellidos);\r\n persona.setRazon_social(razon_social);\r\n persona.setId_tipo_doc(t_doc);\r\n persona.setNumero_doc(num_doc);\r\n persona.setRuc(ruc);\r\n persona.setFecha_nac(fecha_nacimiento);\r\n persona.setTelefono(telefono);\r\n persona.setCelular(celular);\r\n persona.setDireccion(direccion);\r\n persona.setGenero(genero);\r\n\r\n if(dao.InsertarPersona(persona))\r\n { \r\n if(!num_doc.equals(\"\")||!ruc.equals(\"\")){\r\n if(!num_doc.equals(\"\")){\r\n persona =dao.ObtenerPersonaDni(num_doc);\r\n id_proveedor=persona.getId_persona();\r\n }\r\n else if(!ruc.equals(\"\")){\r\n persona =dao.ObtenerPersonaRuc(ruc);\r\n id_proveedor=persona.getId_persona();\r\n } \r\n } \r\n proveed.setId_proveedor(id_proveedor);\r\n proveed.setCorreo_electronico(correo);\r\n proveed.setNum_cuenta(num_cuenta);\r\n if(dao.RegistrarProveedor(proveed)){\r\n alert=\"info\";\r\n opcion=\"Registrar\";\r\n mensaje = \"Se registró corerctamente el proveedor...\"; \r\n }\r\n else{\r\n alert=\"danger\";\r\n opcion=\"Continuar\";\r\n mensaje = \"Ocurrio un error...\"; \r\n }\r\n }\r\n else{\r\n alert=\"danger\";\r\n opcion=\"Registrar\";\r\n mensaje = \"Ocurrio un error...\"; \r\n }\r\n } \r\n \r\n request.setAttribute(\"opcion\", opcion);\r\n request.setAttribute(\"alert\", alert);\r\n request.setAttribute(\"mensaje\", mensaje);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n break;\r\n \r\n case \"Registrar\": \r\n if(!id_proveedor.equals(\"\") && !id_moneda.equals(\"\") &&!id_comprobante.equals(\"\")\r\n && !num_comp.equals(\"\") && !id_forma_pago.equals(\"\") && !fecha_comp.equals(\"\")){\r\n \r\n igv = igv.equals(\"\")?\"0\":igv;\r\n flete = flete.equals(\"\")?\"0\":flete;\r\n \r\n compra.setId_usuario(id_usuario);\r\n compra.setId_comprobante(id_comprobante);\r\n compra.setNumComprobante(num_comp);\r\n compra.setId_formaPago(id_forma_pago);\r\n compra.setId_tipoMoneda(id_moneda);\r\n compra.setId_proveedor(id_proveedor);\r\n compra.setFechaCompra(fecha_comp);\r\n compra.setIgv(igv);\r\n compra.setFlete(flete);\r\n compra.setDescripcion(descripcion);\r\n\r\n if(cd.RegistrarCompra(compra)){\r\n mensaje=\"Se registro correctamente la compra...\"; \r\n request.setAttribute(\"num_comp\", num_comp);\r\n request.getRequestDispatcher(\"buyproducts\").forward(request, response);\r\n }\r\n else{\r\n opcion=\"Registrar\";\r\n alert=\"danger\";\r\n mensaje=\"No se pudo registrar la compra...\";\r\n request.setAttribute(\"opcion\", opcion);\r\n request.setAttribute(\"alert\", alert);\r\n request.setAttribute(\"mensaje\", mensaje);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n }\r\n }\r\n \r\n else if(!proveedor.equals(\"\")){\r\n request.setAttribute(\"proveedor\", proveedor);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n }\r\n \r\n else{\r\n opcion=\"Registrar\";\r\n alert=\"danger\";\r\n mensaje=\"No se pudo registrar la compra...Faltan registrar algunos datos\";\r\n request.setAttribute(\"opcion\", opcion);\r\n request.setAttribute(\"alert\", alert);\r\n request.setAttribute(\"mensaje\", mensaje);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n }\r\n \r\n break;\r\n \r\n case \"Actualizar\":\r\n \r\n request.setAttribute(\"opcion\", \"Actualizando\");\r\n request.setAttribute(\"id_compra\", id_compra);\r\n request.setAttribute(\"Compra\", cd.ListarCompraid(id_compra));\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n break;\r\n\r\n case \"Actualizando\":\r\n \r\n if(!id_proveedor.equals(\"\") && !id_moneda.equals(\"\") &&!id_comprobante.equals(\"\")\r\n && !num_comp.equals(\"\") && !id_forma_pago.equals(\"\")){\r\n \r\n igv = igv.equals(\"\")?\"0\":igv;\r\n flete = flete.equals(\"\")?\"0\":flete;\r\n \r\n compra.setId_compra(id_compra);\r\n compra.setId_usuario(id_usuario);\r\n compra.setId_comprobante(id_comprobante);\r\n compra.setNumComprobante(num_comp);\r\n compra.setId_formaPago(id_forma_pago);\r\n compra.setId_tipoMoneda(id_moneda);\r\n compra.setId_proveedor(id_proveedor);\r\n compra.setIgv(igv);\r\n compra.setFlete(flete);\r\n compra.setDescripcion(descripcion);\r\n\r\n if(cd.UpdateCompra(compra)){\r\n alert=\"success\";\r\n mensaje=\"Se actualizo correctamente los datos de la compra...\"; \r\n request.setAttribute(\"buscar_por\", \"nombre\");\r\n request.setAttribute(\"buscar\", \"\");\r\n request.setAttribute(\"opcion\", \"Buscar\");\r\n request.setAttribute(\"alert\", alert);\r\n request.setAttribute(\"mensaje\", mensaje);\r\n request.setAttribute(\"id_compra\", id_compra);\r\n request.setAttribute(\"CompraT\", cd.ListarCompraT(id_compra));\r\n request.getRequestDispatcher(\"Compra_detalle.jsp\").forward(request, response);\r\n }\r\n else{\r\n opcion=\"Registrar\";\r\n alert=\"danger\";\r\n mensaje=\"No se pudo actualizar los datos de la compra...\";\r\n request.setAttribute(\"opcion\", opcion);\r\n request.setAttribute(\"alert\", alert);\r\n request.setAttribute(\"mensaje\", mensaje);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n }\r\n }\r\n \r\n else if(!proveedor.equals(\"\")){\r\n request.setAttribute(\"proveedor\", proveedor);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n }\r\n \r\n else{\r\n opcion=\"Registrar\";\r\n alert=\"danger\";\r\n mensaje=\"No se pudo actualizar los datos compra...Faltan registrar algunos datos\";\r\n request.setAttribute(\"opcion\", opcion);\r\n request.setAttribute(\"alert\", alert);\r\n request.setAttribute(\"mensaje\", mensaje);\r\n request.getRequestDispatcher(\"Compra.jsp\").forward(request, response);\r\n }\r\n \r\n break;\r\n}\r\n}", "private JDBCMiddler(String controlador, String url, String usuario, String clave) {\n this.controlador = controlador;\n this.url = url;\n this.usuario = usuario;\n this.clave = clave;\n }", "private static String convertDonnee(String donnee){\n byte[] tableau = convert.toBinaryFromString(donnee);\n StringBuilder sbDonnee = new StringBuilder();\n for (int i =0; i<tableau.length;i++){\n String too=Byte.toString(tableau[i]);\n sbDonnee.append(convert.decimalToBinary(Integer.parseInt(too)));\n }\n return sbDonnee.toString();\n }", "public String getParameterFromX();", "public static void main(String[] args) throws Exception {\n\n CloseableHttpClient aDefault = HttpClients.createDefault();\n\n\n /* HttpPost httpPost = new HttpPost(\"http://172.16.18.88:8080/toLogin.do\");\n List<NameValuePair> paramList = new ArrayList<>();\n paramList.add(new BasicNameValuePair(\"email\", \"hf\"));\n paramList.add(new BasicNameValuePair(\"pwd\", \"1234\"));\n paramList.add(new BasicNameValuePair(\"url\", \"\"));\n UrlEncodedFormEntity postEntity = new UrlEncodedFormEntity(paramList, \"UTF-8\");\n httpPost.setEntity(postEntity);\n HttpEntity entity = aDefault.execute(httpPost).getEntity();\n System.out.println(EntityUtils.toString(entity,DEFAULT_CHARSET));*/\n\n\n HttpGet httpGet = new HttpGet(\"http://e-hentai.org\");\n httpGet.setHeader(\"User-Agent\", DEFAULT_USER_AGENT);\n CloseableHttpResponse execute = aDefault.execute(httpGet);\n System.out.println(EntityUtils.toString(execute.getEntity(), DEFAULT_CHARSET));\n\n\n String phone = \"13920266937\";\n String code = \"北京,邢台,上海。\";\n String tplId = \"39638\";\n String url = \"http://v.juhe.cn/sms/send?mobile=\" + phone + \"&tpl_id=\" + tplId + \"&tpl_value=%23code%23%3D\" + code + \"&key=e3d4c483e58d86102bce4e05dcf071c1\";\n String s = httpPost(url);\n System.out.println(s);\n }", "private PaymentParams m50382b(String str) throws PaymentException {\n String trim = this.f30738i0.getText().toString().trim();\n String r = m50420r();\n String b = mo38887b();\n String c = mo38889c();\n String obj = this.f30737h0.getText().toString();\n String p = m50417p();\n StringBuilder sb = new StringBuilder();\n sb.append(\"20\");\n sb.append(c);\n CardPaymentParams cardPaymentParams = new CardPaymentParams(str, p, r, trim, b, sb.toString(), obj);\n return cardPaymentParams;\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out=resp.getWriter();\n\t\t//获得请求的消息\n\t\tString[] items=new String[18];\n\t\titems[0] = new String(req.getParameter(\"name\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[1] = new String(req.getParameter(\"weight\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[2] = new String(req.getParameter(\"huowufenlei\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[3] = new String(req.getParameter(\"huowuzhuangtai\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[4] = new String(req.getParameter(\"cangkufenlei\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[5] = new String(req.getParameter(\"speed\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[6] = new String(req.getParameter(\"jiName\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[7] = new String(req.getParameter(\"jiPhone\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[8] = new String(req.getParameter(\"sheng\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[9] = new String(req.getParameter(\"shi\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[10] = new String(req.getParameter(\"qu\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[11] = new String(req.getParameter(\"other4\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[12] = new String(req.getParameter(\"shouName\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[13] =new String(req.getParameter(\"shouPhone\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[14] = new String(req.getParameter(\"shengT\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[15] = new String(req.getParameter(\"shiT\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[16] = new String(req.getParameter(\"quT\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\titems[17] = new String(req.getParameter(\"other5\").getBytes(\"ISO-8859-1\"),\"UTF-8\");\n\t\tnew AddItem().additems(items);\n\t\tout.print(\"添加成功!\");\n\t}", "static void confirm_B(Messenger messenger, Response_e response, String paramA, int paramB)\n {\n Bundle bundle = new Bundle();\n bundle.putString( Parameters.KKeyParameterA, paramA);\n bundle.putInt( Parameters.KKeyParameterB, paramB );\n sendToClient( messenger, Request_e.Request_B_en.valueOf(), response, bundle );\n }", "public String getParamString() {\n\t\tStringBuilder s = new StringBuilder();\n\t\tif (!((image instanceof SATImage ) ||\n\t\t\t\t(image instanceof IMAImage ))) {\n\t\t\ts.append(super.getParamString());\n\t\t} \n\t\ts.append(stringShort);\n\t\ts.append(\"(\");\n\t\ts.append(\")\");\n\t\treturn s.toString();\n\t}", "private PreparedStatement prepareClientesRebarba(Connection conn, String data, String promocao) \n\t\tthrows ParseException, SQLException\n\t{\n\t\tPreparedStatement result = null;\t\t\n\t\tSimpleDateFormat conversorData = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate dataExecucao = conversorData.parse(data);\t\t\n\t\t\n\t\t//Parametro 1: Promocao (Parametro do metodo)\n\t\t//Parametro 2: Ano e mes da execucao\n\t\tSimpleDateFormat conversorDatMes = new SimpleDateFormat(\"yyMM\");\n\t\tString datMes = conversorDatMes.format(mesAnterior(dataExecucao));\n\t\t//Parametros 3, 5 e 7: Primeiro dia do mes da execucao\n\t\tDate dataInicioMesExecucao = getPrimeiroDiaMes(dataExecucao);\n\t\t//Parametro 4: Tipo de transacao da promocao PulaPula\n\t\tString tipoTransacao = TIPO_TRANSACAO_PULA_PULA;\n\t\t//Parametro 5: Primeiro dia do mes posterior ao da execucao\n\t\tDate dataInicioProxMes = getPrimeiroDiaMes(proximoMes(dataExecucao));\n\t\t//Parametro 8: Ultimo dia do mes da execucao\n\t\tDate dataFimMesExecucao = getUltimoDiaMes(dataExecucao);\n\n\t\tString sqlClientes = getQuerySelecaoClientesRebarba();\n\t\tresult = conn.prepareStatement(sqlClientes);\t\t\n\t\tresult.setString(1, promocao);\n\t\tresult.setString(2, datMes);\n\t\tresult.setDate (3, new java.sql.Date(dataInicioMesExecucao.getTime()));\n\t\tresult.setString(4, tipoTransacao);\n\t\tresult.setDate (5, new java.sql.Date(dataInicioMesExecucao.getTime()));\n\t\tresult.setDate (6, new java.sql.Date(dataInicioProxMes.getTime()));\n\t\tresult.setDate (7, new java.sql.Date(dataInicioMesExecucao.getTime()));\n\t\tresult.setDate (8, new java.sql.Date(dataFimMesExecucao.getTime()));\n\t\t\n\t\treturn result;\n\t}", "private static String buildUrlString(String base, Map<String, String> params) {\n if (params == null || params.isEmpty()) return API_URL + base;\n //construct get parameters list\n StringBuilder get = new StringBuilder();\n boolean first = true;\n for (String param : params.keySet()) {\n if (!first) get.append('&'); else first = false;\n //add the parameter\n get.append(param);\n String value = params.get(param);\n if (value != null) {\n get.append('=');\n get.append(value);\n }\n }\n //return the full string\n if (get.length() == 0) return API_URL + base;\n return API_URL + base + \"?\" + get.toString();\n }", "private String[] Condicion(String variable, String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].equals(variable)) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n }\n } else {\n if (var[0].equals(variable)) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "@Override\n protected String doInBackground(String... values) {\n accion = values[0];\n String text = \"?accion=\" + values[0];\n switch (accion) {\n case \"registrarUsuario\":\n text += \"&id=\" + values[1];\n text += \"&nombre=\" + values[2];\n text += \"&contra=\" + values[3];\n text += \"&corr=\" + values[4];\n text += \"&tel=\" + values[5];\n text += \"&rol=\" + values[6];\n break;\n }\n return coneccion.getResultFromServlet(text);\n\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "@Override\n\tprotected String doInBackground(String... params) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\ttry {\n\t\t\t \n\t\t // Modelo el request\n\t\t SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //namespace, Metodo\n\t\t request.addProperty(PARAM, DATO);\n\t\t \n\t\t // Model el Sobre\n\t\t SoapSerializationEnvelope sobre = new SoapSerializationEnvelope(SoapEnvelope.VER11);\n\t\t sobre.dotNet = true;\n\t\t sobre.setOutputSoapObject(request);\n\t\t \n\t\t // Modelo el transporte\n\t\t HttpTransportSE transporte = new HttpTransportSE(URL);//url\n\t\t //transporte.debug= true;\n\t\t \n\t\t // Llamada\n\t\t transporte.call(SOAP_ACTION, sobre);//Constants.SOAP_ACTION\n\t\t // Resultado\n\t\t String resultado = (String) sobre.getResponse();\n\t\t\tLog.e(\"SOAP\", resultado);\n\t\t sb.append(resultado);\n\t\t //sb.append(resultado.getPrimitivePropertyAsString(\"value\"));\n\t\t \n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString urlParameters=null;\n\t\t\ttry {\n\t\t\t\turlParameters= \"\";\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresp = Connectivity.excutePost(Constants.BUSNOFETCH_URL,\n urlParameters);\n\t\t\treturn resp;\n\t\t}", "public static void m15843b(String str) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"action_type\", \"click\");\n hashMap.put(\"request_page\", str);\n C8443c.m25663a().mo21606a(\"guest_connection\", hashMap, Room.class);\n }", "private static String getIBeaconSetAdvertisementParametersCommand( boolean useRandomAddr) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append( String.format( \"0x%02x 0x%04x \", HCI_Command.HCI_LE_Controller_OGF, HCI_Command.HCI_LE_Set_Advertising_Parameters_OCF));\n\t\t\n\t\tString advertisingInterval = getAdvertisingInterval( Beacon.ADVERTISING_INTERVAL_IBEACON);\n\t\t\n\t\t// sb.append( \"a0 00 \"); // Advertising_Interval_Min:\tSize: 2 octets\n\t\t// sb.append( \"a0 00 \"); // Advertising_Interval_Max:\tSize: 2 octets\n\t\t\n\t\tsb.append( advertisingInterval); // Advertising_Interval_Min:\tSize: 2 octets\n\t\tsb.append( advertisingInterval); // Advertising_Interval_Max:\tSize: 2 octets\n\t\t\n\t\tsb.append( String.format( \"%02x \", ADV_NONCONN_IND)); // Advertising_Type:\tSize: 1 octet\n\t\t\n\t\tfinal byte ownAddrType = useRandomAddr?Beacon.Own_Address_Type_Random_Device_Address:Own_Address_Type_Public_Device_Address;\n\t\t\n\t\tsb.append( String.format( \"%02x \", ownAddrType)); // Own_Address_Type:\tSize: 1 octet\n\t\tsb.append( String.format( \"%02x \", Own_Address_Type_Public_Device_Address)); // Peer_Address_Type: Size: 1 octet\n\t\t\n\t\tsb.append( \"00 00 00 00 00 00 \"); // Peer_Address: Size: 6 octets\n\t\t// Advertising_Channel_Map: Size: 1 octet\n\t\tsb.append( String.format( \"%02x \", Advertising_Channel_37 | Advertising_Channel_38 | Advertising_Channel_39));\n\t\tsb.append( \"00\"); // Advertising_Filter_Policy: Size: 1 octet\n\t\treturn sb.toString();\n\t}", "public ReformaTributariaOutput getComporConv(boolean comportamiento, ReformaTributariaInput reformaTributaria)throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n int inComportamiento=0; \n int inTipoConvenio=0;\n int inEmbargo=0;\n int inPyme=0;\n String ContextoAmbienteParam = null;\n ReformaTributariaOutput reformaTributariaOut = new ReformaTributariaOutput();\n try {\n\n conn = this.getConnection();\n String beneficio = this.getBeneficio();\n \n System.out.println(\"Estoy adentro con parametro beneficio---------------------->\"+beneficio);\n \n if (beneficio.equalsIgnoreCase(\"S\")){\n\t if (reformaTributaria.getContextoAmbienteParam().endsWith(\"CNV_INTRA\")){\n\t \t ContextoAmbienteParam=\"CNV_INTRA\";\n\t }else{\n\t \t ContextoAmbienteParam=\"CNV_BENEFICIO_INTER\";\n\t }\n }else{\n \t ContextoAmbienteParam=reformaTributaria.getContextoAmbienteParam(); \n }\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n /*\n --------------------------------------------------------------\n ------- Las variables determinantes --------------------\n ------- para condiciones de convenios --------------------\n --------------------------------------------------------------\n ------- v_tipo_valor\n ------- v_tipo_convenio\n ------- v_comportamiento\n ------- v_embargo\n ------- v_canal\n --------------------------------------------------------------\n -------------------------------------------------------------- \n */\n if (comportamiento){\n \t inComportamiento=1;\n }else{\n \t inComportamiento=2;\n }\n \n //String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia()+\";\"+reformaTributaria.canal();\n String parametros=reformaTributaria.pagoTotalConvenio()+\";\"+reformaTributaria.comportamiento()+\";\"+reformaTributaria.garantia();\n \n //System.out.println(\"tipo reforma condonacion--->\"+reformaTributaria.getCodConvenios());\n //System.out.println(\"***************************estoy en comportamiento****************************************\");\n //System.out.println(\"reformaTributaria.garantia()--->\"+reformaTributaria.garantia());\n //System.out.println(\"param getComporConv---> \"+parametros);\n //call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?)}\");\n call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.consulta_tabla_valores_conv(?,?,?,?,?,?,?,?)}\");\n call.setLong(1,inComportamiento);/*tipo comporamiento � condonaci�n */\n call.setString(2,parametros);/*tipo convenio */\n call.registerOutParameter(3, OracleTypes.INTEGER);/*max_cuotas*/\n call.registerOutParameter(4, OracleTypes.INTEGER);/*min_pie*/\n call.registerOutParameter(5, OracleTypes.INTEGER);/*por_condonacion*/ \n call.registerOutParameter(6, OracleTypes.INTEGER);/*error*/ \n /*se agrega nueva forma de servicio*/\n if (reformaTributaria.getCodConvenios()!=null){//si no es nulo quiere decir que es transitoria\n \t call.setLong(7,reformaTributaria.getCodConvenios().intValue());/*codigo condonacion si es transitoria*/\n }else{//si es null quiere decir que es convenio permanente\n \t call.setNull(7, OracleTypes.INTEGER);\n }\n //call.setString(8,reformaTributaria.getContextoAmbienteParam());/*ambiente Intranet � internet*/ \n System.out.println(\"ContextoAmbienteParam---> \"+ContextoAmbienteParam);\n call.setString(8,ContextoAmbienteParam);/*ambiente Intranet � internet*/\n call.execute();\n \n int maxCuotas = Integer.parseInt(call.getObject(3).toString());\n int minCuotaContado = Integer.parseInt(call.getObject(4).toString());\n \n\n int codError = Integer.parseInt(call.getObject(6).toString());\n \n reformaTributariaOut.setCodError(new Integer(codError));\n reformaTributariaOut.setMaxCuota(new Integer(maxCuotas));\n reformaTributariaOut.setMinCuotaContado(new Integer(minCuotaContado));\n call.close(); \n \n }catch (Exception e) {\n \te.printStackTrace();\n \t//throw new RemoteException(\"No tiene valor de comportamiento convenios:\" + e.getMessage());\n }\n finally{\n this.closeConnection();\n }\n\t\treturn reformaTributariaOut;\n }", "private static String[] AddCorsa(int i) {\r\n Scanner scanner = new Scanner(System.in);\r\n String[] Corsa;\r\n String orari = \"\";\r\n System.out.println(\"Inserisci gli orari della corsa \" + i + \"(:ogni orario deve essere diviso da una ,)\");\r\n orari = scanner.nextLine();\r\n orari+=\", \";\r\n Corsa = orari.split(\",\");\r\n return Corsa;\r\n }", "java.lang.String getBidid();", "public String sendToServer(String RFIDJSON){\n\t\t// Creatng variable for url, HttpURLConnection and BufferedReader\n\t\tURL url;\n\t\tHttpURLConnection conn;\n\t\tBufferedReader rd = null;\n\n\t\t// Replacing invalid URL characters from json string\n\t\ttry {\n\t\t\tRFIDJSON = URLEncoder.encode(RFIDJSON, \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\te1.printStackTrace();\n\t\t} // CLose catch UnsupportedEncodingException\n\n\t\t// Creating string full url for the sensor server url for the sensor data\n\t\tString fullURL = sensorServerURL + \"?sensordata=\"+RFIDJSON;\n\t\t// Print message to the console\n\t\tSystem.out.println(\"Sending data to: \"+fullURL); // DEBUG confirmation message\n\t\t// Creating variable for line and result\n\t\tString line;\n\t\tString result = \"\";\n\t\t// Creating try for the url connection\n\t\ttry {\n\t\t\t// Creating new url\n\t\t\turl = new URL(fullURL);\n\t\t\t// Creating http url connection to open the connection\n\t\t\tconn = (HttpURLConnection) url.openConnection();\n\t\t\t// Setting the request mehtod as get\n\t\t\t// Get is used to request data from a specified resource.\n\t\t\tconn.setRequestMethod(\"GET\");\n\t\t\trd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\t\t\t// Request response from server to enable URL to be opened\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\tresult += line;\n\t\t\t} // CLose while loop\n\t\t\trd.close(); // CLose buffered reader\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} // CLose catch Exception e\n\t\t// Return the reuslt\n\t\treturn result; \t\n\t}", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }" ]
[ "0.5665593", "0.55325496", "0.5526016", "0.55059355", "0.5505056", "0.5438123", "0.5438123", "0.54241085", "0.5418485", "0.5382437", "0.5380206", "0.53775775", "0.53620505", "0.53207904", "0.5299354", "0.52312374", "0.5216036", "0.5214011", "0.52067816", "0.5204373", "0.5173713", "0.51693887", "0.5165078", "0.51352316", "0.5127444", "0.51263833", "0.5115064", "0.510901", "0.5097081", "0.5085076", "0.507951", "0.50735027", "0.5060552", "0.50468665", "0.50447166", "0.5041603", "0.50412583", "0.50395167", "0.5036639", "0.50278974", "0.50274205", "0.5021454", "0.5012456", "0.5010156", "0.49936157", "0.49878678", "0.49789128", "0.4972298", "0.49703065", "0.4968069", "0.49680537", "0.49467736", "0.49202308", "0.49178445", "0.49154925", "0.49096444", "0.4907392", "0.49031383", "0.48884347", "0.48850948", "0.48830688", "0.48830688", "0.48812148", "0.48779988", "0.48729968", "0.48728082", "0.4868872", "0.48671436", "0.48661402", "0.4859749", "0.4855142", "0.48452052", "0.48429736", "0.48424125", "0.48348323", "0.483452", "0.4826424", "0.48249727", "0.48152703", "0.48112723", "0.4810933", "0.48100692", "0.48082078", "0.47991547", "0.47972283", "0.47906223", "0.478979", "0.47888854", "0.47820956", "0.47791657", "0.47771752", "0.47749564", "0.4772993", "0.47653374", "0.47610947", "0.47550225", "0.4746451", "0.4744417", "0.4743969", "0.4743724" ]
0.51402694
23
Mostra a mensagem enviada pelo servidor fazendo parsing para se saber o que fazer a partir dai
public String[][] getMessageValues(String mensagemRecebida) { // Parsing da stringXML DocumentBuilderFactory docFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder docBuilder; Document parserDoc = null; try { docBuilder = docFactory.newDocumentBuilder(); parserDoc = docBuilder.parse(new InputSource(new StringReader( mensagemRecebida))); } catch (Exception e) { e.printStackTrace(); } String expression = "/tipo"; // expressão para o user XPath xpath = XPathFactory.newInstance().newXPath(); NodeList nodes = null; Node raiz = null; try { nodes = (NodeList) xpath.evaluate(expression, parserDoc, XPathConstants.NODESET); raiz = nodes.item(0); } catch (XPathExpressionException e) { e.printStackTrace(); } NodeList filhos = raiz.getChildNodes(); ArrayList<String> elementName = new ArrayList<String>(); ArrayList<String> elementValue = new ArrayList<String>(); elementName.add("tipo"); elementValue.add(this.getTipo(mensagemRecebida)); for (int i = 0; i < filhos.getLength(); i++) { Node childNode = filhos.item(i); if (childNode.getNodeType() == Node.ELEMENT_NODE) { elementName.add(childNode.getNodeName()); elementValue.add(childNode.getTextContent()); } } String[][] valores = new String[elementName.size()][2]; for (int i = 0; i < elementName.size(); i++) { valores[i][0] = elementName.get(i); valores[i][1] = elementValue.get(i); System.out.println(valores[i][0] + " " + valores[i][1]); } return valores; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void logParsedMessage()\n {\n if (log.isInfoEnabled())\n {\n StringBuffer buf = new StringBuffer(\"Parsed EASMessage:\");\n buf.append(\"\\n OOB alert = \").append(isOutOfBandAlert());\n buf.append(\"\\n sequence_number = \").append(this.sequence_number);\n buf.append(\"\\n protocol_version = \").append(this.protocol_version);\n buf.append(\"\\n EAS_event_ID = \").append(this.EAS_event_ID);\n buf.append(\"\\n EAS_originator_code = \").append(this.EAS_originator_code).append(\": \").append(\n getOriginatorText());\n buf.append(\"\\n EAS_event_code = \").append(this.EAS_event_code);\n buf.append(\"\\n nature_of_activation_text = \").append(getNatureOfActivationText(new String[] { \"eng\" }));\n buf.append(\"\\n alert_message_time_remaining = \").append(getAlertMessageTimeRemaining()).append(\" seconds\");\n buf.append(\"\\n event_start_time = \").append(this.event_start_time);\n buf.append(\"\\n event_duration = \").append(this.event_duration).append(\" minutes\");\n buf.append(\"\\n alert_priority = \").append(getAlertPriority());\n buf.append(\"\\n details_OOB_source_ID = \").append(this.details_OOB_source_ID);\n buf.append(\"\\n details_major_channel_number = \").append(this.details_major_channel_number);\n buf.append(\"\\n details_minor_channel_number = \").append(this.details_minor_channel_number);\n buf.append(\"\\n audio_OOB_source_ID = \").append(this.audio_OOB_source_ID);\n buf.append(\"\\n alert_text = \").append(getAlertText(new String[] { \"eng\" }));\n buf.append(\"\\n location_code_count = \").append(this.m_locationCodes.size());\n for (int i = 0; i < this.m_locationCodes.size(); ++i)\n {\n buf.append(\"\\n location[\").append(i).append(\"]: \").append(this.m_locationCodes.get(i).toString());\n }\n buf.append(\"\\n exception_count = \").append(this.m_exceptions.size());\n for (int i = 0; i < this.m_exceptions.size(); ++i)\n {\n buf.append(\"\\n exception[\").append(i).append(\"]: \").append(this.m_exceptions.get(i).toString());\n }\n buf.append(\"\\n descriptor count = \").append(this.m_descriptors.size());\n for (int i = 0; i < this.m_descriptors.size(); ++i)\n {\n buf.append(\"\\n descriptor[\").append(i).append(\"]: \").append(this.m_descriptors.get(i).toString());\n }\n buf.append(\"\\n isAudioChannelAvailable = \").append(isAudioChannelAvailable());\n buf.append(\"\\n number of audio sources = \").append(this.m_audioFileSources.size());\n for (int i = 0; i < this.m_audioFileSources.size(); ++i)\n {\n buf.append(\"\\n audio file source[\").append(i).append(\"]: \").append(\n this.m_audioFileSources.get(i).toString());\n }\n buf.append(\"\\n m_detailsChannelLocator = \").append(this.m_detailsChannelLocator);\n buf.append(\"\\n m_eventReceivedTime = \").append(new Date(this.m_eventReceivedTime));\n buf.append(\"\\n m_eventStartTime = \").append(new Date(this.m_eventStartTime));\n buf.append(\"\\n m_eventExpirationTime = \").append(new Date(this.m_eventExpirationTime));\n if (log.isInfoEnabled())\n {\n log.info(buf.toString());\n }\n }\n }", "@Override\r\n public void handleMessage(Message msg) {\n Log.d(\"Guardado en el servidor\",\"\"+msg.obj.toString());\r\n if(msg.obj.toString().length() > 1){\r\n\r\n Log.d(\"VALOR DEL SERVER\",\"\"+(String)msg.obj);\r\n\r\n }else{\r\n\r\n }\r\n\r\n }", "private int checkServerResponse(String message) {\n \t\tif (message.substring(0, 2).equalsIgnoreCase(\"ok\")) {\n \t\t\treturn HGDConsts.SUCCESS;\n \t\t}\n \t\treturn HGDConsts.FAILURE;\n \t}", "public void tractaResposta(String s) throws IOException {\n if (s.equals(\"OK\")){\n ResponseSuccess = true;\n }else{\n KOMessage = diStream.readUTF();\n ResponseSuccess = false;\n }\n }", "private static void responseHandler(StringBuilder sb)\n\t{\n\t\tString s = sb.toString();\t\t\n\t\tString[] lines = s.split(\"\\n\");\t\t\n\t\tString firstLine = \"\";\n\t\t\n\t\t// Only search through the first five lines. If it isn't \n\t\t// in the first five lines it probably isn't there.\n\t\tfor(int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif(lines[i].contains(\"HTTP/1\"))\n\t\t\t{\n\t\t\t\tfirstLine = lines[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Error and quit if it is still empty.\n\t\tif(firstLine.equals(\"\"))\n\t\t{\n\t\t\terrorQuit(\"Whoops something went wrong.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(firstLine.contains(\"200\"))\n\t\t\t{\n\t\t\t\tSystem.out.print(s);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(firstLine);\n\t\t\t}\n\t\t}\n\t}", "public static void any() {\n\t\tlong date = System.currentTimeMillis();\n\t\tString body = IO.readContentAsString(request.body);\n\t\tif (body == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (null body)...\");\n\t\t}\n\n\t\tDocument soapMessage = XML.getDocument(body);\n\t\tif (soapMessage == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (not XML)...\");\n\t\t}\n\n\t\t// parse the body and calculate required data...\n\t\tNode n = XPath.selectNode(\"//ReportListBean\", soapMessage);\n\t\tif (n == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (not a valid report)...\");\n\t\t}\n\n\t\t// can be optimized...\n\t\tString reportList = XMLHelper.createStringFromDOMNode(n, true);\n\t\tif (reportList == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (can not generate reportList)...\");\n\t\t}\n\n\t\tReportListBean reportListBean = null;\n\t\ttry {\n\t\t\treportListBean = JAXBHelper.unmarshall(new ByteArrayInputStream(\n\t\t\t\t\treportList.getBytes()));\n\t\t} catch (MessageExchangeException e) {\n\t\t\terror(StatusCode.INTERNAL_ERROR, e.getMessage());\n\t\t}\n\n\t\tMessage message = new Message();\n\t\tfor (ReportBean report : reportListBean.getReports()) {\n\t\t\tif (\"t1\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t1 = report.getDate();\n\t\t\t} else if (\"t2\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t2 = report.getDate();\n\t\t\t} else if (\"t3\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t3 = report.getDate();\n\t\t\t} else if (\"t4\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t4 = report.getDate();\n\t\t\t}\n\n\t\t\t// monitoring api needs to be fixed since all informations are the\n\t\t\t// same for the target\n\t\t\tmessage.endpoint = report.getEndpoint();\n\t\t\tmessage.itf = report.getItf();\n\t\t\tmessage.service = report.getServiceName();\n\t\t\tmessage.operation = report.getOperation();\n\t\t}\n\t\tmessage.date = date;\n\t\tmessage.exception = false;\n\t\tWebSocket.liveStream.publish(message);\n\t\t\n\t\trender(\"Services/MonitoringService_Response.xml\");\n\t}", "public StringBuilder sendMessage(String msg) throws IOException {\n out.println(msg);\n String resp = \"\";\n StringBuilder stringBuilder = new StringBuilder();\n if(msg.length() >3 && msg.substring(0,3).equals(\"GET\")) {\n while (true) {\n String newLine;\n newLine = in.readLine();\n\n if (newLine.equals(\"~~~END~~~\")) {\n return stringBuilder;\n }\n else{stringBuilder.append(newLine);\n stringBuilder.append(System.getProperty(\"line.separator\"));\n }\n }\n }\n else {\n stringBuilder.append(in.readLine());\n\n\n }\n return stringBuilder;\n\n }", "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "private boolean handleData(String serverMessage){\r\n\t\t// Separating the message STATUS + TOKEN\r\n\t\tString[] messageParts = serverMessage.split(SEPARATOR);\r\n\r\n\t\t// Get status code from message\r\n\t\tint error = Integer.parseInt(messageParts[0]);\r\n\r\n\t\t//Process status\r\n\t\tswitch (error) {\r\n\t\tcase REQUEST_OK:\r\n\r\n\t\t\t// Status OK process the data\r\n\t\t\thanleOkData(messageParts);\r\n\t\t\treturn true;\r\n\r\n\t\tcase INCORRECT_REQUEST_FORMAT:\r\n\r\n\t\t\tSystem.err.println(\"Oups! \\nSomethin went wrong!\\n Request format was invalid\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase INCORRECT_USER_OR_PASSWOROD:\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username or password is incorrect!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\t\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private ServerResponse getServerResponse(String mensaje, StatusResponse status) {\n\t\tHeaders<Object> headers = new Headers<>();\n\t\theaders.add(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\n\t\tList<String> errores = Arrays.asList(mensaje);\t\t\n\t\tResponse response = ResponseJSONGenericoUtil.getRespuestaError(status, errores, null);\t\t\n\t\treturn new ServerResponse(response.getEntity(), status.getStatusCode(), headers);\n\t}", "private boolean handleServerMessage(String serverMessage){\r\n\t\t// Separating the message STATUS + OTHER\r\n\t\tString[] messageParts = serverMessage.split(SEPARATOR);\r\n\r\n\t\t// Get status code from message\r\n\t\tint messageStatus = Integer.parseInt(messageParts[0]);\r\n\r\n\t\t// Process status\r\n\t\tswitch (messageStatus) {\r\n\t\tcase REQUEST_OK:\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Send Request OK\");\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\tcase INCORRECT_REQUEST_FORMAT:\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.err.println(\"Oups! \\nSomethin went wrong!\\n Request format was invalid\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase INCORRECT_USER_OR_PASSWOROD:\r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username or password is incorrect!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tcase USER_NAME_ALREADY_EXIST:\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username alredy exists!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void processMessage(String msg) {\n\t\t\tif (msg.equals(Message.TEST_SERVER)) {\n\t\t\t\tSystem.out.println(\"Server test passed. Testing client...\");\n\t\t\t\tpw.println(Message.TEST_CLIENT);\n\t\t\t}\n\t\t}", "public String getResponseMessage();", "@Override\n\tpublic void onMessage(Message m) {\n\t\t\t\ttry {\n\n\t\t\t\t\tTextMessage ms = (TextMessage) m;\n\n\t\t\t\t\tString linea = ms.getText();\n\n\t\t\t\t\tString args[] = linea.split(\" - \");\n\n\t\t\t\t\tif (args[0].equals(\"consulta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\t\t\t\t\t\tif (args[1].equals(\"1\")) {\t\t\t\t\t\n\t\t\t\t\t\t\t//registrarPedido(args[2], args[3], args[4], args[5]);\n\t\t\t\t\t\t}else if (args[1].equals(\"2\")) {\n\t\t\t\t\t\t\t//cambiarEstado(args[2], args[3]);\n\t\t\t\t\t\t}else if (args[1].equals(\"3\")) {\n\t\t\t\t\t\t\t//ArrayList<String> ejecuciones = consultarEjecucionDeEtapas(args[2], args[3], args[4]);\n\t\t\t\t\t\t\t//responderConEjecucionesDeEtapas(ejecuciones);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (args[0].equals(\"respuesta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\n\t\t\t\t\t\tif ( args[1].equals(\"1\") || args[1].equals(\"2\") ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if( args[1].equals(\"3\") ){\n\t\t\t\t\t\t\tString[] data = linea.substring( 16, ( linea.length() - 1 ) ).split(\"-\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<String> ejec = new ArrayList<String>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tString data0 = data[i];\n\t\t\t\t\t\t\t\tejec.add(data0);\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t//Numero del Pedido\n//\t\t\t\t\t\t\t\tString numPedido = data0[0];\n//\t\t\t\t\t\t\t\t//Codigo de la EstaciÛn\n//\t\t\t\t\t\t\t\tString codEstacion = data0[1];\n//\t\t\t\t\t\t\t\t//Numero de ejecuciones\n//\t\t\t\t\t\t\t\tString numEjecuciones = data0[2];\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} catch (Exception e) {\n\n\t\t\t\t}\n\t\t\t}", "public void enviarMensagem(String mensagem) {\n //Painel.COMPUTADOR_TRANSMISSOR.limparTextoCamadas();//Limpando texto do Computador Transmissor\n //Painel.COMPUTADOR_RECEPTOR.limparTextoCamadas();//Limpando texto do Computador Receptor\n\n //Painel.COMPUTADOR_TRANSMISSOR.limparTela();//Limpando texto da Tela\n //Painel.COMPUTADOR_RECEPTOR.limparTela();//Limpando texto da Tela\n\n //this.id_temporizador = 1;\n //this.idQuadroEsperado = 1;\n //MeioDeComunicacao.inicarTransmissao();\n\n adicionarMensagem(\"Msg Enviada: \" + mensagem);//Adiciona a mensagem enviada no Computador Transmissor\n\n aplicacaoTransmissora.aplicacaoTransmissora(mensagem);//Enviando a mensagem para aplicacao transmissora\n }", "@Override\n public void onResponse(String response) {\n Log.i(\"Checking\", response + \" \");\n if(new ServerReply(response).getStatus())\n {\n Toast.makeText(context,new ServerReply(response).getReason(),Toast.LENGTH_LONG).show();\n }\n\n }", "private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n//\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "private void receberMensagem() throws Exception {\n\t\ttry {\n\t\t\tbyte[] buffer = new byte[1000];\n\t\t\tMessage mensagem;\n\t\t\tDatagramPacket messageIn = new DatagramPacket(buffer, buffer.length);\n\n\t\t\tthis.socket.receive(messageIn);\n\n\t\t\tmensagem = Message.fromBytes(buffer);\n\n\t\t\tSystem.out.println(mensagem.toString());\n\n\t\t\tif (!mensagem.getRemetente().equals(this.identificador)) {\n\t\t\t\tbyte[] chavePublicaRemetenteBytes = this.listaChavesPublicas.get(mensagem.getRemetente());\n\n\t\t\t\tif (mensagem.getTipoMensagem().equals(EnumMessageType.ENTRADA)\n\t\t\t\t\t\t|| mensagem.getTipoMensagem().equals(EnumMessageType.RESPOSTA_ENTRADA)) {\n\t\t\t\t\tchavePublicaRemetenteBytes = mensagem.getChavePublica();\n\t\t\t\t}\n\n\t\t\t\tmensagem.validar(chavePublicaRemetenteBytes);\n\n\t\t\t\tthis.tratarMensagem(mensagem);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Exception(\"Erro ao receber mensagem\");\n\t\t}\n\t}", "@Override\n public void onResponse(Call<ResponseContent> call, Response<ResponseContent> response) {//obtener datos\n\n ResponseContent data = response.body();\n\n try {\n\n if( data.getBody().getString(0).toString().equals(\"msm\") ){//verifico si es un mensaje\n\n Toast.makeText(contexto.getApplicationContext(),\n mss.msmServices.getString(data.getBody().getString(1).toString()),\n Toast.LENGTH_SHORT).show(); // muestro mensaje enviado desde el servidor\n\n }else{\n\n Log.i( mss.TAG, data.getBody().toString() );\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n new ServicesPeticion().SaveError(e,\n new Exception().getStackTrace()[0].getMethodName().toString(),\n this.getClass().getName());//Envio la informacion de la excepcion al server\n }\n\n }", "private void getMessage() throws Exception {\n\t\tGetTimestamp(\"Getting Message: \");\n\t\tString msg = \"\";\n\t\tString decmsg = \"\";\n\t\tbyte[] result;\n\t\ttry {\n\t\t\tmsg = br.readLine();\n\t\t\tJSONObject RESPONSE = new JSONObject();\n\t\t\tRESPONSE.put(\"payload\", msg);\n\t\t\tSystem.out.println(RESPONSE);\n\t\t\tdecmsg = decrypt(serversharedkey, msg);\n\t\t\tSystem.out.println(\"Decrypted Message from client is \" + decmsg);\n\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\tif (decmsg.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"Client has signed out!\");\n\t\t\tcloseConnection();\n\n\t\t} else {\n\t\t\tsendMessage();\n\t\t}\n\n\t}", "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 }", "@Override\n\tpublic void envia(String mensagem) {\n\t\tSystem.out.println(\"Mensagem enviada por SMS\");\n\t\tSystem.out.println(mensagem);\n\t}", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "private void responseToServer() throws ReversiException {\n try {\n while (!done) {\n int msg = fromServer.readInt();\n report(\"Msg from server: \" + msg);\n switch (msg) {\n case ENTERROOM:\n othersEnterRoom();\n break;\n case ASSIGN:\n assign();\n break;\n case TURN:\n turn();\n break;\n case DRAWBLACK:\n drawBlack();\n break;\n case DRAWWHITE:\n drawWhite();\n break;\n case READY:\n ready();\n break;\n case INVALIDTRY:\n invalidTry();\n break;\n case INVALID:\n invalidMove();\n break;\n case WIN:\n win();\n break;\n case RESIGN:\n resign();\n break;\n case NEWGAME:\n startGame();\n break;\n case QUIT:\n othersQuit();\n break;\n case DONE:\n doQuit();\n break;\n case RETRIEVE:\n retrieve();\n break;\n case CHAT:\n showMessage();\n break;\n default:\n report(\"uncaught: \" + msg);\n }\n }\n } catch (IOException e){\n\n throw new ReversiException(\"Quit, unsolved exception catch.\");\n\n }\n }", "public FutureResult sendToServer(String onTheWireFormat) throws IOException;", "public void recibirMensajesServidor(){\n String mensaje;\n try {\n entradaDatos = new DataInputStream(socket.getInputStream());\n } catch (IOException ex) {\n mostrarMensaje(\"Error al crear el stream de entrada: \" + ex.getMessage());\n } catch (NullPointerException ex) {\n mostrarMensaje(\"El socket no se creo correctamente. \");\n }\n \n // Bucle infinito que recibe mensajes del servidor\n boolean conectado = true; \n while (conectado) {\n try {\n mensaje = entradaDatos.readUTF();\n mostrarMensaje(mensaje);\n } catch (IOException ex) {\n mostrarMensaje(\"Error al leer del stream de entrada: \" + ex.getMessage());\n conectado = false;\n } catch (NullPointerException ex) {\n mostrarMensaje(\"El socket no se creo correctamente. \");\n conectado = false;\n }\n }\n }", "messages.Serverhello.ServerHello getServerHello();", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "public static void sendOK() {\n try {\n Server destServer = ServerState.getInstance().getServers().get(sourceID);\n MessageTransfer.sendServer(\n ServerMessage.getOk( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent OK to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n System.out.println(\"INFO : Server s\"+sourceID+\" has failed. OK message cannot be sent\");\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 101;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 102;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }", "public static void messagePostingResultParser(FacebookAdapter adapter, \r\n String msg, String to, String response) throws JSONException\r\n {\r\n if (response == null)\r\n throw new NullPointerException(\"The parameter response is null\");\r\n String prefix = \"for (;;);\";\r\n if (response.startsWith(prefix))\r\n response = response.substring(prefix.length());\r\n \r\n // for (;;);{\"error\":0,\"errorSummary\":\"\",\"errorDescription\":\"No\r\n // error.\",\"payload\":[],\"bootload\":[{\"name\":\"js\\/common.js.pkg.php\",\"type\":\"js\",\"src\":\"http:\\/\\/static.ak.fbcdn.net\\/rsrc.php\\/pkg\\/60\\/106715\\/js\\/common.js.pkg.php\"}]}\r\n // for (;;);{\"error\":1356003,\"errorSummary\":\"Send destination not\r\n // online\",\"errorDescription\":\"This person is no longer\r\n // online.\",\"payload\":null,\"bootload\":[{\"name\":\"js\\/common.js.pkg.php\",\"type\":\"js\",\"src\":\"http:\\/\\/static.ak.fbcdn.net\\/rsrc.php\\/pkg\\/60\\/106715\\/js\\/common.js.pkg.php\"}]}\r\n JSONObject respObjs = new JSONObject(response);\r\n if (respObjs == null)\r\n throw new NullPointerException(\r\n \"Failed to parse JSONObject from the parameter response\");\r\n logger.info(\"Facebook: error: \" + respObjs.getInt(\"error\"));\r\n if (respObjs.get(\"error\") != null)\r\n {\r\n /*\r\n * kError_Global_ValidationError = 1346001,\r\n * kError_Login_GenericError = 1348009,\r\n * kError_Chat_NotAvailable = 1356002, \r\n * kError_Chat_SendOtherNotAvailable = 1356003,\r\n * kError_Async_NotLoggedIn = 1357001, \r\n * kError_Async_LoginChanged = 1357003,\r\n * kError_Async_CSRFCheckFailed = 1357004,\r\n * kError_Chat_TooManyMessages = 1356008,\r\n * kError_Platform_CallbackValidationFailure = 1349007,\r\n * kError_Platform_ApplicationResponseInvalid = 1349008;\r\n */\r\n \r\n int errorCode = respObjs.getInt(\"error\");\r\n String errorString =\r\n \"Error(\" + errorCode + \"): \"\r\n + (String) respObjs.get(\"errorSummary\") + \"; \"\r\n + (String) respObjs.get(\"errorDescription\");\r\n \r\n logger.warn(\"Facebook: \"+errorString);\r\n \r\n if (errorCode == FacebookErrorCode.Error_Global_NoError)\r\n {\r\n // \"error\":0, no error\r\n return;\r\n }\r\n else\r\n {\r\n // notify the posting error\r\n adapter.getSession().getTransport().sendMessage(adapter.getSession().getJID(),\r\n adapter.getSession().getTransport().getJID(),\r\n respObjs.get(\"errorSummary\").toString(), Type.error);\r\n return;\r\n // MessageDeliveryFailedEvent mdfe =\r\n // new MessageDeliveryFailedEvent(msg, to, errorCode,\r\n // new Date(), (String) respObjs.get(\"errorSummary\"));\r\n // return mdfe;\r\n \r\n }\r\n }\r\n throw new JSONException(\"The response has no \\'error\\' code field\");\r\n }", "private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }", "public void onlinerequest() {\r\n int size = Server.getUsers().size();\r\n \r\n try {\r\n this.output.flush();\r\n this.output.writeUTF(\"ONLINE\");\r\n this.output.flush();\r\n this.output.writeUTF(Integer.toString(size));\r\n this.output.flush();\r\n// Log.print(\"Sending the data\");\r\n for(int x = 0; x < Server.getUsers().size(); x++){\r\n if(Server.getUsers().get(x).getName().equals(this.name)){\r\n this.output.writeUTF(Server.getUsers().get(x).getName() + \" (You)\");\r\n }\r\n else{\r\n this.output.writeUTF(Server.getUsers().get(x).getName());\r\n this.output.flush();\r\n }\r\n \r\n \r\n }\r\n// Log.print(\"Successfully sent\");\r\n } catch (IOException ex) {\r\n Log.error(ex.getMessage());\r\n }\r\n }", "boolean isServerMessage();", "public void getServerResponse() {\n\t\twhile (true) {\n\t\t\ttheMessage = readObject.readMessage();\n\t\t\tif (theMessage != null) {\n\t\t\t\tSystem.out.println(\"Server response is: \" + theMessage.getChoice());\n\t\t\t\tswitchBoard(theMessage.getChoice(), theMessage);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }", "@Override\n public void onResponse(Call<ResponseContent> call, Response<ResponseContent> response) {//obtener datos\n\n try {\n ResponseContent data = response.body();\n\n boolean answer = ValidateResponse( data );\n\n if( answer ){\n\n if( data.getBody().getString(0).toString().equals(\"msm\") ){//verifico si es un mensaje\n\n Toast.makeText(CONTEXTO.getApplicationContext(),\n mss.msmServices.getString(data.getBody().getString(1).toString()),\n Toast.LENGTH_SHORT).show(); // muestro mensaje enviado desde el servidor\n\n }else{\n\n Log.i( mss.TAG, data.getBody().toString() );\n\n }\n\n }else{\n Log.i( mss.TAG, data.getBody().toString() );\n }\n } catch (JSONException e) {\n e.printStackTrace();\n new ServicesPeticion().SaveError(e,\n new Exception().getStackTrace()[0].getMethodName().toString(),\n this.getClass().getName());//Envio la informacion de la excepcion al server\n }\n\n\n }", "public void processRequest(StunMessageEvent evt)\n {\n if(messageSequence.isEmpty())\n return;\n Object obj = messageSequence.remove(0);\n\n if( !(obj instanceof Response) )\n return;\n\n Response res = (Response)obj;\n\n try\n {\n stunStack.sendResponse(evt.getMessage().getTransactionID(),\n res, serverAddress, evt.getRemoteAddress());\n }\n catch (Exception ex)\n {\n logger.log(Level.WARNING, \"failed to send a response\", ex);\n }\n\n }", "private static Object doMpesa(Request req, Response res){\n System.out.println(\"Here is the confirmation: \" + req.body());\n\n Mpesa received = new Gson().fromJson(req.body(),Mpesa.class);\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"Payment Status: \"+ received.getStatus());\n publisher send_0k = new publisher();\n send_0k.setContent(received.getStatus());\n send_0k.publish();\n return received;\n }", "public void serverSideOk();", "public OtherResponse sendMT(String mobilenumber, String message, String shortcode, int carrierid, int campaignid, Date sendat, String msgfxn, int priority, String fteu, float tariff) throws PrepException, SQLException, JAXBException, SAXException, MalformedURLException, IOException{\n String response;\n\n if(canSendMT(mobilenumber)){\n //System.out.print(\"User with mobile number:\"+mobilenumber+\" exist!\");\n\n String mt_request_xml = createXml(mobilenumber, message, shortcode, carrierid, campaignid, sendat, msgfxn, priority, fteu, tariff);\n response = postMT(mt_request_xml);\n\n com.novartis.xmlbinding.mt_response.Response res = getResponse(response);\n\n\n\n List<String> statusmsg = getStatusmessage(response);\n\n return new OtherResponse(res.getStatus(), statusmsg);\n }\n else{//if user not registerd or opted-in send back message on how to register for GetOnTrack\n String registerMsg = \"Novartis Pharmaceuticals Corp: You have to register for the GetOnTrack BP Tracker to use the service. Didn't mean to? Call 877-577-7726 for more information\";\n String mt_request_xml = createXml(mobilenumber, registerMsg, shortcode, carrierid, campaignid, sendat, msgfxn, priority, fteu, tariff);\n response = postMT(mt_request_xml);\n com.novartis.xmlbinding.mt_response.Response res = getResponse(response);\n //com.novartis.xmlbinding.mt_response.Response res = getResponse(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><response><mts><mt><mobilenumber>\"+mobilenumber+\"</mobilenumber></mt></mts><status>FAIL</status><statusmessage><exceptions><exception>User not opted in for SMS</exception></exceptions></statusmessage></response>\");\n\n\n //System.out.print(\"User with mobile number:\"+mobilenumber+\" does not exist!\");\n List<String> statusmsg = getStatusmessage(response);\n\n return new OtherResponse(res.getStatus(), statusmsg);\n }\n\n }", "static private void readMessage(){\r\n\t\t index = 0;\r\n\t\t code = 0;\r\n\t\t firstParam = \"\";\r\n\t\t secondParam = \"\";\r\n\t\t thirdParam = \"\";\r\n\t\t StringTokenizer st = new StringTokenizer(message, \"_\");\r\n\t\t String c = st.nextToken();\r\n\t\t index = Integer.parseInt(c);\r\n\t\t c = st.nextToken();\r\n\t\t code = Integer.parseInt(c);\r\n\t\t \t\tSystem.out.println(\"ClientMessageReader: il codice del messaggio ricevuto è \"+code);\r\n\t\t \t//\t||(code == Parameters.START_PLAYBACK) \r\n\t\t if((code == Parameters.START_OFF)|| (code == Parameters.FILES_RESPONSE))\r\n\t\t {\r\n\t\t\t firstParam = st.nextToken();\r\n\t\t }\r\n\t\t if(code == Parameters.CONFIRM_REQUEST)\r\n\t\t {\r\n\t\t\t firstParam = st.nextToken();\r\n\t\t\t \t\t\tSystem.out.println(\"CONFIRM_REQUEST firstParam: \"+firstParam);\r\n\t\t }\r\n\t }", "public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String msg = request.getParameter(\"Body\");\n msg = msg.toLowerCase();\n System.out.println(\"-->\" + msg);\n\n String cmd = msg.split(\" \")[0];\n msg = msg.substring(msg.indexOf(' ')+1);\n\n String result = \"\";\n\n if (cmd.equals(\"usage\")) {\n System.out.println(\"usage\");\n result = \"Twilio Movie Assistant Usage Guide:\"\n + \"\\nLIST: Returns a list of movies available\"\n + \"\\nSHOW movie_num: Returns the movie's showtimes\";\n } else if (cmd.equals(\"list\")) {\n System.out.println(\"list\");\n Document doc;\n try {\n doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n Elements titles = doc.select(\".info > h3 > span > a\");\n System.out.println(titles.size());\n for (int i = 1; i <= titles.size(); i++) {\n String title = titles.get(i-1).text().split(\"\\\\(\")[0];\n title = title.substring(0, title.length()-1);\n result += \"\\n\" + i + \"-\" + title;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (cmd.equals(\"show\")){\n System.out.println(\"showtimes\");\n Document doc;\n try {\n doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n Elements titles = doc.select(\".info > h3 > span > a\");\n Elements showtimes = doc.getElementsByClass(\"showtimes\");\n\n System.out.println(showtimes.size() + \" , \" + titles.size());\n for (int i = 0; i < titles.size(); i++) {\n String title = titles.get(i).text().toLowerCase().split(\"\\\\(\")[0];\n title = title.substring(0, title.length()-1);\n if ((\"\"+(i+1)).equals(msg)) {\n result = (titles.get(i).text() + \" : \" + showtimes.get(i).text());\n }\n }\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n // } else if (cmd.equals(\"review\")) {\n // Document doc;\n // HttpURLConnection con;\n // try {\n // doc = Jsoup.connect(\"http://www.imdb.com/showtimes/cinema/CA/ci0961718/CA/H2W1G6\").get();\n // Elements titles = doc.select(\".info > h3 > span > a\");\n // System.out.println(titles.size());\n // String title = \"\";\n // for (int i = 0; i < titles.size(); i++) {\n // title = titles.get(i).text().split(\"\\\\(\")[0];\n // title = title.substring(0, title.length()-1);\n // if ((\"\"+i).equals(msg)) {\n // result = title;\n // break;\n // }\n // }\n // result = result.replace(' ', '+');\n // String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?q=\" + title + \"&page_limit=10&page=1&apikey=69dxhndmtkxf7f8m8bertygz\";\n\n // URL obj = new URL(url);\n // con = (HttpURLConnection) obj.openConnection();\n // con.setRequestMethod(\"GET\");\n // con.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n // BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n // String inputLine;\n // StringBuffer buf = new StringBuffer();\n \n // while ((inputLine = in.readLine()) != null) {\n // buf.append(inputLine);\n // }\n \n // JSONParser parser = new JSONParser(); \n // JSONObject json = (JSONObject) parser.parse(buf.toString());\n // JSONArray jsonArray = ((JSONArray)json.get(\"movies\"));\n // JSONObject movie1 = (JSONObject)jsonArray.get(0);\n // result = (String)movie1.get(\"synopsis\");\n \n // in.close();\n // } catch (IOException e) {\n // e.printStackTrace();\n // } catch (ParseException e) {\n \n // }\n } else {\n result = \"Cannot complete command: \" + msg;\n }\n\n System.out.println(result);\n\n Message message = new Message(result);\n TwiMLResponse twiml = new TwiMLResponse();\n try {\n twiml.append(message);\n } catch (TwiMLException e) {\n e.printStackTrace();\n }\n\n response.setContentType(\"application/xml\");\n response.getWriter().print(twiml.toXML());\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty=response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test5\", \"5555555555--->\"+response.toString());\r\n\t\t\t\t\t\t\tif(\"no\".equals(empty)){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes1111111111111\");\r\n\t\t\t\t\t\t\t}else if(\"ok\".equals(empty)){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\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 messageSent();", "void inProcessing(String statusMsg);", "@Override\r\n\tpublic void newLineRecieved() {\n\t\tString response = grblPort.readNextLine();\r\n\t\tresponse.trim();\r\n\t\tSystem.out.println(\"Recieve: \" + response);\r\n\t\t//System.out.println(\"HAHAHAH\");\r\n\t\tif (response.contains(\"ok\") && grblPort.ok == false){\t\t\t\r\n\t\t\tgrblPort.ok = true;\t\t\r\n\t\t\tSystem.out.println(\"Got ACK\");\r\n\t\t\tif (!sendLines.isEmpty()){//If there is more stuff in the buffer, keep on sending it.\r\n\t\t\t\tsendLines.remove(0);\r\n\t\t\t\tgrblPort.sendDataLine(sendLines.get(0)); \t\t\r\n\t \t}\r\n\t\t}\r\n\t\tif (response.contains(\"error\")){\r\n\t\t\tSystem.out.println(\"ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR\");\r\n\t\t\tgrblPort.sendDataLine(sendLines.get(0)); \r\n\t\t}\r\n\t\tif (response.contains(\"<\")&&response.contains(\">\")){\r\n\t\t\tif (!sendLines.isEmpty()){//If there is more stuff in the buffer, keep on sending it.\r\n\t\t\t//\tgrblPort.sendDataLine(sendLines.remove(0)); \t\t\r\n\t \t}\r\n\t\t\tresponse = response.replaceAll(\"<\", \"\");\r\n\t\t\tresponse = response.replaceAll(\">\", \"\");\r\n\t\t\tString data[] = response.split(\",\");\r\n\t\t\tfor (String string : data) {\r\n\t\t\t\tstring = string.toUpperCase();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"************************************* \"+data[0]);\r\n\t\t\tswitch (data[0].toUpperCase()) {\r\n\t\t\tcase \"IDLE\":\r\n\t\t\t\tmachineState = MachineState.IDLE;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"RUN\":\r\n\t\t\t\tmachineState = MachineState.RUNNING;\r\n\t\t\t\treturn;\r\n\t\t\t\t//break;\r\n\t\t\tcase \"QUEUE\":\r\n\t\t\t\tmachineState = MachineState.QUEUE;\r\n\t\t\t\treturn;\r\n\t\t\tdefault:\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) throws UnknownHostException, IOException\n\t{\n\t\t Socket clientSocket = new Socket(\"localhost\", 6789);\n\t\t clientSocket.setSoTimeout(5000);\n\n\t\t DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());\n\t\t BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n\t\t outToServer.writeBytes(\"queryState\" + '\\n'); // warningClear , stopRequest, startRequest, queryState\n\t\t String clientMess = inFromServer.readLine();\n\t\t System.out.println(\"FROM SERVER: \" + clientMess);\n\t\t clientSocket.close();\n\t\t String mess = null;\n\t\t if(clientMess.equals(\"ON\"))\n\t\t {\n\t\t\t mess = \"stopRequest\";\n\t\t }\n\t\t else if(clientMess.equals(\"OFF\"))\n\t\t\t mess = \"startRequest\";\n\t\t Socket clientSocket2 = new Socket(\"localhost\", 6789);\n\t\t DataOutputStream outToServer2 = new DataOutputStream(clientSocket2.getOutputStream());\n\t\t BufferedReader inFromServer2 = new BufferedReader(new InputStreamReader(clientSocket2.getInputStream()));\n\t\t outToServer2.writeBytes(mess + '\\n'); // warningClear , stopRequest, startRequest, queryState\n\t\t System.out.println(\"FROM SERVER: \" +inFromServer2.readLine() );\n\t\t clientSocket2.close();\n\t\t \n\t}", "private boolean messageFilter(NettyMessage message)\n {\n try\n {\n\n String[] splits = message.getFormatStrings();;\n if ((message.getHeader().equals(\"FA\")||message.getHeader().equals(\"GB\"))&&splits.length==4)\n {\n isReconnect = false;\n close(false);\n currentMsg = message;\n Log.e(\"\",\n \"切换服务器\" + splits[splits.length - 2] + \"\" + Integer\n .valueOf(splits[splits.length - 1]));\n Thread.sleep(500);\n connect(splits[splits.length - 2],\n Integer.valueOf(splits[splits.length - 1]));\n return false;\n }\n else if (AppServerType.EX.toString()\n .equals(message.getHeader()) && \"100\".equals(splits[0]))\n {\n user = null;\n setCallingUser(null);\n isConnected = false;\n isReconnect = false;\n close(false);\n }\n else if (AppServerType.EX.toString()\n .equals(message.getHeader()) && \"0\".equals(splits[0]))\n {\n sleepTime = 10 * 1000;\n isLooping = false;\n reconnect();\n }\n else if (AppServerType.AB.toString()\n .equals(message.getHeader()))\n {\n NettyServer server = getServer(message.getCtxUTF8String());\n Log.e(\"Dudu_SDK\", \" NS:\" + (server == null));\n if (server != null)\n {\n connect(server.getIp(), server.getPort());\n }\n return false;\n }\n else if (AppServerType.RS.toString()\n .equals(message.getHeader()))\n {\n Responbean bean = (Responbean) parser.parseObject(splits[0],\n Responbean.class);\n if (\"FS\".equals(bean.getHeader()))\n {\n if (!splits[1].equals(callingUser.getUserid()))\n {\n return false;\n }\n }\n }\n commadFilter(message);\n // 处理特殊消息\n ServerFacoty.getInstance()\n .getUserserver()\n .CommadFilter(mChannel, message, parser);\n }\n catch (Exception e)\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return true;\n }", "@Override\r\n\tprotected byte[] handleSpecificRequest(String request) {\r\n\t\tif (!Utils.isEmpty(request)) {\r\n\t\t\tlogger.info(\"$$$$$$$$$$$$Message received at Tracking Server:\" + request);\r\n\t\t\tif (request.startsWith(NODE_REQUEST_TO_SERVER.FILE_LIST.name())) {\r\n\t\t\t\thandleFileUpdateMessage(request);\r\n\t\t\t\treturn Utils.stringToByte(SharedConstants.COMMAND_SUCCESS);\r\n\t\t\t} else if (request.startsWith(NODE_REQUEST_TO_SERVER.FIND.name())) {\r\n\t\t\t\tString peers = handleFindFileRequest(request);\r\n\t\t\t\treturn Utils.stringToByte((Utils.isEmpty(peers) ? SharedConstants.COMMAND_FAILED\r\n\t\t\t\t\t\t: SharedConstants.COMMAND_SUCCESS) + SharedConstants.COMMAND_PARAM_SEPARATOR + peers);\r\n\r\n\t\t\t} else if (request.startsWith(NODE_REQUEST_TO_SERVER.FAILED_PEERS.name())) {\r\n\t\t\t\thandleFailedPeerRequest(request);\r\n\t\t\t\treturn Utils.stringToByte(SharedConstants.COMMAND_SUCCESS);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Utils.stringToByte(SharedConstants.INVALID_COMMAND);\r\n\r\n\t}", "public void fromMicroServer() throws Exception {\n \tbyte[] buf = new byte[1024];\n\t\tDatagramPacket dp = new DatagramPacket(buf, 1024);\n\t\ttry{\n\t\t\ttoMicroServer.receive(dp);\n\t\t\trecieve = true;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Connection timed out, retrying...\");\n\t\t\trecieve = false;\n\t\t\treturn;\n\t\t}\n str = new String(dp.getData(), 0, dp.getLength());\n\t\tSystem.out.printf(\"Child about to send message: %s \\n\", str);\n\n }", "@Order(2)\n\t\t@Test\n\t\tpublic void getMessageWithNoParam() throws IOException, ParseException {\n\t\t\tboolean response = Requests.sendGETBoolReturn(Requests.MESSAGE_URL, \"\");\n\t\t\t\n\t\t\t//the GET is expected to return all messages :: expected response is true (200 response code)\n\t\t\tassertTrue(response);\n\t\t}", "public static void messageRequestResultParser(FacebookAdapter adapter,\r\n String response) throws JSONException\r\n {\r\n if (response == null)\r\n return;\r\n String prefix = \"for (;;);\";\r\n if (response.startsWith(prefix))\r\n response = response.substring(prefix.length());\r\n \r\n JSONObject respObjs = new JSONObject(response);\r\n logger.info(\"t: \" + (String) respObjs.get(\"t\"));\r\n if (respObjs.get(\"t\") != null)\r\n {\r\n if (((String) respObjs.get(\"t\")).equals(\"msg\"))\r\n {\r\n JSONArray ms = (JSONArray) respObjs.get(\"ms\");\r\n logger.info(\"Facebook: NO of msges: \" + ms.length());\r\n // Iterator<JSONObject> it = ms..iterator();\r\n int index = 0;\r\n while (index < ms.length())\r\n {\r\n JSONObject msg = ms.getJSONObject(index);\r\n index++;\r\n if (msg.get(\"type\").equals(\"typ\"))\r\n {\r\n // got a typing notification\r\n // for\r\n // (;;);{\"t\":\"msg\",\"c\":\"p_1386786477\",\"ms\":[{\"type\":\"typ\",\"st\":0,\"from\":1190346972,\"to\":1386786477}]}\r\n int facebookTypingState = msg.getInt(\"st\");\r\n Long from = msg.getLong(\"from\");\r\n if (!from.toString().equals(adapter.getUID()))\r\n adapter.promoteTypingNotification(from.toString(),\r\n facebookTypingState);\r\n }\r\n else if (msg.get(\"type\").equals(\"msg\"))\r\n {\r\n // the message itself\r\n JSONObject realmsg = (JSONObject) msg.get(\"msg\");\r\n /*\r\n * {\"text\":\"FINE\", \"time\":1214614165139,\r\n * \"clientTime\":1214614163774, \"msgID\":\"1809311570\"},\r\n * \"from\":1190346972, \"to\":1386786477,\r\n * \"from_name\":\"David Willer\", \"to_name\":\"\\u5341\\u4e00\",\r\n * \"from_first_name\":\"David\", \"to_first_name\":\"\\u4e00\"}\r\n */\r\n FacebookMessage fm = new FacebookMessage();\r\n fm.text = (String) realmsg.get(\"text\");\r\n fm.time = (Number) realmsg.get(\"time\");\r\n fm.clientTime = (Number) realmsg.get(\"clientTime\");\r\n fm.msgID = (String) realmsg.get(\"msgID\");\r\n \r\n // the attributes of the message\r\n fm.from = (Number) msg.get(\"from\");\r\n fm.to = (Number) msg.get(\"to\");\r\n fm.fromName = (String) msg.get(\"from_name\");\r\n fm.toName = (String) msg.get(\"to_name\");\r\n fm.fromFirstName = (String) msg.get(\"from_first_name\");\r\n fm.toFirstName = (String) msg.get(\"to_first_name\");\r\n \r\n if (adapter.isMessageHandledBefore(fm.msgID))\r\n {\r\n logger.trace(\"Omitting a already handled message: msgIDCollection.contains(msgID)\");\r\n continue;\r\n }\r\n adapter.addMessageToCollection(fm.msgID);\r\n \r\n printMessage(fm);\r\n \r\n if (!fm.from.toString().equals(adapter.getUID()))\r\n adapter.promoteMessage(fm);\r\n }\r\n }\r\n }\r\n //refresh means that the session or post_form_id is invalid\r\n else if (((String) respObjs.get(\"t\")).equals(\"refresh\"))\r\n {\r\n logger.trace(\"Facebook: Refresh\");// do nothing\r\n if (((String) respObjs.get(\"seq\")) != null)\r\n {\r\n logger.trace(\"Facebook: refresh seq: \"\r\n + (String) respObjs.get(\"seq\"));\r\n }\r\n }\r\n //continue means that the server wants us to remake the connection\r\n else if (((String) respObjs.get(\"t\")).equals(\"continue\"))\r\n {\r\n logger.trace(\"Facebook: Time out? reconnect...\");// do nothing\r\n }\r\n else\r\n {\r\n logger.warn(\"Facebook: Unrecognized response type: \"\r\n + (String) respObjs.get(\"t\"));\r\n }\r\n }\r\n }", "public String checkMessage() {\n\t\tString userLatestStep = questionBot.get(owner.id());\n\n\t\t//se a amensagem comeca com '/', trata-se de um item de menu sendo acionado\n\t\tif(answerUser != null && answerUser.startsWith(\"/\"))\n\t\t\tuserLatestStep = answerUser;\n\n\t\t//busca no mapa de respostas as opcoes para o usuario\n\t\tObject options = response.get(userLatestStep);\n\n\t\t//obtem a mensagem a ser devolvida para o usuario\n\t\tString result = parseResult(options, answerUser);\n\n\t\t//mantem a ultima resposta do usuario\n\t\tuserLatestAnswer.put(owner.id(), answerUser);\n\n\t\treturn result;\n\t}", "public void handle(HttpExchange h) throws IOException {\n String message = \"The server is running without any problem\"; //Message to be shown to client\n h.sendResponseHeaders(200, message.length());//response code and the length of message to be sent\n \n /*writes in the output stream, converts the message into array of bytes and closes the stream.*/\n OutputStream out = h.getResponseBody();\n out.write(message.getBytes());\n out.close();\n }", "void processMessage(JSONObject msg, InetAddress addr, int port);", "@Override\n\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n try {\n Object obj = new JSONParser().parse(response.toString());\n JSONObject jo = (JSONObject)obj;\n String reply = (String) jo.get(\"reply\");\n TextView tv = (TextView) findViewById(R.id.unsendmsg);\n tv.setText(reply);\n if(!reply.equals(\"0\")){\n// startService(new Intent(showservice.this,sms_send.class));\n }\n }catch (Exception e){\n System.out.println(e.toString());\n }\n }", "public String response() {\n\t\treturn message;\n\t}", "public static void main(String[] args) throws IOException, JSONException, InterruptedException\n\t{\n\t\tString xKey = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\tString segmentId = \"0123\";\t//Id du segment a modifier ('null' si le segment est a creer)\n\t\tString unicity = \"test@test.com\"; //L'adresse mail de la cible a mettre dans le segment ('null' pour ne rien ajouter au segment)\n\t\t\n\t\tString type = \"static\";\t//Code pour creer un segment Statique\n\t\tString name = \"SegmentStatic (java)\";\t//Nom du segment\n\t\tString description = \"SegmentStatic (java)\";\t//Description du segment\n\t\tString expiration = \"2016-01-08T12:11:00Z\";\t//Date d'expiration du segment\n\t\tBoolean isTest = true;\t//Segment de test : oui = 'true' / non = 'false'\n\n\n\t\t//On trouve l'addresse pour la requete\n\t\tString url = \"http://v8.mailperformance.com/segments/\";\n\t\tif (segmentId != null)\n\t\t{\n\t\t\turl = \"http://v8.mailperformance.com/segments/\" + segmentId;\n\t\t}\n\t\t\n\t\t//Creation du Json du message\n\t\tJSONObject jsonData = new JSONObject();\n\t\tjsonData.put(\"type\", type);\n\t\tjsonData.put(\"name\", name);\n\t\tjsonData.put(\"description\", description);\n\t\tjsonData.put(\"expiration\", expiration);\n\t\tjsonData.put(\"isTest\", isTest);\n\t\t\n\t\t//On affiche le message\n\t\tSystem.out.print(jsonData + \"\\n\");\n\t\t\n\t\t//Lancement de la connexion\n\t\tHttpURLConnection con = null;\n\t\tif (segmentId != null)\n\t\t{\n\t\t\tcon = connection(url, xKey, jsonData, \"PUT\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcon = connection(url, xKey, jsonData, \"POST\");\n\t\t}\n\t\t\n\t\t//Verification des reponses\n\t\tint responseCode = con.getResponseCode();\n\t\tif (responseCode != 200)\n\t\t{\n\t\t\t//Affichage de l'erreur\n\t\t\tSystem.out.print(\"Error : \" + responseCode + \" \" + con.getResponseMessage());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Le segment a bien ete cree\n\t\t\tSystem.out.print(\"The segment static : \" + name + \" is created / update.\\n\\n\");\n\t\t\t\n\t\t\tif (unicity != null && segmentId != null)\n\t\t\t{\n\t\t\t\t//Nouvelle url\n\t\t\t\turl = \"http://v8.mailperformance.com/targets?unicity=\" + unicity;\n\t\t\t\t\n\t\t\t\t//Connexion\n\t\t\t\tcon = openConn(url, xKey);\n\t\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\t\t\n\t\t\t\t//Verification des reponses\n\t\t\t\tresponseCode = con.getResponseCode();\n\t\t\t\tif (responseCode != 200)\n\t\t\t\t{\n\t\t\t\t\t//Affichage de l'erreur\n\t\t\t\t\tSystem.out.print(\"Error : \" + responseCode + \" \" + con.getResponseMessage());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Lecture des donnees ligne par lignes\n\t\t\t\t\tBufferedReader buffRead = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\t\t\tString reply = buffRead.readLine();\n\t\t\t\t\tcon.disconnect();\n\t\t\t\t\tbuffRead.close();\n\t\t\t\t\n\t\t\t\t\t//On recupere l'id de l'action\n\t\t\t\t\tJSONObject jObject = new JSONObject(reply);\n\t\t\t\t\tString idTarget = jObject.getString(\"id\");\n\t\t\t\t\t\n\n\t\t\t\t\t//Nouvelle url\n\t\t\t\t\turl = \"http://v8.mailperformance.com/targets/\" + idTarget + \"/segments/\" + segmentId;\n\t\t\t\t\t\n\t\t\t\t\t//Connexion\n\t\t\t\t\tcon = openConn(url, xKey);\n\t\t\t\t\tcon.setRequestMethod(\"POST\");\n\t\t\t\t\tcon.setRequestProperty(\"Content-Length\", \"0\");\n\t\t\t\t\tcon.setDoOutput(true);\n\t\t\t \n\t\t\t\t\t//Envoie des informations dans la connection\n\t\t\t\t\tOutputStreamWriter sendMessage = new OutputStreamWriter(con.getOutputStream());\n\t\t\t\t\tsendMessage.flush();\n\t\t\t\t\tsendMessage.close();\n\t\t\t\t\t\n\t\t\t\t\t//Verification des reponses\n\t\t\t\t\tresponseCode = con.getResponseCode();\n\t\t\t\t\tif (responseCode != 204)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Affichage de l'erreur\n\t\t\t\t\t\tSystem.out.print(\"Error : \" + responseCode + \" \" + con.getResponseMessage());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"The target : \" + unicity + \" is add to the segment : \" + name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcon.disconnect();\n\t}", "boolean hasResponseMessage();", "@Test\n public void testServer() throws Exception{\n ServerMain s=new ServerMain(1,3,2,\"test\",InetAddress.getLocalHost(),null);\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.PM);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"testInvalid\",s).getServerVisitor());\n }", "@Override\r\n\t\t\t\t// here the messageReceived method is implemented\r\n\t\t\t\tpublic void messageReceived(String message) {\n\t\t\t\t\tpublishProgress(message);\r\n\t\t\t\t\t// serverMessage[0] = message;\r\n\r\n\t\t\t\t\tserverMessage[count] = message;\r\n\r\n\t\t\t\t\t// count++;\r\n\t\t\t\t\tLog.i(\"TAG\", count + \"辞獄拭辞 閤精 葵: \" + serverMessage[count]);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Log.i(\"TAG\", \"0腰属閤精 葵: \" + serverMessage[0]);\r\n\t\t\t\t\t * Log.i(\"TAG\", \"1腰属 閤精 葵: \" + serverMessage[1]);\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}", "void faild_response();", "public static void sendResponse(String message, MessageReceivedEvent event)\n {\n List<String> bits = splitMessage(message);\n if(bits.size() > maxMessages)\n {\n if(event.isPrivate() || PermissionUtil.checkPermission(event.getTextChannel(), event.getJDA().getSelfInfo(), Permission.MESSAGE_ATTACH_FILES))\n {\n event.getChannel().sendTyping();\n String header = bits.get(0);\n header = header.split(\"\\n\",2)[0];\n if(header.length()>100)\n {\n header = header.substring(0,100);\n int index = header.lastIndexOf(\" \");\n if(index!=-1)\n header = header.substring(0,index);\n }\n File f = OtherUtil.writeArchive(message, \"Result\");\n event.getChannel().sendFileAsync(f, new MessageBuilder().appendString(header).build(), m -> {\n CallDepend.getInstance().add(event.getMessage().getId(), m);\n });\n return;\n }\n bits = bits.subList(0, maxMessages);\n String lastBit = bits.get(maxMessages-1);\n if(lastBit.length()>(2000-30))\n lastBit = lastBit.substring(0,1970);\n lastBit+=\"(...message too long!)\";\n bits.set(maxMessages-1, lastBit);\n }\n bits.stream().forEach((bit) -> {\n event.getChannel().sendMessageAsync(bit, m -> {\n if(!event.isPrivate())\n CallDepend.getInstance().add(event.getMessage().getId(), m);\n });\n });\n }", "void responseSent( C conn ) ;", "private void getMessages(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int tick = Integer.parseInt(request.getParameter(\"tick\"));\n\n if (tick != SimApi.getCurrTick()) {\n String allPaths = \"\";\n\n for (Message me : SimApi.getMessages()) {\n allPaths += me.getRoute() + \",\" + (me.getRouteList().size() - 1) + \",\" + me.getType().toString() + \",,\";\n }\n\n if (!allPaths.equals(\"\")) {\n allPaths = allPaths.substring(0, allPaths.length() - 2);\n }\n\n response.getWriter().write(SimApi.getCurrTick() + \"!\" + allPaths);\n } else {\n response.sendError(0);\n }\n }", "ChatWithServer.Req getChatWithServerReq();", "@Override\n public void onResponse(String response) {\n System.out.print(\"respuesta Server\"+response);\n responseRequest(sync_id);\n /*if (sync_id != 0) {\n responseRequest(sync_id);\n } else {\n background_response = \"ID Sync null\";\n restartRequest(background_response);\n }*/\n }", "private void handleMessageFromServer(String theMessage) {\n //Some contants that will come from the server in the message itself:\n final String DIRECTION_JSON_KEY = \"DIRECTION\";\n final String FINAL_PRICE_JSON_KEY = \"FINAL_PRICE\";\n final String THE_FOLLOW_JSON_KEY = \"THEFOLLOW\";\n //and those are the possible values for the 'direction' key\n final String UP_VALUE = \"UP\";\n final String DOWN_VALUE = \"DOWN\";\n\n if(!isJson(theMessage)){\n handleSimpleMessageFromServer(theMessage);\n }\n\n\n //Let's start by parsing the message\n try {\n JSONObject theMessageInJson = new JSONObject(theMessage);\n String direction = theMessageInJson.getString(DIRECTION_JSON_KEY);\n double finalPrice = theMessageInJson.getDouble(FINAL_PRICE_JSON_KEY);\n String theFollowString = theMessageInJson.getString(THE_FOLLOW_JSON_KEY);\n Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new gsonUTCdateAdapter()).create();\n Follow theFollow = gson.fromJson(theFollowString, Follow.class);\n double [] followParams=theFollow.getFollowParams();\n double lowValue=followParams[0];\n double highValue=followParams[1];\n\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent launchSecurityShow=new Intent(this, SecurityPresent.class);\n launchSecurityShow.putExtra(SecurityPresent.THE_SECURITY,theFollow.getTheSecurity());\n launchSecurityShow.putExtra(SecurityPresent.MODE,SecurityPresent.NOTIFIED);\n //launchSecurityShow.putExtra(SecurityPresent.THE_FOLLOW_AND_STATUS,theFollow);\n PendingIntent contentIntent =\n PendingIntent.getActivity(this, 0, launchSecurityShow, PendingIntent.FLAG_ONE_SHOT);\n FollowAndStatus theFollowWhichWasReceived=new FollowAndStatus();\n theFollowWhichWasReceived.setFollow(theFollow);\n ContentValues valuesToUpdate=new ContentValues();\n valuesToUpdate.put(FollowEntry.COLUMN_FINAL_PRICE,finalPrice);\n Timestamp now=new Timestamp(System.currentTimeMillis());\n valuesToUpdate.put(FollowEntry.COLUMN_DATE_EXPIRY,now.toString());\n valuesToUpdate.put(FollowEntry.COLUMN_STATUS,FollowAndStatus.STATUS_NOTIFIED);\n //TODO: take the following off the main thread\n UtilityForDatabase.updateFollowInDatabase(this,theFollowWhichWasReceived,valuesToUpdate);\n\n int drawableArrow= direction.equals(UP_VALUE)?R.drawable.uparrow:R.drawable.downarrow;\n int iconArrow=direction.equals(UP_VALUE)?R.drawable.ic_stat_uparrow:R.drawable.ic_stat_downarrow;\n int notificationColor=direction.equals(UP_VALUE)?Color.GREEN:Color.RED;\n\n\n String title=theFollow.getTheSecurity().getName()+\" IS \"+direction+\"!\";\n String content=title+\" at \"+finalPrice+\". You wanted me to notify you at (\"+lowValue+','+highValue+\")\";\n\n // Notifications using both a large and a small icon (which yours should!) need the large\n // icon as a bitmap. So we need to create that here from the resource ID, and pass the\n // object along in our notification builder. Generally, you want to use the app icon as the\n // small icon, so that users understand what app is triggering this notification.\n Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), drawableArrow);\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(iconArrow)\n .setLargeIcon(largeIcon)\n .setContentTitle(title)\n .setStyle(new NotificationCompat.BigTextStyle().bigText(content))\n .setContentText(content)\n .setLights(notificationColor, 1000, 1000)\n .setPriority(NotificationCompat.PRIORITY_HIGH);\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(FOLLOW_NOTIFICATION_ID, mBuilder.build());\n } catch(JSONException e){}\n }", "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}", "private void handlemsg(String[] tokens) throws IOException {\n String sendto = tokens[1];\n String body = tokens[2];\n boolean istopic = (sendto.charAt(0) == '#'); //if hash then mssg is being sent to group\n List<ServerHelper> helperList = server.getList();\n for (ServerHelper helper : helperList) {\n if (istopic) { //if group mssg\n if (helper.isMember(sendto)) {\n helper.notify(\"msg \"+login + \" in \" + sendto + \":\" + body + \"\\n\");\n\n }\n } else { //if individual msg\n if (sendto.equalsIgnoreCase(helper.login)) {\n helper.notify(\"msg \"+login + \" : \" + body + \"\\n\");\n }\n }\n }\n }", "public String enviarAServidor() {\n return \"\";\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty = response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test4\", \"444444444--->\"+empty);\r\n\t\t\t\t\t\t\tif(empty.equals(\"no\")){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");//已完成 和未完成都为空\r\n\t\t\t\t\t\t\t}else if(empty.equals(\"ok\")){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n loadSentMessages();\n }", "private void operateLine() throws IOException{\n String message=\"你好 服务端\";\n OutputStream write = socket.getOutputStream();\n write.write(message.getBytes(\"UTF-8\"));\n write.flush();\n LOG.info(\"to-server:\" + message);\n BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String temp;\n int index;\n while ((temp=br.readLine()) != null) {\n if ((index = temp.indexOf(\"EOF\")) != -1) {//遇到eof时就结束接收\n sb.append(temp.substring(0, index));\n break;\n }\n sb.append(temp);\n }\n LOG.info(\"get-server:\" + sb);\n write.close();\n br.close();\n socket.close();\n\n\n }", "private void parseCompleteReqMessage() {\r\n byte result = _partialMessage.get(0);\r\n byte opCode = _partialMessage.get(1);\r\n byte numberOfParams = _partialMessage.get(2);\r\n\r\n /* cursor of bytes within 'message'. Parameters start at position 2 */\r\n int messageIndex = 3;\r\n int availableChars = (int) _partialMessage.size();\r\n\r\n List<String> paramList = new ArrayList<>();\r\n String param;\r\n\r\n for (byte i = 0; (i < numberOfParams) && (messageIndex < availableChars); i++) {\r\n param = \"\";\r\n\r\n /* collect data up to terminator */\r\n while ((messageIndex < availableChars) &&\r\n (_partialMessage.get(messageIndex) != '\\0')) {\r\n param += (char)((byte)(_partialMessage.get(messageIndex)));\r\n ++ messageIndex;\r\n }\r\n\r\n /* skip after terminator */\r\n if (messageIndex < availableChars) {\r\n ++ messageIndex;\r\n }\r\n\r\n paramList.add( param);\r\n }\r\n\r\n _replyDispatcher.onReplyReceivedForRequest(opCode, result, paramList);\r\n }", "@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\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 void parseMessage(JSONObject message, Session session, WebSocketEndpoint wsep) {\n\t\tConnection conn = null;\n\t\tStatement st = null;\n\t\tResultSet rs = null;\n\t response = new JSONObject();\n//\t transNotif = new JSONObject();\n\t try {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/Sanity?user=root&password=root&useSSL=false\");\n\t\t\tst = conn.createStatement();\n\t\t\tJSONObject r = new JSONObject();\n\t\t\tif (!message.get(\"message\").equals(\"signup\") && !message.get(\"message\").equals(\"login\") && !message.get(\"message\").equals(\"changePassword\")) {\n\t\t\t\tr = notifyPeriod(message, session, conn);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tr = null;\n\t\t\t}\n\t\t\tif (r!=null) {\n\t\t\t\twsep.sendToSession(session, toBinary(r));\n\t\t\t}\n\t\t\tresponse = new JSONObject();\n//\t\t\tSystem.out.println(message.toString());\n\t if (message.get(\"message\").equals(\"signup\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(signUp(message, conn)));\n\t\t\t}\n\t else if (message.get(\"message\").equals(\"getHistory\")) {\n\t \twsep.sendToSession(session, toBinary(getHistory(message, session, conn)));\n\t }\n\t else if (message.get(\"message\").equals(\"editBigBudgetAttributes\")) {\n\t \twsep.sendToSession(session, toBinary(editBigBudgetAttributes(message, session, conn)));\n\t }\n\t else if (message.get(\"message\").equals(\"refreshdata\")) {\n\t \twsep.sendToSession(session, toBinary(refreshData(message, session, conn)));\n\t }\n\t else if (message.get(\"message\").equals(\"refreshdatacategory\")) {\n\t \twsep.sendToSession(session, toBinary(refreshDataCategory(message, session, conn)));\n\t }\n\t else if (message.get(\"message\").equals(\"refreshdatatransaction\")) {\n\t \twsep.sendToSession(session, toBinary(refreshDataTransaction(message, session, conn)));\n\t }\n\t else if (message.get(\"message\").equals(\"refreshdatahistory\")) {\n\t \twsep.sendToSession(session, toBinary(refreshDataHistory(message, session, conn)));\n\t }\n\t\t\telse if (message.get(\"message\").equals(\"login\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(signIn(message, session, conn)));\n//\t\t\t\tif (r!=null) {\n//\t\t\t\t\twsep.sendToSession(session, toBinary(r));\n//\t\t\t\t}\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"createBigBudget\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(createBigBudget(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"createBudget\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(createBudget(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"editBigBudget\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(editBigBudget(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"editCategory\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(editBudget(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"deleteBigBudget\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(deleteBigBudget(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"deleteCategory\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(deleteBudget(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"editUser\")) {\n//\t\t\t\twsep.sendToSession(session, toBinary(refreshData(message, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"changePassword\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(editProfile(message, session, conn)));\n//\t\t\t\twsep.sendToSession(session, toBinary(editProfile(message, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"addTransaction\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(addTransaction(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"editTransactionDescription\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(renameTransaction(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"deleteTransaction\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(deleteTransaction(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"deleteAllTransactions\")) {\n\t\t\t\twsep.sendToSession(session, toBinary(deleteAllTransactions(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"getAnalytics\")) {\n\t\t\t\t\n\t\t\t}\n\t \n\t //clear database in each test function before running it\n\t \n\t\t\telse if (message.get(\"message\").equals(\"logintest\")) {\n\t\t\t\t\n\t\t\t\twsep.sendToSession(session, toBinary(signInTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"signuptest\")) { //return signupsuccesstest, signupfailtest\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(signUpTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"changePasswordTest\")) { //return passwordSuccessTest, passwordFailTest\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(changePasswordTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"addToBudgetTest\")) { //return addToBudgetSuccessTest/fail\n\t\t\t\t//creates budget, category and adds transaction\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(addToBudgetTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"subtractFromBudgetTest\")) { //return subtractFromBudgetSuccessTest, success when category/budget amount has decreased\n\t\t\t\t//same as addToBudgetTest, sends -100 in amountToAdd\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(subtractFromBudgetTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"transactionHistoryTest\")) { //return transactionHistorySuccessTest if pull from transaction table is not 0\n\t\t\t\t//create budget, create category, add transaction, check that it is not empty\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(transactionHistoryTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"locationTest\")) { //return locationSuccessTest if pull from transaction table is not 0\n\t\t\t\t//create budget, create category, add transaction with location markerLatitude, markerLongitude\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(locationTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"limitNotificationTest\")) { //return limitNotificationSuccessTest if pull from transaction table is not 0\n\t\t\t\t//create budget, category, and transaction (if under 20% left, send successs notification message)\n\t\t\t\t//\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(limitNotificationTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"createBigBudgetTest\")) { //return createBigBudgetSuccessTest, passwordFailTest\n\t\t\t\t//return success if budget amount is negative, is over 1000000 and not created in database\n\t\t\t\t//success if exception caught\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(createBigBudgetTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"createBudgetTest\")) { //return createBudgetSuccessTest, passwordFailTest\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(createBudgetTest(message, session, conn)));\n\t\t\t}\n\t\t\telse if (message.get(\"message\").equals(\"deleteBigBudgetTest\")) { //return deleteBigBudgetSuccessTest, passwordFailTest\n//\t\t\t\tdeleteAll(conn);\n\t\t\t\tcreateUser(conn, session);\n\t\t\t\twsep.sendToSession(session, toBinary(deleteBigBudgetTest(message, session, conn)));\n\t\t\t}\n\t \n\t \n\t \n\t \n\t \n\t //budget: bigBudgetName, bigBudgetAmount, userID, totalAmountSpent, totalAmountAdded, resetFrequency, resetStartDate\n\t //category: budgetName, budgetAmount, bigBudgetID\n\t //transaction: amountToAdd, budgetID, markerLatitude, markerLongitude\n\t\t} catch (ClassNotFoundException | SQLException | JSONException e) {\n\t\t\t//JSONObject response = new JSONObject();\n\t\t\ttry {\n\t\t\t\tresponse.put(\"SQLFail\", \"SQL connection could not be made.\");\n\t\t\t} catch (JSONException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t\twsep.sendToSession(session, toBinary(response));\n\t\t} finally {\n\t \ttry {\n\t \t\tif (rs != null) {\n\t \t\t\trs.close();\n\t \t\t}\n\t \t\tif (st != null) {\n\t \t\t\tst.close();\n\t \t\t}\n\t \t\tif (conn != null) {\n\t \t\t\tconn.close();\n\t \t\t}\n\t \t} catch (SQLException sqle) {\n\t \t\tSystem.out.println(sqle.getMessage());\n\t \t}\n\t\t}\n\t}", "public void talk() {\n\t try{\t\n\t \twhile(exit) {\n\t\t \t\t//Definizione stream per la comunicazione\n\t\t \t\ttastiera = new BufferedReader(new InputStreamReader(System.in));\n\t\t \t\tout = new DataOutputStream(connection.getOutputStream());\n\t\t\t\t in = new DataInputStream(connection.getInputStream());\n\t\t\t\t \n\t\t \t\t//Invio messaggio\n\t\t\t\t System.out.println(\"Inserisci il messaggio da mandare al server: \\n\");\n\t\t\t\t mess = tastiera.readLine();\n\t\t\t\t\tout.writeUTF(mess + \"\\n\");\n\t\t\t\t\t\n\t\t\t\t\t//Ricezione risposta server\n\t\t\t\t\tservermess = in.readUTF();\n\t\t\t System.out.println(\"Risposta dal server: \"+servermess);\n\t\t\t if(mess.equals(\"FINE\")) {\n\t\t\t \texit = false;\n\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t }\n\t \tfinally {\n\t\t\t try {\n\t\t\t\t if (connection!=null)\n\t\t\t\t {\n\t\t\t\t connection.close();\n\t\t\t\t System.out.println(\"Connessione chiusa!\");\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t catch(IOException e){\n\t\t\t System.err.println(\"Errore nella chiusura della connessione!\");\n\t\t\t }\n\t \t}\t\n \t}", "private void deliver(String mb) {\n\t\t\tString[] sourceIdAndMsgAndTime = mb.split(\" \", 3);\n\t\t\tSystem.out.println(\"Received \"+ sourceIdAndMsgAndTime[1] + \" from process \"+ sourceIdAndMsgAndTime[0] +\", system time is ­­­­­­­­­­­­­\" + sourceIdAndMsgAndTime[2]);\n\t\t\t\n\t\t}", "public String extractingmessagegetbookings()\r\n\t{\r\n\t\tString localresponseJSONString = responseJSONString;\r\n\t\tJSONObject jsonResult = new JSONObject(localresponseJSONString);\r\n\t\tString getbookingsstring;\r\n\t\tgetbookingsstring = jsonResult.getJSONObject(\"hotelogix\").getJSONObject(\"response\").getJSONObject(\"status\").getString(\"message\");\r\n\t\tSystem.out.println(\"at last getbookings success:\"+getbookingsstring);\r\n\t\treturn getbookingsstring;\r\n\t}", "public String reporteFinMesPost()\n\t{\n\t\tString m = new String();\n\t\tif(!this.clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tGregorianCalendar ff = new GregorianCalendar();\n\t\t\tCliente c = new Cliente();\n\t\t\tlong dur, durc, durt, totalcliente, totalt, valorp;\n\t\t\tCuenta p;\n\t\t\tLLamada ll;\n\t\t\tSet<String> llaves = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(llaves);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tListIterator<Cuenta> cu;\n\t\t\tList<Cuenta> lista = new ArrayList<Cuenta>();\n\t\t\tList<Cliente> cli = new ArrayList<Cliente>();\n\t\t\tString s = new String();\n\n\t\t\t//Tomamos los clientes que tienen cuentas postpago\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\ts = it.next();\n\t\t\t\tif(clientes.get(s).tienePost())\n\t\t\t\t\tcli.add(clientes.get(s));\n\t\t\t}\n\n\t\t\t//Ordenamos la lista de clientes por cedula\n\t\t\tCollections.sort(cli, new CompararCedulasClientes());\n\n\t\t\tListIterator<Cliente> itc = cli.listIterator();\n\t\t\tListIterator<LLamada> itl;\n\t\t\tList<LLamada> lisll = new ArrayList<LLamada>();\n\t\t\ttotalt = 0;\n\t\t\tdurt = 0;\n\t\t\t//Empezamos a recorrer la lista de clientes\n\t\t\twhile(itc.hasNext())\n\t\t\t{\n\t\t\t\ttotalcliente = 0;\n\t\t\t\tdurc = 0;\n\t\t\t\tc = itc.next();\n\t\t\t\tm += Utils.espacios(\"--CLIENTE: \", 12) + Utils.espacios(c.getNombre(), 15) + Utils.espacios(\", CC \",5) + Utils.espacios(String.valueOf(c.getCedula()), 10) + Utils.espacios(\", \", 3) + Utils.espacios(c.getDireccion(), 20) + \"\\n\";\n\t\t\t\t//cu recorre ahora las cuentas del cliente\n\t\t\t\tcu = c.getCuentas().listIterator(0);\n\t\t\t\tlista.clear();\n\t\t\t\twhile(cu.hasNext())\n\t\t\t\t{\n\t\t\t\t\tCuenta n = cu.next();\n\t\t\t\t\tif(n instanceof CuentaPostpago)\n\t\t\t\t\t\tlista.add(n);\n\t\t\t\t}\n\n\t\t\t\tcu = lista.listIterator(0);\n\n\t\t\t\t//En lista estan las cuentas postpago de dicho cliente\n\t\t\t\twhile(cu.hasNext())\n\t\t\t\t{\n\t\t\t\t\tp = cu.next();\n\t\t\t\t\tm += Utils.espacios(\" \", 4)+ Utils.espacios(\"Cuenta Postpago #\", 17) + Utils.espacios(String.valueOf(p.getId()), 5) + Utils.espacios(\": Num \", 6) + Utils.espacios(String.valueOf(p.getNumero()), 10) + Utils.espacios(\", Plan \", 7) + Utils.espacios(p.getPlan().getNombre(), 15) + \"\\n\\n\";\n\t\t\t\t\tm += Utils.espacios(\" \", 8) + Utils.espacios(\"Llamadas: \", 11)+ Utils.espacios(\"Fecha\", 15) + Utils.espacios(\"TelefonoDestinatario\", 21) + Utils.espacios(\"Duracion\",10 ) + Utils.espacios(\"Valor\", 8) +\"\\n\\n\";\n\t\t\t\t\t//lisll ahora tiene las llamadas de dicha cuenta de dicho cliente\n\t\t\t\t\tlisll = p.getLlamadas();\n\t\t\t\t\t//Las ordenamos por fecha\n\t\t\t\t\tCollections.sort(lisll, new CompararLLamadasFecha());\n\t\t\t\t\titl = lisll.listIterator(0);\n\t\t\t\t\tvalorp = 0;\n\t\t\t\t\tdur =0;\n\n\t\t\t\t\twhile(itl.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tll = itl.next();\n\t\t\t\t\t\tif (ll.getFecha().get(Calendar.MONTH) == ff.get(Calendar.MONTH) && ll.getFecha().get(Calendar.YEAR) == ff.get(Calendar.YEAR))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalorp += ll.getValor();\n\t\t\t\t\t\t\tdur += ll.getDuracion();\n\t\t\t\t\t\t\tm += Utils.espacios(\" \",19) + Utils.espacios(Utils.convertirFechaCadena(ll.getFecha()), 15) + Utils.espacios(String.valueOf(ll.getTelefonoDestinatario()), 21) + Utils.espacios(String.valueOf(ll.getDuracion()), 10) + Utils.espacios(String.valueOf(ll.getValor()), 8) + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tm += Utils.espacios(\" \", 19) + Utils.espacios(\"TotalCuenta: ----------------------------\", 55) + Utils.espacios(String.valueOf(dur),10) + valorp + \"\\n\";\n\n\t\t\t\t\t//-------\n\t\t\t\t\tm += Utils.espacios(\" \",19) + Utils.espacios(\"Valor a Pagar: ----------------------------\", 65) + p.obtenerPagoCuenta(ff) + \"\\n\\n\";\n\t\t\t\t\ttotalcliente += p.obtenerPagoCuenta(ff);\n\t\t\t\t\tdurc += dur;\n\t\t\t\t}\n\t\t\t\ttotalt += totalcliente;\n\t\t\t\tdurt += durc;\n\t\t\t\tm += Utils.espacios(\" \",8) + Utils.espacios(\"Total Cliente: ----------------------------\", 66) + Utils.espacios(String.valueOf(durc),10) + totalcliente + \"\\n\" + \"\\n\\n\\n\";\n\t\t\t}\n\n\t\t\tm += Utils.espacios(\"TOTAL TODOS LOS CLIENTES: -----------------------\", 74) + Utils.espacios(String.valueOf(durt),10) + totalt + \"\\n\" + \"\\n\";\n\t\t}\n\t\treturn m;\n\t}", "public static void informNullResponse(Context context) {\n Log.e(context.getClass().getSimpleName(), \"Problem on client side\");\n Toast.makeText(context, context.getString(R.string.server_unreachable_error),\n Toast.LENGTH_SHORT).show();\n }", "private void receiveAndDispatchMessage() {\n String response = null;\n try {\n while((response = bufferedReader.readLine()) != null) {\n System.out.println(\"received message from server: \" + response);\n String messageKind = \"\";\n if(response.contains(\":\")) {\n messageKind = response.substring(0, response.indexOf(\":\"));\n } else {\n messageKind = response;\n }\n Bundle bundle = new Bundle();\n bundle.putString(\"response\", response);\n switch (messageKind) {\n case ClientMessageKind.SIGNUPDENIED:\n case ClientMessageKind.SIGNUPOK:\n if(resultReceiverMap.keySet().contains(ActivityNames.COMMONSIGNUPACTIVITY)) {\n resultReceiverMap.get(ActivityNames.COMMONSIGNUPACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.SIGNINDENIED:\n case ClientMessageKind.SIGNINOK:\n if(resultReceiverMap.keySet().contains(ActivityNames.COMMONSIGNINACTIVITY)) {\n resultReceiverMap.get(ActivityNames.COMMONSIGNINACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERLOC:\n if(resultReceiverMap.keySet().contains(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERLOC:\n if(resultReceiverMap.keySet().contains(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.CHATFROMDRIVER:\n if(resultReceiverMap.keySet().contains(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.CHATFROMPASSENGER:\n if(resultReceiverMap.keySet().contains(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERDEST:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.STARTRIDE:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n } else if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.ENDRIDE:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERENDSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERENDSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERCANCEL:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERCANCEL:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.UPDATEPASSENGERPROFILEDENIED:\n case ClientMessageKind.UPDATEPASSENGERPROFILEOKAY:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERUPDATEPROFILEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERUPDATEPROFILEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.UPDATEDRIVERPROFILEDENIED:\n case ClientMessageKind.UPDATEDRIVERPROFILEOKAY:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERUPDATEPROFILEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERUPDATEPROFILEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERREQUESTLOC:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERREQUESTLOC:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n default:\n break;\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}", "private void clientResponse(String msg) {\n JSONObject j = new JSONObject();\n j.put(\"statuscode\", 200);\n j.put(\"sequence\", ++sequence);\n j.put(\"response\", new JSONArray().add(msg));\n output.println(j);\n output.flush();\n }", "private void sendErrorResponse(String aText, int aStatus, HttpServletRequest aRequest, HttpServletResponse aResponse){\n try {\n aResponse.setStatus(aStatus);\n //fLogger.fine(\"Sending response in uncompressed form, as UTF-8. Length: \" + aText.length());\n String utf8Text = new String(aText.getBytes(), ENCODING);\n aResponse.setCharacterEncoding(\"UTF-8\");\n aResponse.setContentLength(utf8Text.getBytes().length); \n aResponse.setContentType(\"application/text\");\n PrintWriter out = aResponse.getWriter();\n out.append(utf8Text);\n } \n catch (IOException ex) {\n //in practice this won't happen\n logProblem(\"Problem sending an error response.\", ex);\n }\n }", "public String listen(){\t\n\t\tSystem.out.println(\"Server lauscht.\");\n\t\treturn receiveString();\n\t}", "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}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html; charset=UTF-8\");\r\n MensajeDAO m = new MensajeDAO();\r\n String name = request.getParameter(\"name\");\r\n String message = request.getParameter(\"message\");\r\n String message1 = request.getParameter(\"message\");\r\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n \r\n Date date = new Date();\r\n int id_user;\r\n id_user = Integer.parseInt(name);\r\n Mensaje mensaje = new Mensaje(id_user, message, message1, dateFormat.format(date));\r\n System.out.print(\"emojiiiiiiiiiiiiiiiiiiiiiiii\"+mensaje.getEmi_mess());\r\n m.create(mensaje);\r\n \r\n DateFormat dateFormat2 = new SimpleDateFormat(\"HH:mm:ss\");\r\n\r\n mensaje.setTime_mess(dateFormat2.format(date));\r\n\r\n Pusher pusher = new Pusher(\"1188258\", \"814af04f4e0ebcbfa6e4\", \"859c005916df08aa32eb\");\r\n pusher.setCluster(\"us2\");\r\n pusher.setEncrypted(true);\r\n\r\n pusher.trigger(\"chat\", \"new-message\", mensaje.getJsonObject());\r\n\r\n }" ]
[ "0.57142437", "0.56939775", "0.56721884", "0.5651368", "0.5595323", "0.5584123", "0.5555187", "0.5544699", "0.55339456", "0.55150086", "0.55129385", "0.54974484", "0.5480578", "0.54563534", "0.5451179", "0.5438714", "0.54283655", "0.5413592", "0.5413433", "0.53927845", "0.5392719", "0.53797495", "0.53794146", "0.5334834", "0.5333882", "0.5319697", "0.5303178", "0.5302371", "0.5298671", "0.5288461", "0.5286087", "0.528023", "0.52767146", "0.52723914", "0.5271671", "0.52627337", "0.52297974", "0.5225263", "0.5225211", "0.52135605", "0.5210344", "0.5207583", "0.5207436", "0.5199736", "0.5199592", "0.51765203", "0.5161612", "0.5157869", "0.51504093", "0.514337", "0.51314646", "0.5126347", "0.5107793", "0.51019806", "0.51016194", "0.5101182", "0.5093", "0.50873995", "0.50858253", "0.50857246", "0.5081805", "0.5080693", "0.5080693", "0.5074924", "0.50669664", "0.5066714", "0.506384", "0.5063337", "0.50633305", "0.50568444", "0.5046856", "0.5045243", "0.5041976", "0.5041441", "0.50387657", "0.50358486", "0.50331604", "0.5032865", "0.50282794", "0.5028249", "0.5025859", "0.5022651", "0.5021284", "0.50146675", "0.50117195", "0.50092757", "0.50092757", "0.5006155", "0.5005222", "0.5002402", "0.49959564", "0.49939078", "0.49879932", "0.49873948", "0.49818897", "0.49766248", "0.4973974", "0.49707118", "0.49704695", "0.4969862", "0.49695957" ]
0.0
-1
This is broken right now. The ip is set to a general ip, so anyone can access via ssh. It's unlikely there would be a problem since a user would still need to have a private key that is authorized, but this should be fixed.
private static void genSecGroup() { System.out.println("This Program will generate a security group"); System.out.println("with the name bitcrusher and ssh ability for"); System.out.println("your ip address."); try{ CreateSecurityGroupRequest secGrpRequest = new CreateSecurityGroupRequest("bitcrusher", "Ingress group for AWSTool"); CreateSecurityGroupResult res = ec2.createSecurityGroup(secGrpRequest); System.out.println("Group " + res.getGroupId() + "created."); }catch(AmazonServiceException ase){ System.out.println("Group exists. If needed set permissions with -ip option"); System.exit(0); } String ip = "0.0.0.0/0"; List<String> ipRanges = Collections.singletonList(ip); IpPermission ipPerm = new IpPermission(); ipPerm.setFromPort(SSH); ipPerm.setToPort(SSH); ipPerm.setIpRanges(ipRanges); ipPerm.setIpProtocol("tcp"); List<IpPermission> ipPermList = Collections.singletonList(ipPerm); try{ AuthorizeSecurityGroupIngressRequest ingRequest = new AuthorizeSecurityGroupIngressRequest("bitcrusher", ipPermList); ec2.authorizeSecurityGroupIngress(ingRequest); System.out.println("Your ip has been authorized with the bitcrusher group."); }catch(AmazonServiceException e){ System.out.println("Ip already authorized"); System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(java.lang.String ip) {\r\n this.ip = ip;\r\n }", "public void setIp (java.lang.String ip) {\r\n\t\tthis.ip = ip;\r\n\t}", "public void setIp (java.lang.String ip) {\r\n\t\tthis.ip = ip;\r\n\t}", "private static InetAddress getPrivateIpAddress(Server server) {\n\t Preconditions.checkNotNull(server, \"instance is null\");\n\t InetAddress privateIpAddress;\n\t try {\n\t privateIpAddress = InetAddress.getByName(server.getAccessIPv4());\n\t } catch (UnknownHostException e) {\n\t throw new IllegalArgumentException(\"Invalid private IP address\", e);\n\t }\n\t return privateIpAddress;\n\t}", "public void setIp(final String ip) {\n this.ip = ip;\n }", "String getRemoteIpAddress();", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "@Override\n\tpublic String getIp() {\n\t\treturn ip;\n\t}", "public String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "String getIp();", "String getIp();", "public String getPrivateIpAddress() {\n return this.PrivateIpAddress;\n }", "public void insertAuthKeys(int id, String ip, String pk) {\n String sql = \"INSERT INTO authenticatedkeys(id_user, ipaddr, publickey) VALUES (?, ?, ?)\";\n try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setInt(1, id);\n pstmt.setString(2, ip);\n pstmt.setString(3, pk);\n pstmt.executeUpdate();\n System.out.println(\"CRIADO COM SUCESSO!\");\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void setServerIP(String ip)\n\t{\n\t\tthis.serverIP = ip;\n\t}", "public String getIp() {\n return ip;\n }", "int getIp();", "int getIp();", "int getIp();", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public String getIp() {\r\n return ip;\r\n }", "private static void getTcpPrivateAddress() {\n\n\t\tString address = readFileString(FileConstant.FILE_NAME_TCP_ADDRESS_PRIVATE);\n\n\t\tif (Utils.isNotEmpty(address)) {\n\n\t\t\tint start = 0;\n\t\t\tint end = address.indexOf(FileConstant.FILE_STRING_SPLIP_SYMBOL, start);\n\n\t\t\tif (end < address.length()) {\n\n\t\t\t\tConfigureVariable.Tcp_Address_Ip_Private = address.substring(start, end);\n\n\t\t\t\tstart = end + 1;\n\t\t\t\tend = address.length();\n\n\t\t\t\tConfigureVariable.Tcp_Address_Port_Private = address.substring(start, end);\n\t\t\t}\n\t\t}\n\t}", "public String getIp(){\n\treturn ip;\n }", "public String getRemoteip() {\n\t\treturn remoteip;\n\t}", "String getCsPublicIp() {\n String ip = null;\n try {\n URL url = new URL(\"http://169.254.169.254/latest/meta-data/public-ipv4\");\n URLConnection conn = url.openConnection();\n Scanner s = new Scanner(conn.getInputStream());\n if (s.hasNext()) {\n ip = s.next();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ip;\n }", "public String getPublicIpAddress() {\n return publicIpAddress;\n }", "@Override\r\n\tpublic String getIp() {\n\t\treturn null;\r\n\t}", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public void setPublicIpAddress(String publicIpAddress) {\n this.publicIpAddress = publicIpAddress;\n }", "@Override\r\n\tpublic boolean hasIpAddressSupport() {\n\t\treturn false;\r\n\t}", "public String getIp() {\n return ip;\n }", "@Override\n\t\tpublic String buildBasicIp() {\n\t\t\treturn buildIp();\n\t\t}", "int getInIp();", "int getInIp();", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByIp()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=ip\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "public int getIp() {\n return ip_;\n }", "public static void main(String args[]) {\n try {\n // Setup a logfile\n /*Handler fh = new FileHandler(\"example.log\");\n fh.setFormatter(new SimpleFormatter());\n Logger.getLogger(\"com.sshtools\").setUseParentHandlers(false);\n Logger.getLogger(\"com.sshtools\").addHandler(fh);\n Logger.getLogger(\"com.sshtools\").setLevel(Level.ALL);*/\n // Configure J2SSH (This will attempt to install the bouncycastle provider\n // under jdk 1.3.1)\n ConfigurationLoader.initialize(false);\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(System.in));\n System.out.print(\"Connect to host? \");\n String hostname = reader.readLine();\n // Make a client connection\n SshClient ssh = new SshClient();\n // Connect to the host\n ssh.connect(hostname);\n PublicKeyAuthenticationClient pk = new PublicKeyAuthenticationClient();\n // Get the users name\n System.out.print(\"Username? \");\n String username = reader.readLine();\n pk.setUsername(username);\n // Get the private key file\n System.out.print(\"Path to private key file? \");\n String filename = reader.readLine();\n // Open up the private key file\n SshPrivateKeyFile file =\n SshPrivateKeyFile.parse(new File(filename));\n // If the private key is passphrase protected then ask for the passphrase\n String passphrase = null;\n if (file.isPassphraseProtected()) {\n System.out.print(\"Enter passphrase? \");\n passphrase = reader.readLine();\n }\n // Get the key\n SshPrivateKey key = file.toPrivateKey(passphrase);\n pk.setKey(key);\n // Try the authentication\n int result = ssh.authenticate(pk);\n // Evaluate the result\n if (result == AuthenticationProtocolState.COMPLETE) {\n // The connection is authenticated we can now do some real work!\n SessionChannelClient session = ssh.openSessionChannel();\n if (!session.requestPseudoTerminal(\"vt100\", 80, 24, 0, 0, \"\")) {\n logger.info(\"Failed to allocate a pseudo terminal\");\n }\n if (session.startShell()) {\n InputStream in = session.getInputStream();\n OutputStream out = session.getOutputStream();\n IOStreamConnector input =\n new IOStreamConnector(System.in, session.getOutputStream());\n IOStreamConnector output =\n new IOStreamConnector(session.getInputStream(), System.out);\n output.getState().waitForState(IOStreamConnectorState.CLOSED);\n }\n else {\n logger.info(\"Failed to start the users shell\");\n }\n ssh.disconnect();\n }\n if (result == AuthenticationProtocolState.PARTIAL) {\n logger.info(\"Further authentication requried!\");\n }\n if (result == AuthenticationProtocolState.FAILED) {\n logger.info(\"Authentication failed!\");\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "PrivateKey getPrivateKey();", "public void setIp(String value) {\n set(24, value);\n }", "public void setPrivateIpAddress(String PrivateIpAddress) {\n this.PrivateIpAddress = PrivateIpAddress;\n }", "public static String createAuthorizedKeysSegment(String proxyexecutable, String key, String pubkey){\n String ret=\"\";\n String command = \" command=\\\"\"+proxyexecutable+\" username\\\",no-X11-forwarding,no-pty,no-port-forwarding,no-agent-forwarding \";\n ret=\"#\"+key+\"\\n\"+command+\" \"+pubkey+\"\\n\"+\"#\"+key+\"end\"+\"\\n\";\n return ret;\n }", "public String getIpAddress()\n\t{\n\t\t/* TODO: The IP address returned is in this format: /127.0.0.1:9845\n\t\t * Rewrite to remove the unnessecary data. */\n\t\treturn getSession().getIpAddress();\n\t}", "private KeyPair getPrivateKeyPair() throws IOException {\n final PEMParser pemParser = new PEMParser(new StringReader(sshKey));\n final PEMKeyPair keypair = (PEMKeyPair) pemParser.readObject();\n final JcaPEMKeyConverter converter = new JcaPEMKeyConverter();\n return new KeyPair(\n converter.getPublicKey(SubjectPublicKeyInfo.getInstance(keypair.getPublicKeyInfo())),\n converter.getPrivateKey(keypair.getPrivateKeyInfo()));\n }", "@Test(groups = \"Integration\")\n public void testIsSshableWhenFalse() throws Exception {\n byte[] unreachableIp = new byte[] {123,123,123,123};\n SshMachineLocation unreachableHost = new SshMachineLocation(MutableMap.of(\"address\", InetAddress.getByAddress(\"unreachablename\", unreachableIp)));\n assertFalse(unreachableHost.isSshable());\n }", "public void setRemoteip(String remoteip) {\n\t\tthis.remoteip = remoteip == null ? null : remoteip.trim();\n\t}", "public void setIpAddress(String ipAddress) {\n this.ipAddress = ipAddress;\n }", "public SshPortForward(Context context) {\n\t\tInputStream privateStream = null;\n\t\tInputStream publicStream = null;\n\n\t\ttry {\n\t\t\tsession = jsch.getSession(USERNAME, HOSTNAME, SSH_PORT);\n\t\t\tsession.setTimeout(30000);\n\t\t\tsession.setPortForwardingL(HTTP_LOCAL_PORT, \"localhost\", HTTP_REMOTE_PORT);\n\t\t\tsession.setConfig(\"StrictHostKeyChecking\",\"no\");\n\n\t\t\t// These resources need to be added.\n\t\t\t// TODO these should be stored in the Android Keystore\n\t\t\tprivateStream = context.getResources().openRawResource(R.raw.id_rsa);\n\t\t\tpublicStream = context.getResources().openRawResource(R.raw.id_rsa_pub);\n\n\t\t\tbyte[] privateKey = IOUtils.toByteArray(privateStream);\n\t\t\tbyte[] publicKey = IOUtils.toByteArray(publicStream);\n\t\t\tjsch.addIdentity(PUBLIC_KEY_IDENTITY, privateKey, publicKey, PASSWORD.getBytes(Charset.defaultCharset()));\n\t\t\tsession.connect();\n\n\t\t}\n\t\tcatch (Exception e) {}\n\t\tfinally {\n\t\t\tIOUtils.closeQuietly(publicStream);\n\t\t\tIOUtils.closeQuietly(privateStream);\n\t\t}\n\t}", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "@Override\n\t\tpublic void ipChange() {\n\t\t\t\n\t\t}", "java.lang.String getSnIp();", "java.lang.String getSnIp();", "public java.lang.String getIp() {\r\n return ip;\r\n }", "private void findInternalExternalIP() {\n\t\ttry {\n\t\t\texternalIP = InetAddress.getByName(getExternalIP());\n\t\t} catch (UnknownHostException e) {\n\t\t\tDecentLogger.write(\"Unable to to resolve external IP to InetAddress (problem with ip provider?)\");\n\t\t}\n\t\ttry {\n\t\t\tinternalIP = InetAddress.getLocalHost();\n\t\t} catch (UnknownHostException e) {\n\t\t\tDecentLogger.write(\"Unable to to resolve internal IP to InetAddress\");\n\t\t}\n\t}", "public void setIp(String ip) {\r\n this.ip = ip == null ? null : ip.trim();\r\n }", "private final void configureKeys() {\n\t\t// SecretServer's public key\n\t\tString line = ComMethods.getValueFor(\"SecretServer\", pubkeysfn);\n\t\tint x = line.indexOf(',');\n\t\tmy_n = new BigInteger(line.substring(0,x));\n\t\tmy_e = new Integer(line.substring(x+1,line.length()));\n\n\t\t// SecretServer's private key\n\t\tline = ComMethods.getValueFor(\"SecretServer\", privkeysfn);\n\t\tx = line.indexOf(',');\n\t\tmy_d = new BigInteger(line.substring(x+1,line.length()));\n\n\t\t// Public keys for all registered Users\n\t\tusersPubKeys1 = new BigInteger[validUsers.length];\n\t\tusersPubKeys2 = new int[validUsers.length];\n\t\tfor (int i=0; i<validUsers.length; i++) {\n\t\t\tline = ComMethods.getValueFor(validUsers[i], pubkeysfn);\n\t\t\tx = line.indexOf(',');\n\t\t\tusersPubKeys1[i] = new BigInteger(line.substring(0,x));\n\t\t\tusersPubKeys2[i] = new Integer(line.substring(x+1,line.length()));\n\t\t}\n\t}", "void bind(int nodeKey) throws UnknownHostException, RemoteException {\n\n java.util.StringTokenizer st = new java.util.StringTokenizer(java.lang.management.ManagementFactory.getRuntimeMXBean().getName(), \"@\");\n @SuppressWarnings(\"static-access\")\n String ip = Node.getCurrentEnvironmentNetworkIp().toString();\n try {\n Naming.rebind(\"rmi:/\" + ip + \":1099/Keys-\" + nodeKey, this);\n } catch (MalformedURLException ex) {\n ex.printStackTrace();\n }\n }", "abstract String getRemoteAddress();", "public String getIpAddress() {\n return ipAddress;\n }", "public String getIp() {\n return (String) get(24);\n }", "@Test\n public void createDnsEntryWithIp() throws IOException {\n String endpoint = \"gknox\";\n String environment = \"gtopolyai-without-freeipa\";\n boolean wildcard = false;\n List<String> ips = List.of(\"10.65.65.212\");\n dnsManagementService.createOrUpdateDnsEntryWithIp(actorCrn, accountId, endpoint, environment, wildcard, ips);\n LOGGER.info(\"dns is registered\");\n }", "public SSHConnection getSSHConnection() {return _sshConnection;}", "public void associateIP(String instanceId, String instanceIp){\n \t System.out.println(\"Now associate IP\"); \t\t\t \n AssociateAddressRequest aar = new AssociateAddressRequest(); \t \n \t aar.setInstanceId(instanceId);\n \t aar.setPublicIp(instanceIp);\n \t ec2.associateAddress(aar);\n }", "public String getPrivateKey();", "public String getPrivateKey();", "private String getLocalIpAddress() throws Exception {\n return InetAddress.getLocalHost().getHostAddress();\n }", "boolean hasIp();", "boolean hasIp();", "boolean hasIp();", "boolean hasIp();", "public void setIp(String ip) {\n this.ip = ip == null ? null : ip.trim();\n }", "public void setIp(String ip) {\n this.ip = ip == null ? null : ip.trim();\n }", "public void setIp(String ip) {\n this.ip = ip == null ? null : ip.trim();\n }", "public String getIp() {\n\t\treturn InfraUtil.getIpMachine();\n\t}", "public String getIP() {\n return this.IP;\n }", "public void setIpAddress(InetAddress addr) \n\t{\n\t\tthis.ipAddress = addr;\n\t}", "public boolean isIpAccessible(String url) {\n URL img = null;\n try {\n img = new URL(url);\n InputStream s = img.openStream();\n byte[] b = new byte[256];\n s.read(b);\n String str = new String(b);\n System.out.println(str);\n s.close();\n return true;\n } catch (java.io.IOException e) {\n return false;\n }\n }", "private void setIp(int value) {\n \n ip_ = value;\n }", "private void setIp(int value) {\n \n ip_ = value;\n }" ]
[ "0.5927023", "0.5847388", "0.5847388", "0.57884747", "0.56632775", "0.5643296", "0.5643296", "0.56396043", "0.56377", "0.5585568", "0.55596876", "0.55596876", "0.5494472", "0.5451939", "0.5445649", "0.5445649", "0.5445649", "0.5445649", "0.5445649", "0.5445649", "0.5445649", "0.5445649", "0.543488", "0.543488", "0.5390036", "0.5369552", "0.53609896", "0.53390473", "0.5337969", "0.5337969", "0.5337969", "0.53287596", "0.53287596", "0.5327676", "0.5326289", "0.5324737", "0.5299763", "0.5298632", "0.5273532", "0.52699536", "0.52277845", "0.52277845", "0.52277845", "0.52277845", "0.52277845", "0.52277845", "0.52123475", "0.5196622", "0.5190432", "0.5181057", "0.5144648", "0.5144648", "0.5140014", "0.51331407", "0.5114375", "0.5109955", "0.5095155", "0.50803316", "0.5057174", "0.50516385", "0.50320166", "0.5030242", "0.5020485", "0.501946", "0.5012886", "0.5012093", "0.5012093", "0.5012093", "0.5005705", "0.5005705", "0.4984843", "0.4979671", "0.4979671", "0.49774614", "0.4976057", "0.4949967", "0.494382", "0.4943376", "0.49423194", "0.49379668", "0.49361718", "0.49346212", "0.49255112", "0.49240652", "0.49203062", "0.49203062", "0.49174964", "0.4910117", "0.4910117", "0.4910117", "0.4910117", "0.49092084", "0.49092084", "0.49092084", "0.490599", "0.49020517", "0.48858425", "0.48795143", "0.48729718", "0.48729718" ]
0.49098584
91
Creates a new instance
private static void spawnInstance(){ String instanceType = null; String imageId = null; int numInstances = 0; Scanner in = new Scanner(System.in); System.out.println("Name of key to use?"); keyname = in.next(); System.out.println("Instance type? (use d for default: t2.micro)"); instanceType = in.next(); if(instanceType.equals("d")){ instanceType = INSTANCE_TYPE; } System.out.println("Image id? (use d for default: ami-b5a7ea85, Amazon Linux AMI)"); imageId = in.next(); if(imageId.equals("d")){ imageId = IMAGE_ID; } System.out.println("Number of instances?"); numInstances = in.nextInt(); in.close(); RunInstancesRequest req = new RunInstancesRequest(); String group = GROUP; req.withImageId(imageId) .withInstanceType(instanceType) .withMinCount(numInstances) .withMaxCount(numInstances) .withKeyName(keyname) .withSecurityGroups(group); RunInstancesResult reqRes = ec2.runInstances(req); Reservation res = reqRes.getReservation(); System.out.println("Reservation number is " + res.getReservationId()); try { System.out.println("Just a moment while the instance is spun up..."); TimeUnit.SECONDS.sleep(10); } catch (InterruptedException e) { System.out.println("Instantiation failed!"); } String ip = listLiveInstances(); System.out.println(""); System.out.println("Connect with 'ssh -i " + keyname + ".pem ec2-user@" + ip +"'"); System.out.println("If connection fails, run with -l option and check status."); System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "private Instantiation(){}", "Reproducible newInstance();", "public Instance() {\n }", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "public void create() {\n\t\t\n\t}", "public CMObject newInstance();", "void create(T instance) throws IOException;", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public T newInstance();", "T create();", "T create();", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "public abstract void create();", "@Override\n\tpublic void create () {\n\n\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "InstanceModel createInstanceOfInstanceModel();", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public 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 abstract boolean create(T newInstance);", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "For createFor();", "public Factory() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "<T> T newInstance(URI description) throws EnvironmentException;", "protected abstract void construct();", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "OBJECT createOBJECT();", "Klassenstufe createKlassenstufe();", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "@Override\r\n public void instantiate() {\r\n }", "public Open() {\n //creates a new open instance\n }", "public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}", "public ObjectFactory() {\n super(grammarInfo);\n }", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public Produto() {}", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "public ObjectFactory() {\n\t}", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "public ObjectFactory() {\r\n\t}", "DynamicInstance createDynamicInstance();", "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 Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "Snapshot create();", "public abstract Instance duplicate();", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "void create(T t);", "public ApplicationCreator() {\n }", "void create( State state );", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "public Postoj() {}", "Foco createFoco();", "public Product() {}", "P createP();", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.80138785", "0.74958986", "0.71698487", "0.71112543", "0.710905", "0.7050398", "0.69675916", "0.6917698", "0.6898909", "0.6877", "0.687667", "0.67765003", "0.67765003", "0.67695117", "0.6755214", "0.67186517", "0.6710647", "0.670457", "0.6680712", "0.66512895", "0.66113096", "0.6599627", "0.6547862", "0.6503745", "0.64030236", "0.6340788", "0.6312287", "0.63122565", "0.6277298", "0.627222", "0.6267284", "0.6248176", "0.621257", "0.621022", "0.6197579", "0.6197529", "0.6170889", "0.6170889", "0.6170889", "0.61622334", "0.61592776", "0.6140179", "0.6135131", "0.6115948", "0.609913", "0.6096307", "0.6090506", "0.6081187", "0.6076713", "0.6066972", "0.6061743", "0.6055685", "0.6045855", "0.6044152", "0.60429484", "0.6041627", "0.6031911", "0.6019348", "0.60029525", "0.6001604", "0.59953326", "0.5984401", "0.5977708", "0.5977419", "0.59736013", "0.59485537", "0.59455353", "0.5943511", "0.59341866", "0.59275097", "0.5918293", "0.5917546", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145", "0.59157145" ]
0.0
-1
The genKey method creates a pem file in the directory that the program is executed in, and generates a key on amazon's servers.
private static void genKey(){ System.out.println("Name to use for key?"); Scanner in = new Scanner(System.in); keyname = in.next(); in.close(); CreateKeyPairRequest createKPReq = new CreateKeyPairRequest(); createKPReq.withKeyName(keyname); CreateKeyPairResult resultPair = null; try{ resultPair = ec2.createKeyPair(createKPReq); }catch(AmazonServiceException e){ System.out.println("Key already exists!"); System.exit(0); } KeyPair keyPair = new KeyPair(); keyPair = resultPair.getKeyPair(); String privateKey = keyPair.getKeyMaterial(); FileOutputStream out = null; try{ File f = new File(keyname + ".pem"); out = new FileOutputStream(f); byte[] privateKeyByte = privateKey.getBytes(); out.write(privateKeyByte); out.flush(); out.close(); }catch (IOException e){ System.out.println("IO failed!"); }finally{ if(out != null){ try { out.close(); } catch (IOException e) { System.out.println("IO failed!"); } } } System.out.println("Key generated: " + keyname + ".pem"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void keyPairGenerator() throws NoSuchAlgorithmException, IOException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(2048);\n KeyPair keyPair = kpg.generateKeyPair();\n\n //Get public and private keys\n Key publicKey = keyPair.getPublic();\n Key privateKey = keyPair.getPrivate();\n\n String outFile = files_path + \"/Client_public\";\n PrintStream out = null;\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(publicKey.getEncoded());\n out.close();\n\n outFile = files_path + \"/Client_private\";\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(privateKey.getEncoded());\n out.close();\n\n System.err.println(\"Private key format: \" + privateKey.getFormat());\n // prints \"Private key format: PKCS#8\" on my machine\n\n System.err.println(\"Public key format: \" + publicKey.getFormat());\n // prints \"Public key format: X.509\" on my machine\n\n }", "public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void generateKeys() {\r\n try {\r\n SecureRandom random = SecureRandom.getInstance(Constants.SECURE_RANDOM_ALGORITHM);\r\n KeyPairGenerator generator = KeyPairGenerator.getInstance(Constants.ALGORITHM);\r\n generator.initialize(Constants.KEY_BIT_SIZE, random);\r\n \r\n KeyPair keys = generator.genKeyPair();\r\n \r\n persistPrivateKey(keys.getPrivate().getEncoded());\r\n persistPublicKey(keys.getPublic().getEncoded());\r\n logger.log(Level.INFO, \"Done with generating persisting Public and Private Key.\");\r\n \r\n } catch (NoSuchAlgorithmException ex) {\r\n logger.log(Level.SEVERE, \"En error occured while generating the Public and Private Key\");\r\n }\r\n }", "private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }", "private static void createKeyFiles(String pass, String publicKeyFilename, String privateKeyFilename) throws Exception {\n\t\tString password = null;\n\t\tif (pass.isEmpty()) {\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.print(\"Password to encrypt the private key: \");\n\t\t\tpassword = in.readLine();\n\t\t\tSystem.out.println(\"Generating an RSA keypair...\");\n\t\t} else {\n\t\t\tpassword = pass;\n\t\t}\n\t\t\n\t\t// Create an RSA key\n\t\tKeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyPairGenerator.initialize(1024);\n\t\tKeyPair keyPair = keyPairGenerator.genKeyPair();\n\n\t\tSystem.out.println(\"Done generating the keypair.\\n\");\n\n\t\t// Now we need to write the public key out to a file\n\t\tSystem.out.print(\"Public key filename: \");\n\n\t\t// Get the encoded form of the public key so we can\n\t\t// use it again in the future. This is X.509 by default.\n\t\tbyte[] publicKeyBytes = keyPair.getPublic().getEncoded();\n\n\t\t// Write the encoded public key out to the filesystem\n\t\tFileOutputStream fos = new FileOutputStream(publicKeyFilename);\n\t\tfos.write(publicKeyBytes);\n\t\tfos.close();\n\n\t\t// Now we need to do the same thing with the private key,\n\t\t// but we need to password encrypt it as well.\n\t\tSystem.out.print(\"Private key filename: \");\n \n\t\t// Get the encoded form. This is PKCS#8 by default.\n\t\tbyte[] privateKeyBytes = keyPair.getPrivate().getEncoded();\n\n\t\t// Here we actually encrypt the private key\n\t\tbyte[] encryptedPrivateKeyBytes = passwordEncrypt(password.toCharArray(), privateKeyBytes);\n\n\t\tfos = new FileOutputStream(privateKeyFilename);\n\t\tfos.write(encryptedPrivateKeyBytes);\n\t\tfos.close();\n\t}", "public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }", "public void generateKeyPair(String dirPath) throws Exception {\n\t\tnew File(dirPath).mkdirs();\n\t\tKeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkpg.initialize(512);\n\t\tKeyPair keyPair = kpg.generateKeyPair();\n\t\tPrivateKey privateKey = keyPair.getPrivate();\n\t\tPublicKey publicKey = keyPair.getPublic();\n\t\t\n\t\t// Store Public Key.\n\t\tX509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicKey.getEncoded());\n\t\tFileOutputStream fos = new FileOutputStream(dirPath + \"/public.key\");\n\t\tfos.write(x509EncodedKeySpec.getEncoded());\n\t\tfos.close();\n\t\t\n\t\t// Store Private Key.\n\t\tPKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(privateKey.getEncoded());\n\t\tfos = new FileOutputStream(dirPath + \"/private.key\");\n\t\tfos.write(pkcs8EncodedKeySpec.getEncoded());\n\t\tfos.close();\n\t}", "static KeyPair generateKeyPair() throws NoSuchAlgorithmException {\n\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);\n\n keyGen.initialize(2048);\n\n //Log.e(TAG, \"generateKeyPair: this is public key encoding \" + Arrays.toString(generateKeyPair.getPrivate().getEncoded()));\n\n return keyGen.generateKeyPair();\n }", "public static KeyPair GenrateandEncrypt(String keyname) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException\n\t {\n\t \tKeyPairGenerator kpg;\n\t kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(4096);\n \n KeyPair kp = kpg.genKeyPair();\n PublicKey publicKey = kp.getPublic();\n PrivateKey privateKey = kp.getPrivate();\n\n //save keys \n \n \n String sPublic = Base64.getEncoder().encodeToString( publicKey.getEncoded());\n String sPrivate = Base64.getEncoder().encodeToString( privateKey.getEncoded());\n\n File file1 = new File(keyname+\"public.txt\");\n\t\t\tFileWriter fileWriter1 = new FileWriter(file1);\n\t\t\tfileWriter1.write(sPublic);\n\t\t\t\n\t\t\t\n\t\t\tFile file2 = new File(keyname+\"private.txt\");\n\t\t\tFileWriter fileWriter2 = new FileWriter(file2);\n\t\t\tfileWriter2.write(sPrivate);\n\t\t\t \n fileWriter1.flush();\n fileWriter1.close();\n \n fileWriter2.flush();\n fileWriter2.close();\n ////////////\n \n return kp;\n\t }", "@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }", "static void generate() throws Exception {\n\t\t\n\t\tKeyPairGenerator keyGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyGenerator.initialize(2048);\n\t\tKeyPair kp = keyGenerator.genKeyPair();\n\t\tRSAPublicKey publicKey = (RSAPublicKey)kp.getPublic();\n\t\tRSAPrivateKey privateKey = (RSAPrivateKey)kp.getPrivate();\n\t\t\n\t\tSystem.out.println(\"RSA_public_key=\"+Base64.getEncoder().encodeToString(publicKey.getEncoded()));\n\t\tSystem.out.println(\"RSA_private_key=\"+Base64.getEncoder().encodeToString(privateKey.getEncoded()));\n\t\tSystem.out.println(\"RSA_public_key_exponent=\"+ Base64.getEncoder().encodeToString(BigIntegerUtils.toBytesUnsigned(publicKey.getPublicExponent())));\n\t\tSystem.out.println(\"RSA_private_key_exponent=\"+Base64.getEncoder().encodeToString(BigIntegerUtils.toBytesUnsigned(privateKey.getPrivateExponent())));\n\t}", "public RSAKeyContents generateKeys() {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\tButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator();\r\n\t\t\tkpGen.init(new RSAKeyGenerationParameters(DEFAULT_PUBLIC_EXPONENT, rand, KEY_STRENGTH, CERTAINTY));\r\n\t\t\treturn kpGen.generateKeys();\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}", "public void generateNewKeyPair(String alias, Context context) throws Exception {\n Calendar start = Calendar.getInstance();\n Calendar end = Calendar.getInstance();\n // expires 1 year from today\n end.add(Calendar.YEAR, 1);\n KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(context)\n .setAlias(alias)\n .setSubject(new X500Principal(\"CN=\" + alias))\n .setSerialNumber(BigInteger.TEN)\n .setStartDate(start.getTime())\n .setEndDate(end.getTime())\n .build();\n // use the Android keystore\n KeyPairGenerator gen = KeyPairGenerator.getInstance(\"RSA\",ANDROID_KEYSTORE);\n gen.initialize(spec);\n // generates the keypair\n gen.generateKeyPair();\n }", "private static String getKey(String filename) throws IOException {\n\t\tString strKeyPEM = \"\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tstrKeyPEM += line;\n\t\t}\n\t\tbr.close();\n\t\treturn strKeyPEM;\n\t}", "public void generateEphemeralKey(){\n esk = BIG.randomnum(order, rng); //ephemeral secret key, x\n epk = gen.mul(esk); //ephemeral public key, X = x*P\n }", "public void generateKeys() {\n\t\t// p and q Length pairs: (1024,160), (2048,224), (2048,256), and (3072,256).\n\t\t// q must be a prime; choosing 160 Bit for q\n\t\tSystem.out.print(\"Calculating q: \");\n\t\tq = lib.generatePrime(160);\n\t\tSystem.out.println(q + \" - Bitlength: \" + q.bitLength());\n\t\t\n\t\t// p must be a prime\n\t\tSystem.out.print(\"Calculating p \");\n\t\tp = calculateP(q);\n\t System.out.println(\"\\np: \" + p + \" - Bitlength: \" + p.bitLength());\n\t System.out.println(\"Test-Division: ((p-1)/q) - Rest: \" + p.subtract(one).mod(q));\n\t \n\t // choose an h with (1 < h < p−1) and try again if g comes out as 1.\n \t// Most choices of h will lead to a usable g; commonly h=2 is used.\n\t System.out.print(\"Calculating g: \");\n\t BigInteger h = BigInteger.valueOf(2);\n\t BigInteger pMinusOne = p.subtract(one);\n\t do {\n\t \tg = h.modPow(pMinusOne.divide(q), p);\n\t \tSystem.out.print(\".\");\n\t }\n\t while (g == one);\n\t System.out.println(\" \"+g);\n\t \n\t // Choose x by some random method, where 0 < x < q\n\t // this is going to be the private key\n\t do {\n\t \tx = new BigInteger(q.bitCount(), lib.getRandom());\n }\n\t while (x.compareTo(zero) == -1);\n\t \n\t // Calculate y = g^x mod p\n\t y = g.modPow(x, p);\n\t \n System.out.println(\"y: \" + y);\n System.out.println(\"-------------------\");\n System.out.println(\"Private key (x): \" + x);\n\t}", "public KeyPair createKeyPair() {\n try {\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n keyPairGenerator.initialize(4096);\n return keyPairGenerator.generateKeyPair();\n } catch (RuntimeException | NoSuchAlgorithmException e) {\n throw new RuntimeException(\"Failed to create public/private key pair\", e);\n }\n }", "void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "public static void main(String[] args) {\n generateKeys(\"DSA\", 1024);\n\n // Generate a 576-bit DH key pair\n generateKeys(\"DH\", 576);\n\n // Generate a 1024-bit RSA key pair\n generateKeys(\"RSA\", 1024);\n }", "public void generateKeys()\n\t{\n\t\tmyP = BigInteger.probablePrime(myView.getBitLength(), rand());\n\t\tmyQ = BigInteger.probablePrime(myView.getBitLength(), rand());\n\t\tif(confirmPrimes(myP, myQ))\n\t\t{\n\t\t\tpublicKey = myP.multiply(myQ);\n\t\t\tmyView.displayPublicKey(publicKey.toString());\n\t\t\tmyPhi = (myP.subtract(BigInteger.ONE).multiply(myQ.subtract(BigInteger.ONE)));\n\t\t\tprivateKey = E.modInverse(myPhi);\n\t\t\tmyView.displayPrivateKey(privateKey.toString());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgenerateKeys();\n\t\t}\n\t}", "public RSAKeyPairGenerator() {\n }", "OpenSSLKey mo134201a();", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "public GenRSAKey() {\n initComponents();\n }", "@Test\n\tpublic void createNewMyKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean r1 = ks.createNewMyKeyPair(\"newkp\");\n\t\tboolean r2 = ks.createNewMyKeyPair(\"newtwo\");\n\t\tassertTrue(\"Should have added the key\", r1);\n\t\tassertTrue(\"Should have added the second key\", r2);\n\t}", "public static Keys generateKeys() throws GeneralSecurityException {\n KeyGenerator gen = KeyGenerator.getInstance(ENC_ALGORITHM);\n gen.init(KEYLEN);\n SecretKey encKey = gen.generateKey();\n\n /* XXX: It's probably unnecessary to create a different keygen for the\n * MAC, but JCA's API design suggests we should just in case ... */\n gen = KeyGenerator.getInstance(MAC_ALGORITHM);\n gen.init(KEYLEN);\n SecretKey macKey = gen.generateKey();\n\n return new Keys(encKey, macKey);\n }", "public void genKeyPair(BigInteger p, BigInteger q)\n {\n n = p.multiply(q);\n BigInteger PhiN = RSA.bPhi(p, q);\n do {\n e = new BigInteger(2 * SIZE, new Random());\n } while ((e.compareTo(PhiN) != 1)\n || (Utils.bigGCD(e,PhiN).compareTo(BigInteger.ONE) != 0));\n d = RSA.bPrivateKey(e, p, q);\n }", "protected SecretKey generateRandomAESKey() throws GeneralSecurityException {\n fixPrng();\n // Instantiante KeyGenerator\n KeyGenerator keyGenerator = KeyGenerator.getInstance(AES_INSTANCE);\n // Initialize generator with the desired keylength\n keyGenerator.init(AES_128);\n // Return new key\n return keyGenerator.generateKey();\n }", "public String generateKey(long duration) throws Exception;", "public void RSAyoyo() throws NoSuchAlgorithmException, GeneralSecurityException, IOException {\r\n\r\n KeyPairGenerator kPairGen = KeyPairGenerator.getInstance(\"RSA\");\r\n kPairGen.initialize(2048);\r\n KeyPair kPair = kPairGen.genKeyPair();\r\n publicKey = kPair.getPublic();\r\n System.out.println(publicKey);\r\n privateKey = kPair.getPrivate();\r\n\r\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\r\n RSAPublicKeySpec pub = fact.getKeySpec(kPair.getPublic(), RSAPublicKeySpec.class);\r\n RSAPrivateKeySpec priv = fact.getKeySpec(kPair.getPrivate(), RSAPrivateKeySpec.class);\r\n serializeToFile(\"public.key\", pub.getModulus(), pub.getPublicExponent()); \t\t\t\t// this will give public key file\r\n serializeToFile(\"private.key\", priv.getModulus(), priv.getPrivateExponent());\t\t\t// this will give private key file\r\n\r\n \r\n }", "private byte[][] ECDSAgeneratePublicAndPrivateKey(){\r\n int length = 0;\r\n byte[][] keys;\r\n \r\n do{\r\n \r\n\tECKeyPairGenerator gen = new ECKeyPairGenerator();\r\n\tSecureRandom secureRandom = new SecureRandom();\r\n X9ECParameters secnamecurves = SECNamedCurves.getByName(\"secp256k1\");\r\n\tECDomainParameters ecParams = new ECDomainParameters(secnamecurves.getCurve(), secnamecurves.getG(), secnamecurves.getN(), secnamecurves.getH());\r\n\tECKeyGenerationParameters keyGenParam = new ECKeyGenerationParameters(ecParams, secureRandom);\r\n\tgen.init(keyGenParam);\r\n\tAsymmetricCipherKeyPair kp = gen.generateKeyPair();\r\n\tECPrivateKeyParameters privatekey = (ECPrivateKeyParameters)kp.getPrivate();\r\n\tECPoint dd = secnamecurves.getG().multiply(privatekey.getD());\r\n\tbyte[] publickey=new byte[65];\r\n\tSystem.arraycopy(dd.getY().toBigInteger().toByteArray(), 0, publickey, 64-dd.getY().toBigInteger().toByteArray().length+1, dd.getY().toBigInteger().toByteArray().length);\r\n\tSystem.arraycopy(dd.getX().toBigInteger().toByteArray(), 0, publickey, 32-dd.getX().toBigInteger().toByteArray().length+1, dd.getX().toBigInteger().toByteArray().length);\r\n\tpublickey[0]=4;\r\n length = privatekey.getD().toByteArray().length;\r\n keys = new byte[][]{privatekey.getD().toByteArray(),publickey};\r\n \r\n }while(length != 32);\r\n\treturn keys;\r\n}", "java.lang.String getPublicEciesKey();", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "private PrivateKey generatePrivateKey(KeyFactory factory) throws IOException, InvalidKeySpecException {\n\n PemFile pemFile = new PemFile(RESOURCES_DIR + PRIVATE_KEY_FILE_NAME);\n byte[] content = pemFile.getPemObject().getContent();\n PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(content);\n return factory.generatePrivate(privKeySpec);\n }", "public void generate(){\n\t\t//Key Generation\n\t\tint p = 41, q = 67; //two hard-coded prime numbers\n\t\tint n = p * q;\n\t\tint w = (p-1) * (q-1);\n\t\tint d = 83; //hard-coded number relatively prime number to w\n\t\t\n\t\tthis.privatekey = new PrivateKey(d,n); //public key generation completed\n\t\t\n\t\t//Extended Euclid's algorithm\n\t\tint \ta = w, \n\t\t\t\tb = d,\n\t\t\t\tv = a/b;\n\t\tArrayList<Integer> \tx = new ArrayList<Integer>(), \n\t\t\t\t\ty = new ArrayList<Integer>(),\n\t\t\t\t\tr = new ArrayList<Integer>();\n\t\t\n\t\t\n\t\t//Iteration 0\n\t\tint i = 0;\n\t\tx.add(1);\n\t\ty.add(0);\n\t\tr.add(a);\n\t\ti++;\n\t\t//Iteration 1\n\t\tx.add(0);\n\t\ty.add(1);\n\t\tr.add(b);\n\t\ti++;\n\t\t//Iteration 2\n\t\t //iteration counter\n\t\tint e = y.get(i-1);\n\t\tv = r.get(i-2) / r.get(i-1);\n\t\tx.add(x.get(i-2)-v*x.get(i-1));\n\t\ty.add(y.get(i-2) - v*y.get(i-1));\n\t\tr.add(a*(x.get(i-2)-v*x.get(i-1))\n\t\t\t\t+b*(y.get(i-2)-v*y.get(i-1))); \n\t\ti++;\n\t\t\n\t\t//Iterate until r == 0, then get the previous iteration's value of d\n\t\twhile(r.get(i-1) > 0){\n\t\t\te = y.get(i-1);\n\t\t\tv = r.get(i-2) / r.get(i-1);\n\t\t\tx.add(x.get(i-2)-v*x.get(i-1));\n\t\t\ty.add(y.get(i-2) - v*y.get(i-1));\n\t\t\tr.add(a*(x.get(i-2)-v*x.get(i-1))\n\t\t\t\t\t+b*(y.get(i-2) -(v*y.get(i-1))));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//if number is negative, add w to keep positive\n\t\tif (e < 0){\n\t\t\te = w+e;\n\t\t}\n\t\tthis.publickey = new PublicKey(e,n); //private key generation completed\n\t\t\n\t\t//print values to console\n\t\tSystem.out.println(\"Value of public key: \" + e + \", private key: \" + d + \", modulus: \" + n);\n\t\tSystem.out.println();\n\t}", "public KeyPair generadorAleatori() {\n KeyPair keys = null;\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(2048);\n keys = keyGen.genKeyPair();\n } catch (Exception e) {\n System.err.println(\"Generador no disponible.\");\n }\n return keys;\n }", "private static void computeKeyPairs() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {\r\n\r\n\t\tfinal KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"EC\");\r\n\t\tkeyPairGenerator.initialize(new ECGenParameterSpec(\"secp256r1\"), SecureRandom.getInstanceStrong());\r\n\t\tkeyPairAlice = keyPairGenerator.generateKeyPair();\r\n\t\tkeyPairBob = keyPairGenerator.generateKeyPair();\r\n\t}", "public KeyGenerator() {\n this.publicList = new SinglyLinkedList();\n this.privateList = new PrivateKey();\n }", "private static Key generateKey() throws NoSuchAlgorithmException {\r\n\t\tif (key == null) {\r\n\t\t\tgenerator = KeyGenerator.getInstance(\"DES\");\r\n\t\t\tgenerator.init(new SecureRandom());\r\n\t\t\tkey = generator.generateKey();\r\n\t\t}\r\n\t\treturn key;\r\n\t}", "public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }", "public static void main(String[] args) {\n KeyStore myStore = null;\n try {\n\n /* Note: could also use a keystore file, which contains the token label or slot no. to use. Load that via\n * \"new FileInputStream(ksFileName)\" instead of ByteArrayInputStream. Save objects to the keystore via a\n * FileOutputStream. */\n\n ByteArrayInputStream is1 = new ByteArrayInputStream((\"slot:\" + slot).getBytes());\n myStore = KeyStore.getInstance(keystoreProvider);\n myStore.load(is1, passwd.toCharArray());\n } catch (KeyStoreException kse) {\n System.out.println(\"Unable to create keystore object\");\n System.exit(-1);\n } catch (NoSuchAlgorithmException nsae) {\n System.out.println(\"Unexpected NoSuchAlgorithmException while loading keystore\");\n System.exit(-1);\n } catch (CertificateException e) {\n System.out.println(\"Unexpected CertificateException while loading keystore\");\n System.exit(-1);\n } catch (IOException e) {\n // this should never happen\n System.out.println(\"Unexpected IOException while loading keystore.\");\n System.exit(-1);\n }\n\n KeyPairGenerator keyGen = null;\n KeyPair keyPair = null;\n try {\n // Generate an ECDSA KeyPair\n /* The KeyPairGenerator class is used to determine the type of KeyPair being generated. For more information\n * concerning the algorithms available in the Luna provider please see the Luna Development Guide. For more\n * information concerning other providers, please read the documentation available for the provider in question. */\n System.out.println(\"Generating ECDSA Keypair\");\n /* The KeyPairGenerator.getInstance method also supports specifying providers as a parameter to the method. Many\n * other methods will allow you to specify the provider as a parameter. Please see the Sun JDK class reference at\n * http://java.sun.org for more information. */\n keyGen = KeyPairGenerator.getInstance(\"ECDSA\", provider);\n /* ECDSA keys need to know what curve to use. If you know the curve ID to use you can specify it directly. In the\n * Luna Provider all supported curves are defined in LunaECCurve */\n ECGenParameterSpec ecSpec = new ECGenParameterSpec(\"c2pnb304w1\");\n keyGen.initialize(ecSpec);\n keyPair = keyGen.generateKeyPair();\n } catch (Exception e) {\n System.out.println(\"Exception during Key Generation - \" + e.getMessage());\n System.exit(1);\n }\n\n // generate a self-signed ECDSA certificate.\n Date notBefore = new Date();\n Date notAfter = new Date(notBefore.getTime() + 1000000000);\n BigInteger serialNum = new BigInteger(\"123456\");\n LunaCertificateX509 cert = null;\n try {\n cert = LunaCertificateX509.SelfSign(keyPair, \"CN=ECDSA Sample Cert\", serialNum, notBefore, notAfter);\n } catch (InvalidKeyException ike) {\n System.out.println(\"Unexpected InvalidKeyException while generating cert.\");\n System.exit(-1);\n } catch (CertificateEncodingException cee) {\n System.out.println(\"Unexpected CertificateEncodingException while generating cert.\");\n System.exit(-1);\n }\n\n byte[] bytes = \"Some Text to Sign as an Example\".getBytes();\n System.out.println(\"PlainText = \" + com.safenetinc.luna.LunaUtils.getHexString(bytes, true));\n\n Signature ecdsaSig = null;\n byte[] signatureBytes = null;\n try {\n // Create a Signature Object and signUsingI2p the encrypted text\n /* Sign/Verify operations like Encrypt/Decrypt operations can be performed in either singlepart or multipart\n * steps. Single part Signing and Verify examples are given in this code. Multipart signatures use the\n * Signature.update() method to load all the bytes and then invoke the Signature.signUsingI2p() method to get the result.\n * For more information please see the class documentation for the java.security.Signature class with respect to\n * the version of the JDK you are using. */\n System.out.println(\"Signing encrypted text\");\n ecdsaSig = Signature.getInstance(\"ECDSA\", provider);\n ecdsaSig = Signature.getInstance(\"SHA256withECDSA\", provider);\n ecdsaSig.initSign(keyPair.getPrivate());\n ecdsaSig.update(bytes);\n signatureBytes = ecdsaSig.sign();\n\n // Verify the signature\n System.out.println(\"Verifying signature(via Signature.verify)\");\n ecdsaSig.initVerify(keyPair.getPublic());\n ecdsaSig.update(bytes);\n boolean verifies = ecdsaSig.verify(signatureBytes);\n if (verifies == true) {\n System.out.println(\"Signature passed verification\");\n } else {\n System.out.println(\"Signature failed verification\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception during Signing - \" + e.getMessage());\n System.exit(1);\n }\n\n try {\n // Verify the signature\n System.out.println(\"Verifying signature(via cert)\");\n ecdsaSig.initVerify(cert);\n ecdsaSig.update(bytes);\n boolean verifies = ecdsaSig.verify(signatureBytes);\n if (verifies == true) {\n System.out.println(\"Signature passed verification\");\n } else {\n System.out.println(\"Signature failed verification\");\n }\n } catch (Exception e) {\n System.out.println(\"Exception during Verification - \" + e.getMessage());\n System.exit(1);\n }\n\n// // Logout of the token\n// HSM_Manager.hsmLogout();\n }", "public static KeyPair generatePublicKeyPair(){\r\n\t\ttry {\r\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(publicKeyAlgorithm);\r\n\t\t\tkeyGen.initialize(PUBLIC_KEY_LENGTH, new SecureRandom());\r\n\t\t\treturn keyGen.generateKeyPair();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal key generation error - \"+publicKeyAlgorithm+\"[\"+PUBLIC_KEY_LENGTH+\"]\",e);\r\n\t\t}\r\n\t}", "public KeyFiles createKeyPair(Path publicKeyDestination, Path privateKeyDestination) throws IOException {\n Objects.requireNonNull(publicKeyDestination);\n Objects.requireNonNull(privateKeyDestination);\n\n KeyPairGenerator generator = null;\n\n try {\n generator = KeyPairGenerator.getInstance(\"RSA\", BouncyCastleProvider.PROVIDER_NAME);\n generator.initialize(1024, SecureRandom.getInstanceStrong());\n } catch (NoSuchAlgorithmException | NoSuchProviderException e) {\n // We register the provider at construction, and RSA is a standard algorithm - if these exceptions occur,\n // something is legitimately wrong with the JVM\n throw new IllegalStateException(\"Error configuring key generator\", e);\n }\n\n KeyPair pair = generator.generateKeyPair();\n\n PemObject publicPem = new PemObject(\"RSA PUBLIC KEY\", pair.getPublic().getEncoded());\n PemObject privatePem = new PemObject(\"RSA PRIVATE KEY\", pair.getPrivate().getEncoded());\n\n try (PemWriter pemWriter = new PemWriter(\n new OutputStreamWriter(Files.newOutputStream(publicKeyDestination, StandardOpenOption.CREATE_NEW)))) {\n pemWriter.writeObject(publicPem);\n }\n\n try (PemWriter pemWriter = new PemWriter(\n new OutputStreamWriter(Files.newOutputStream(privateKeyDestination, StandardOpenOption.CREATE_NEW)))) {\n pemWriter.writeObject(privatePem);\n }\n\n return new KeyFiles(publicKeyDestination, privateKeyDestination);\n }", "public java.security.KeyPair generateKeyPair() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ef in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyPairGeneratorSpi.generateKeyPair():java.security.KeyPair, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyPairGeneratorSpi.generateKeyPair():java.security.KeyPair\");\n }", "RSAKeygen(){\n Random rnd = new Random();\n p = BigInteger.probablePrime(bitlength, rnd);\n BigInteger eTmp = BigInteger.probablePrime(bitlength, rnd);\n\n while(p.equals(eTmp)){\n eTmp = BigInteger.probablePrime(bitlength,rnd);\n }\n\n q = eTmp;\n n = p.multiply(q);\n }", "@Override\n public KeyPairResourceModel generateNewKeyPairFor(ApplicationUser user) {\n removeExistingUserKeysFor(user);\n //create new one\n String keyComment = \"SYSTEM GENERATED\";\n KeyPairResourceModel result = sshKeyPairGenerator.generateKeyPair(keyComment);\n // must add to our repo before calling stash SSH service since audit\n // listener will otherwise revoke it.\n SshKeyEntity newRecord = enterpriseKeyRepository.createOrUpdateUserKey(user, result.getPublicKey(), keyComment);\n SshKey newKey = sshKeyService.addForUser(user, result.getPublicKey());\n enterpriseKeyRepository.updateRecordWithKeyId(newRecord, newKey);\n log.info(\"New managed key \" + newKey.getId() +\" of type USER created user {} ({})\", user.getId(), user.getSlug());\n return result;\n }", "public static HydraKey generateKey() throws NoSuchAlgorithmException {\n // Sets the keygenerator to use blowfish key\n KeyGenerator keygen = KeyGenerator.getInstance(ALGORITHM_DEFAULT);\n keygen.init(128); // set a keylength of 128 bits\n SecretKey secret_key = keygen.generateKey();\n HydraKey hk = new HydraKey(secret_key.getEncoded(), ALGORITHM_DEFAULT);\n return hk;\n }", "@Test\n\tpublic void getMyKeyPairs() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tks.createNewMyKeyPair(\"ichi\");\n\t\tks.createNewMyKeyPair(\"ni\");\n\t\tKeyPair kp = ks.getMyKeyPair(\"ichi\");\n\t\tassertNotNull(\"should have returned keypair\", kp);\n\t\tKeyPair kpp = ks.getMyKeyPair(\"ni\");\n\t\tassertNotNull(\"should have returned keypair\", kpp);\n\t}", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "@Override\n public byte[] generateKey() throws ProtocolException, IOException {\n BigInteger p, q, n, e, d;\n Polynomial pol;\n do {\n // we want e such that GCD(e, phi(p*q))=1. as e is actually fixed\n // below, then we need to search for suitable p and q\n p = generateCofactor();\n q = generateCofactor();\n n = computeModulus(p, q);\n e = generatePublicExponent(p, q);\n } while (!verifyCofactors(p, q, e));\n d = computePrivateExponent(p, q, e);\n pol = generatePolynomial(p, q, d);\n BigInteger[] shares = ProtocolUtil.generateShares(pol, tparams.getParties());\n RSAPrivateCrtKey[] packedShares = packShares(e, shares, n);\n try {\n storeShares(packedShares);\n } catch (SmartCardException ex) {\n throw new ProtocolException(\n \"Error while communicating with smart card: \" + ex.toString());\n }\n\n RSAPublicKey pk = SignatureUtil.RSA.paramsToRSAPublicKey(e, n);\n return pk.getEncoded();\n }", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "void generateSecretKey() {\n\n Random rand = new Random();\n \n // randomly generate alphabet chars\n this.secretKey.setCharAt(0, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(1, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(4, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(5, (char) (rand.nextInt(26) + 'a'));\n\n // randomly generate special chars\n // special chars are between 33-47 and 58-64 on ASCII table\n if (rand.nextBoolean()) {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(15) + '!'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(15) + '!'));\n } else {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(7) + ':'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(7) + ':'));\n }\n \n // randomly generate int between 2 and 5\n this.secretKey.setCharAt(7, (char) (rand.nextInt(4) + '2'));\n }", "public RecordObject generateLicenseKeys(String token, Object record) throws RestResponseException;", "void saveKeys(PGPPublicKeyRingCollection publicKeyRings, PGPSecretKeyRingCollection secretKeyRings, String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "public static KeyPair createKeyPair(){\n KeyPair pair = KeyPair.random();\n System.out.println(pair.getSecretSeed());\n System.out.println(pair.getAccountId());\n return pair;\n\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "public byte[] generateKey()\n\t{\n\t\tImageKeyGenerate ikg = ImageKeyGenerate.getMD5SHA256();\n\t\tthis.rowKey = MyBytes.toBytes(CommonUtils.byteArrayToHexString(ikg.generate(imageData)));\n\t\treturn this.rowKey;\n\t}", "public static X509V3CertificateGenerator GenerateSelfSignedCerteficate(X500Principal dnName1,X500Principal dnName2, BigInteger serialNumber ,PublicKey mypublicKey, PrivateKey myprivateKey, KeyUsage Keyus ) throws CertificateEncodingException, InvalidKeyException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException\n\t {\n\t\t\t X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();\n\t\t \n\n\t\t\t //certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new DERSequence(new DERObjectIdentifier(\"2.23.43.6.1.2\")));\n\n\t\t\t certGen.setSerialNumber(serialNumber);\n\t\t\t certGen.setSerialNumber(BigInteger.valueOf(System.currentTimeMillis()));\n\t\t certGen.setIssuerDN(dnName1); // use the same\n\t\t\t certGen.setSubjectDN(dnName2);\n\t\t\t // yesterday\n\t\t\t certGen.setNotBefore(new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000));\n\t\t\t // in 2 years\n\t\t\t certGen.setNotAfter(new Date(System.currentTimeMillis() + 2 * 365 * 24 * 60 * 60 * 1000));\n\t\t\t certGen.setPublicKey(mypublicKey);\n\t\t\t certGen.setSignatureAlgorithm(\"SHA256WithRSAEncryption\");\n\t\t\t certGen.addExtension(X509Extensions.KeyUsage, true, Keyus);\n\t\t\t certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new ExtendedKeyUsage(KeyPurposeId.id_kp_serverAuth));\n\n\t\t\t \n\t \treturn certGen;\n\t \t\n\t }", "java.lang.String getPubkey();", "public static void main(String[] args) throws Exception {\n KeyPairGenerator kpGen = KeyPairGenerator.getInstance(\"RSA\"); //create RSA KeyPairGenerator \n kpGen.initialize(2048, new SecureRandom()); //Choose key strength\n KeyPair keyPair = kpGen.generateKeyPair(); //Generate private and public keys\n PublicKey RSAPubKey = keyPair.getPublic();\n PrivateKey RSAPrivateKey = keyPair.getPrivate();\n\n //Information for Certificate\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\"); \n X500Name issuer = new X500Name(\"CN=\" + \"ExampleIssuer\"); // Issuer/Common Name\n X500Name subject = new X500Name(\"CN=\" + \"Client\"); //Subject\n Date notBefore = new Date(); //The date which the certificate becomes effective. \n long expiryDate = 1672437600000L; // expires 31 December 2022\n Date notAfter = new Date(expiryDate); //The date the certificate expires. \n BigInteger serialNumber = BigInteger.valueOf(Math.abs(random.nextInt())); //Cert Serial Number\n\n //Define the generator\n X509v3CertificateBuilder certGenerator \n = new JcaX509v3CertificateBuilder(\n issuer, \n serialNumber, \n notBefore,\n notAfter,\n subject,\n RSAPubKey\n );\n\n //Define how the certificate will be signed.\n //Usually with a hash algorithm and the Certificate Authority's private key. \n //Change argument x in .build(x) to not self-sign the cert.\n final ContentSigner contentSigner = new JcaContentSignerBuilder(\"SHA1WithRSAEncryption\").build(keyPair.getPrivate());\n\n //Generate a X.509 cert.\n X509CertificateHolder certificate = certGenerator.build(contentSigner);\n\n //Encode the certificate and write to a file. On Mac, you can open it with KeyChain Access\n //to confirm that it worked. \n byte[] encodedCert = certificate.getEncoded();\n FileOutputStream fos = new FileOutputStream(\"Example.cert\"); //Filename\n fos.write(encodedCert);\n fos.close();\n\n }", "byte[] genKeyBlock(byte[] mastersecret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", mastersecret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", mastersecret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", mastersecret, clientRandom, serverRandom);\r\n byte[] part4 = md5andshaprocessing(\"DDDD\", mastersecret, clientRandom, serverRandom);\r\n byte[] part5 = md5andshaprocessing(\"EEEEE\", mastersecret, clientRandom, serverRandom);\r\n byte[] part6 = md5andshaprocessing(\"FFFFFF\", mastersecret, clientRandom, serverRandom);\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n baos.write(part4);\r\n baos.write(part5);\r\n baos.write(part6);\r\n \r\n byte[] keyblock = baos.toByteArray();\r\n baos.reset();\r\n \r\n client_macsecret = new byte[20];\r\n server_macsecret = new byte[20];\r\n client_writekey = new byte[24];\r\n server_writekey = new byte[24];\r\n \r\n System.arraycopy(keyblock, 0, client_macsecret, 0, 20);\r\n System.arraycopy(keyblock, 20, server_macsecret, 0, 20);\r\n System.arraycopy(keyblock, 40, client_writekey, 0, 24);\r\n System.arraycopy(keyblock, 64, server_writekey, 0, 24);\r\n return keyblock;\r\n }", "private void createDerivedKey() throws NoSuchAlgorithmException, InvalidKeySpecException, IOException {\n byte[] salt = null;\n int numIterations;\n derivedKey = null;\n \n // read salt + numIterations from file if available\n File derivParamFile = configuration.getKeyDerivationParametersFile();\n if (derivParamFile.exists()) {\n DataInputStream inputStream = null;\n try {\n inputStream = new DataInputStream(new FileInputStream(derivParamFile));\n salt = new byte[FileEncryptionConstants.SALT_LENGTH];\n inputStream.read(salt);\n numIterations = inputStream.readInt();\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, numIterations);\n derivedKey = new DerivedKey(salt, numIterations, key);\n }\n finally {\n if (inputStream != null)\n inputStream.close();\n }\n }\n \n // if necessary, create a new salt and key and write the derivation parameters to the cache file\n if (derivedKey==null || derivedKey.numIterations!=NUM_ITERATIONS) {\n I2PAppContext appContext = I2PAppContext.getGlobalContext();\n salt = new byte[SALT_LENGTH];\n appContext.random().nextBytes(salt);\n \n DataOutputStream outputStream = null;\n try {\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, NUM_ITERATIONS);\n derivedKey = new DerivedKey(salt, NUM_ITERATIONS, key);\n outputStream = new DataOutputStream(new FileOutputStream(derivParamFile));\n outputStream.write(salt);\n outputStream.writeInt(NUM_ITERATIONS);\n }\n finally {\n if (outputStream != null)\n outputStream.close();\n }\n }\n }", "public GenerateKey() {\n\t\tsuper(\"generate_key\", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.impl.SQLDataType.VARCHAR);\n\n\t\tsetReturnParameter(RETURN_VALUE);\n\t\taddInParameter(LICENSE_DATE);\n\t\taddInParameter(EMAIL);\n\t}", "public RSAKeyContents generateKeys(char [] password) {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\tButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator(password);\r\n\t\t\tkpGen.init(new RSAKeyGenerationParameters(DEFAULT_PUBLIC_EXPONENT, rand, KEY_STRENGTH, CERTAINTY));\r\n\t\t\treturn kpGen.generateKeys();\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}", "public KpubData generateKpub(String dataToKpubCheck)\r\n\t\t\tthrows LibMCryptException {\n\r\n\t\tKeyPair keyPair = CryptoTools.generateKeyPair();\r\n\t\t\r\n\t\tRSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();\r\n\t\t\r\n\r\n\t\tString publicK = publicKey.getModulus().toString(16);\r\n\t\t\r\n\t\tString kPubCheck = null;\r\n\r\n\t\tKpubData ret = new KpubData(publicK, kPubCheck);\r\n\r\n\t\tthis.priK = ((RSAPrivateKey) keyPair.getPrivate());\r\n\r\n\t\t//Log.v(\"generateKpub\", \"key pair generated successfully\");\r\n\r\n\t\treturn ret;\r\n\t}", "ExportedKeyData makeKeyPairs(PGPKeyPair masterKey, PGPKeyPair subKey, String username, String email, String password) throws PGPException, IOException;", "private static Key generateKey(String secretKeyString) throws Exception {\n // generate secret key from string\n Key key = new SecretKeySpec(secretKeyString.getBytes(), \"AES\");\n return key;\n }", "private PrivateKey getUserKey() throws KeyChainException, InterruptedException {\n return KeyChain.getPrivateKey(getApplicationContext(), mCurrentProfile.getUserCertificateAlias());\n\n }", "private static void setupKeysAndCertificates() throws Exception {\n // set up our certificates\n //\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\n\n kpg.initialize(1024, new SecureRandom());\n\n String issueDN = \"O=Punkhorn Software, C=US\";\n issueKP = kpg.generateKeyPair();\n issueCert = Utils.makeCertificate(\n issueKP, issueDN, issueKP, issueDN);\n\n //\n // certificate we sign against\n //\n String signingDN = \"CN=William J. Collins, E=punkhornsw@gmail.com, O=Punkhorn Software, C=US\";\n signingKP = kpg.generateKeyPair();\n signingCert = Utils.makeCertificate(\n signingKP, signingDN, issueKP, issueDN);\n\n certList = new ArrayList<>();\n\n certList.add(signingCert);\n certList.add(issueCert);\n\n decryptingKP = signingKP;\n\n }", "@Override\n\tprotected SessionKey generateSessionKey() {\n\n\t\tSessionKey sk = new SessionKey();\n\t\t\n\t\tSecureRandom random = null;\n\t\ttry {\n\t\t\trandom = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tbyte bytes[] = new byte[16];\n\t\trandom.nextBytes(bytes);\n\n\t\tbyte transformation[] = \"AES/CBC/PKCS5Padding\".getBytes();\n\t\tsk.setTransformationName(transformation);\n\t\tsk.setKey(bytes); // 128 Bits\n\t\trandom.nextBytes(bytes);\n\t\tsk.setIV(bytes); // 128 Bits\n\n\t\t\n\t\treturn sk;\n\t}", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "public String generateApiKey() {\r\n\t\t\r\n\t\tString key = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < API_LENGTH; i++) {\r\n\t\t\tchar letter = (char) (Math.random() * (90 - 65 + 1) + 65);\r\n\t\t\tkey += letter;\r\n\t\t}\r\n\t\t\r\n\t\treturn key;\r\n\t}", "public static void execEnkripsi(File fileTemp, String pathTempFileEncryptName, String pathEncryptedSecretKeyFile, String pemContent, SimpleDateFormat sdf, String outputFileNameZip) throws Exception{\n String secretKey=RandomStringUtils.randomAlphanumeric(16);\r\n System.out.println(\"Generated Secret Key :\"+secretKey);\r\n File exportedFile;\r\n CompressingUtils compressingUtils = new CompressingUtils();\r\n String tmpPlainZipped = lokasiHasil+\"/tmp\"+outputFileNameZip;\r\n List<File> lsFile = new ArrayList<>();\r\n lsFile.add(fileTemp);\r\n if(compressingUtils.createZipWithoutPassword(lsFile, tmpPlainZipped)){\r\n exportedFile = new File(tmpPlainZipped);\r\n //delete file awal yang telah dikompresi\r\n for(File dfile : lsFile){\r\n dfile.delete();\r\n }\r\n }else{\r\n throw new Exception(\"gagal melakukan kompresi file\");\r\n }\r\n System.out.println(\"file kompresi berhasil dibuat \"+ outputFileNameZip);\r\n\r\n /*Step 3 : enkripsi file dengan kunci acak */\r\n System.out.println(\"Step 3 : enkripsi file dengan kunci acak\");\r\n\r\n\r\n String fileOutputEcnryptedname = lokasiHasil+\"/\"+outputFileNameZip;\r\n\r\n File tempFileEncryptName = new File(pathTempFileEncryptName);\r\n try {\r\n CryptoUtils.encrypt(secretKey, exportedFile, tempFileEncryptName);\r\n } catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi file gagal : \" + e.getMessage());\r\n }\r\n\r\n EncryptionUtils utils = new EncryptionUtils();\r\n PublicKey publicKey = utils.getPublicKeyFromX509(pemContent);\r\n\r\n /*Step 4 : Enkripsi kunci acak dengan public key dari DJP*/\r\n System.out.println(\"Step 4 : enkripsi kunci acak dengan public key dari DJP\");\r\n\r\n String encryptedSecretKey;\r\n try{\r\n encryptedSecretKey = CryptoUtils.encrypt(secretKey, publicKey);\r\n }catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi kunci gagal : \" + e.getMessage());\r\n }\r\n File encryptedSecretKeyFile = new File(pathEncryptedSecretKeyFile);\r\n try {\r\n FileOutputStream outputStream = new FileOutputStream(encryptedSecretKeyFile);\r\n outputStream.write(encryptedSecretKey.getBytes());\r\n outputStream.close();\r\n }catch (FileNotFoundException e){\r\n throw new Exception(\"kunci yang dienkripsi tidak ditemukan : \" + pathEncryptedSecretKeyFile);\r\n } catch (IOException e) {\r\n throw new Exception(\"gagal membentuk kunci enkripsi\");\r\n }\r\n\r\n /*Step 5: Compress data dan key kedalam file zip dan menjadi hasil akhir*/\r\n System.out.println(\"Step 5: Compress enkripsi file dan kunci kedalam file zip\");\r\n\r\n List<File> listFiles = new ArrayList<File>();\r\n listFiles.add(tempFileEncryptName);\r\n listFiles.add(encryptedSecretKeyFile);\r\n\r\n if(listFiles.size() != 2){\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n throw new Exception(\"file enkripsi dan/atau key enkripsi salah satunya tidak ada\");\r\n }\r\n\r\n compressingUtils = new CompressingUtils();\r\n if (compressingUtils.createZip(listFiles, fileOutputEcnryptedname)) {\r\n /*Step 6 : hapus file data dan key, hasil dari step 3 dan 4 */\r\n System.out.println(\"Step 6 : hapus file data dan key, hasil dari step 3 dan 4\");\r\n\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n /*Step 7: hapus file zip, hasil dari step 2 */\r\n System.out.println(\"Step 7: hapus file zip, hasil dari step 2\");\r\n\r\n exportedFile.delete();\r\n }\r\n\r\n System.out.println(\"Proses enkripsi selesai, nama file : \" + fileOutputEcnryptedname);\r\n }", "public void generateKeys(){\n\t\t//Apply permutation P10\n\t\tString keyP10 = permutation(key,TablesPermutation.P10);\n\t\tresults.put(\"P10\", keyP10);\n\t\t//Apply LS-1\n\t\tString ls1L = leftShift(keyP10.substring(0,5),1);\n\t\tString ls1R = leftShift(keyP10.substring(5,10),1);\n\t\tresults.put(\"LS1L\", ls1L);\n\t\tresults.put(\"LS1R\", ls1R);\n\t\t//Apply P8 (K1)\n\t\tk1 = permutation(ls1L+ls1R, TablesPermutation.P8);\n\t\tresults.put(\"K1\", k1);\n\t\t//Apply LS-2\n\t\tString ls2L = leftShift(ls1L,2);\n\t\tString ls2R = leftShift(ls1R,2);\n\t\tresults.put(\"LS2L\", ls2L);\n\t\tresults.put(\"LS2R\", ls2R);\n\t\t//Apply P8 (K2)\n\t\tk2 = permutation(ls2L+ls2R, TablesPermutation.P8);\n\t\tresults.put(\"K2\", k2);\n\t}", "private void setPrivateKey(String b64key) {\n\t\ttry {\n\t\t\tbyte[] bytes = Base64.decodeBase64(b64key);\n\t\t\tPKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(bytes);\n\t\t\tKeyFactory fact = KeyFactory.getInstance(\"RSA\");\n\t\t\tpk = fact.generatePrivate(keySpec);\n\t\t} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Key generarKey() throws Exception{\n Key key = new SecretKeySpec(keyvalue, instancia); \n return key;\n }", "@Override\n public String generateKey(int round) {\n return this.key.substring(4 * round, 4 * round + 16);\n }", "public String getPrivateKey();", "public String getPrivateKey();", "private static byte[] genKey(String algorithm, int keySize) throws NoSuchAlgorithmException {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(algorithm);\n\n keyGenerator.init(keySize);\n\n SecretKey secretKey = keyGenerator.generateKey();\n\n return secretKey.getEncoded();\n }", "@Test\n\tpublic void createNewMyKeyEmptyName() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean re = ks.createNewMyKeyPair(\"\");\n\t\tassertFalse(\"Should not have created new my keypair: empty name\", re);\n\t}", "public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}", "@Test\n public void testGetCmekKey() {\n String project = UUID.randomUUID().toString();\n MockFailureCollector collector = new MockFailureCollector();\n String configKey = String.format(\"projects/%s/locations/key-location/keyRings/ring/cryptoKeys/test_key\", project);\n String key = String.format(\"projects/%s/locations/us/key-location/my_ring/cryptoKeys/test_key\", project);\n\n MockArguments arguments = new MockArguments();\n arguments.set(\"gcp.cmek.key.name\", key);\n\n CryptoKeyName keyReturned = CmekUtils.getCmekKey(configKey, arguments.asMap(), collector);\n Assert.assertEquals(configKey, keyReturned.toString());\n }", "private SecretKey generateSecretKey() throws NoSuchAlgorithmException {\n final KeyGenerator keygen = KeyGenerator.getInstance(KEYSPEC_ALGORITHM);\n keygen.init(KEY_SIZE, mRandom);\n return keygen.generateKey();\n }", "public void newKeystore(String alias,String password, String bodyCert) {\n try {\n CertAndKeyGen keyGen = new CertAndKeyGen(\"RSA\", ALGORITHM, null);\n try {\n keyGen.generate(KEY_LEN);\n PrivateKey pk = keyGen.getPrivateKey();\n X509Certificate cert;\n cert = keyGen.getSelfCertificate(new X500Name(bodyCert), (long) EXPIRATION * 24 * 60 * 60);\n X509Certificate[] chain = new X509Certificate[1];\n chain[0]= cert;\n //creo el request PKCS10\n PKCS10 certreq = new PKCS10 (keyGen.getPublicKey());\n Signature signature = Signature.getInstance(ALGORITHM);\n signature.initSign(pk);\n certreq.encodeAndSign(new X500Name(bodyCert), signature);\n //-creo el archivo CSR-\n //FileOutputStream filereq = new FileOutputStream(\"C:\\\\test\\\\certreq.csr\");\n FileOutputStream filereq = new FileOutputStream(OUTPUTCERT_PATH);\n PrintStream ps = new PrintStream(filereq);\n certreq.print(ps);\n ps.close();\n filereq.close();\n \n this.ks = KeyStore.getInstance(INSTANCE);\n this.ksPass = password.toCharArray();\n try (FileOutputStream newkeystore = new FileOutputStream(archivo)) {\n ks.load(null,null);\n ks.setKeyEntry(alias, pk, ksPass, chain);\n ks.store(newkeystore, ksPass);\n }\n } catch (InvalidKeyException | IOException | CertificateException | SignatureException | KeyStoreException ex) {\n LOG.error(\"Error a manipular el archivo: \"+archivo,ex);\n }\n \n } \n catch (NoSuchAlgorithmException | NoSuchProviderException ex) {\n LOG.error(ex);\n }\n }", "public PrivateKey getKey();", "private void initKey() {\n String del = \":\";\n byte[] key;\n if (MainGame.applicationType == Application.ApplicationType.Android) {\n key = StringUtils.rightPad(Build.SERIAL + del + Build.ID + del, 32, \"~\").getBytes();\n } else if (MainGame.applicationType == Application.ApplicationType.Desktop) {\n key = new byte[]{0x12, 0x2d, 0x2f, 0x6c, 0x1f, 0x7a, 0x4f, 0x10, 0x48, 0x56, 0x17, 0x4b, 0x4f, 0x48, 0x3c, 0x17, 0x04, 0x06, 0x4b, 0x6d, 0x1d, 0x68, 0x4b, 0x52, 0x50, 0x50, 0x1f, 0x06, 0x29, 0x68, 0x5c, 0x65};\n } else {\n key = new byte[]{0x77, 0x61, 0x6c, 0x0b, 0x04, 0x5a, 0x4f, 0x4b, 0x65, 0x48, 0x52, 0x68, 0x1f, 0x1d, 0x3c, 0x4a, 0x5c, 0x06, 0x1f, 0x2f, 0x12, 0x32, 0x50, 0x19, 0x3c, 0x52, 0x04, 0x17, 0x48, 0x4f, 0x6d, 0x4b};\n }\n for (int i = 0; i < key.length; ++i) {\n key[i] = (byte) ((key[i] << 2) ^ magic);\n }\n privateKey = key;\n }", "private void generateIntegrityKeyPair(boolean clientMode) throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException {\n byte[] cimagic = CLIENT_INT_MAGIC.getBytes(encoding);\n byte[] simagic = SVR_INT_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n byte[] keyBuffer = new byte[H_A1.length + cimagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, H_A1.length);\n System.arraycopy(cimagic, 0, keyBuffer, H_A1.length, cimagic.length);\n md5.update(keyBuffer);\n byte[] Kic = md5.digest();\n System.arraycopy(simagic, 0, keyBuffer, H_A1.length, simagic.length);\n md5.update(keyBuffer);\n byte[] Kis = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST12:Kic: \", Kic);\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST13:Kis: \", Kis);\n }\n if (clientMode) {\n myKi = Kic;\n peerKi = Kis;\n } else {\n myKi = Kis;\n peerKi = Kic;\n }\n }", "public abstract PrivateKey generatePrivate(KeySpec keySpec)\n\t throws InvalidKeySpecException;", "public byte[] createKey(String keyName, String token) throws InternalSkiException {\n return createKey(keyName, null, SkiKeyGen.DEFAULT_KEY_SIZE_BITS, token);\n }", "public void KGC(byte[] id_){\n RAND set = new RAND(); \n byte[] RAW = new byte[100];\n for (int i=0;i<100;i++) RAW[i]=(byte)(i);\n set.clean();\n \tset.seed(100,RAW); //create constant key for KGC\n\n id = id_;\n hash1 = new HASH256(); //SHA256\n hash2 = new HASH512(); //SHA512\n gen = ECP.generator(); //generator\n order = new BIG(ROM.CURVE_Order); //order\n skS = BIG.randomnum(order, set); //KGC secret key\n pkS = gen.mul(skS); //KGC public key\n r = BIG.randomnum(order, rng); //KGC random secret key\n R = gen.mul(r); //KGC random public key\n\n hash = hashing(id_, R, hash1, order); //hash with SHA256\n hash.mod(order);\n S = BIG.modadd((BIG.modmul(hash, skS, order)), r, order); //calculate partial private key\n }", "public RSAKeyContents generateKeys(RSAKeyMetadata metadata, int publicExp, int keyStrength, int certainty) {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\tButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator(metadata);\r\n\t\t\tkpGen.init(new RSAKeyGenerationParameters(BigInteger.valueOf(publicExp), rand, keyStrength, certainty));\r\n\t\t\treturn kpGen.generateKeys();\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}", "private SecretKey generatePukBaseKey(byte[] derivedKeyBytes) {\n // Extract bytes 10-25 as recovery puk base key bytes\n final byte[] recoveryPukBaseKeyBytes = new byte[16];\n System.arraycopy(derivedKeyBytes, 10, recoveryPukBaseKeyBytes, 0, 16);\n return keyConvertor.convertBytesToSharedSecretKey(recoveryPukBaseKeyBytes);\n }", "ApiKeys regenerateKey(RegenerateKeyParameters parameters);", "public String[] keyGen(){\n \n p1 = BigInteger.probablePrime(N / 2, random);\n p2 = BigInteger.probablePrime(N / 2, random);\n phi0 = (p1.subtract(one)).multiply(p2.subtract(one));\n \n BigInteger modulus = p1.multiply(p2);\n BigInteger privateKey = setPrivateKey(modulus);\n BigInteger publicKey = privateKey.modInverse(phi0);\n \n /* Retourne un tableau de 3 chaine de caractere contenant dans cette ordre */\n /* cle publique, modulus, cle prive */\n String tab[] = {publicKey + \"\", modulus + \"\", privateKey + \"\"};\n return tab;\n \n }", "short generateKeyAndWrap(byte[] applicationParameter, short applicationParameterOffset, byte[] publicKey, short publicKeyOffset, byte[] keyHandle, short keyHandleOffset, byte info);", "public void run(int id) throws Exception {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(1024);\n KeyPair kp = keyGen.generateKeyPair();\n PublicKey puk = kp.getPublic();\n PrivateKey prk = kp.getPrivate();\n saveToFile(id,puk,prk);\n }", "@PostMapping(\"/create\")\n public String createSymmetricKey() {\n\n AWSKMS kmsClient = new KmsClientBuilder().buildKmsClient();\n \n String creatingMasterKey = \"Creating Master Key\";\n CreateKeyRequest request = new CreateKeyRequest().withDescription(creatingMasterKey);\n CreateKeyResult result = kmsClient.createKey(request);\n\n return \"Object Type: Symmetric Key\\nuid: \"+ uid + \"\\n\";\n }", "private String exportkey() {\n\n\t\ttry {\n\t\t\tbyte[] keyBytes = serversharedkey.getEncoded();\n\t\t\tString encodedKey = new String(Base64.encodeBase64(keyBytes), \"UTF-8\");\n\t\t\tFile file = new File(\"serversharedKey\");\n\t\t\t//System.out.println(\"The server Private key: \" + encodedKey);\n\t\t\tPrintWriter writer = new PrintWriter(file, \"UTF-8\");\n\t\t\twriter.println(encodedKey);\n\t\t\twriter.close();\n\n\t\t\treturn encodedKey;\n\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.6503651", "0.64754003", "0.6165851", "0.6136214", "0.60671693", "0.60601676", "0.59695494", "0.5961723", "0.59075874", "0.5827812", "0.5780505", "0.57747704", "0.576326", "0.5583632", "0.55324024", "0.55194384", "0.54958075", "0.5436486", "0.5434319", "0.541811", "0.5415248", "0.53809327", "0.53745973", "0.53043294", "0.52855957", "0.52824724", "0.52206427", "0.5218632", "0.521628", "0.5206872", "0.5198038", "0.5178148", "0.51779276", "0.5163397", "0.5158882", "0.51495653", "0.5149534", "0.51387423", "0.5137596", "0.5109888", "0.5103198", "0.5089223", "0.5081238", "0.5080604", "0.50652915", "0.5055608", "0.5041149", "0.5033223", "0.5020104", "0.4995961", "0.49941033", "0.49925944", "0.49895227", "0.498253", "0.49756458", "0.4969047", "0.49654073", "0.4952992", "0.4950971", "0.493841", "0.4932538", "0.49319294", "0.49120504", "0.49059054", "0.48992148", "0.48989624", "0.48925516", "0.48821718", "0.48676884", "0.48633757", "0.48623607", "0.4858507", "0.48557758", "0.48247838", "0.48157632", "0.48111978", "0.48110646", "0.47966352", "0.4790347", "0.4790347", "0.47851938", "0.47844633", "0.47804847", "0.47803262", "0.47767985", "0.4770724", "0.4749185", "0.4733349", "0.473055", "0.472871", "0.4725551", "0.47229668", "0.47079208", "0.46998918", "0.4696225", "0.46949404", "0.46871322", "0.46865115", "0.46740133", "0.4670068" ]
0.7622708
0
The operations will create a default lattice which will map all variables to maybe null (since that was our default). Of course, "this" should never be null.
public TupleLatticeElement<Variable, NullLatticeElement> createEntryValue( MethodDeclaration method) { TupleLatticeElement<Variable, NullLatticeElement> def = ops.getDefault(); def.put(getAnalysisContext().getThisVariable(), NullLatticeElement.NOT_NULL); AnnotationSummary summary = annoDB.getSummaryForMethod(method.resolveBinding()); for (int ndx = 0; ndx < method.parameters().size(); ndx++) { SingleVariableDeclaration decl = (SingleVariableDeclaration) method.parameters().get(ndx); Variable paramVar = getAnalysisContext().getSourceVariable(decl.resolveBinding()); if (summary.getParameter(ndx, AnnotatedNPEAnalysis.NON_NULL_ANNO) != null) //is this parameter annotated with @Nonnull? def.put(paramVar, NullLatticeElement.NOT_NULL); } return def; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ILatticeOperations<TupleLatticeElement<Variable, NullLatticeElement>> getLatticeOperations() {\n\t\treturn ops;\n\t}", "public void setupPlainVariables_xjal()\n/* 422: */ {\n/* 423:492 */ this.mapPanel = \n/* 424:493 */ new TileMapPanel(new TileImageProvider());\n/* 425: */ }", "public Transducer ()\n\t{\n\t\tsumLatticeFactory = new SumLatticeDefault.Factory();\n\t\tmaxLatticeFactory = new MaxLatticeDefault.Factory();\n\t}", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private DiscretePotentialOperations() {\r\n\t}", "public Operations() {\n initComponents();\n populateO();\n }", "public ShapeRadioButtonGroup _placeholder_DefaultValue_xjal()\n/* 36: */ {\n/* 37: 68 */ TileGIS self = this;\n/* 38: 69 */ return null;\n/* 39: */ }", "public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ this.placeholder = _placeholder_DefaultValue_xjal();\n/* 68: */ }", "public VariableGridLayout() {\n\t\tthis(FIXED_NUM_ROWS, 1, 0, 0);\n\t}", "public LoansInfoPolitics()\n\t{\n\t\tsuper(new BorderLayout());\n\t}", "public lv3()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n //super(950, 600, 1); \n //prepare();\n prepare();\n stopped();\n started();\n }", "Tuple (){\n\t\tleft=null;\n\t\tright=null;\n\t}", "public BasicKPartiteGraph() {\n\t\tthis(\"none\",UNLIMITED_PARTITIONS);\n\t}", "public Universe()\n\t{\n\t\tthis.dimension = 3;\n\t\tthis.particles = new ArrayList<Particle>();\n\t\tthis.timebase = DEF_TIMEBASE;\n\t}", "public LifeComponent() {\n // call other constructor with null param\n this(null);\n }", "public PlatzVerkaufsWerkzeug()\r\n\t{\r\n\t\t_ui = new PlatzVerkaufsWerkzeugUI();\r\n\t\tregistriereUIAktionen();\r\n\t\t// Am Anfang wird keine Vorstellung angezeigt:\r\n\t\tsetVorstellung(null);\r\n//\t\t_auswahl = new Map<Platz, Boolean>; Alternative mit Map\r\n\t}", "public void initDefaultValues(SurgicalPathologyReport t)\r\n\t{\n\r\n\t}", "public Lattice(int[][] values, String t, boolean willDraw){\n title = t;\n draw = willDraw;\n score = 0;\n n = values[0].length;\n totalElements = n*n;\n numNegatives=0;\n //numPositives=0;\n lattice = new Element[n][n];\n rand = new Random();\n //Initialize lattice with random elements\n for(int i = 0; i < n; i++){\n for(int j = 0; j < n; j++){\n lattice[i][j] = new Element(values[i][j]);\n }\n }\n //Calculate score for full matrix\n calculateEntireScore();\n //Draw the lattice\n if(draw)\n setUpFrame();\n }", "public PresentValueHullWhiteMonteCarloCalculator() {\n _nbPath = DEFAULT_NB_PATH;\n }", "public Celula() {\n this(null);\n }", "public VoronoiVisualization()\n\t \t{\n\t\t super();\n\t \t}", "public Nodo1Controlador() {\n this.reinit();\n\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "public CustomSolver() {\n this.possibleSol = this.generateTokenSet();\n this.curToken = 0;\n }", "public abstract SolutionPartielle solutionInitiale();", "public AntelopePanel() {\n this( null, null, true );\n }", "public void initializeStructure(){\n\t\tif ( !this.isRegistered()){\n\t\t\tthrow new Error(\"Can't initialize structure for unregistered SOS2Primitive\");\n\t\t}\n\t\tMatrix matrix=parentComponent.matrix;\n\t\tint col=0;\n\t\t// First create a variable for the x value itself but have it contribute nothing to the objective \n\t\tMatrixVariable newVariable=new MatrixVariable(0,0,1.0,LPX.LPX_FR,LPX.LPX_CV,matrix.numCols(),ObjectiveType.SOS2DUMMY);\n\t\tnewVariable.setTag(objType+label+\"_x\");\n\t\tmatrix.addVariable(newVariable);\n\t\tregisterVariable(newVariable,col);\n\t\tcol++;\n\t\t// Now create the weighting variables \n\t\tfor(int i=0;i<xVals.length;i++){\n\t\t\tnewVariable=new MatrixVariable(yVals[i],\n\t\t\t\t\t0.0,1.0,\n\t\t\t\t\tLPX.LPX_DB,LPX.LPX_CV,matrix.numCols(),objType);\n\t\t\tnewVariable.setTag(objType+label+\"y\"+i);\n\t\t\tmatrix.addVariable(newVariable);\n\t\t\tregisterVariable(newVariable,col);\n\t\t\tcol++;\n\t\t}\n\t\t// Now the binary variables\n\t\tfor(int i=0;i<(xVals.length-1);i++){\n\t\t\tnewVariable=new MatrixVariable(0,\n\t\t\t\t\t0.0,1.0,\n\t\t\t\t\tLPX.LPX_DB,LPX.LPX_IV,matrix.numCols(),ObjectiveType.SOS2DUMMY);\n\t\t\tnewVariable.setTag(label+\"b\"+i);\n\t\t\tmatrix.addVariable(newVariable);\n\t\t\tregisterVariable(newVariable,col);\n\t\t\tcol++;\n\t\t}\t\t\n\t}", "protected void initModel() throws CommandLineFormatException, NullCoordinateException\n\t{\n\t\t\n\t\tfinal Var vdt = command.get(CNFTCommandLine.DT); //default dt\n\t\t\n\t\tcortical = new NeighborhoodMap(CORTICAL, \n\t\t\t\tnew SomUM(inputSpace, vdt, extendedFramedSpace)){\n\t\t\tpublic void compute() throws NullCoordinateException{\n\t\t\t\tsuper.compute();\n\t\t\t\tpotential.resetState();\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\tpotential = getPotential(vdt);\n\t\t\n\t\t\n\t\tcortical.addParameters(input,potential,command.get(CNFTCommandLine.LEARNING_RATE));\n\t\tNeighborhood neigh = new V4Neighborhood2D( extendedFramedSpace, new UnitLeaf((UnitParameter) cortical));\n\t\tneigh.setNullUnit(new ConstantUnit(new Var(0)));\n\t\t((NeighborhoodMap)cortical).addNeighboors(neigh);\n\t\t\n\t\t\n\t\tthis.root = cortical;\n\t\t\n\t\tcorticalPot = new Map(CORTICAL_POT, new Sum(vdt, extendedFramedSpace, new Leaf(cortical)));\n\t\tthis.addParameters(corticalPot);\n\t\t\n\t\t\n\n\t}", "public DancingNode()\n {\n L=R=U=D=this;\n }", "public CalcLayout() {\n\t\tthis(0);\n\t}", "public Context() {\n this.mFunctionSet=new ArrayList();\n this.mTerminalSet=new ArrayList();\n this.mPrimitiveMap=new TreeMap();\n this.mCache=new MyLinkedHashMap(500, .75F, true);\n this.previousBest=Double.MAX_VALUE;\n}", "public void clearVars() {\n setLatitude (FLOATNULL);\n setLongitude (FLOATNULL);\n setDepth (FLOATNULL);\n setTemperatureMin (FLOATNULL);\n setTemperatureMax (FLOATNULL);\n setSalinityMin (FLOATNULL);\n setSalinityMax (FLOATNULL);\n setOxygenMin (FLOATNULL);\n setOxygenMax (FLOATNULL);\n setNitrateMin (FLOATNULL);\n setNitrateMax (FLOATNULL);\n setPhosphateMin (FLOATNULL);\n setPhosphateMax (FLOATNULL);\n setSilicateMin (FLOATNULL);\n setSilicateMax (FLOATNULL);\n setChlorophyllMin (FLOATNULL);\n setChlorophyllMax (FLOATNULL);\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "ROp() {super(null); _ops=new HashMap<>(); }", "public void clear() {\n\t\t\tsuper.clear();\n\t\t\tjgraph.getGraphLayoutCache().remove(nullnodes.toArray());\n\t\t\tnullnodes = new LinkedList<DefaultGraphCell>();\n\t\t}", "private void drawModelElements_PlainVariables_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 237: */ {\n/* 238:320 */ if (!_publicOnly) {\n/* 239:321 */ drawPlainVariable(_panel, _g, 20, 50, 10, 0, \"mapPanel\", this.mapPanel, false);\n/* 240: */ }\n/* 241: */ }", "public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }", "public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }", "public Equation() {\n alpha_arr = new ArrayList<LinkedList<VariableUnit>>();\n for (int i = 0; i < 26; i++) {\n LinkedList<VariableUnit> list = new LinkedList<VariableUnit>();\n alpha_arr.add(list);\n }\n \n op_order = new LinkedList<VariableUnit>();\n }", "public Lattice(Lattice l, String t, boolean willDraw){\n title = t;\n draw = willDraw;\n if(l == null){\n System.err.println(\"Null lattice\");\n return;\n }\n score = 0;\n n = l.n();\n totalElements = n*n;\n numNegatives=0;\n //numPositives=0;\n rand = new Random();\n lattice = new Element[n][n];\n //Initialize lattice with random elements\n for(int i = 0; i < n; i++){\n for(int j = 0; j < n; j++){\n lattice[i][j] = new Element(l.getLatticeValueAt(i,j));\n }\n }\n //Calculate score for full matrix\n calculateEntireScore();\n //Draw the lattice\n if(draw)\n setUpFrame();\n }", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "public View() {\n\t\tlastBlk = new HashMap<>();\n\t\tstate = new HashMap<>();\n\t\tbalance = new HashMap<>();\n\t\tmode = new HashMap<>();\n\t\ttoken = new HashMap<>();\n\t}", "public Formula() {\t\n\t\t// TODO: implement this.\n\t\t// throw new RuntimeException(\"not yet implemented.\");\n\t\tclauses=new EmptyImList<Clause>();\n\t}", "public TradeVariables() { /*gets default values*/ }", "public Matrix33() {\r\n // empty\r\n }", "protected SimpleHeatmapNodeModel() {\r\n\t\tsuper(1, 0);\r\n\t}", "public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }", "public Layer() {\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tfor (int j = 0; j < 16; j++) {\n\t\t\t\tgrid[i][j] = false;\n\t\t\t}\n\t\t}\n\t}", "private void initialize() {\n this.traitMap = new HashMap<T, ITrait<T>>();\n this.traitList = new ArrayList<ITrait<T>>();\n this.observers = Collections.synchronizedList(new ArrayList<IStatisticsObserver>());\n this.dimensionName = \"UNNAMED\";\n\n }", "public Mesh() {\n this(DEFAULT_COORDS);\n }", "private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\n }", "public MultiCache () {\n super();\n this.locals = new ArrayList<Coordinates>();\n this.stage = 0;\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "protected GenTreeOperation() {}", "public salida()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n }", "public Universe() {\n\t\tset = new HashSet<T>();\n\t}", "public AlgorithmDesign() {\n initComponents();\n }", "@Override\n public List<String> getVariables()\n {\n return null;\n }", "public Lattice(int size, String t, boolean willDraw){\n title = t;\n draw = willDraw;\n if(size <= 0){\n System.err.println(\"Must create a positive lattice number,\" +\n \"creating default 5x5 lattice\");\n n = 5;\n }\n score = 0;\n n = size;\n totalElements = n*n;\n numNegatives=0;\n //numPositives=0;\n rand = new Random();\n lattice = new Element[n][n];\n //Initialize lattice with random elements\n for(int i = 0; i < n; i++){\n for(int j = 0; j < n; j++){\n lattice[i][j] = new Element(rand.nextInt(2)-1);\n }\n }\n //Calculate score for full matrix\n calculateEntireScore();\n\n //Draw the lattice\n if(draw)\n setUpFrame();\n \n }", "public DefaultTip(String name, Object tip)\n/* */ {\n/* 39 */ this.name = name;\n/* 40 */ this.tip = tip;\n/* */ }", "private TETile[][] initialize() {\n int width = size.width;\n int height = size.height;\n world = new TETile[width][height];\n for (int w = 0; w < width; w++) {\n for (int h = 0; h < height; h++) {\n world[w][h] = Tileset.NOTHING;\n }\n }\n return world;\n }", "private void initilize()\n\t{\n\t\tdimXNet = project.getNoC().getNumRotX();\n\t\tdimYNet = project.getNoC().getNumRotY();\n\t\t\n\t\taddProperties();\n\t\taddComponents();\n\t\tsetVisible(true);\n\t}", "public Layout() {\n\n //nao precisa colocar externo, apenas referencia com a linha 0\n for (int i = 0; i < 4; i++) {\n matrix[0][i] = Estados.EXTERNO;\n }\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = Estados.ROOM;\n }\n\n matrix[2][1] = Estados.ROOM_EMPTY;\n matrix[2][2] = Estados.ROOM_EMPTY2;\n\n matrix[2][0] = Estados.ACESSO_EXTERNO;\n matrix[2][3] = Estados.ACESSO_INTERNO;\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = Estados.ROOM;\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[4][i] = Estados.EXTERNO2;\n }\n\n }", "public Network() {\r\n\t\tobjective = null;\r\n\t\tvariables = new ArrayList<Variable>();\r\n\t\tconstraints = new ArrayList<Constraint>();\r\n\t}", "public TShapePanel() {\r\ncommonInitialization();\r\n }", "public Nodo() {\n\t\tthis(null, null);\n\t}", "public CentrosTrabajo() {\n initComponents();\n }", "public void initialize() {\n setThisFacility(null);\n loadData();\n initCols();\n\n }", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "private FplList() {\n\t\tshape = new FplValue[0][];\n\t}", "public BasicStrategy() {\r\n if (pairTable == null) {\r\n createPairTable();\r\n }\r\n if (aceTable == null) {\r\n createAceTable();\r\n }\r\n if (totalTable == null) {\r\n createTotalTable();\r\n }\r\n }", "public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\n }", "public TransformDesign() {\n tLayerPool = new TransformLayerPool();\n }", "private HyperplaneSubsets() {\n }", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "private void initialize() {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setBounds(new Rectangle(0, 0, 943, 615));\n this.setPreferredSize(new Dimension(890,570));\n this.setMinimumSize(new Dimension(890,570));\n\n\t\tm_GraphControlGradient = new GraphControl();\n\t\tm_GraphControlGradient.setBounds(new Rectangle(4, 16, 461, 285));\n\t\tm_GraphControlGradient.setControlsEnabled(false);\n\n\t\tm_GraphControlFlowRate = new GraphControl();\n\t\tm_GraphControlFlowRate.setBounds(new Rectangle(3, 16, 462, 241));\n\t\tm_GraphControlFlowRate.setControlsEnabled(false);\n\n\t\tthis.add(getJbtnPreviousStep(), null);\n\t\tthis.add(getJpanelGradientProfile(), null);\n\t\tthis.add(getJpanelFlowProfile(), null);\n\t\tthis.setVisible(true);\n\t\tthis.add(getJbtnHelp(), null);\n\t\tthis.add(getJpanelStep5(), null);\n\t\t\n\t\tthis.tmOutputModel.addTableModelListener(this);\n\t\tthis.addComponentListener(this);\n\t}", "public IsingLattice(int[][] lattice1, int dimension) {\n this.lattice = lattice1;\n this.m = dimension;\n }", "public LatticeMagInt getSimSystem(){return lattice;}", "@Override\r\n public void initialiseEmptyPanel()\r\n {\r\n gaugeName = Helpers.createLabel(\"Default\");\r\n \r\n gauge = new Radial();\r\n \r\n gauge.setPreferredSize(new Dimension(300,300));\r\n setTitle(\"Default\");\r\n add(gaugeName);\r\n add(gauge);\r\n \r\n }", "public Node() {\r\n\t\tthis.input = null;\r\n\t\tthis.inputWeights = null;\r\n\t}", "@Override\n\tpublic void init() {\n\t\tGraph<Number,Number> ig = Graphs.<Number,Number>synchronizedDirectedGraph(new DirectedSparseMultigraph<Number,Number>());\n\t\tObservableGraph<Number,Number> og = new ObservableGraph<Number,Number>(ig);\n\t\tog.addGraphEventListener(new GraphEventListener<Number,Number>() {\n\n\t\t\tpublic void handleGraphEvent(GraphEvent<Number, Number> evt) {\n\t\t\t\tSystem.err.println(\"got \"+evt);\n\n\t\t\t}});\n\t\tthis.g = og;\n\n\t\tthis.timer = new Timer();\n\t\tthis.layout = new FRLayout2<Number,Number>(g);\n\t\t// ((FRLayout)layout).setMaxIterations(200);\n\t\t// create a simple pickable layout\n\t\tthis.vv = new VisualizationViewer<Number,Number>(layout, new Dimension(600,600));\n\n\n\n\t}", "public ResultTransform() {\n super(((org.xms.g.utils.XBox) null));\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl());\n } else {\n this.setGInstance(new GImpl());\n }\n wrapper = false;\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "@Override\n public void convertToDefaultValueOps() {\n\n }", "public PollutedVarsPointsToAnalysis(DirectedGraph<Unit> graph) {\n super(graph);\n emptyMap = new HashMap<>();\n initialMap = new HashMap<>();\n\n }", "Tetrisblock()\n {\n newblockparam();\n newmapparam();\n setboundary();\n }", "public LSystemBuilderImpl() {\n\t\tthis.commands = new Dictionary();\n\t\tthis.productions = new Dictionary();\n\t\tunitLength = 0.1;\n\t\tunitLengthDegreeScaler = 1;\n\t\torigin = new Vector2D(0, 0);\n\t\tangle = 0;\n\t\taxiom = \"\";\n\t}", "public TriangleSolitaireModelImpl() {\r\n super(new TriangleBoard());\r\n }", "public GeneralViewControl() {\r\n }", "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }", "private Vect3() {\n\t\tthis(0.0,0.0,0.0);\n\t}", "public interface ILits {\n\n public static int UNDEFINED = -1;\n\n public abstract void init(int nvar);\n\n /**\n * Translates a Dimacs literal into an internal representation literal.\n * \n * @param x\n * the Dimacs literal (a non null integer).\n * @return the literal in the internal representation.\n */\n public abstract int getFromPool(int x);\n\n /**\n * Returns true iff the variable is used in the set of constraints.\n * \n * @param x\n * @return true iff the variable belongs to the formula.\n */\n boolean belongsToPool(int x);\n\n public abstract void resetPool();\n\n public abstract void ensurePool(int howmany);\n\n public abstract void unassign(int lit);\n\n public abstract void satisfies(int lit);\n\n public abstract boolean isSatisfied(int lit);\n\n public abstract boolean isFalsified(int lit);\n\n public abstract boolean isUnassigned(int lit);\n\n /**\n * @param lit\n * @return true iff the truth value of that literal is due to a unit\n * propagation or a decision.\n */\n public abstract boolean isImplied(int lit);\n\n /**\n * to obtain the max id of the variable\n * \n * @return the maximum number of variables in the formula\n */\n public abstract int nVars();\n\n /**\n * to obtain the real number of variables appearing in the formula\n * \n * @return the number of variables used in the pool\n */\n int realnVars();\n\n public abstract int not(int lit);\n\n public abstract void reset(int lit);\n\n public abstract int getLevel(int lit);\n\n public abstract void setLevel(int lit, int l);\n\n public abstract Constr getReason(int lit);\n\n public abstract void setReason(int lit, Constr r);\n\n public abstract IVec<Undoable> undos(int lit);\n\n public abstract void attach(int lit, Propagatable c);\n\n /**\n * @param lit\n * a literal\n * @return the list of all the constraints that watch the negation of lit\n */\n public abstract IVec<Propagatable> attaches(int lit);\n\n public abstract String valueToString(int lit);\n}", "public CoordinateSystem() {\r\n\t\torigin = new GuiPoint(0, 0);\r\n\t\tzoomFactor = 1f;\r\n\t}", "public JLabelOperator lblTheDatabaseNameIsEmpty() {\n if (_lblTheDatabaseNameIsEmpty==null) {\n _lblTheDatabaseNameIsEmpty = new JLabelOperator(this,\n Bundle.getStringTrimmed(\"org.netbeans.modules.derby.ui.Bundle\", \"ERR_DatabaseNameEmpty\"));\n }\n return _lblTheDatabaseNameIsEmpty;\n }", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "public RelaxedPyramidSolitaire() {\n super();\n }", "public LocalPanel() {\r\n\t\tinitComponents();\r\n\t}", "Variables createVariables();" ]
[ "0.6000396", "0.5739307", "0.56967777", "0.5673797", "0.5671304", "0.5642977", "0.5604792", "0.5552224", "0.54537493", "0.5452962", "0.53554136", "0.5355264", "0.5334236", "0.5318598", "0.52849054", "0.5283431", "0.52782923", "0.52711123", "0.52635455", "0.5248407", "0.5246812", "0.5243499", "0.52329606", "0.52151674", "0.520853", "0.5204849", "0.5203668", "0.5176772", "0.51666784", "0.5154854", "0.5143558", "0.51349765", "0.51299244", "0.5104441", "0.5091372", "0.5091005", "0.5089862", "0.50889784", "0.5074333", "0.50659555", "0.50557643", "0.5054702", "0.5053791", "0.50529945", "0.50255543", "0.50217193", "0.501773", "0.5016748", "0.50150454", "0.50064975", "0.5002722", "0.5002218", "0.50005704", "0.49957782", "0.49915272", "0.49810082", "0.4980116", "0.4979486", "0.4978268", "0.49780002", "0.4969059", "0.4963017", "0.49528033", "0.4952566", "0.49479508", "0.49469078", "0.49468705", "0.49467617", "0.4944389", "0.49439684", "0.4941916", "0.49408448", "0.4938387", "0.49326417", "0.49243775", "0.4923984", "0.49207705", "0.49206793", "0.49206212", "0.49203017", "0.491832", "0.4916747", "0.49152136", "0.49081787", "0.49049178", "0.49044713", "0.49040252", "0.49035284", "0.48959205", "0.48915404", "0.48911816", "0.48895574", "0.4889076", "0.48867285", "0.48860425", "0.4883894", "0.4882179", "0.4879505", "0.48776808", "0.48742813" ]
0.49063197
84
Just return our lattice ops.
public ILatticeOperations<TupleLatticeElement<Variable, NullLatticeElement>> getLatticeOperations() { return ops; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Operations operations();", "public LatticeMagInt getSimSystem(){return lattice;}", "@Override\n protected void generateTiles() {\n }", "public HOp[] ops()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n return OPS;\r\n }", "@Override\n\tprotected void generateTiles() {\n\t}", "OpList createOpList();", "@Override\r\n\tpublic List<ComputeNodeDesc> getAllComputeNodes(Identifier opId) {\n\t\treturn null;\r\n\t}", "public Tile[] generateTiles() {\n return null;\n }", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "private DiscretePotentialOperations() {\r\n\t}", "private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}", "public Collection<Element> getOperations() {\n Stream<Element> combinedStream = Stream.of(aCollection, cCollection)\n .flatMap(Collection::stream);\n return combinedStream.collect(Collectors.toList());\n }", "public Tile[] generate() {\n Tile[] tiles = generateTiles();\n calculatePathfindingGrid(tiles);\n return tiles;\n }", "Operations createOperations();", "public SetOfTiles getSetOfTiles();", "Lab apply();", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public abstract TiledMapTileSet getTileSet();", "public Transducer ()\n\t{\n\t\tsumLatticeFactory = new SumLatticeDefault.Factory();\n\t\tmaxLatticeFactory = new MaxLatticeDefault.Factory();\n\t}", "ArrayList<Integer> getStepCounterTileX();", "@DataProvider(name = \"flatMap\")\n private Object[][] flatMapProvider() {\n final UnaryOperator<List<Integer>> operator1 = list -> list.stream()\n .flatMap(n -> Stream.generate(() -> n).limit(n))\n .collect(Collectors.toList());\n\n final UnaryOperator<List<Integer>> operator2 = list -> list.stream()\n .flatMapToInt(n -> IntStream.rangeClosed(1, n))\n .boxed()\n .collect(Collectors.toList());\n\n final UnaryOperator<List<Integer>> operator3 = list -> list.stream()\n .flatMapToInt(n -> IntStream.iterate(n, val -> val + 1).limit(n))\n .boxed()\n .collect(Collectors.toList());\n\n final UnaryOperator<List<Integer>> operator4 = list -> list.stream()\n .flatMap(Stream::of)\n .collect(Collectors.toList());\n\n return new Object[][]{\n {operator1, Arrays.asList(1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5)},\n {operator2, Arrays.asList(1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5)},\n {operator3, Arrays.asList(1, 2, 3, 3, 4, 5, 4, 5, 6, 7, 5, 6, 7, 8, 9)},\n {operator4, Arrays.asList(1, 2, 3, 4, 5)}\n };\n }", "public Map(int[] lattice){\n\t\tthis.lattice = lattice;\n\t\tvisited = new boolean[lattice.length];\n\t\t\n\t\t//unique case [end/start]\n\t\tif(lattice[6] != -1)\n\t\t\ta2Nodes.add(6);\n\t\tvisited[6] = true;\n\t\tif(lattice[224] != -1)\n\t\t\ta2Nodes.add(224);\n\t\tvisited[224] = true;\n\t\t\n\t\t\n\t\tfor(int i = 0; i < 6;i++){ //top cases A3NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta3Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\tif(lattice[14] != -1) // unique case due to corner cut[CC]\n\t\t\ta3Nodes.add(14);\n\t\tvisited[14] = true;\n\t\t\n\t\tfor(int i = 225; i < 231;i++){//bottom cases A3NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta3Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\tif(lattice[216] != -1) //index 218, accounts for CC\n\t\t\ta3Nodes.add(216);\n\t\tvisited[216] = true;\n\t\t\n\t\tfor(int i = 29; i < 210; i+=15){ //side cases A4NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta4Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 21; i < 202; i+=15){\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta4Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\tif(lattice[7] != -1) //unique side cases due to CC\n\t\t\ta4Nodes.add(7);\n\t\tvisited[7] = true;\n\t\tif(lattice[223] != -1)\n\t\t\ta4Nodes.add(223);\n\t\tvisited[223] = true;\n\t\t\n\t\t\n\t\tfor(int i = 8; i < 14; i++){ //Bottom-top cases A5NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta5Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 217; i < 223; i++){\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta5Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < lattice.length; i++){ //All A6Nodes\n\t\t\tif(visited[i])\n\t\t\t\tcontinue;\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta6Nodes.add(i);\n\t\t}\n\t\t\n\t\tcreateNodes();\n\t}", "private List<Tile> makeTiles() {\n List<Tile> tiles = new ArrayList<>();\n Board board = (Board) boardManager.getBoard();\n final int numTiles = board.getNumRows() * board.getNumCols();\n for (int tileNum = 0; tileNum != numTiles; tileNum++) {\n tiles.add(new Tile(tileNum + 1, tileNum, 4));\n }\n\n return tiles;\n }", "static WireloopReward freeSteps() {\n return (s, a, n) -> RealScalar.ZERO;\n }", "List<Tile> getAdjacentTiles();", "public List<Node> getPowerPillList();", "@Override\n\tpublic OpIterator[] getChildren() {\n\t\tOpIterator[] childOperators = new OpIterator[1];\n\t\tchildOperators[0] = childOperator;\n\t\treturn childOperators;\n\t}", "@Override\n public Tile[][] getGrid() { return grid; }", "public Tile[] getAdjs(){\r\n return adjTiles;\r\n }", "public List<TCSObjectReference<Point>> getHops() {\n return new LinkedList<>(hops);\n }", "protected Tile[] newTiles() {\n int len = getWidthInTiles() * getHeightInTiles();\n Tile[] t = new Tile[ len ];\n for(int i = 0; i < len; i++) {\n t[i] = null;\n }\n return t;\n }", "public Ops getTF() {\n return tf;\n }", "public Operations() {\n initComponents();\n populateO();\n }", "public HexagonalClosePackedLattice() {\n\t\tuc[0] = Math.sqrt(3.0)/2.0;\n\t\tuc[1] = 1.0;\n\t\tuc[2] = Math.sqrt(2.0/3.0);\n\t\tuc_sep = 1.0;\n\t\tname = \"hcp\";\n\t}", "public List<Point2D> getControlPoints();", "public Tile[][] getTiles() {\n return tiles;\n }", "public Tile[][] getTiles() {\n return tiles;\n }", "public void getTile_B8();", "public ReadOnlyIterator<ContextNode> getAllLeafContextNodes();", "protected abstract Node[] getAllNodes();", "public ef l()\r\n/* 293: */ {\r\n/* 294:240 */ Packet211TileDesc packet = new Packet211TileDesc();\r\n/* 295:241 */ packet.subId = 9;\r\n/* 296:242 */ packet.xCoord = this.l;packet.yCoord = this.m;\r\n/* 297:243 */ packet.zCoord = this.n;\r\n/* 298:244 */ writeToPacket(packet);\r\n/* 299:245 */ packet.encode();\r\n/* 300:246 */ return packet;\r\n/* 301: */ }", "public void printLattice() {\n System.out.println(\"New configuration looks like this:\\n\");\n\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < m; j++) {\n System.out.printf(\"%d \", lattice[i][j]);\n }\n System.out.println();\n }\n }", "@Override\r\n public ArrayList<RowCol> getLegals(int nowY, int nowX){\r\n ArrayList<RowCol> legals = new ArrayList<RowCol>();\r\n \r\n for(int y = nowY - 1; y <= nowY + 1; y++){\r\n for (int x = nowX - 1; x <= nowX + 1; x++){\r\n if ((0 <= y) && (y < 8) && (0 <= x) && (x < 5)){\r\n if (y == nowY && x == nowX){\r\n // because we don't want to register \"moving to original position\" as a legal position\r\n continue;\r\n }\r\n \r\n legals.add(new RowCol(y, x));\r\n }\r\n }\r\n }\r\n \r\n return legals;\r\n }", "public interface FiniteSemiGroup extends DiscreetSemiGroup {\r\n\r\n\t/**\r\n\t *\r\n\t * Method to obtain a map to the elements.\r\n\t *\r\n\t * @return the map.\r\n\t */\r\n\tMap<Double, Element> getElements();\r\n\r\n\t@Override\r\n\tdefault Integer getOrder() {\r\n\t\treturn this.getElements().size();\r\n\t}\r\n\r\n\t/**\r\n\t * Method to obtain the matrix of multiplication.\r\n\t *\r\n\t * @return the multiplication matrix.\r\n\t */\r\n\tMap<Element, Map<Element, Element>> getOperationMap();\r\n\r\n\t/**\r\n\t * method to present the monoid.\r\n\t */\r\n\tdefault void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}\r\n\r\n}", "LP getLp();", "@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}", "protected abstract IStoreFastLane make_express();", "@Override\r\n public Collection getOperators() throws Exception\r\n {\n return null;\r\n }", "private Node getLobby() {//大廳節點\n\n Node base = new Node();\n\n base.setRenderable(arrowRenderable);\n\n return base;\n\n }", "public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public Lattice(int[][] values, String t, boolean willDraw){\n title = t;\n draw = willDraw;\n score = 0;\n n = values[0].length;\n totalElements = n*n;\n numNegatives=0;\n //numPositives=0;\n lattice = new Element[n][n];\n rand = new Random();\n //Initialize lattice with random elements\n for(int i = 0; i < n; i++){\n for(int j = 0; j < n; j++){\n lattice[i][j] = new Element(values[i][j]);\n }\n }\n //Calculate score for full matrix\n calculateEntireScore();\n //Draw the lattice\n if(draw)\n setUpFrame();\n }", "protected abstract void getAllUniformLocations();", "@Override\n\tpublic BlockState[] getTileEntities()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}", "public OperationType[] createOperationTypes() {\n int[] op1v1 = new int[]{2, 3, 4, 6};\n OperationType op1 = new OperationType(1, op1v1, null, null, 2\n , 0, 17520, 730, 8, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Transport net before operation\");\n int[] op2v1 = new int[]{2, 3, 4, 6};\n int[] op2v2 = new int[]{2, 3, 4, 6};\n OperationType op2 = new OperationType(2, op2v1, op2v2, null,\n 3, 1, 17520, 730, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Install net\");\n int[] op3v1 = new int[]{2, 3, 4, 6};\n OperationType op3 = new OperationType(3, op3v1, null,\n null, 0, 2, 17520, 730, 8, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Transport net after operation\");\n int[] op4v1 = new int[]{5};\n int[] op4v2 = new int[]{2, 3, 4, 6};\n OperationType op4 = new OperationType(4, op4v1, op4v2, null,\n 0, 0, 1152, 192, 5, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 8, \"Delousing\");\n int[] op5v1 = new int[]{2, 3, 4};\n int[] op5v2 = new int[]{2, 3, 4};\n int[] op5BT = new int[]{6};\n OperationType op5 = new OperationType(5, op5v1, op5v2, op5BT,\n 0, 0, 8760, 360, 40, DataGenerator.costPenalty * DataGenerator.maxSailingTime, \"Large inspection of the facility\");\n int[] op6v1 = new int[]{2};\n OperationType op6 = new OperationType(6, op6v1, null, null,\n 0, 0, 5110, 730, 5, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Wash the net\");\n int[] op7v1 = new int[]{4, 6};\n OperationType op7 = new OperationType(7, op7v1, null, null,\n 0, 0, 8760, 360, 48, DataGenerator.costPenalty * DataGenerator.maxSailingTime, \"tightening anchor lines\");\n int[] op8v1 = new int[]{2, 3, 4, 6};\n int[] op8v2 = new int[]{2, 3, 4, 6};\n OperationType op8 = new OperationType(8, op8v1, op8v2, null,\n 0, 9, 8760, 360, 3, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Small installation facility\");\n int[] op9v1 = new int[]{2, 3, 4, 6};\n OperationType op9 = new OperationType(9, op9v1, null, null,\n 8, 0, 8760, 360, 6, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Easy transport of equipment to facility\");\n int[] op10v1 = new int[]{2, 3, 4, 6};\n OperationType op10 = new OperationType(10, op10v1, null, null,\n 0, 0, 720, 100, 2, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Remove dead fish\");\n int[] op11v1 = new int[]{2, 3, 4, 6};\n OperationType op11 = new OperationType(11, op11v1, null, null,\n 0, 0, 720, 100, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 8, \"Support wellboat\");\n int[] op12v1 = new int[]{1, 2, 3, 4, 6};\n OperationType op12 = new OperationType(12, op12v1, null, null,\n 0, 0, 720, 100, 5, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Inspect net ROV\");\n int[] op13v1 = new int[]{1, 3};\n OperationType op13 = new OperationType(13, op13v1, null, null,\n 0, 0, 8760, 360, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Inspect net diver\");\n int[] op14v1 = new int[]{2};\n OperationType op14 = new OperationType(14, op14v1, null, null,\n 0, 0, 8760, 360, 4, DataGenerator.costPenalty * DataGenerator.maxSailingTime, \"Wash bottom ring and floating collar\");\n int[] op15v1 = new int[]{2, 3, 4, 6};\n OperationType op15 = new OperationType(15, op15v1, null, null,\n 0, 0, 168, 24, 3, DataGenerator.costPenalty * DataGenerator.maxSailingTime * 4, \"Support working boat\");\n return new OperationType[]{op1, op2, op3, op4, op5, op6, op7, op8, op9, op10, op11, op12, op13, op14, op15};\n }", "Operands createOperands();", "public List<OperatorImpl> getChildOperators() {\n\t\treturn Collections.emptyList();\n\t}", "public Integer getIops() {\n return this.iops;\n }", "public Tiles getTiles() {\n return tiles;\n }", "public List<Trixel> getTrixels() {\n\t\tif (!alreadyRun) {\n\t\t\treturn null;\n\t\t}\n\t\treturn concatenate(listOfInners, stackOfPartialLists.peek());\n\t}", "public interface CARule\n\n{\t\n\t/* In simulation display panel, odd and even rows are slightly staggered,\n\t * when getting the ordinate of six neighbors of a cell\n\t * the offset vary between odd rows and even rows\n\t * so directions4OddRow and directions4EvenRows are defined separately\n\t * \n\t * \t\t + +\n\t * + -> + + +\n\t * \t\t + +\n\t * \n\t * */\n public static final int[][] directions4OddRow = { \n \t\t{ -1, -1 },\n \t\t{ -1, 0 },\n \t\t{ 0, -1 }, \n \t\t{ 0, 1 }, \n \t\t{ 1, -1 },\n \t\t{ 1, 0 } \n \t\t};\n public static final int[][] directions4EvenRow = {\n \t\t{ -1, 0 },\n \t\t{ -1, 1 },\n \t\t{ 0, -1 }, \n \t\t{ 0, 1 },\n \t\t{ 1, 0 }, \n \t\t{ 1, 1 } \n \t\t};\n\n /* Get new outer layer from last layer\n * @param crystal is the crystal object which is being simulated\n * @param set is the set of last outer layer\n */\n Set<CACell> automateNGetOuterLayerSet(CACrystal crystal, final Set<CACell> set);\n \n /*\n * after stop button is pressed or one simulation of max steps is finished\n * before next simulation,the step should be reset to 0\n * */\n void reset();\n}", "OperationsClient getOperations();", "protected GenTreeOperation() {}", "public List<Tile> getNeighbors() {\n List<Tile> list = new ArrayList<Tile>();\n\n if (this.tileNorth != null) {\n list.add(this.tileNorth);\n }\n\n if (this.tileEast != null) {\n list.add(this.tileEast);\n }\n\n if (this.tileSouth != null) {\n list.add(this.tileSouth);\n }\n\n if (this.tileWest != null) {\n list.add(this.tileWest);\n }\n\n return list;\n }", "public List<Tile> getNeighbours() {\n \r\n return neighbours;\r\n }", "private static Image[][] getTileBases()\n\t{\n\t\tImage[][] tileBases = new Image[2][4];\n\t\tfor (int type = 0; type < 4; type++) {\n\t\t\ttry {\n\t\t\t\ttileBases[0][type] = ImageIO.read(new File(tileDirectory\n\t\t\t\t\t\t+ \"tile_\" + tileColours[type] + \".png\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\t\t}\n\t\tfor (int type = 0; type < 4; type++) {\n\t\t\ttry {\n\t\t\t\ttileBases[1][type] = ImageIO.read(new File(tileDirectory\n\t\t\t\t\t\t+ \"tile_\" + tileColours[type] + \"_trans.png\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn tileBases;\n\t}", "public View getViewAllPanels()\n\t{\n\t\treturn view;\n\t}", "public Map<UnitPlus, List<UnitPlus>> createCFG() {\n\t\t// try {\n\t\t// Class<?> classType = Class.forName(classNameString);\n\t\t// methods = classType.getDeclaredMethods();\n\t\t// for (Method method : methods) {\n\t\t// Class<?>[] parameterTypes = method.getParameterTypes();\n\t\t// List<Class<?>> parameterList = new ArrayList<>();\n\t\t// for(Class<?> parameterType:parameterTypes){\n\t\t// parameterList.add(parameterType);\n\t\t// System.out.println(parameterType);\n\t\t// }\n\t\t// SootMethod sootmethod = sootclass.getMethod(method.getName(),\n\t\t// parameterList);\n\t\t// Body body = sootmethod.retrieveActiveBody();\n\t\t// UnitGraph unitGraph = new ExceptionalUnitGraph(body);\n\t\t// methodToUnitGraph.put(methodName, unitGraph);\n\n\t\tList<SootMethod> sootMethods = sootclass.getMethods();\n\t\tfor (SootMethod sootMethod : sootMethods) {\n\t\t\tBody body = sootMethod.retrieveActiveBody();\n\t\t\tUnitGraph unitGraph = new ExceptionalUnitGraph(body);\n\t\t\tList<Type> parameterList = sootMethod.getParameterTypes();\n\t\t\tMethodPlus Method = new MethodPlus(sootMethod.getName(), classNameString,\n\t\t\t\t\tparameterList);\n\t\t\tMethods.add(Method);\n\t\t\tmethodToUnitGraph.put(Method, unitGraph);\n\t\t\tthis.createCFGsForMethod(unitGraph, Method);\n\t\t}\n\n\t\t// }\n\t\t// } catch (ClassNotFoundException e) {\n\t\t// e.printStackTrace();\n\t\t// }\n\t\tthis.createCompleteCFG();\n\t\tthis.combineAllCFGs();\n\n\t\treturn completeCFG;\n\t}", "private void createRenderables()\n {\n this.gridElements = new ArrayList<GridElement>();\n\n ArrayList<Position> positions = new ArrayList<Position>();\n double step = sector.getDeltaLatDegrees() / this.divisions;\n\n // Generate meridians with labels\n double lon = sector.getMinLongitude().degrees + (this.level == 0 ? 0 : step);\n while (lon < sector.getMaxLongitude().degrees - step / 2)\n {\n Angle longitude = Angle.fromDegrees(lon);\n // Meridian\n positions.clear();\n positions.add(new Position(this.sector.getMinLatitude(), longitude, 0));\n positions.add(new Position(this.sector.getMaxLatitude(), longitude, 0));\n\n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n this.sector.getMinLatitude().degrees, this.sector.getMaxLatitude().degrees, lon, lon);\n String lineType = lon == this.sector.getMinLongitude().degrees ?\n GridElement.TYPE_LINE_WEST : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lon;\n this.gridElements.add(ge);\n\n // Increase longitude\n lon += step;\n }\n\n // Generate parallels\n double lat = this.sector.getMinLatitude().degrees + (this.level == 0 ? 0 : step);\n while (lat < this.sector.getMaxLatitude().degrees - step / 2)\n {\n Angle latitude = Angle.fromDegrees(lat);\n positions.clear();\n positions.add(new Position(latitude, this.sector.getMinLongitude(), 0));\n positions.add(new Position(latitude, this.sector.getMaxLongitude(), 0));\n \n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n lat, lat, this.sector.getMinLongitude().degrees, this.sector.getMaxLongitude().degrees);\n String lineType = lat == this.sector.getMinLatitude().degrees ?\n GridElement.TYPE_LINE_SOUTH : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lat;\n this.gridElements.add(ge);\n\n // Increase latitude\n lat += step;\n }\n }", "List<Coord> allActiveCells();", "LinkedList<double[]> getTasks() {\r\n return tasks;\r\n }", "private static Tensor hyperloop_eight() {\n Tensor poly = ResourceData.of(\"/dubilab/controlpoints/eight/20180603.csv\");\n poly = poly.map(scalar -> Quantity.of(scalar, SI.METER));\n return Nest.of(SUBDIVISION_RN, poly, 6).unmodifiable();\n }", "public Long getIops() {\n return this.iops;\n }", "protected abstract IStoreLane make_classic();", "public abstract Set<Tile> getNeighbors(Tile tile);", "TraceInstructionsView instructions();", "OperandList createOperandList();", "public AgwCslOper clone() {\n return (AgwCslOper)cloneContent(new AgwCslOper());\n }", "public NodeTupleTable getNodeTupleTable() {\n return getDatasetGraphTDB().chooseNodeTupleTable(getGraphName()) ;\n }", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public JPanel getPanel() { return gate; }", "Operator.Type getOperation();", "public void generate() {\n\t\t\n\t\t// For this system, there are two particles per cell:\n\t\tint nc = size[0][0]*size[0][1]*size[0][2];\n\t\tn = 3*nc;\n\t\t\n\t\t// The AB2 Lattice:\n\t\tAB2Lattice ab2 = new AB2Lattice();\n\t\tab2.setSizeInCells(size[0][0],size[0][1],size[0][2]);\n\t\t\n\t\t// Stick them in the latt member:\n\t\tlatt = new VectorD3[2][];\n\t\tlatt[0] = new VectorD3[n];\t\t\n\t\tSystem.arraycopy(ab2.getLattice(0),0,latt[0], 0, nc);\n\t\tSystem.arraycopy(ab2.getLattice(1),0,latt[0], nc, 2*nc);\n\t\tlatt_name[0] = \"AB2\";\n\t\tab2.saveAsWRL(\"initAB2\");\n\t\t\n\t\t// Build the A and B lattices, A first, then B second:\n\n\t\t// The seperate A and B2 lattices\n\t\tFaceCentredCubicABCLattice fcc = new FaceCentredCubicABCLattice();\n\t\t\n\t\t// Create the new system at the new size:\n\t\tNtp = n-nc;\n\t\tfcc.setSizeInCells(size[1][0],size[1][1],size[1][2]);\n\n\t\t// Copy the two FCC lattices into the 1th phase:\n\t\tlatt[1] = new VectorD3[n];\n\t\tlatt_name[1] = \"FCC\";\n\t\tSystem.arraycopy(fcc.getLattice(), 0, latt[1], 0, n);\n\n\t\t/* Define distances between neighbouring atoms in the same stacking plane \n\t\t * taking advantage of the fact that both lattices have the same Unit Cell: */\n\t\tdouble[] c_uc = new double[3];\n\t\tc_uc = ab2.getUnitCell();\n\t\tuc.x = c_uc[0];\n\t\tuc.y = c_uc[1];\n\t\tuc.z = c_uc[2];\n\t\t\n\t\t// Put the lattices in the class members, for later use:\n\t\tlats[0] = (Lattice)ab2;\n\t\tlats[1] = (Lattice)fcc;\n\t\t\n\t}", "public synchronized OMGraphicList prepare() {\n\n if (spatialIndexes == null || spatialIndexes.size() == 0) {\n Debug.message(\"shape\", \"MultiShapeLayer: spatialIndexes is empty!\");\n return new OMGraphicList();\n }\n\n Projection projection = getProjection();\n\n if (projection == null) {\n // This can happen if the layer is part of a\n // ScaleFilterLayer, and the redraw button for this layer\n // is pressed before the ScaleFilterLayer gives it a\n // projection (which only happens if the layer is the\n // active one).\n Debug.message(\"basic\", \"MultiShapeLayer|\" + getName()\n + \": prepare called with null projection\");\n return new OMGraphicList();\n }\n\n LatLonPoint ul = projection.getUpperLeft();\n LatLonPoint lr = projection.getLowerRight();\n float ulLat = ul.getLatitude();\n float ulLon = ul.getLongitude();\n float lrLat = lr.getLatitude();\n float lrLon = lr.getLongitude();\n\n OMGraphicList masterList = new OMGraphicList();\n OMGraphicList list = null;\n SpatialIndexHandler sih;\n Iterator sii;\n\n // check for dateline anomaly on the screen. we check for\n // ulLon >= lrLon, but we need to be careful of the check for\n // equality because of floating point arguments...\n if (ProjMath.isCrossingDateline(ulLon, lrLon, projection.getScale())) {\n if (Debug.debugging(\"shape\")) {\n Debug.output(\"MultiShapeLayer.computeGraphics(): Dateline is on screen\");\n }\n\n double ymin = (double) Math.min(ulLat, lrLat);\n double ymax = (double) Math.max(ulLat, lrLat);\n\n sii = spatialIndexes.iterator();\n while (sii.hasNext()) {\n sih = (SpatialIndexHandler) sii.next();\n if (!sih.enabled)\n continue;\n\n try {\n\n list = sih.getGraphics(ulLon,\n ymin,\n 180.0d,\n ymax,\n list,\n projection);\n list = sih.getGraphics(-180.0d,\n ymin,\n lrLon,\n ymax,\n list,\n projection);\n } catch (java.io.IOException ex) {\n ex.printStackTrace();\n } catch (FormatException fe) {\n fe.printStackTrace();\n }\n masterList.add(list);\n }\n } else {\n\n double xmin = (double) Math.min(ulLon, lrLon);\n double xmax = (double) Math.max(ulLon, lrLon);\n double ymin = (double) Math.min(ulLat, lrLat);\n double ymax = (double) Math.max(ulLat, lrLat);\n\n sii = spatialIndexes.iterator();\n while (sii.hasNext()) {\n sih = (SpatialIndexHandler) sii.next();\n\n if (!sih.enabled)\n continue;\n\n if (Debug.debugging(\"shape\")) {\n Debug.output(\" Getting graphics from \" + sih.prettyName\n + \" spatial index\");\n }\n try {\n list = sih.getGraphics(xmin,\n ymin,\n xmax,\n ymax,\n list,\n projection);\n } catch (java.io.IOException ex) {\n ex.printStackTrace();\n } catch (FormatException fe) {\n fe.printStackTrace();\n }\n masterList.add(list);\n }\n }\n\n // OMGraphics already projected in SpatialIndexHandlers\n // if (masterList != null) {\n // masterList.generate(projection, true);//all new graphics\n // }\n return masterList;\n }", "public HashSet<N> getNodes()\r\n/* 99: */ {\r\n/* 100:182 */ assert (checkRep());\r\n/* 101: */ \r\n/* 102:184 */ return new HashSet(this.map.keySet());\r\n/* 103: */ }", "public Node createGrid() {\n\t\tGroup gridGroup = new Group();\n\t\tgridGroup.getChildren().addAll(buildXYPlane());\n\t\t/*\n\t\t * XXX extend the grid\n\t\t * \n\t\t * here it would be possible to extend the grid, e.g. with a graph\n\t\t * or another plane with a grid (XZ, YZ, ...).\n\t\t * \n\t\t * it would look like this:\n\t\t * gridGroup.getChildren().addAll(buildGraph());\n\t\t */\n\t\treturn gridGroup;\n\t}", "int[] getVisualToLogicalMap() {\n if (v2lMap == null) {\n v2lMap = createVisualToLogicalMap(levels);\n }\n return v2lMap;\n }", "public static JComponent[] createPanelComponets() {\r\n\t\tJComponent[] c = new JComponent[6];\r\n\t\tc[0] = new JLabel(\"Login\");\r\n\t\tc[1] = new JTextField(\"\", 20);\r\n\t\tc[2] = new JLabel(\"Password\");\r\n\t\tc[3] = new JPasswordField(\"\", 20);\r\n\t\tc[4] = new JLabel(\"Re-enter Password\");\r\n\t\tc[5] = new JPasswordField(\"\", 20);\r\n\t\treturn c;\r\n\t}", "public Vector<Node> GetAdditionalSubNodes();", "private static interface T {@Symbolic Term.List t();}", "public ArrayList<DrawableVector> getInstructions(){\n return instructions;\n }", "public DataStructure getOperations() {\r\n\t\tif (ports == null) {\r\n\t\t\treturn EmptyStructures.EMPTY_STRUCTURE;\r\n\t\t}\r\n\t\tList l = new ArrayList();\r\n\t\tfor (Iterator it = ports.values().iterator(); it.hasNext();) {\r\n\t\t\tWSDLPort port = (WSDLPort) it.next();\r\n\t\t\tl.addAll(port.getOperations());\r\n\t\t}\r\n\t\treturn l;\r\n\t}", "@Override\r\n\tpublic Iterable<Entity> getNodes()\r\n\t{\n\t\treturn null;\r\n\t}", "private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}", "@Override\r\n\tpublic List<Operation> consulterOperations(String codeCpte, int position, int nbOperation) {\n\t\treturn dao.consulterOperations(codeCpte,position,nbOperation);\r\n\t}", "public boolean[][] getRotateLeft() {\n boolean[][] out = new boolean[size][size];\n for(int y = 0; y < size; y++)\n for(int x = 0; x < size; x++)\n out[x][y] = tileLogic[size - y - 1][x];\n return out;\n }", "public IsingLattice(int[][] lattice1, int dimension) {\n this.lattice = lattice1;\n this.m = dimension;\n }", "private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }", "public final T dfork( Vec...vecs ) {return dfork(0,vecs);}", "default void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}" ]
[ "0.55990756", "0.5340065", "0.52717364", "0.5266158", "0.52017623", "0.51398844", "0.49974844", "0.49965647", "0.4987596", "0.4894417", "0.4835219", "0.48338374", "0.4820835", "0.48186687", "0.48051155", "0.47916508", "0.4783254", "0.4782187", "0.4770944", "0.4766566", "0.4760175", "0.47525272", "0.4746153", "0.47429746", "0.47356486", "0.47313952", "0.4722865", "0.47213036", "0.46735096", "0.46567127", "0.46520662", "0.46465197", "0.46212694", "0.46197513", "0.46181664", "0.4607737", "0.4591135", "0.45910203", "0.45903566", "0.45845002", "0.45788875", "0.45692286", "0.45690233", "0.4563703", "0.4562827", "0.4558003", "0.4551256", "0.45396963", "0.45353368", "0.45278978", "0.45270625", "0.45267925", "0.45147863", "0.45135966", "0.4489209", "0.44884983", "0.4487877", "0.44861132", "0.44828212", "0.44798192", "0.44764653", "0.44630465", "0.44477224", "0.44471183", "0.44396654", "0.44385558", "0.44363487", "0.44237685", "0.44170302", "0.44166696", "0.44094053", "0.4404633", "0.44036922", "0.44034332", "0.44024825", "0.4397229", "0.4391326", "0.43901667", "0.43897855", "0.43863994", "0.43856633", "0.4383709", "0.43825585", "0.43823895", "0.43802935", "0.4378304", "0.43768278", "0.43721095", "0.43706822", "0.4370298", "0.43692273", "0.4363327", "0.4359731", "0.43571034", "0.43557552", "0.43550226", "0.43535113", "0.43533146", "0.43508235", "0.43484652" ]
0.73221815
0
TextView textViewVersion; TextView rlid; ImageView imageViewIcon;
public MyViewHolder(final View itemView) { super(itemView); this.textView1 = (TextView) itemView.findViewById(R.id.textViewt1); c2=(CardView) itemView.findViewById(R.id.card_view2); this.cardfashlin = (LinearLayout) itemView.findViewById(R.id.lincardfarsh); this.searchView = (SearchView) itemView.findViewById(R.id.searchView); /* this.textView2 = (TextView) itemView.findViewById(R.id.textViewt2); this.textView3 = (TextView) itemView.findViewById(R.id.textViewt3); this.textView4 = (TextView) itemView.findViewById(R.id.textViewt4); this.textView5 = (TextView) itemView.findViewById(R.id.textViewt5); this.textView6 = (TextView) itemView.findViewById(R.id.textViewt6);*/ /* this. rlid = (TextView) itemView.findViewById(R.id.rmmm); rlid.setVisibility(View.GONE);*/ // itemView.getContext().startActivity(new Intent(itemView.getContext(), farshtyybah.class)); // this.imageViewIcon = (ImageView) itemView.findViewById(R.id.imageView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TextView getIconTipsView();", "public RecyclerCardViewHolder(View itemView) {\n super(itemView);\n ivLsPicture = (ImageView) itemView.findViewById(R.id.ivLsPicture);\n tvTitle = (TextView) itemView.findViewById(R.id.tvTitle);\n // textView5 = (TextView) itemView.findViewById(R.id.textView5);\n }", "public ViewHolder(View view) {\r\n super(view);\r\n img = (ImageView) view.findViewById(R.id.recycleimg);\r\n// picture_text = (TextView) view.findViewById(R.id.picture_text);\r\n// picture_img = (TextView) view.findViewById(R.id.picture_img);\r\n// picture_heart = (TextView) view.findViewById(R.id.picture_heart);\r\n// picture_date = (TextView) view.findViewById(R.id.picture_date);\r\n// picture_num = (TextView) view.findViewById(R.id.picture_num);\r\n }", "public void getViews() {\n cameraButton = (ImageButton) findViewById(R.id.cameraButton);\n galleryButton = (ImageButton)findViewById(R.id.galleryButton);\n tagText = (TextView) findViewById(R.id.tag_text);\n }", "private void fillTextViewContent(){\n if(mPhotoInfo != null){\n if(mPhotoInfo.getOwner().getRealname()!= null){\n mOwner = mPhotoInfo.getOwner().getRealname();\n }else if(mPhotoInfo.getOwner().getUsername() != null){\n mOwner = mPhotoInfo.getOwner().getUsername();\n }\n\n if(mOwner != null && mOwner.length() > 0){\n mOwnerTv.setText(mOwner);\n }else{\n mOwnerTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getTitle() != null){\n mTitle = mPhotoInfo.getTitle().getContent();\n }\n\n if(mTitle != null && mTitle.length() > 0){\n if(mTitle.length() > 120){\n mTitle = mTitle.substring(0,120) + \"...\";\n }\n mTitleTv.setText(mTitle);\n }else{\n mTitleTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDescription() != null){\n mDesc = mPhotoInfo.getDescription().getContent();\n }\n\n if(mDesc != null && mDesc.length() > 0){\n if(mDesc.length() > 120){\n mDesc = mDesc.substring(0,120) + \"...\";\n }\n mDescTv.setText(mDesc);\n }else{\n mDescTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDateuploaded() != null){\n mDates = mPhotoInfo.getDateuploaded();\n }\n\n if(mDates != null && mDates.length() > 0){\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"MM/dd/yyyy\", Locale.getDefault());\n Date date = new Date(System.currentTimeMillis() - Long.parseLong(mDates));\n mDatesTv.setText(simpleDateFormat.format(date));\n }else{\n mDatesTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getViews() != null){\n mViews = mPhotoInfo.getViews();\n }\n\n if(mViews != null && mViews.length() > 0){\n mViewsTv.setText(mViews);\n }else{\n mViewsTv.setText(R.string.info_not_available);\n }\n }\n }", "void mo36480a(int i, int i2, ImageView imageView, Uri uri);", "void mo36483b(int i, ImageView imageView, Uri uri);", "@Override\n\tpublic void findViews() {\n\t\tet1 = (TextView) findViewById(R.id.et1);\n\t\tet2 = (TextView) findViewById(R.id.et2);\n\t\tet3 = (TextView) findViewById(R.id.et3);\n\t\tet4 = (TextView) findViewById(R.id.et4);\n\t\tet5 = (TextView) findViewById(R.id.et5);\n\t\tet6 = (TextView) findViewById(R.id.et6);\n\t\tet7 = (TextView) findViewById(R.id.et7);\n\t\tet8 = (TextView) findViewById(R.id.et8);\n\t\tet9 = (TextView) findViewById(R.id.et9);\n\t\tet10 = (TextView) findViewById(R.id.et10);\n\t\tet11 = (TextView) findViewById(R.id.et11);\n\t\tet12 = (TextView) findViewById(R.id.et12);\n\t\tet13 = (TextView) findViewById(R.id.et13);\n\t\tet14 = (TextView) findViewById(R.id.et14);\n\t\ttv_total1 = findViewById(R.id.tv_total1);\n\t\ttv_total2 = findViewById(R.id.tv_total2);\n\t\tiv1 = findViewById(R.id.im1);\n\t\tiv2 = findViewById(R.id.im2);\n\t\tiv3 = findViewById(R.id.im3);\n\t\tiv4 = findViewById(R.id.im4);\n\t\tiv5 = findViewById(R.id.im5);\n\t\tiv6 = findViewById(R.id.im6);\n\t\tiv7 = findViewById(R.id.im7);\n\t\tiv8 = findViewById(R.id.im8);\n\t\tiv9 = findViewById(R.id.im9);\n\t\tiv10 = findViewById(R.id.im10);\n\t\tiv11 = findViewById(R.id.im11);\n\t\tiv12 = findViewById(R.id.im12);\n\t\tiv13 = findViewById(R.id.im13);\n\t\tiv14 = findViewById(R.id.im14);\n\t\ttv_title1 = (TextView) findViewById(R.id.tv_title1);\n\t\ttv_title2 = (TextView) findViewById(R.id.tv_title2);\n\t\ttv_title3 = (TextView) findViewById(R.id.tv_title3);\n\t\ttv_title4 = (TextView) findViewById(R.id.tv_title4);\n\t\ttv_title5 = (TextView) findViewById(R.id.tv_title5);\n\t\ttv_title6 = (TextView) findViewById(R.id.tv_title6);\n\t\ttv_title7 = (TextView) findViewById(R.id.tv_title7);\n\t\tll_progress = (LinearLayout) findViewById(R.id.ll_progress);\n\t\tll_progress.setVisibility(View.VISIBLE);\n\t}", "private void setupView() {\n\t\timg=(ImageView) findViewById(R.id.imageView1);\n\t}", "private void initView() {\n\n main_ll_rl = (LinearLayout) findViewById(R.id.main_ll_rili);\n main_ll_xw = (LinearLayout) findViewById(R.id.main_ll_xw);\n main_ll_wode = (LinearLayout) findViewById(R.id.main_ll_wd);\n main_ll_self = (LinearLayout) findViewById(R.id.main_ll_self);\n main_ll_hq = (LinearLayout) findViewById(R.id.main_ll_hq);\n main_zt_color = (LinearLayout) findViewById(R.id.main_zt_color);\n\n main_zt_color.setBackgroundColor(Color.parseColor(\"#e9e9ea\"));\n\n imgrl = (ImageView) findViewById(R.id.imgrili);\n imgxw = (ImageView) findViewById(R.id.imgxw);\n imgwd = (ImageView) findViewById(R.id.imgwd);\n imggr = (ImageView) findViewById(R.id.imgself);\n imghq = (ImageView) findViewById(R.id.imghq);\n\n main_rl_tv = (TextView) findViewById(R.id.main_rl_tv);\n main_xw_tv = (TextView) findViewById(R.id.main_xw_tv);\n main_wd_tv = (TextView) findViewById(R.id.main_wd_tv);\n main_gr_tv = (TextView) findViewById(R.id.main_self_tv);\n main_hq_tv = (TextView) findViewById(R.id.main_hq_tv);\n\n main_ll_rl.setOnClickListener(this);\n main_ll_xw.setOnClickListener(this);\n main_ll_wode.setOnClickListener(this);\n main_ll_hq.setOnClickListener(this);\n main_ll_self.setOnClickListener(this);\n }", "public ViewHolder(View itemView) {\n super(itemView);\n imageView = itemView.findViewById(R.id.ivSomeImage);\n textView = itemView.findViewById(R.id.tvSomeText);\n }", "public ViewHolder(View itemView) {\n super(itemView);\n /*imgOverFlow = (ImageView) itemView.findViewById(R.id.overflow);*/\n bookThumbnail = (ImageView) itemView.findViewById(R.id.book_thumbnail);\n// bookAuthor= (TextView) itemView.findViewById(R.id.book_author);\n// bookTitle = (TextView) itemView.findViewById(R.id.book_title);\n }", "public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }", "void mo36481a(int i, ImageView imageView, Uri uri);", "public MyHolder(View itemView) {\n super(itemView);\n item = itemView.findViewById(R.id.item);\n noofpices = itemView.findViewById(R.id.noofpices);\n cost = itemView.findViewById(R.id.cost);\n amount = itemView.findViewById(R.id.total);\n plus = itemView.findViewById(R.id.plus);\n// minus = (ImageButton)itemView.findViewById(R.id.minus);\n delete = itemView.findViewById(R.id.del);\n\n // id= (TextView)itemView.findViewById(R.id.id);\n }", "private void findViews() {\n jurgen = (ImageView) findViewById(R.id.jurgen_view);\n jurgen.setTag(JURGEN_VIEW_TAG);\n joost = (ImageView) findViewById(R.id.joost_view);\n joost.setTag(JOOST_VIEW_TAG);\n nick = (ImageView) findViewById(R.id.nick_view);\n nick.setTag(NICK_VIEW_TAG);\n stijn = (ImageView) findViewById(R.id.stijn_view);\n stijn.setTag(STIJN_VIEW_TAG);\n }", "private void findViews() {\n // Buttons first\n closeBtn = (ImageButton) findViewById(getApplication().getResources().getIdentifier(\"closeBtn\", \"id\", getApplication().getPackageName()));\n shareBtn = (ImageButton) findViewById(getApplication().getResources().getIdentifier(\"shareBtn\", \"id\", getApplication().getPackageName()));\n\n //ProgressBar\n loadingBar = (ProgressBar) findViewById(getApplication().getResources().getIdentifier(\"loadingBar\", \"id\", getApplication().getPackageName()));\n // Image Container\n image = (TouchImageView) findViewById(getApplication().getResources().getIdentifier(\"imageView\", \"id\", getApplication().getPackageName()));\n \n\n // Title TextView\n titleTxt = (TextView) findViewById(getApplication().getResources().getIdentifier(\"titleTxt\", \"id\", getApplication().getPackageName()));\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n ((TextView) view.findViewById(R.id.Title)).setText(cursor.getString(cursor.getColumnIndex(\"Title\")));\n ((TextView) view.findViewById(R.id.Mood)).setText(cursor.getString(cursor.getColumnIndex(\"Mood\")));\n ((TextView) view.findViewById(R.id.Timestamp)).setText(cursor.getString(cursor.getColumnIndex(\"Timestamp\")));\n String mood = cursor.getString(cursor.getColumnIndex(\"Mood\"));\n ImageView moodimage = view.findViewById(R.id.Moodimage);\n switch (mood) {\n case \"Angry\":\n moodimage.setImageResource(R.drawable.angry_egg);\n break;\n case \"Happy\":\n moodimage.setImageResource(R.drawable.happy_egg);\n break;\n case \"Confused\":\n moodimage.setImageResource(R.drawable.tired_egg);\n break;\n case \"Sad\":\n moodimage.setImageResource(R.drawable.sad_egg);\n break;\n\n }\n }", "private void updateViews() {\n titleTextView.setText(currentVolume.getTitle());\n descTextView.setText(Html.fromHtml(currentVolume.getDesc(), Html.FROM_HTML_MODE_COMPACT));\n authorsTextView.setText(currentVolume.getAuthors());\n\n retrieveImage();\n }", "@Override\r\n\t\tpublic void bindView(View v, Context arg1, Cursor arg2) {\n\t\t\t String tv1 = arg2.getString(2);\r\n\t\t\t String tv3 = CommonCode.change_Date_Format(arg2.getString(3), \"yyyy-MM-dd HH:mm:ss\", \"MM-dd-yyyy HH:mm:ss\");\r\n\t\t\t String tv4 = arg2.getString(4);\r\n\t\t\t String tv2 = arg2.getString(1);\r\n\t\t\t String tv6 = arg2.getString(7);\r\n\t\t\t String tv5 = arg2.getString(6);\r\n\t\t\t String tv8 = arg2.getString(8);//randomnumber\r\n\t\t\t String tv7 = arg2.getString(5);\r\n\t\t\t \r\n\t\t\t final TextView text1 = (TextView) v.findViewById(R.id.textView1);\r\n\t\t\t final TextView text2 = (TextView) v.findViewById(R.id.textView2);\r\n\t\t\t final TextView text3 = (TextView) v.findViewById(R.id.textView3);\r\n\t\t\t final TextView text4 = (TextView) v.findViewById(R.id.textView4);\r\n\t\t\t final TextView text5 = (TextView) v.findViewById(R.id.textView5);\r\n\t\t\t final TextView text6 = (TextView) v.findViewById(R.id.textView6);\r\n\t\t\t final TextView text7 = (TextView) v.findViewById(R.id.textView7); \r\n\t\t\t final TextView text8 = (TextView) v.findViewById(R.id.textView8);\r\n\t\t\t \r\n\t\t\t\ttext1.setText(tv1);\r\n\t\t\t\ttext2.setText(tv2);\r\n\t\t\t\ttext3.setText(tv3);\r\n\t\t\t\ttext4.setText(tv4);\r\n\t\t\t\ttext5.setText(tv5);\r\n\t\t\t\ttext6.setText(tv6);\r\n\t\t\t\ttext7.setText(\"\");\r\n\t\t\t\ttext8.setText(\"\");\r\n\t\t}", "void mo6660a(Context context, String str, ImageView imageView, C1492a aVar);", "private void initViews() {\n animalImageNIV = (NetworkImageView)findViewById(R.id.animal_image_niv);\n\n animalIdTV = (TextView)findViewById(R.id.animal_id_tv);\n rfidTV = (TextView)findViewById(R.id.rfid_tv);\n otherIdTV = (TextView)findViewById(R.id.other_id_tv);\n statusTV = (TextView)findViewById(R.id.status_tv);\n\n speciesTV = (TextView)findViewById(R.id.species_tv);\n sexTV = (TextView)findViewById(R.id.sex_tv);\n breedsTV = (TextView)findViewById(R.id.breeds_tv);\n dobTV = (TextView)findViewById(R.id.dob_tv);\n\n ownerTV = (TextView)findViewById(R.id.owner_tv);\n experimentTV = (TextView)findViewById(R.id.experiment_tv);\n locationCanvasLL = (LinearLayout)findViewById(R.id.location_canvas_ll);\n locLayer1TV = (TextView)findViewById(R.id.loc_layer_1_tv);\n locLayer2TV = (TextView)findViewById(R.id.loc_layer_2_tv);\n locCommentTV = (TextView)findViewById(R.id.loc_comment_tv);\n\n damCanvasLL = (LinearLayout)findViewById(R.id.dam_canvas_ll);\n damCanvasLL.setOnClickListener(this);\n damIdTV = (TextView)findViewById(R.id.dam_id_tv);\n damBreedsTV = (TextView)findViewById(R.id.dam_breeds_tv);\n damStatusTV = (TextView)findViewById(R.id.dam_status_tv);\n\n sireCanvasLL = (LinearLayout)findViewById(R.id.sire_canvas_ll);\n sireCanvasLL.setOnClickListener(this);\n sireIdTV = (TextView)findViewById(R.id.sire_id_tv);\n sireBreedsTV = (TextView)findViewById(R.id.sire_breeds_tv);\n sireStatusTV = (TextView)findViewById(R.id.sire_status_tv);\n\n recordFAB = (FloatingActionButton)findViewById(R.id.record_fab);\n recordFAB.setOnClickListener(this);\n }", "ViewHolder(View itemView) {\n super(itemView);\n myImageView = itemView.findViewById(R.id.info_image); // myTextView = itemView.findViewById(R.id.info_text)\n itemView.setOnClickListener(this);\n }", "AsyncImageView getIconView();", "TextView getDescriptionView();", "public interface OwnerDetailsView extends BaseUIView {\n void addBaseLabel(ImageVerticalKeyValueLabel label);\n\n void addDynamicLabel(ImageHorizontalKeyValueLabel label);\n\n void setFollowersCount(String followersCount);\n\n void setFollowingCount(String followeringCount);\n\n void setUpToolbar(String title);\n\n void setOwnerDescription(String description);\n\n void stopProgress();\n\n void showProgress();\n\n void loadHeaderImage(String url);\n}", "public taskimage(ImageView t134){\n t34=t134;\n\n\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView Ename = (TextView) view.findViewById(R.id.Ename);\n TextView Designation = (TextView) view.findViewById(R.id.Designation);\n TextView Salary = (TextView) view.findViewById(R.id.Salary);\n // Extract properties from cursor\n String ename = cursor.getString(cursor.getColumnIndexOrThrow(\"ename\"));\n String designation = cursor.getString(cursor.getColumnIndexOrThrow(\"designation\"));\n int salary = cursor.getInt(cursor.getColumnIndexOrThrow(\"salary\"));\n\n ImageView imgView =(ImageView)view.findViewById(R.id.ImageView01);\n\n\n imgView.setImageResource(R.drawable.ic_launcher);\n\n\n\n\n\n // Populate fields with extracted properties\n Ename.setText(ename);\n Designation.setText(designation);\n Salary.setText(String.valueOf(salary));\n }", "private void findViews() {\r\n\t\t// Buttons first\r\n\t\tcloseBtn = (ImageButton) findViewById( getApplication().getResources().getIdentifier(\"closeBtn\", \"id\", getApplication().getPackageName()) );\r\n\t\tshareBtn = (ImageButton) findViewById( getApplication().getResources().getIdentifier(\"shareBtn\", \"id\", getApplication().getPackageName()) );\r\n\t\t// Photo Container\r\n\t\tphoto = (ImageView) findViewById( getApplication().getResources().getIdentifier(\"photoView\", \"id\", getApplication().getPackageName()) );\r\n\t\twarning = this.getResources().getIdentifier(\"warning\", \"drawable\", getApplication().getPackageName());\r\n\t\tplace = this.getResources().getIdentifier(\"no_media\", \"drawable\", getApplication().getPackageName());\r\n\t\tmAttacher = new PhotoViewAttacher(photo);\r\n\t\t// Title TextView\r\n\t\t//titleTxt = (TextView) findViewById( getApplication().getResources().getIdentifier(\"titleTxt\", \"id\", getApplication().getPackageName()) );\r\n\t\tprogress = (ProgressBar) findViewById( getApplication().getResources().getIdentifier(\"progressBar\", \"id\", getApplication().getPackageName()));\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tlineid = this.getIntent().getStringExtra(\"lineid\");\r\n\t\t\r\n\t\tsetTitleText(\"\");\r\n\t\tsetRightButtonText(\"订购>>\");\r\n\t\t\r\n\t\ttvFullName = (TextView) findViewById(R.id.tv_fullname);\r\n\t\ttvFullName.setTextSize(DisplayUtil.textGetSizeSp(this, 33));\r\n\t\ttvFullName.setTypeface(Typeface.MONOSPACE,Typeface.ITALIC);\r\n\t\tRelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) tvFullName.getLayoutParams();\r\n\t\tlp.height = DisplayUtil.getSize(this, 60);\r\n\t\tlp.leftMargin = DisplayUtil.getSize(this, 24);\r\n\t\ttvFullName.setLayoutParams(lp);\r\n\t\t\r\n\t\trlPriceInfo = (RelativeLayout)findViewById(R.id.rl_price_info);\r\n\t\tlp = (RelativeLayout.LayoutParams) rlPriceInfo.getLayoutParams();\r\n\t\tlp.height = DisplayUtil.getSize(this, 106);\r\n\t\trlPriceInfo.setLayoutParams(lp);\r\n\t\t\r\n\t\ttvAdultPrice = (TextView) findViewById(R.id.tv_adult_price);\r\n\t\ttvAdultPrice.setPadding(0, 0, DisplayUtil.getSize(this, 35), DisplayUtil.getSize(this, 12));\r\n\t\ttvAdultPrice.setTextSize(DisplayUtil.textGetSizeSp(this, 27));\r\n\t\t\r\n\t\ttvKidPrice = (TextView) findViewById(R.id.tv_kid_price);\r\n\t\t\r\n\t\ttvKidPrice.setTextSize(DisplayUtil.textGetSizeSp(this, 27));\r\n\t\t\r\n\t\ttvStart = (TextView) findViewById(R.id.tv_start);\r\n\t\ttvStart.setPadding(DisplayUtil.getSize(this, 24), 0, 0, 0);\r\n\t\ttvStart.setTextSize(DisplayUtil.textGetSizeSp(this, 27));\r\n\t\t\r\n\t\tivLine = (ImageView) findViewById(R.id.iv_line);\r\n\t\tlp = (RelativeLayout.LayoutParams) ivLine.getLayoutParams();\r\n\t\tlp.rightMargin = DisplayUtil.getSize(this, 12);\r\n\t\tlp.leftMargin = lp.rightMargin;\r\n\t\tivLine.setLayoutParams(lp);\r\n\t\t\r\n\t\trlTopInfo = (RelativeLayout)findViewById(R.id.rl_top_info);\r\n\t\tLinearLayout.LayoutParams llp = (LinearLayout.LayoutParams) rlTopInfo.getLayoutParams();\r\n\t\tllp.topMargin = DisplayUtil.getSize(this, 12);\r\n\t\tllp.bottomMargin = DisplayUtil.getSize(this, 21);\r\n\t\trlTopInfo.setLayoutParams(llp);\r\n\t\t\r\n\t\tllDetail = (LinearLayout) findViewById(R.id.ll_details);\r\n\t\t//llDetail.setPadding(DisplayUtil.getSize(this, 12), 0, DisplayUtil.getSize(this, 12), DisplayUtil.getSize(this, 12));\r\n\t\t\r\n\t\tllCheckTab = (LinearLayout) findViewById(R.id.ll_check_tab);\r\n\t\tllCheckTab.setPadding(DisplayUtil.getSize(this, 12), 0, DisplayUtil.getSize(this, 12), 0);\r\n\t\t\r\n\t\tbtnCheckOne = (Button) findViewById(R.id.btn_check_one);\r\n\t\tbtnCheckOne.setOnClickListener(this);\r\n\t\tbtnCheckTwo = (Button) findViewById(R.id.btn_check_two);\r\n\t\tbtnCheckTwo.setOnClickListener(this);\r\n\t\tbtnCheckThree = (Button) findViewById(R.id.btn_check_three);\r\n\t\tbtnCheckThree.setOnClickListener(this);\r\n\t\t\r\n\t\tbtnCheckOne.setTextSize(DisplayUtil.textGetSizeSp(this, 30));\r\n\t\tbtnCheckTwo.setTextSize(DisplayUtil.textGetSizeSp(this, 30));\r\n\t\tbtnCheckThree.setTextSize(DisplayUtil.textGetSizeSp(this, 30));\r\n\t\t\r\n\t\tif(!TextUtils.isEmpty(lineid)){\r\n\t\t\tRequester.requestTravelLineInfo(handler, lineid);\r\n\t\t}\r\n\t}", "private void initUI() {\n\t\timageview = (ImageView) v.findViewById(R.id.shezhi);\r\n\t\timageview.setOnClickListener(this);\r\n\r\n\t\tmytaobao = (ImageView) v.findViewById(R.id.taobao_go);\r\n\t\tmytaobao.setOnClickListener(this);\r\n\r\n\t\twuliu = (ImageView) v.findViewById(R.id.wuliu);\r\n\t\twuliu.setOnClickListener(this);\r\n\r\n\t\tgouwuche = (ImageView) v.findViewById(R.id.gouwuche);\r\n\t\tgouwuche.setOnClickListener(this);\r\n\r\n\t\tchadingdan = (ImageView) v.findViewById(R.id.dingdan);\r\n\t\tchadingdan.setOnClickListener(this);\r\n\r\n\t\tshoucang = (ImageView) v.findViewById(R.id.shoucang);\r\n\t\tshoucang.setOnClickListener(this);\r\n\t}", "TextView getTagView();", "private void intviews() {\n\t\tyanzhengmall=(LinearLayout) findViewById(R.id.yanzhengma);\r\n\t\tphonell=(LinearLayout) findViewById(R.id.phone);\r\n\t\tzhucell=(LinearLayout) findViewById(R.id.zhuce);\r\n\t\tbtn=(Button) findViewById(R.id.button1);\r\n\t\tbtn1=(Button) findViewById(R.id.yanzhengmabutton);\r\n\t\tgetcodebtn=(Button) findViewById(R.id.getcodebtn);\r\n\t\tphoneet=(EditText) findViewById(R.id.phoneet);\r\n\t\tphonetv=(TextView) findViewById(R.id.phonetv);\r\n\t\tyanzhengmatv=(TextView) findViewById(R.id.yanzhengmatv);\r\n\t\tpasswordtv=(TextView) findViewById(R.id.passwordtv);\r\n\t\tbackimageview=(ImageView) findViewById(R.id.backimageview);\r\n\t\tcodeedittext=(EditText) findViewById(R.id.yanzhengmaEditText);\r\n\t\tpasswordet=(EditText) findViewById(R.id.passwordEditText);\r\n\t\tquerenpasswordet=(EditText) findViewById(R.id.passwordquerenEditText);\r\n\t\tregisterbtn=(Button) findViewById(R.id.zhucebutton);\r\n\t}", "public interface ItemView {\n\n void setFocus(boolean isFocused);\n\n void setImage(String url);\n}", "@Override\n\tprotected void init() {\n\t\ttv1 = (TextView) findViewById(R.id.text1);\n\t\ttv2 = (TextView) findViewById(R.id.text2);\n\t\tbt1 = (Button) findViewById(R.id.button1);\n\t\tbt2 = (Button) findViewById(R.id.button2);\n\t\timg1 = (ImageView) findViewById(R.id.imageView1);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n imginfo=(TextView)super.findViewById(R.id.imginfo);\n img=(ImageView)super.findViewById(R.id.img);\n img.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n imginfo.setText(\"x=\"+event.getX()+\",y=\"+event.getY());\n return false;\n }\n });\n }", "private void initViews() {\n textViewName = (AppCompatTextView) findViewById(R.id.textViewName);\n //appCompatButtonBack= (AppCompatButton) findViewById(R.id.appCompatButtonBack);\n imageView= (ImageView) findViewById(R.id.imageView);\n recyclerViewUsers = (RecyclerView) findViewById(R.id.recyclerViewUsers);\n\n }", "void getUIControls()\n {\n title = (TextView) findViewById(R.id.reviewTitleTextView);\n date = (TextView) findViewById(R.id.dateTextView);\n author = (TextView) findViewById(R.id.authorTextView);\n message = (TextView) findViewById(R.id.messageTextView);\n reviewerCountry = (TextView) findViewById(R.id.reviewerCountryTextView);\n authorRate = (RatingBar) findViewById(R.id.authorRateRatingBar);\n }", "public void initViews(){\n layout_health = (RelativeLayout) findViewById(R.id.layout_health);\n layout_msg = (RelativeLayout) findViewById(R.id.layout_msg);\n layout_usercenter = (RelativeLayout) findViewById(R.id.layout_usercenter);\n\n// img_home = (ImageView) findViewById(R.id.img_home);\n img_health = (ImageView) findViewById(R.id.img_health);\n img_msg = (ImageView) findViewById(R.id.img_msg);\n img_usercenter = (ImageView) findViewById(R.id.img_usercenter);\n\n// tv_home = (TextView) findViewById(R.id.tv_home);\n tv_health = (TextView) findViewById(R.id.tv_health);\n tv_msg = (TextView) findViewById(R.id.tv_msg);\n tv_usercenter = (TextView) findViewById(R.id.tv_usercenter);\n\n }", "public interface IDetailView {\n public void setImage(String url);\n\n // mètodes per assignar el nom i cognom\n public void setNom(String text);\n public void setDivisio(String text);\n public void setNivell(String text);\n public void setObjPref(String text);\n public void setTipusAtac(String text);\n /*public void setUrlImatge(String text) ;*/\n}", "public final void onBindView(View view) {\n AppMethodBeat.m2504i(107165);\n super.onBindView(view);\n ImageView imageView = (ImageView) view.findViewById(2131822184);\n if (imageView != null) {\n if (this.drawable != null) {\n imageView.setImageDrawable(this.drawable);\n imageView.setVisibility(0);\n } else if (this.f4433ZV != 0) {\n imageView.setImageResource(this.f4433ZV);\n imageView.setVisibility(0);\n } else {\n imageView.setVisibility(8);\n }\n }\n LinearLayout linearLayout = (LinearLayout) view.findViewById(2131822347);\n if (this.height != -1) {\n linearLayout.setMinimumHeight(this.height);\n }\n TextView textView = (TextView) view.findViewById(2131822348);\n if (textView != null) {\n textView.setVisibility(this.qlf);\n textView.setText(this.pnJ);\n if (this.qle != -1) {\n textView.setBackgroundDrawable(C1338a.m2864g(this.context, this.qle));\n }\n }\n this.yBG = (ImageView) view.findViewById(2131822349);\n this.yBG.setVisibility(this.yBD);\n this.yBH = (ViewGroup) view.findViewById(2131822351);\n this.yBH.setVisibility(this.yBE);\n this.yBI = (TextView) view.findViewById(16908310);\n textView = (TextView) view.findViewById(2131826062);\n if (C5046bo.isNullOrNil(this.yBJ)) {\n textView.setVisibility(8);\n AppMethodBeat.m2505o(107165);\n return;\n }\n textView.setVisibility(0);\n textView.setText(this.yBJ);\n AppMethodBeat.m2505o(107165);\n }", "@Override\n\tprotected void initView() {\n\t\tiv_content = (ImageView) findViewById(R.id.music_content);\n\t\tiv_music = (ImageView) findViewById(R.id.music_me_iv);\n\t\tiv_queen = (ImageView) findViewById(R.id.music_queen_iv);\n\t\ttv_music = (TextView) findViewById(R.id.music_me_tv);\n\t\ttv_queen = (TextView) findViewById(R.id.music_queen_tv);\n\t\tiv_music.setOnClickListener(this);\n\t\tiv_queen.setOnClickListener(this);\n\t\t\n\t\tbitmap=DisplayUtil.readBitMap(getApplicationContext(), R.drawable.music_part1);\n\t\tiv_content.setImageBitmap(bitmap);\n\n\t}", "public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }", "public OtherContentViewHolder(View view) {\n super(view);\n C32569u.m150519b(view, \"v\");\n View findViewById = view.findViewById(R.id.image_view_layout);\n C32569u.m150513a((Object) findViewById, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154B63DAA2EE3318641F7F2FCDB689ADA0FAB79\"));\n this.f85358a = findViewById;\n View findViewById2 = view.findViewById(R.id.image_view);\n C32569u.m150513a((Object) findViewById2, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154B63DAA2EE3318641F7F28A\"));\n this.f85359b = (ZHDraweeView) findViewById2;\n View findViewById3 = view.findViewById(R.id.left_top_image);\n C32569u.m150513a((Object) findViewById3, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154B335AD3DD91A9F58CDECCED66E869C\"));\n this.f85360c = (ZHDraweeView) findViewById3;\n View findViewById4 = view.findViewById(R.id.right_bottom_image);\n C32569u.m150513a((Object) findViewById4, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154AD39AC21F2319247E6F1CCDA568AD81BB835E2\"));\n this.f85361d = (ZHDraweeView) findViewById4;\n View findViewById5 = view.findViewById(R.id.tv_title);\n C32569u.m150513a((Object) findViewById5, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154AB26943DEF1A9C4DBB\"));\n this.f85362e = (ZHTextView) findViewById5;\n View findViewById6 = view.findViewById(R.id.tv_content);\n C32569u.m150513a((Object) findViewById6, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154AB26942AE900844DFCF18A\"));\n this.f85363f = (ZHTextView) findViewById6;\n View findViewById7 = view.findViewById(R.id.tv_info);\n C32569u.m150513a((Object) findViewById7, C6969H.m41409d(\"G7FCDD313B1349D20E319B251DBE18BE5278AD154AB269420E8089F01\"));\n this.f85364g = (ZHTextView) findViewById7;\n View f = mo108907f(R.id.content_layout);\n if (f != null) {\n f.setBackground(C24380s.m119247a(C24380s.m119245a(8, (Context) null, 1, (Object) null), mo108903c(R.color.GBK10A)));\n }\n this.f85358a.setClipToOutline(true);\n this.f85358a.setOutlineProvider(new C24379r((float) C24380s.m119245a(6, (Context) null, 1, (Object) null)));\n TextPaint paint = this.f85362e.getPaint();\n C32569u.m150513a((Object) paint, C6969H.m41409d(\"G7D95E113AB3CAE67F60F9946E6\"));\n paint.setFakeBoldText(true);\n this.itemView.setOnClickListener(this);\n }", "protected ImageView getImageView(){\n\t\treturn iv1;\n\t}", "public ViewHolder(View itemView) {\n super(itemView);\n\n tvMessageLeft = (TextView) itemView.findViewById(R.id.tvMessageLeft);\n tvMessageRight = (TextView) itemView.findViewById(R.id.tvMessageRight);\n ivUserIcon = (ImageView) itemView.findViewById(R.id.ivProfPicMessageList);\n // tvTime_stamp = (TextView) itemView.findViewById(R.id.tvTime);\n\n\n //llItemListTop = (LinearLayout) itemView.findViewById(R.id.llListItemTop);\n //llItemListMiddle = (LinearLayout) itemView.findViewById(R.id.llListItemMiddle);\n //llItemListBottom = (LinearLayout) itemView.findViewById(R.id.llListItemTop);\n\n\n }", "private void prepareView(){\n mAvatar = (ImageButton)findViewById(R.id.btnAvatar);\n mAvatar.setOnClickListener(this);\n\n mName = (TextView)findViewById(R.id.tvName);\n mEmail = (TextView)findViewById(R.id.tvEmail);\n mWelcome = (TextView)findViewById(R.id.tvSelectionTitle);\n\n mDesigner = (ImageButton)findViewById(R.id.btnDesigner);\n mDesigner.setOnClickListener(this);\n\n mDeveloper = (ImageButton)findViewById(R.id.btnDeveloper);\n mDeveloper.setOnClickListener(this);\n }", "private void getAttributes(View view) {\n firstName = view.findViewById(R.id.user_first_name);\n vibez = view.findViewById(R.id.vibePointsNum);\n vibezString = view.findViewById(R.id.myVibe);\n myBooksRecyclerView = view.findViewById(R.id.my_books_recycler_view);\n booksIReadRecyclerView = view.findViewById(R.id.books_i_read_recycler_view);\n ownerImg = (CircleImageView) view.findViewById(R.id.circ_image);\n }", "@SuppressLint(\"SimpleDateFormat\")\r\n\tprivate void initViews() {\n\r\n\t\tTypeface teko = Typeface.createFromAsset(getAssets(), \"Teko_Light.ttf\");\r\n\t\tTypeface lato = Typeface.createFromAsset(getAssets(),\r\n\t\t\t\t\"Lato-Regular.ttf\");\r\n\t\tTypeface teko_bold = Typeface.createFromAsset(getAssets(),\r\n\t\t\t\t\"Teko-Bold.ttf\");\r\n\r\n\t\tiv_client = (ImageView) findViewById(R.id.iv_client);\r\n\t\tiv_trainer = (ImageView) findViewById(R.id.iv_trainer);\r\n\r\n\t\ttv_clientname = (TextView) findViewById(R.id.tv_clientname);\r\n\t\ttv_clientname.setTypeface(teko_bold);\r\n\t\ttv_clientplace = (TextView) findViewById(R.id.tv_clientplace);\r\n\t\ttv_clientplace.setTypeface(lato);\r\n\t\ttv_client_session_date = (TextView) findViewById(R.id.tv_client_session_date);\r\n\t\ttv_client_session_date.setTypeface(lato);\r\n\t\ttv_client_session_time = (TextView) findViewById(R.id.tv_client_session_time);\r\n\t\ttv_client_session_time.setTypeface(lato);\r\n\t\ttv_trainername = (TextView) findViewById(R.id.tv_trainername);\r\n\t\ttv_trainername.setTypeface(teko_bold);\r\n\t\ttv_trainerplace = (TextView) findViewById(R.id.tv_trainerplace);\r\n\t\ttv_trainerplace.setTypeface(lato);\r\n\t\tbtn_missed = (Button) findViewById(R.id.btn_missed);\r\n\t\tbtn_missed.setTypeface(teko);\r\n\t\td = new DialogView();\r\n\r\n\t\ttv_clientname.setText(GlobalVariable.trainerPageClientName\r\n\t\t\t\t.toUpperCase());\r\n\t\ttv_client_session_date.setText(new SimpleDateFormat(\"MMM dd, yyyy\")\r\n\t\t\t\t.format(new Date()));\r\n\t\ttv_client_session_time.setText(\"demo\");\r\n\t\ttv_trainername.setText(GlobalVariable.trainerPageTrainerName\r\n\t\t\t\t.toUpperCase());\r\n\r\n\t\tSystem.out.println(\"photo c\" + GlobalVariable.trainerPageClientPhoto);\r\n\t\tSystem.out.println(\"photo t\" + GlobalVariable.trainerPageTrainerPhoto);\r\n\r\n\t\tif (GlobalVariable.trainerPageClientPhoto.length() > 0) {\r\n\t\t\tSystem.out.println(\"1\");\r\n\t\t\tiv_trainer.setBackgroundResource(R.drawable.test);\r\n\t\t\tnew DownloadImageTask(iv_client)\r\n\t\t\t\t\t.execute(GlobalVariable.trainerPageClientPhoto);\r\n\r\n\t\t}\r\n\r\n\t\tif (GlobalVariable.trainerPageTrainerPhoto.length() > 0) {\r\n\t\t\tSystem.out.println(\"2\");\r\n\t\t\tnew DownloadImageTask(iv_trainer)\r\n\t\t\t\t\t.execute(GlobalVariable.trainerPageTrainerPhoto);\r\n\t\t\tiv_client.setBackgroundResource(R.drawable.test);\r\n\r\n\t\t}\r\n\t\tif (GlobalVariable.trainerPageClientPhoto.length() > 0\r\n\t\t\t\t&& GlobalVariable.trainerPageTrainerPhoto.length() > 0) {\r\n\t\t\tSystem.out.println(\"3\");\r\n\t\t\tnew DownloadImageTask(iv_client)\r\n\t\t\t\t\t.execute(GlobalVariable.trainerPageClientPhoto);\r\n\r\n\t\t\tnew DownloadImageTask(iv_trainer)\r\n\t\t\t\t\t.execute(GlobalVariable.trainerPageTrainerPhoto);\r\n\r\n\t\t}\r\n\t\tif (GlobalVariable.trainerPageClientPhoto.length() == 0\r\n\t\t\t\t&& GlobalVariable.trainerPageTrainerPhoto.length() == 0) {\r\n\t\t\tSystem.out.println(\"4\");\r\n\t\t\tiv_trainer.setBackgroundResource(R.drawable.test);\r\n\t\t\tiv_client.setBackgroundResource(R.drawable.test);\r\n\t\t}\r\n\r\n\t\t// managing start and end time\r\n\t\tif (GlobalVariable.trainerStartTime.equals(\"\")\r\n\t\t\t\t&& GlobalVariable.trainerEndTime.equals(\"\")) {\r\n\t\t\ttv_client_session_time.setText(\"No active session\");\r\n\t\t\ttv_client_session_date.setText(\"No active session\");\r\n\r\n\t\t\tbtn_missed.setAlpha(0.3f);\r\n\t\t\tbtn_missed.setText(\"NO SESSION\");\r\n\t\t\tbtn_missed.setEnabled(false);\r\n\t\t} else {\r\n\r\n\t\t\tString startTime = \"\", endTime = \"\";\r\n\t\t\tlong total_time = 0;\r\n\t\t\tString st_time_text = GlobalVariable.trainerStartTime.substring(10,\r\n\t\t\t\t\t16);\r\n\t\t\tSystem.out.println(\"st time text: \" + st_time_text);\r\n\r\n\t\t\tString st_date = GlobalVariable.trainerStartTime.substring(0, 10);\r\n\t\t\tSystem.out.println(\"st_date : \" + st_date);\r\n\r\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"kk:mm\");\r\n\t\t\tSimpleDateFormat dateFormat2 = new SimpleDateFormat(\"hh:mm aa\");\r\n\t\t\tSimpleDateFormat dateFormat3 = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\tSimpleDateFormat dateFormat4 = new SimpleDateFormat(\"MMM dd,yyyy\");\r\n\t\t\tSimpleDateFormat dateFormat5 = new SimpleDateFormat(\r\n\t\t\t\t\t\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\ttry {\r\n\t\t\t\tDate date = dateFormat.parse(st_time_text);\r\n\t\t\t\tDate fulldate = dateFormat5\r\n\t\t\t\t\t\t.parse(GlobalVariable.trainerStartTime.substring(0, 19));\r\n\t\t\t\tSystem.out.println(\"full date: \"\r\n\t\t\t\t\t\t+ GlobalVariable.trainerStartTime.substring(0, 19));\r\n\r\n\t\t\t\tlong start_date_obj = fulldate.getTime();\r\n\t\t\t\tSystem.out.println(\"AA:\" + start_date_obj);\r\n\t\t\t\tstartTime = dateFormat2.format(date);\r\n\t\t\t\tLog.e(\"Time\", startTime);\r\n\r\n\t\t\t\tSystem.out.println(\"BB:\" + GlobalVariable.ytime);\r\n\r\n\t\t\t\tstDate = dateFormat3.parse(st_date);\r\n\t\t\t\tstartDate = dateFormat4.format(stDate);\r\n\r\n\t\t\t\t// total_time = start_date_obj\r\n\t\t\t\t// + (Integer.parseInt(GlobalVariable.ytime) * 60 * 1000);\r\n\t\t\t\ttotal_time = start_date_obj;\r\n\t\t\t\tSystem.out.println(\"CC:\" + total_time);\r\n\t\t\t\tSystem.out.println(\"DD:\" + System.currentTimeMillis());\r\n\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t}\r\n\r\n\t\t\ttv_client_session_date.setText(startDate);\r\n\r\n\t\t\tString end_time_text = GlobalVariable.trainerEndTime.substring(10,\r\n\t\t\t\t\t16);\r\n\t\t\tSystem.out.println(\"end time text: \" + end_time_text);\r\n\r\n\t\t\tSimpleDateFormat dtFormat = new SimpleDateFormat(\"kk:mm\");\r\n\t\t\tSimpleDateFormat dtFormat2 = new SimpleDateFormat(\"hh:mm aa\");\r\n\t\t\ttry {\r\n\t\t\t\tDate date = dtFormat.parse(end_time_text);\r\n\r\n\t\t\t\tendTime = dtFormat2.format(date);\r\n\t\t\t\tLog.e(\"Time end\", endTime);\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t}\r\n\r\n\t\t\t// set the session time\r\n\t\t\ttv_client_session_time.setText(startTime + \"-\" + endTime);\r\n\t\t\tSystem.out.println(\"status is:\"\r\n\t\t\t\t\t+ GlobalVariable.TrainerMissedButtonStatus);\r\n\r\n\t\t\tif (GlobalVariable.TrainerMissedButtonStatus.equals(\"0\")) {\r\n\r\n\t\t\t\tSystem.out.println(\"STATUS\");\r\n\r\n\t\t\t\tbtn_missed.setAlpha(0.3f);\r\n\t\t\t\tbtn_missed.setText(\"NO SESSION\");\r\n\t\t\t\tbtn_missed.setEnabled(false);\r\n\r\n\t\t\t} else if (GlobalVariable.TrainerMissedButtonStatus.equals(\"1\")) {\r\n\r\n\t\t\t\t// check here\r\n\t\t\t\t// if current time is > than start time + y mins\r\n\t\t\t\tLog.d(\"Status\", GlobalVariable.TrainerMissedButtonStatus);\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"current time:\" + System.currentTimeMillis());\r\n\t\t\t\tif (System.currentTimeMillis() > total_time) {\r\n\t\t\t\t\tSystem.out.println(\"greater\");\r\n\t\t\t\t\tbtn_missed.setText(\"MISSED SESSION\");\r\n\t\t\t\t\tbtn_missed.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"smaller\");\r\n\t\t\t\t\tbtn_missed.setAlpha(0.3f);\r\n\t\t\t\t\tbtn_missed.setText(\"MISSED SESSION\");\r\n\t\t\t\t\tbtn_missed.setEnabled(false);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else if (GlobalVariable.TrainerMissedButtonStatus.equals(\"2\")) {\r\n\r\n\t\t\t\tbtn_missed.setAlpha(0.3f);\r\n\t\t\t\tbtn_missed.setText(\"SESSION CONFIRMED\");\r\n\t\t\t\tbtn_missed.setEnabled(false);\r\n\r\n\t\t\t} else if (GlobalVariable.TrainerMissedButtonStatus.equals(\"3\")) {\r\n\r\n\t\t\t\tbtn_missed.setAlpha(0.3f);\r\n\t\t\t\tbtn_missed.setText(\"MARKED ABSENT\");\r\n\t\t\t\tbtn_missed.setEnabled(false);\r\n\t\t\t} else if (GlobalVariable.TrainerMissedButtonStatus.equals(\"\")) {\r\n\r\n\t\t\t\tbtn_missed.setAlpha(0.3f);\r\n\t\t\t\tbtn_missed.setText(\"NO SESSION\");\r\n\t\t\t\tbtn_missed.setEnabled(false);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public ItemViewHolder(View itemView) {\n super(itemView);\n iv_image = (RoundedImageView)itemView.findViewById(R.id.item_photo);\n tv_title = (TextView)itemView.findViewById(R.id.item_title);\n tv_subtitle = (TextView)itemView.findViewById(R.id.item_subtitle);\n iv_image2 = (ImageView)itemView.findViewById(R.id.imageView1);\n }", "private void initViews() {\n user_name = (LinearLayout)findViewById(R.id.user_name);\n user_photo = (LinearLayout)findViewById(R.id.user_photo);\n user_sex = (LinearLayout)findViewById(R.id.user_sex);\n user_notes = (LinearLayout)findViewById(R.id.user_notes);\n name = (TextView)findViewById(R.id.name);\n sex = (TextView)findViewById(R.id.sex);\n notes = (TextView)findViewById(R.id.notes);\n email = (TextView)findViewById(R.id.email);\n photo = (ImageView)findViewById(R.id.photo);\n }", "public void TextView_Config(){\n textviewBaro=(TextView) findViewById(R.id.textviewGravity);\n textviewAcceleration=(TextView) findViewById(R.id.textviewAcceleration);\n textviewGyro=(TextView) findViewById(R.id.textviewGyro);\n display=(TextView)findViewById(R.id.textView1);\n }", "public ViewHolder3(View view)\n {\n super(view);\n this.view = view;\n\n this.author = (TextView) view.findViewById(R.id.author);\n this.rate = (TextView) view.findViewById(R.id.vote_by);\n this.content = (TextView) view.findViewById(R.id.my_review);\n }", "@Override\n\t\tpublic void layout(int l, int t, int r, int b) {\n\t\t\tsuper.layout(l, t, r, b);\n\t\t\tLog.e(\"FYF\", getId() + \" ImageView layout\");\n\t\t}", "@Override\n protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n textView.measure(widthMeasureSpec, heightMeasureSpec);\n\n // Now limit the max size for the icon and then compute its measure\n int height = textView.getMeasuredHeight();\n // We allow 120% of the text size\n height = (12 * height) / 10;\n imageView.setMaxWidth(height);\n imageView.setMaxHeight(height);\n imageView.measure(widthMeasureSpec, heightMeasureSpec);\n\n // Now compute this item measure\n super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n }", "private void initViews(View v) {\n\t\tuser_head_img = (ImageView) v.findViewById(R.id.user_head_img);\r\n\t\tuser_head_img.setImageResource(R.drawable.icon_user_img);\r\n\t\tString id = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUseId();\r\n\t\tList<ImageBean> bean = dao.select(id);\r\n\t\tif (bean != null && bean.size() > 0) {\r\n\t\t\tImageLoader.getInstance().displayImage(bean.get(0).getUrl(),\r\n\t\t\t\t\tuser_head_img, ImageLoadOptions.getOptions());\r\n\t\t} else {\r\n\t\t\tuser_head_img.setImageResource(R.drawable.icon_user_img);\r\n\t\t}\r\n\t\ttv_account = (TextView) v.findViewById(R.id.tv_account);\r\n\t\tString account = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserName();\r\n\t\ttv_account.setText(account);\r\n\t\ttv_tel = (TextView) v.findViewById(R.id.tv_tel);\r\n\t\tString tel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserTel();\r\n\t\ttv_tel.setText(StringUtils.getTelNum(tel));\r\n\t\ttxt_zcgl = (TextView) v.findViewById(R.id.txt_zcgl);\r\n\t\ttxt_tzgl = (TextView) v.findViewById(R.id.txt_tzgl);\r\n\t\ttxt_jlcx = (TextView) v.findViewById(R.id.txt_jlcx);\r\n\t\ttxt_wdyhk = (TextView) v.findViewById(R.id.txt_wdyhk);\r\n\t\ttxt_wdxx = (TextView) v.findViewById(R.id.txt_wdxx);\r\n\t\ttxt_myredpager = (TextView) v.findViewById(R.id.txt_myredpager);\r\n\t\tlayout_zhaq = (RelativeLayout) v.findViewById(R.id.layout_zhaq);\r\n\t\tlayout_ssmm = (RelativeLayout) v.findViewById(R.id.layout_ssmm);\r\n\t\ttv_safelevel = (TextView) v.findViewById(R.id.tv_safelevel);\r\n\t\tString safelevel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getSafelevel();\r\n\t\ttv_safelevel.setText(safelevel);\r\n\t\ttv_zhye = (TextView) v.findViewById(R.id.tv_zhye);\r\n\t\tlinearlayout = (LinearLayout) v.findViewById(R.id.linearlayout);\r\n\t\ttv_ssmm = (TextView) v.findViewById(R.id.tv_ssmm);\r\n\t\tboolean isHasGesturePsd = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).isHasGesturePsd();\r\n\t\tif (isHasGesturePsd) {\r\n\t\t\ttv_ssmm.setText(R.string.ssmm_msg);\r\n\t\t} else {\r\n\t\t\ttv_ssmm.setText(R.string.no_setting);\r\n\t\t}\r\n\t}", "private void initView() {\n\t\timg_back = (ImageView) findViewById(R.id.img_back_updatejob);\n\t\tedt_content = (EditText) findViewById(R.id.edt_content_updatejob);\n\t\tedt_course = (EditText) findViewById(R.id.edt_course_updatejob);\n\t\tbtn_delete = (Button) findViewById(R.id.btn_delete_updatejob);\n\t\tbtn_update = (Button) findViewById(R.id.btn_update_updatejob);\n\t}", "private final void m110459at() {\n float b = ((float) C23482j.m77098b(mo75261ab())) / ((float) C23486n.m77122a(375.0d));\n if (mo86957ao()) {\n this.f89205aX = (LinearLayout) this.itemView.findViewById(R.id.e_w);\n this.f89206aY = (LinearLayout) this.itemView.findViewById(R.id.e_u);\n this.f89216bj = (DmtTextView) this.itemView.findViewById(R.id.cl);\n this.f89207aZ = (AdRatingView) this.itemView.findViewById(R.id.d5);\n this.f89209ba = this.itemView.findViewById(R.id.ce);\n this.f89210bb = (DmtTextView) this.itemView.findViewById(R.id.b_);\n this.f89217bk = (LinearLayout) this.itemView.findViewById(R.id.ch);\n this.f89218bl = (DescTextView) this.itemView.findViewById(R.id.bo);\n this.f89219bm = (RemoteImageView) this.itemView.findViewById(R.id.c5);\n this.f89211bc = (DmtTextView) this.itemView.findViewById(R.id.aj6);\n this.f89220bn = (DmtTextView) this.itemView.findViewById(R.id.aj_);\n LinearLayout linearLayout = this.f89206aY;\n if (linearLayout != null) {\n LayoutParams layoutParams = linearLayout.getLayoutParams();\n if (layoutParams != null) {\n layoutParams.width = (int) (((float) C23486n.m77122a(183.0d)) * b);\n }\n }\n DmtTextView dmtTextView = this.f89220bn;\n if (dmtTextView != null) {\n LayoutParams layoutParams2 = dmtTextView.getLayoutParams();\n if (layoutParams2 != null) {\n layoutParams2.width = (int) (((float) C23486n.m77122a(86.5d)) * b);\n }\n }\n DmtTextView dmtTextView2 = this.f89211bc;\n if (dmtTextView2 != null) {\n LayoutParams layoutParams3 = dmtTextView2.getLayoutParams();\n if (layoutParams3 != null) {\n layoutParams3.width = (int) (((float) C23486n.m77122a(86.5d)) * b);\n if (layoutParams3 != null) {\n if (layoutParams3 != null) {\n ((MarginLayoutParams) layoutParams3).setMarginStart((int) (((float) C23486n.m77122a(10.0d)) * b));\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams\");\n }\n }\n }\n }\n } else {\n this.f89205aX = (LinearLayout) this.itemView.findViewById(R.id.aw_);\n this.f89206aY = (LinearLayout) this.itemView.findViewById(R.id.aw8);\n this.f89216bj = (DmtTextView) this.itemView.findViewById(R.id.ck);\n this.f89207aZ = (AdRatingView) this.itemView.findViewById(R.id.d4);\n this.f89209ba = this.itemView.findViewById(R.id.cd);\n this.f89210bb = (DmtTextView) this.itemView.findViewById(R.id.b9);\n this.f89217bk = (LinearLayout) this.itemView.findViewById(R.id.cg);\n this.f89218bl = (DescTextView) this.itemView.findViewById(R.id.bn);\n this.f89219bm = (RemoteImageView) this.itemView.findViewById(R.id.c4);\n this.f89211bc = (DmtTextView) this.itemView.findViewById(R.id.aj5);\n this.f89220bn = (DmtTextView) this.itemView.findViewById(R.id.aj9);\n LinearLayout linearLayout2 = this.f89206aY;\n if (linearLayout2 != null) {\n LayoutParams layoutParams4 = linearLayout2.getLayoutParams();\n if (layoutParams4 != null) {\n layoutParams4.width = (int) (((float) C23486n.m77122a(223.0d)) * b);\n }\n }\n DmtTextView dmtTextView3 = this.f89220bn;\n if (dmtTextView3 != null) {\n LayoutParams layoutParams5 = dmtTextView3.getLayoutParams();\n if (layoutParams5 != null) {\n layoutParams5.width = (int) (((float) C23486n.m77122a(106.5d)) * b);\n }\n }\n DmtTextView dmtTextView4 = this.f89211bc;\n if (dmtTextView4 != null) {\n LayoutParams layoutParams6 = dmtTextView4.getLayoutParams();\n if (layoutParams6 != null) {\n layoutParams6.width = (int) (((float) C23486n.m77122a(106.5d)) * b);\n if (layoutParams6 != null) {\n if (layoutParams6 != null) {\n ((MarginLayoutParams) layoutParams6).setMarginStart((int) (((float) C23486n.m77122a(10.0d)) * b));\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams\");\n }\n }\n }\n }\n }\n DescTextView descTextView = this.f89218bl;\n if (descTextView != null) {\n descTextView.setDescLightDrawable(R.drawable.z2);\n }\n DescTextView descTextView2 = this.f89218bl;\n if (descTextView2 != null) {\n descTextView2.mo1061a();\n }\n LinearLayout linearLayout3 = this.f89205aX;\n if (linearLayout3 != null) {\n linearLayout3.setOnClickListener(new C34215i(this));\n }\n DmtTextView dmtTextView5 = this.f89216bj;\n if (dmtTextView5 != null) {\n dmtTextView5.setOnClickListener(new C34207c(this));\n }\n LinearLayout linearLayout4 = this.f89217bk;\n if (linearLayout4 != null) {\n linearLayout4.setOnClickListener(new C34208d(this));\n }\n DescTextView descTextView3 = this.f89218bl;\n if (descTextView3 != null) {\n descTextView3.setOnClickListener(new C34209e(this));\n }\n RemoteImageView remoteImageView = this.f89219bm;\n if (remoteImageView != null) {\n remoteImageView.setOnClickListener(new C34210f(this));\n }\n DmtTextView dmtTextView6 = this.f89211bc;\n if (dmtTextView6 != null) {\n dmtTextView6.setOnClickListener(new C34211g(this));\n }\n DmtTextView dmtTextView7 = this.f89220bn;\n if (dmtTextView7 != null) {\n dmtTextView7.setOnClickListener(new C34214h(this));\n }\n C43081e.m136671a((View) this.f89211bc, 0.75f);\n C43081e.m136670a(this.f89220bn);\n C43081e.m136671a((View) this.f89218bl, 0.75f);\n C43081e.m136671a((View) this.f89219bm, 0.75f);\n C43081e.m136671a((View) this.f89217bk, 0.75f);\n C43081e.m136671a((View) this.f89216bj, 0.75f);\n if (C25352e.m83221d(this.f77546j)) {\n DmtTextView dmtTextView8 = this.f89211bc;\n if (dmtTextView8 != null) {\n dmtTextView8.setText(C25384x.m83526a(mo75261ab(), this.f77546j, true));\n }\n float a = (float) C23486n.m77122a(2.0d);\n Context ab = mo75261ab();\n C7573i.m23582a((Object) ab, \"context\");\n Drawable bVar = new C24510b(a, ab.getResources().getColor(R.color.w0));\n if (C25352e.m83199A(this.f77546j)) {\n bVar = C43081e.m136669a(bVar.mutate(), C0683b.m2912c(mo75261ab(), R.color.a5q));\n C7573i.m23582a((Object) bVar, \"AdAnimationUtils.tintDra…or(context, R.color.s14))\");\n }\n DmtTextView dmtTextView9 = this.f89211bc;\n if (dmtTextView9 != null) {\n dmtTextView9.setBackground(bVar);\n }\n }\n if (SymphonyAdManager.m82664a().mo65651b(mo75261ab(), this.f77546j) || SymphonyAdManager.m82664a().mo65654c(mo75261ab(), this.f77546j)) {\n int i = 0;\n if (C25352e.m83221d(this.f77546j)) {\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n i = awemeRawAd.getNativeCardType();\n }\n switch (i) {\n case 1:\n m110460au();\n return;\n case 2:\n m110461av();\n return;\n default:\n m110460au();\n break;\n }\n }\n }", "private void setQuestionView() {\n\n if (currentQ.getIsImageQuestion()) {\n\n radioGroup.clearCheck();\n\n byte [] imageInByte = questionList.get(qid).getImageResource();\n\n ByteArrayInputStream imageStream = new ByteArrayInputStream(imageInByte);\n Bitmap theImage = BitmapFactory.decodeStream(imageStream);\n imageView.setImageBitmap(theImage);\n imageView.setVisibility(View.VISIBLE);\n\n txtQuestionNumber.setText(\"Question \" + (qid + 1));\n question.setText(currentQ.getQuestion());\n radio0.setText(currentQ.getA1());\n radio1.setText(currentQ.getA2());\n radio2.setText(currentQ.getA3());\n radio3.setText(currentQ.getA4());\n\n qid++;\n\n }else {\n\n radioGroup.clearCheck();\n\n imageView.setVisibility(View.GONE);\n\n txtQuestionNumber.setText(\"Question \" + (qid + 1));\n question.setText(currentQ.getQuestion());\n radio0.setText(currentQ.getA1());\n radio1.setText(currentQ.getA2());\n radio2.setText(currentQ.getA3());\n radio3.setText(currentQ.getA4());\n\n qid++;\n\n\n }\n }", "@Override\n protected void findViewById() {\n ivGraffit = (ImageView) findView(R.id.ivGraffit);\n\n }", "public void bindViews(){\n txtBio = (TextView) findViewById(R.id.txtBio);\n txtSpeakerName = (TextView) findViewById(R.id.txtSpeakerName);\n imgSpeaker = (ImageView) findViewById(R.id.imgSpeaker);\n speaker = getSpeaker();\n\n\n String image_name = speaker.getImage().toUpperCase().replace(\" \", \"_\");\n String url = IMAGE_URL + image_name;\n ImageLoader imgLoader = AppController.getInstance().getImageLoader();\n imgLoader.get(url, new ImageLoader.ImageListener() {\n @Override\n public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {\n if (response.getBitmap() != null) {\n imgSpeaker.setAdjustViewBounds(true);\n imgSpeaker.setImageBitmap(response.getBitmap());\n\n }\n }\n\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n if(speaker!=null) {\n txtBio.setText(speaker.getBio());\n txtSpeakerName.setText(speaker.getName());\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.detailacheivements);\n\n achvImage = findViewById(R.id.detailimage1);\n achvDetails = findViewById(R.id.detailtextview1);\n achvTitle = findViewById(R.id.detailtitle);\n points = findViewById(R.id.pointtextview);\n des1 = findViewById(R.id.des1);\n\n setImage();\n }", "private void m16075b() {\n this.f13513b = (ImageView) getInflater().inflate(C0633g.abc_list_menu_item_icon, this, false);\n addView(this.f13513b, 0);\n }", "public ViewHolder(View itemView) {\n super(itemView);\n tvNature = (TextView)itemView.findViewById(R.id.item_name);\n tvAmountNature = (TextView)itemView.findViewById(R.id.item_amount);\n }", "private void Initview() {\n\t\tbackimage=((ImageView) findViewById(R.id.main_info_backimage));\n\t\tbackimage.setImageResource(strbackimage);\n\t\tday=((TextView) findViewById(R.id.main_info_day));\n\t\tday.setText(strday);\n\t\tmonth=((TextView) findViewById(R.id.main_info_month));\n\t\tmonth.setText(strmonth);\n\t\tweek=((TextView) findViewById(R.id.main_info_week));\n\t\tweek.setText(strweek);\n\t\ttitle=((TextView) findViewById(R.id.main_info_title));\n\t\ttitle.setText(strtitle);\n\t\tprogress1=((TextView) findViewById(R.id.main_info_progress1));\n\t\tprogress2=((TextView) findViewById(R.id.main_info_progress2));\n\t\tprogress3=((TextView) findViewById(R.id.main_info_progress3));\n\t\tif(markid==0)\n\t\t{\n\t\t\tprogress1.setBackgroundResource(R.drawable.progress_white);\n\t\t\tprogress2.setBackgroundResource(R.drawable.progress_grey);\n\t\t\tprogress3.setBackgroundResource(R.drawable.progress_grey);\n\t\t}\n\t\telse if(markid==1)\n\t\t{\n\t\t\tprogress2.setBackgroundResource(R.drawable.progress_white);\n\t\t\tprogress1.setBackgroundResource(R.drawable.progress_grey);\n\t\t\tprogress3.setBackgroundResource(R.drawable.progress_grey);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprogress3.setBackgroundResource(R.drawable.progress_white);\n\t\t\tprogress2.setBackgroundResource(R.drawable.progress_grey);\n\t\t\tprogress1.setBackgroundResource(R.drawable.progress_grey);\n\t\t}\n\t\t\t\t\n\t}", "public ViewHolder(View view){\n super(view);\n\n artImage = view.findViewById(R.id.thumbnail);\n title = view.findViewById(R.id.headline_title);\n byline = view.findViewById(R.id.byline);\n addDate = view.findViewById(R.id.date_added);\n subText = view.findViewById(R.id.sub_text);\n view.setOnClickListener(this);\n\n }", "void mo36482a(ImageView imageView, Uri uri);", "private void initView() {\n\t\tfindViewById(R.id.rl_titlebar).setBackgroundColor(getResources().getColor(R.color.deep_blue));\n\t\tImageView mLeftImgv=(ImageView) findViewById(R.id.imgv_leftbtn);\n\t\t((TextView)findViewById(R.id.tv_title)).setText(\"病毒查杀进度\");\n\t\tmLeftImgv.setOnClickListener(this);\n\t\tmLeftImgv.setImageResource(R.drawable.title_back);\n\t\tmProcessTV = (TextView) findViewById(R.id.tv_scanprocess);\n\t\tmScanAppTV = (TextView) findViewById(R.id.tv_scansapp);\n\t\tmCancleBtn = (Button) findViewById(R.id.btn_canclescan);\n\t\tmCancleBtn.setOnClickListener(this);\n\t\tmScanListView = (ListView) findViewById(R.id.lv_scanapps);\n\t\tadapter=new ScanVirusAdapter(mScanAppInfos, this);\n\t\tmScanListView.setAdapter(adapter);\n\t\tmScanningIcon = (ImageView) findViewById(R.id.imgv_scanningicon);\n\t\tstartAnim();\n\t}", "private void initViews() {\n\n //O metodo findViewById() recupera a referencia do EditText que se encontra no XML.\n editTextQuantidade = (EditText) findViewById(R.id.edittext_quantidade);\n imageViewOvos = (ImageView) findViewById(R.id.imageview_ovos);\n textViewTotal = (TextView) findViewById(R.id.textview_total);\n }", "ImageView getBadgeView();", "public ShowDataViewHolder(final View itemView) {\n super(itemView);\n // image_url = (ImageView) itemView.findViewById(R.id.fetch_image);\n image_title = (TextView) itemView.findViewById(R.id.fetch_image_title);\n\n\n }", "@Override\n protected int layoutId() {\n return R.layout.activity_appraise_imageshow;\n }", "public ItemHolder(@NonNull View itemView) {\n super(itemView);\n /*tvNombre=itemView.findViewById(R.id.tvNombre);\n tvCiudad=itemView.findViewById(R.id.etCiudad);\n btBorrar=itemView.findViewById(R.id.btBorrar);\n btEditar=itemView.findViewById(R.id.btEditar);\n cl = itemView.findViewById(R.id.cl);\n ivImagen = itemView.findViewById(R.id.ivImagen);*/\n }", "@Override\n protected void initView(View view) {\n super.initView(view);\n picture1 = (ImageView) rootview.findViewById(R.id.picture1);\n picture2=(ImageView) rootview.findViewById(R.id.picture2);\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_screen6);\n\n // Connecting the xml screen 6's imageView elements with code\n ImageView image = (ImageView) findViewById(R.id.scr6_imageView);\n String value = \"GJ\";\n\n // extracting the extras from the bundle\n Bundle extras = getIntent().getExtras();\n\n if(extras != null){\n // extracting the string from the extras\n value = extras.getString(\"image\");\n }\n\n // setting up the image according to the string extracted from the bundle\n image.setImageResource(getResources().\n getIdentifier(value, \"drawable\", \"edu.wcu.cs.catamountcharacters\"));\n\n }", "private void setUpReference() {\n txt_source = (TextView) findViewById(R.id.txt_source);\n txt_author = (TextView) findViewById(R.id.txt_author);\n txt_title = (TextView) findViewById(R.id.txt_title);\n txt_content = (TextView) findViewById(R.id.txt_content);\n txt_data_author = (TextView) findViewById(R.id.txt_data_author);\n txt_data_title = (TextView) findViewById(R.id.txt_data_title);\n txt_data_content = (TextView) findViewById(R.id.txt_data_content);\n imageView = (ImageView) findViewById(R.id.detsBandImage);\n\n Util.setFont(txt_source, this, 0);\n Util.setFont(txt_content, this, 0);\n Util.setFont(txt_title, this, 0);\n Util.setFont(txt_author, this, 0);\n Util.setFont(txt_data_author, this, 0);\n Util.setFont(txt_data_title, this, 0);\n Util.setFont(txt_data_content, this, 0);\n\n }", "public interface AddPhotoView extends BaseView {\n\n void displayIMEINumber();\n\n void showLocationData();\n\n void showCurrentTime(String today);\n\n void showAddPhotoDialog();\n\n void sendEmail();\n\n}", "public void m14907i() {\n m14892a(C3262d.fancy_showcase_view_layout_title, (C3257i) new C3257i() {\n /* renamed from: a */\n public void mo10458a(View view) {\n TextView textView = (TextView) view.findViewById(C3261c.fscv_title);\n if (VERSION.SDK_INT >= 23) {\n textView.setTextAppearance(C3243f.this.f8722k);\n } else {\n textView.setTextAppearance(C3243f.this.f8713b, C3243f.this.f8722k);\n }\n if (C3243f.this.f8723l != -1) {\n textView.setTextSize(C3243f.this.f8724m, (float) C3243f.this.f8723l);\n }\n textView.setGravity(C3243f.this.f8721j);\n if (C3243f.this.f8734w) {\n ((RelativeLayout.LayoutParams) textView.getLayoutParams()).setMargins(0, C3264k.m14942a(C3243f.this.getContext()), 0, 0);\n }\n if (C3243f.this.f8715d != null) {\n textView.setText(C3243f.this.f8715d);\n } else {\n textView.setText(C3243f.this.f8714c);\n }\n }\n });\n }", "public ViewHolder(View view) {\n super(view);\n mView = view;\n mIdView = (TextView) view.findViewById(R.id.id);\n mContentView = (TextView) view.findViewById(R.id.content);\n mIconView = (ImageView) view.findViewById(R.id.browserIcon);\n }", "public void findViews() {\n titleTextView = findViewById(R.id.song_title_text_view);\n artistTextView = findViewById(R.id.song_artist_text_view);\n albumCoverImg = findViewById(R.id.album_cover_img);\n albumTextView = findViewById(R.id.album_text_view);\n playButton = findViewById(R.id.play_button);\n nextButton = findViewById(R.id.next_button);\n backButton = findViewById(R.id.back_button);\n shuffleButton = findViewById(R.id.shuffle_button);\n repeatButton = findViewById(R.id.repeat_button);\n }", "public interface OpenClassRoomsExercise {\n\n /**\n * How crashes were solved:\n * 1. Modified the id of the view from activity_second_activity_text_view_main\n * to activity_main_activity_text_view_quantity\n * 2. Add String.valueOf() to convert int to String\n */\n\n}", "public ViewHolder(View itemView) {\n tvGrupo = (TextView) itemView.findViewById(R.id.tvGrupo);\n tvNCD = (TextView) itemView.findViewById(R.id.tvNCD);\n tvACD = (TextView) itemView.findViewById(R.id.tvACD);\n ivCD = (ImageView) itemView.findViewById(R.id.ivCD);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n holder.iView.setImageResource(Integer.parseInt(aList.get(position).get(from[0])));\n holder.nameView.setText(aList.get(position).get(from[1]));\n holder.descView.setText(aList.get(position).get(from[2]));\n holder.boostView.setText(aList.get(position).get(from[3]));\n }", "private void setAllText(){\n if(route!=null){\n routeImageView.setImageBitmap(route.getImg());\n transportTextView.setText(\"Transport: \" + route.getTransport());\n speedTextView.setText(String.valueOf(\"Speed: \" + route.getSpeed() + \" Km/h \"));\n accuracyTextView.setText(String.valueOf(\"Accuracy: \" + route.getAccuracy()));\n distanceTextView.setText(String.valueOf(\"Distance: \" + route.getDistance() + \" Km\"));\n timestampTextView.setText(\"Start: \" + route.getTimestamp());\n durationTextView.setText(\" Duration: \" + route.getDuration());\n caloriesTextView.setText(\"Calories: \" + route.getCalories() + \" Kcal\");\n if(!route.getTransport().equals(\"Walking\")){\n caloriesTextView.setText(\"Calories: -.- Kcal\");\n }\n descriptionTextView.setText(\"Description: \" + route.getDescription());\n if(route.getDescription().isEmpty()){\n descriptionTextView.setText(\"\");\n }\n\n }\n\n }", "private void getDescriptionRelatedComponents() {\n\t\thelpFrame = ((LinearLayout) findViewById(R.id.helpframe));\n\t\tdescriptionFrame = ((LinearLayout) findViewById(R.id.descriptionframe));\n\t\t// noteFrame = ((LinearLayout) findViewById(R.id.notesFrame));\n\n\t\t// description related linear layouts\n\t\tlinearLayoutDescriptionArea = ((RelativeLayout) findViewById(R.id.descriptionlinearlayout));\n\t\tlinearLayoutDescriptionAreaImages = ((LinearLayout) findViewById(R.id.descriptionImageView));\n\n\t\t// question related linear layouts\n\t\tlinearLayoutQuestionArea = ((RelativeLayout) findViewById(R.id.questionslinearlayout));\n\t\tlinearLayoutQuestionAreaImages = ((LinearLayout) findViewById(R.id.questionImageView));\n\n\t\tdescriptionTextView = (TextView) findViewById(R.id.description_text);\n\t\thelpTextView = (TextView) findViewById(R.id.help_text);\n\t\t// notesTaken = (EditText) findViewById(R.id.noteEditText);\n\n\t\tdescriptionTextView.setMovementMethod(new ScrollingMovementMethod());\n\t\thelpTextView.setMovementMethod(new ScrollingMovementMethod());\n\n\t\t// get the buttons\n\t\tshowDetails = ((Button) findViewById(R.id.showdescription));\n\t\tshowDetailsIv = (ImageView) findViewById(R.id.showdescription_iv);\n\n\t\tshowHelp = ((Button) findViewById(R.id.showhelp));\n\t\tshowHelpIv = (ImageView) findViewById(R.id.showhelp_iv);\n\t\t// showNotes = ((Button) findViewById(R.id.takenotes));\n\t\t// saveNotes = ((Button) findViewById(R.id.saveNotes));\n\t\t// cancelNotes = ((Button) findViewById(R.id.cancelNotes));\n\n\t\t// get the image view\n\t\tfirstImageVievDescription = ((ImageView) findViewById(R.id.imageTab));\n\t\tsecondImageVievDescription = ((ImageView) findViewById(R.id.imageVoiceRecognition));\n\t\tthirdImageVievDescription = ((ImageView) findViewById(R.id.imageVoiceInput));\n\n\t\t// get the spinner\n\t\tdescriptionQuestionSpinner = (Spinner) findViewById(R.id.selectdescriptionquestion);\n\n\t\t// add button click listeners\n\t\t// help button\n\t\tshowHelp.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdescriptionFrame.setVisibility(View.GONE);\n\t\t\t\t// noteFrame.setVisibility(View.GONE);\n\t\t\t\thelpFrame.setVisibility(View.VISIBLE);\n\t\t\t\tshowHelpIv.setSelected(true);\n\t\t\t\tshowDetailsIv.setSelected(false);\n\t\t\t\t// showNotes.setSelected(false);\n\t\t\t}\n\t\t});\n\n\t\t// description button\n\t\tshowDetails.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\thelpFrame.setVisibility(View.GONE);\n\t\t\t\t// noteFrame.setVisibility(View.GONE);\n\t\t\t\tdescriptionFrame.setVisibility(View.VISIBLE);\n\t\t\t\tshowDetailsIv.setSelected(true);\n\t\t\t\tshowHelpIv.setSelected(false);\n\t\t\t\t// showNotes.setSelected(false);\n\t\t\t}\n\t\t});\n\n\t\t// // take notes button\n\t\t// showNotes.setOnClickListener(new OnClickListener() {\n\t\t// @Override\n\t\t// public void onClick(View v) {\n\t\t// helpFrame.setVisibility(View.GONE);\n\t\t// descriptionFrame.setVisibility(View.GONE);\n\t\t// noteFrame.setVisibility(View.VISIBLE);\n\t\t// showNotes.setSelected(true);\n\t\t// showDetails.setSelected(false);\n\t\t// showHelp.setSelected(false);\n\t\t// }\n\t\t// });\n\n\t\t// // save notes\n\t\t// saveNotes.setOnClickListener(new OnClickListener() {\n\t\t// @Override\n\t\t// public void onClick(View v) {\n\t\t// UtilityMethods.saveNotes(AnalysisActivity.this, FOLDER_NAME,\n\t\t// NOTES_FILE_INTERNAL_STORAGE, notesTaken.getText()\n\t\t// .toString());\n\t\t// notesReadFromFileStorage = notesTaken.getText().toString();\n\t\t// }\n\t\t// });\n\t\t//\n\t\t// // clear notes\n\t\t// cancelNotes.setOnClickListener(new OnClickListener() {\n\t\t// @Override\n\t\t// public void onClick(View v) {\n\t\t// // restore the previous notes\n\t\t// notesTaken.setText(notesReadFromFileStorage);\n\t\t// }\n\t\t// });\n\n\t\t// selection listener for spinner\n\t\tdescriptionQuestionSpinner\n\t\t\t\t.setOnItemSelectedListener(new OnItemSelectedListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\tString selectedItem = descriptionQuestionSpinner\n\t\t\t\t\t\t\t\t.getSelectedItem().toString();\n\t\t\t\t\t\tcontrolVisibilityAndAssignParameters(selectedItem);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\tif (locale.getLanguage().equalsIgnoreCase(\n\t\t\t\tgetString(R.string.germalanguagelocale))) {\n\t\t\t// load the description for description fragment\n\t\t\tdescriptionFileData = UtilityMethods.loadDataFromFile(\n\t\t\t\t\tDESCRIPTION_FILE_NAME_DE, FOLDER_NAME, this);\n\n\t\t\t// load the help file data\n\t\t\thelpFileData = UtilityMethods.loadDataFromFile(HELP_FILE_NAME_DE,\n\t\t\t\t\tFOLDER_NAME, this);\n\t\t} else {\n\n\t\t\t// load the description for description fragment\n\t\t\tdescriptionFileData = UtilityMethods.loadDataFromFile(\n\t\t\t\t\tDESCRIPTION_FILE_NAME, FOLDER_NAME, this);\n\n\t\t\t// load the help file data\n\t\t\thelpFileData = UtilityMethods.loadDataFromFile(HELP_FILE_NAME,\n\t\t\t\t\tFOLDER_NAME, this);\n\n\t\t}\n\n\t\t// // notes read from the file storage\n\t\t// notesReadFromFileStorage =\n\t\t// UtilityMethods.readNotesFromInternalStorage(\n\t\t// this, FOLDER_NAME, NOTES_FILE_INTERNAL_STORAGE);\n\n\t\t// set the text data\n\t\thelpTextView.setText(helpFileData);\n\t\tdescriptionTextView.setText(descriptionFileData);\n\t\t// notesTaken.setText(notesReadFromFileStorage);\n\n\t\t// initially help view is visible\n\t\thelpFrame.setVisibility(View.VISIBLE);\n\t\tshowHelpIv.setSelected(true);\n\n\t}", "public void onLayout(boolean z, int i, int i2, int i3, int i4) {\n TextView textView;\n super.onLayout(z, i, i2, i3, i4);\n if (!(this.viewType == 1 || this.nameTextView.getLineCount() > 1 || (textView = this.captionTextView) == null)) {\n textView.getVisibility();\n }\n int measuredHeight = this.nameTextView.getMeasuredHeight() - AndroidUtilities.dp(22.0f);\n TextView textView2 = this.captionTextView;\n if (textView2 != null && textView2.getVisibility() == 0) {\n TextView textView3 = this.captionTextView;\n textView3.layout(textView3.getLeft(), this.captionTextView.getTop() + measuredHeight, this.captionTextView.getRight(), this.captionTextView.getBottom() + measuredHeight);\n measuredHeight += this.captionTextView.getMeasuredHeight() + AndroidUtilities.dp(3.0f);\n }\n TextView textView4 = this.dateTextView;\n textView4.layout(textView4.getLeft(), this.dateTextView.getTop() + measuredHeight, this.dateTextView.getRight(), this.dateTextView.getBottom() + measuredHeight);\n RLottieImageView rLottieImageView = this.statusImageView;\n rLottieImageView.layout(rLottieImageView.getLeft(), this.statusImageView.getTop() + measuredHeight, this.statusImageView.getRight(), measuredHeight + this.statusImageView.getBottom());\n LineProgressView lineProgressView = this.progressView;\n lineProgressView.layout(lineProgressView.getLeft(), (getMeasuredHeight() - this.progressView.getMeasuredHeight()) - (this.needDivider ? 1 : 0), this.progressView.getRight(), getMeasuredHeight() - (this.needDivider ? 1 : 0));\n }", "public interface ForgetKeyAtView {\n\n EditText getEtPhoneV();\n EditText getEtKeyV();\n\n}", "@Override\n public void onResponse(String response) {\n String [] arrOfStr = response.split(\"#\", 28);\n znmo=arrOfStr[0];\n znst=arrOfStr[1];\n znrt=arrOfStr[2];\n znei=arrOfStr[3];\n znKp=arrOfStr[4];\n znKi=arrOfStr[5];\n znKd=arrOfStr[6];\n ccmo=arrOfStr[7];\n ccst=arrOfStr[8];\n ccrt=arrOfStr[9];\n ccei=arrOfStr[10];\n ccKp=arrOfStr[11];\n ccKi=arrOfStr[12];\n ccKd=arrOfStr[13];\n imcmo=arrOfStr[14];\n imcst=arrOfStr[15];\n imcrt=arrOfStr[16];\n imcei=arrOfStr[17];\n imcKp=arrOfStr[18];\n imcKi=arrOfStr[19];\n imcKd=arrOfStr[20];\n hmmo=arrOfStr[21];\n hmst=arrOfStr[22];\n hmrt=arrOfStr[23];\n hmei=arrOfStr[24];\n hmKp=arrOfStr[25];\n hmKi=arrOfStr[26];\n hmKd=arrOfStr[27];\n tvznmo.setText(znmo);\n tvznst.setText(znst);\n tvznrt.setText(znrt);\n tvznei.setText(znei);\n tvznKp.setText(znKp);\n tvznKi.setText(znKi);\n tvznKd.setText(znKd);\n\n tvccmo.setText(ccmo);\n tvccst.setText(ccst);\n tvccrt.setText(ccrt);\n tvccei.setText(ccei);\n tvccKp.setText(ccKp);\n tvccKi.setText(ccKi);\n tvccKd.setText(ccKd);\n\n tvimcmo.setText(imcmo);\n tvimcst.setText(imcst);\n tvimcrt.setText(imcrt);\n tvimcei.setText(imcei);\n tvimcKp.setText(imcKp);\n tvimcKi.setText(imcKi);\n tvimcKd.setText(imcKd);\n\n tvhmmo.setText(hmmo);\n tvhmst.setText(hmst);\n tvhmrt.setText(hmrt);\n tvhmei.setText(hmei);\n tvhmKp.setText(hmKp);\n tvhmKi.setText(hmKi);\n tvhmKd.setText(hmKd);\n\n //Log.i(\"end:\",response);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tsetContentView(R.layout.set_layout);\n\t\t\n\t\tIntent intent = getIntent();\n\t\timageUrl = intent.getStringExtra(\"profile_image_url\");\n\t\tTextView set_version = (TextView)findViewById(R.id.set_version);\n\t\t\n\t\tPackageInfo pkg;\n\t\ttry {\n\t\t\tpkg = getPackageManager().getPackageInfo(getApplication().getPackageName(), 0);\n\t\t\tset_version.setText(pkg.versionName);\n\t\t} catch (NameNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\tSharedPreferences preferences = getSharedPreferences(SET_FILE, MODE_PRIVATE);\n\t\tfont = preferences.getInt(SET_FONT, 1);\n\t\timage = preferences.getInt(SET_IMAGE, 0);\n\t\t\n\t\theadView = (ImageView)findViewById(R.id.set_head);\n//\t\theadView.setImageBitmap(MainActivity.headBuffer.getBitmap(imageUrl, this));\n\t\tMainFragment.downloader.downPic(headView, imageUrl, ImageMode.small);\n\t\t\n\t\theadView.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\tfontButtons[0] = (RadioButton)findViewById(R.id.radio_font1);\n\t\tfontButtons[1] = (RadioButton)findViewById(R.id.radio_font2);\n\t\tfontButtons[2] = (RadioButton)findViewById(R.id.radio_font3);\n\t\t\n\t\tIamgeButtons[0] = (RadioButton)findViewById(R.id.radio_image1);\n\t\tIamgeButtons[1] = (RadioButton)findViewById(R.id.radio_image2);\n\t\tIamgeButtons[2] = (RadioButton)findViewById(R.id.radio_image3);\n\t\tIamgeButtons[3] = (RadioButton)findViewById(R.id.radio_image4);\n\t\t\n\t\tfor (int i = 0; i<fontButtons.length;i++) {\n\t\t\tfinal int j = i;\n\t\t\tfontButtons[i].setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tsetFontClickedState(SetActivity.this, j);\n\t\t\t\t\tfont = j;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\tfor (int i = 0; i<IamgeButtons.length;i++) {\n\t\t\tfinal int j = i;\n\t\t\tIamgeButtons[i].setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tsetIamgeClickedState(SetActivity.this, j);\n\t\t\t\t\timage = j;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n public void bindView(View view, final Context context, final Cursor cursor) {\n TextView nameTextView = (TextView) view.findViewById(R.id.name);\n TextView priceTextView = (TextView) view.findViewById(R.id.price);\n TextView quantTextView = (TextView) view.findViewById(R.id.quantity_edit);\n ImageView orderImageView = (ImageView) view.findViewById(R.id.order);\n ImageView itemImageView = (ImageView) view.findViewById(R.id.itemPic);\n\n itemImageView.setImageURI(Uri.parse(cursor.getString(cursor.getColumnIndex(ItemEntry.COLUMN_IMAGE))));\n\n final int position = cursor.getPosition();\n\n orderImageView.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n cursor.moveToPosition(position);\n int itemColumnIndex = cursor.getColumnIndex(ItemEntry._ID);\n final long itemId = cursor.getLong(itemColumnIndex);\n Uri mCurrentItemUri = ContentUris.withAppendedId(ItemEntry.CONTENT_URI, itemId);\n int quantColumnIndex = cursor.getColumnIndex(ItemEntry.COLUMN_ITEM_QUANTITY);\n String itemQuant = cursor.getString(quantColumnIndex);\n int currentQuant = Integer.parseInt(itemQuant);\n\n if(currentQuant >0) {\n\n currentQuant--;\n\n ContentValues values = new ContentValues();\n values.put(ItemEntry.COLUMN_ITEM_QUANTITY, currentQuant);\n\n int tabUpdate = context.getContentResolver().update(mCurrentItemUri, values, null, null);\n\n } else {\n Toast.makeText(context, \"Out of stock\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n int nameColumnIndex = cursor.getColumnIndex(ItemEntry.COLUMN_ITEM_NAME);\n final int priceColumnIndex = cursor.getColumnIndex(ItemEntry.COLUMN_ITEM_PRICE);\n final int quantColumnIndex = cursor.getColumnIndex(ItemEntry.COLUMN_ITEM_QUANTITY);\n int imgColumnIndex = cursor.getColumnIndex(ItemEntry.COLUMN_IMAGE);\n\n String itemName = cursor.getString(nameColumnIndex);\n String itemPrice = \"$\" + cursor.getString(priceColumnIndex);\n String itemQuant = cursor.getString(quantColumnIndex);\n String itemImg = cursor.getString(imgColumnIndex);\n\n if (TextUtils.isEmpty(itemPrice)) {\n itemPrice = context.getString(R.string.unknown_price);\n }\n nameTextView.setText(itemName);\n priceTextView.setText(itemPrice);\n quantTextView.setText(itemQuant);\n itemImageView.setImageURI(Uri.parse(itemImg));\n\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n tv_slider_icon = (TextView) findViewById(R.id.slider_icon);\n }", "public VoteTitleHolder(View view) {\n super(view);\n C32569u.m150519b(view, C6969H.m41409d(\"G7F8AD00D\"));\n View findViewById = view.findViewById(R.id.etTitle);\n C32569u.m150513a((Object) findViewById, C6969H.m41409d(\"G7F8AD00DF136A227E238994DE5C7DAFE6DCBE754B634E52CF23A995CFEE08A\"));\n this.f62188b = (EditText) findViewById;\n View findViewById2 = view.findViewById(R.id.tvTitleLimit);\n C32569u.m150513a((Object) findViewById2, C6969H.m41409d(\"G7F8AD00DF136A227E238994DE5C7DAFE6DCBE754B634E53DF03A995CFEE0EFDE648AC153\"));\n this.f62189c = (TextView) findViewById2;\n m88846e();\n }", "TextView getTitleView();", "@Override\n\tprotected void onFinishInflate() {\n\t\tsuper.onFinishInflate();\n\t\tSehenswuerdigkeit ziel = Spiel.getInstance().getSpielerAnDerReihe().getZiel();\n\t\tthis.setImageResource(getResources().getIdentifier(ziel.getMotivURL(), \"drawable\", \"com.dhbw.dvst\"));\n\t\t\n\t}", "@Override\n public void initView() {\n r3 = (LinearLayout) findViewById(R.id.r3);\n sign_time = (TextView) findViewById(R.id.sign_time);\n visitor_address_change = (TextView) findViewById(R.id.visitor_address_change);\n // 上传图片使用\n mGrideviewUpload = (GridView) findViewById(R.id.grideview_upload);\n mAdapter = new UploadAdapter(this);\n mGrideviewUpload.setAdapter(mAdapter);\n mParentView = (LinearLayout) getLayoutInflater().inflate(R.layout.creative_idea_new, null);\n mPicturePathList = new ArrayList<String>();\n mDialog = new BSProgressDialog(this);\n sign_time.setText(DateUtils.getCurrentTimess());\n mTitleTv.setText(\"位置签到\");\n activate();\n\n // MyThread m = new MyThread();\n // new Thread(m).start();\n }", "private void assignViews() {\n mTextView = (TextView) findViewById(R.id.textViewForEnterEmail);\n mEdTxtEmail = (EditText) findViewById(R.id.edTxtEmailInForgotPass);\n mButton = (Button) findViewById(R.id.btnSubmit);\n }", "@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n String image = mViewImage.get(position).getImageStr();\n\n holder.myView.setImageResource(getImageId(this.context,image));\n holder.myView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n\n //holder.myTextView.setText(animal);\n }", "public ViewHolder(View itemView) {\n super(itemView);\n hospname= itemView.findViewById(R.id.hospname);\n address= itemView.findViewById(R.id.hospaddress);\n rrr= itemView.findViewById(R.id.rrrtext);\n hospimage= itemView.findViewById(R.id.hospital_image);\n callambulance= itemView.findViewById(R.id.bookambulancebutton);\n getroom= itemView.findViewById(R.id.bookroombutton);\n /*price= itemView.findViewById(R.id.bedprice);\n cat= itemView.findViewById(R.id.bedcat);\n bedimage= itemView.findViewById(R.id.bedimage);*/\n\n\n }", "public interface C2277a {\n String getNameType();\n\n @DrawableRes\n int getStatusIcon();\n\n @Nullable\n String getTagName();\n}", "private void initView() {\n mPhone = (TextView) findViewById(R.id.user_phone_d);\n // mMajor = (TextView) findViewById(R.id.major);\n mYearin= (TextView) findViewById(R.id.year_in);\n mNickname = (TextView) findViewById(R.id.user_name_input);\n sex = (TextView)findViewById(R.id.user_gender);\n mLocal =(TextView)findViewById(R.id.user_local);\n mBirthday =(TextView)findViewById(R.id.user_birthday);\n mLastLogin =(TextView)findViewById(R.id.user_lastlogintime);\n mUserId =(TextView)findViewById(R.id.user_id);\n\n tPhone =(TextView)findViewById(R.id.user_phone);\n tYear =(TextView)findViewById(R.id.user_id_card);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.home8_day3_secondview);\n Log.i(TAG, \"onCreate: \");\n textView = findViewById(R.id.textview);\n imageView = findViewById(R.id.image);\n\n Intent intent = getIntent();\n if (intent != null){\n String root = intent.getStringExtra(\"root\");\n if (root.equals(\"button1\")){\n String name = intent.getStringExtra(\"name\");\n int age = intent.getIntExtra(\"age\",0);\n textView.setText(\"name=\"+name+\" age=\"+age);\n } else if (root.equals(\"button2\")){\n String name = intent.getStringExtra(\"name\");\n int age = intent.getIntExtra(\"age\",0);\n textView.setText(\"name=\"+name+\" age=\"+age);\n }else if (root.equals(\"button3\")){\n Person person = (Person) intent.getSerializableExtra(\"person\");\n textView.setText(person.toString());\n }else if (root.equals(\"button4\")){\n Bitmap bitmap = (Bitmap) intent.getParcelableExtra(\"bitmap\");\n imageView.setImageBitmap(bitmap);\n }\n }\n }" ]
[ "0.6689958", "0.6560777", "0.6335493", "0.62203217", "0.62100804", "0.6157828", "0.61487603", "0.6144179", "0.61397094", "0.6116416", "0.611216", "0.6098005", "0.6084275", "0.60718197", "0.60632926", "0.60560745", "0.60479224", "0.6042701", "0.6029553", "0.59816176", "0.59669524", "0.5958834", "0.5955904", "0.5952682", "0.5951122", "0.5951026", "0.59503555", "0.5949588", "0.59362674", "0.59284294", "0.5921689", "0.5913354", "0.58943564", "0.58892787", "0.58870864", "0.5887065", "0.5874132", "0.58676904", "0.5862", "0.5826451", "0.5823495", "0.5820443", "0.5798993", "0.5792824", "0.57879746", "0.5768881", "0.57673186", "0.57476497", "0.57269573", "0.57244724", "0.5723019", "0.57151777", "0.56974244", "0.5696509", "0.56927073", "0.56751", "0.56671184", "0.56658965", "0.56653357", "0.56616896", "0.56608635", "0.56556886", "0.56487226", "0.5641509", "0.5639183", "0.5638104", "0.5637917", "0.5629852", "0.5606108", "0.56027645", "0.5600687", "0.55987513", "0.5585373", "0.55791974", "0.5573683", "0.55542856", "0.55464405", "0.5545241", "0.5544995", "0.55441445", "0.55304754", "0.5524814", "0.55242133", "0.55229264", "0.55132234", "0.5511656", "0.5506651", "0.5502685", "0.55004495", "0.54961807", "0.54958427", "0.5493881", "0.54887277", "0.5487571", "0.5487468", "0.5485517", "0.5484318", "0.54780346", "0.54760903", "0.54744005", "0.5474039" ]
0.0
-1
Constructor with ui instance as parameter
public GenreateReportView(WhatsUpUI ui) { this.ui = ui; user = (AdminVO) ui.getSession().getAttribute(StringConstants.USER); addComponent(buildLayout()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private UI()\n {\n this(null, null);\n }", "public Ui() { }", "public View(UI ui) {\n this.ui = ui;\n }", "public Ui() {\n }", "public void setMyUi(Object ui) {\n super.setMyUi(ui);\n try {\n init();\n } catch (Exception e) {e.printStackTrace();};\n }", "public UI() {\n initComponents();\n }", "public Ui() {\n this.sc = sc;\n }", "public Stage(UiHandler uiHandler) {\n super();\n mUiHandler = uiHandler;\n }", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "public UiFactoryImpl() {\n\t\tsuper();\n\t}", "private void initUI() {\n }", "public HealthUI() {\n init();\n }", "public SalesMethodsUI() {\n \n }", "public userinterface() {\n initComponents();\n }", "public RummyUI(){\n \n //Call method initComponents\n initComponents();\n \n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private SearchUI()\n\t{\n\t}", "void initUI(View x) {\n }", "public User_Interface() {\n initComponents();\n }", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "public ReportUi() {\n initComponents();\n }", "public mainUI() {\n initComponents();\n }", "public GUI() {\n }", "public UserForm(){ }", "private UIManager() {\n tableUI = new TableUI();\n snifferUI = new SnifferUI();\n }", "void initUI();", "public UserInterface( final GameEngine pGameEngine )\n {\n\n\n this.aEngine = pGameEngine;\n this.createGUI();\n\n }", "UIBar(int instance, String context) {\n\tsuper(instance, context);\n\n\t// Setup object property and method table.\n\t//\n\taddObjectTable(fieldTable, null);\n }", "public ePortfolioEditController(ePortfolioMakerView initUI) {\n\tui = initUI;\n }", "public UI() {\n initComponents();\n setResizable(false);\n }", "protected void setupUI() {\n\n }", "public MulticastClient( MulticastGUI ui) {\n\t\tthis.ui = ui;\n\t}", "private ChatUI()\n\t{\n\t}", "private InstructGui() {\n }", "public TodoGUI() {\r\n todoChooserGui();\r\n }", "public ElevatorUI() {\n initComponents();\n }", "public void setUI(Window ui)\n {\n this.ui = ui;\n theLogger.info(\"Set reference to Window (UI)\");\n }", "public uitax() {\n initComponents();\n }", "public abstract void initUiAndListener();", "private UIUtils() {\n }", "@Override\n public void init(TaskManager tm, Ui ui) {\n setResponse(ui.askEventName());\n setUtility(tm, ui);\n }", "public EjemplarUI() {\n initComponents();\n controlador = Controladores.peliculaController;\n }", "public Parser(Ui ui, Data data) {\n this.ui = ui;\n this.data = data;\n }", "public seViewAnswerUI() {\n initComponents();\n }", "public interface UICreator {\r\n // TODO convert to use View.Builder ?\r\n /**\r\n * Should instantiate the UI.\r\n * @param sim The {@link Simulator} instance for which the UI should be\r\n * created.\r\n */\r\n void createUI(Simulator sim);\r\n }", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public PatientUI() {\n initComponents();\n }", "public GuiMainImpl() {\r\n this(null, null, \"\");\r\n }", "public DrugUI() {\n initComponents();\n }", "public Gui() {\n\t\tsuper();\n\t\tinitGUI();\n\t}", "public void setUi(GamePanel ui) {\n this.ui = ui;\n }", "public AlunoView() {\n initComponents();\n bus = new AlunoBus();\n }", "public GUITest() {\n }", "public TenantPage(User u) {\n initComponents();\n setIcon();\n user = u;\n userNamejLabel.setText(user.getFullName());\n userIdjLabel.setText(String.valueOf(user.getId()));\n userTypejLabel.setText(user.getUserType());\n displayPropertiesInfo();\n }", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "@Override\n public Component getUiComponent() {\n return this;\n }", "public ExecutantGui() {\n initComponents();\n }", "public MimsCBControl(UI ui) {\n this.ui = ui;\n initComponents();\n jLabel1.setText(\"\");\n Dimension d = new Dimension(350, 200);\n jPanel1.setMinimumSize(d);\n jPanel1.setPreferredSize(d);\n jPanel1.setMaximumSize(d);\n jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder());\n setupLutComboBox();\n setupHistogram();\n }", "public User_gui() {\n initComponents();\n }", "public UserInterface() {\n \t setTitle(\"The Cancer Specialist - Diagnostic Application\");\n initComponents();\n }", "public Gui() {\n initComponents();\n }", "private GUI()\n {\n makeGUI();\n }", "public ScriptManagerUI(UIController uiController) {\n\t\tthis.uiController = uiController;\n\t\tsetName(MacroBeanShellExtension.NAME);\n\t\tthis.listModel = new DefaulListModel();\n\t\tthis.controller = new MacroBeanShellController(uiController);\n\t\tthis.setLocationRelativeTo(null);\n\t\tinitComponents();\n\t\tdisplayScripts();\n\t}", "private FrameUIController(){\r\n\t\t\r\n\t}", "public MainUI() {\r\n initComponents();\r\n this.setLocationRelativeTo(null);\r\n /**/\r\n }", "public ViewUserGUI(DashBoard cp, User user) {\n this.cp = cp;\n this.tc = cp.getMessageCollectionController();\n this.pc = cp.getPanelController();\n this.user = user;\n initComponents();\n }", "public GUIController() {\n\n }", "public IView() {\n initComponents();\n setLocationRelativeTo(null); //Center form on screen\n }", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "public StartPanel(SwingUI swingUI) {\r\n\t\tthis.swingUI = swingUI;\r\n\t\t\r\n\t\t/**\r\n\t\t * set background image\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tbackgroundImage = ImageIO.read(new File(\"./data/img/background3.jpg\"));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.init();\r\n\t}", "public AccountDepositUI() {\n initComponents();\n }", "@Override\n public void setUpUI(Bundle savedInstanceState)\n {\n }", "public AdminUI() {\n initComponents();\n wdh=new WebDataHandler();\n initList();\n }", "public Interface() {\n initComponents();\n }", "public Interface() {\n initComponents();\n }", "public Interface() {\n initComponents();\n }", "public SearchBookUI()\n { \n \n addComponent(searchBar);\n addComponent(bookTable);\n addComponent(addBookButton);\n addComponent(errorLabel);\n //Set button on listening mode\n setUpSearchBar();\n\n //Textfield\n searchText.setInputPrompt(\"Search\");\n \n //Set all the table attributes\n setUpTable();\n \n //Set up add button\n setUpAddBookButton();\n \n }", "public HomeView(User user) {\n initComponents();\n this.user = user;\n jLabelName.setText(user.getName()); \n }", "private GUIMain() {\n\t}", "public OptionPanel(Main w) {\r\n\t\tthis.w = w;\r\n\t\tstartButton = new JButton();\r\n\t\texitButton = new JButton();\r\n\t\t\r\n\t}", "private MulticastInputUI()\n\t{\n\t}", "public GUI() {\n initComponents();\n }", "public GUI() {\n initComponents();\n }", "public Interface ()\n {\n initComponents ();\n }", "public UserInterface() { // UserInterface constructor\n\t\tscan = new Scanner(System.in); // initializes scan to new Scanner(System.in)\n\t\tinventoryObject = new InventoryManagement(); // initializes inventoryObject as a new InventoryManagement object\n\t}", "public MainScreen(User user) {\n\t\tsuper();\n\t\tthis.user = user;\n\t\tthis.contentPane = getContentPane();\n\t\tpopulateUtilities();\n\t\tinitGUI(user);\n\t}", "public DevolucaoUI() {\n devolucaoNegocio = new DevolucaoNegocio();\n \n }", "private void setUi(JCpgUI jCpgUIReference){\n\t\t\n\t\tthis.ui = jCpgUIReference;\n\t\t\n\t}", "public UiHelper() {\n this(ContextErrorPolicy.CHECK);\n }", "@Override\r\n\tpublic void initUI(Bundle savedInstanceState) {\n\r\n\t}", "public SearchUI() {\n initComponents();\n initComponents2();\n }", "public GUIRegistrationRest() {\n initComponents();\n setLocationRelativeTo(null);\n initIcons();\n }", "public ClientView() {\n initComponents();\n }", "public MainWindow() {\n\t\t\tthis.initUI();\n\t\t\t\n\t\t}", "public Client() {\n initComponents();\n setIcon();\n }", "public JavierGUI() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t\tthis.setJavier(getJavier());\r\n\t\tbtnHome.doClick();\r\n\t}", "public ConverterGUI() {\n initComponents();\n }", "public adminMainFrame(User user) {\n initComponents();\n userF = user;\n }", "public Kuis2() {\n initComponents();\n }", "public View() {\n initComponents();\n }" ]
[ "0.7985927", "0.7912898", "0.78914565", "0.77997255", "0.7310941", "0.7310571", "0.7207982", "0.7085028", "0.70381004", "0.6991187", "0.69180584", "0.6871271", "0.6840524", "0.6766301", "0.6765666", "0.67313975", "0.6718433", "0.6706218", "0.6682807", "0.6664012", "0.6647799", "0.6641022", "0.66371936", "0.6551785", "0.65475976", "0.6514052", "0.6463135", "0.6452146", "0.6443394", "0.64423996", "0.6440349", "0.64167684", "0.64113176", "0.6404527", "0.63824475", "0.6368051", "0.63609207", "0.6352426", "0.63407034", "0.6303262", "0.6298433", "0.6298064", "0.6283526", "0.627669", "0.6251874", "0.6241937", "0.6240592", "0.6239268", "0.6232903", "0.6227071", "0.6212814", "0.6212791", "0.62085533", "0.619381", "0.6184917", "0.6183502", "0.6180526", "0.6158562", "0.61443555", "0.6123889", "0.61221373", "0.61137146", "0.6112142", "0.6108254", "0.61042964", "0.6093241", "0.6091445", "0.6091263", "0.60442334", "0.60390055", "0.6037297", "0.6024393", "0.60208166", "0.6015834", "0.6006763", "0.6006763", "0.6006763", "0.6005505", "0.6001464", "0.5980599", "0.5978769", "0.5974137", "0.5967902", "0.5967902", "0.59625584", "0.596109", "0.596062", "0.5954557", "0.59420675", "0.5940327", "0.5939191", "0.59360266", "0.5932432", "0.5931955", "0.59278136", "0.5925978", "0.59254634", "0.59150016", "0.59105855", "0.5900516", "0.58848226" ]
0.0
-1
Builds the UI Components
private VerticalLayout buildLayout() { VerticalLayout content = new VerticalLayout(); content.setMargin(true); content.setSpacing(true); ComboBox feedbackMonth = new ComboBox(); feedbackMonth.setCaption(StringConstants.MONTH); feedbackMonth.addFocusListener( e->{ List<String> months = FeedbackDAO.getMonthList(user.getTProject()); feedbackMonth.addItems(months); }); content.addComponent(feedbackMonth); content.setComponentAlignment(feedbackMonth, Alignment.MIDDLE_LEFT); feedbackMonth.addValueChangeListener(e ->{ List<EmployeeVO> employees = EmployeeDAO.getEmployeeDetails(user.getTProject()); float leftcount=0; for (EmployeeVO employee : employees) { int feedbackId = FeedbackDAO.getFeedbackId(employee.getEmployeeId(), (String) feedbackMonth.getValue()); if (!QualityFeedbackDAO.exists(feedbackId)){ leftcount++; } } if(leftcount/employees.size() == IntegerConstants.F_ONE) isSurveyCompleted = true; }); Button generateReport = new Button(StringConstants.GENERATE_REPORT); TextArea emails = new TextArea("please enter comma seperated emails"); generateReport.addClickListener(e -> { if(feedbackMonth.getValue() == null){ Notification.show("ERROR", "Please select a month",Type.ERROR_MESSAGE); return; } if(emails.getValue() == null||emails.getValue().equals("")){ Notification.show("ERROR", "Please enter a valid EmailID",Type.ERROR_MESSAGE); return ; } if (!isSurveyCompleted) { Window window = new Window(); window.setContent(buildConformationWindow(window, feedbackMonth,emails)); window.center(); window.setResizable(false); ui.addWindow(window); } else triggerReportGeneration(emails,feedbackMonth); }); content.addComponents(emails,generateReport); return content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildUI() {\n initComponents();\n\n FormLayout layout = new FormLayout(\"3dlu, pref:grow, 3dlu\",\n \"3dlu, pref, 3dlu, pref, 3dlu, fill:0:grow\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n CellConstraints cc = new CellConstraints();\n\n // Toolbar\n JPanel toolbar = createToolBar();\n toolbar.setOpaque(false);\n builder.add(toolbar, cc.xy(2, 2));\n builder.addSeparator(null, cc.xyw(1, 4, 2));\n\n // Main panel in scroll pane\n JPanel mainPanel = buildMainPanel();\n mainPanel.setOpaque(false);\n JScrollPane scrollPane = new JScrollPane(mainPanel);\n scrollPane.setOpaque(false);\n scrollPane.getVerticalScrollBar().setUnitIncrement(10);\n UIUtil.removeBorder(scrollPane);\n builder.add(scrollPane, cc.xyw(1, 6, 2));\n\n uiComponent = builder.getPanel();\n }", "private void buildComponents() {\r\n buildJMenuBar();\r\n setJMenuBar( gameBar );\r\n\r\n buildScorePanel();\r\n buildInfoPanel();\r\n\r\n getContentPane().add( scorePanel, \"North\" );\r\n getContentPane().add( infoPanel, \"South\" );\r\n }", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "public void buildGui() {\n\t}", "private void buildUIElements() {\n uiCamera = new OrthographicCamera( Global.WINDOW_WIDTH, Global.WINDOW_HEIGHT );\n uiViewport = new ExtendViewport( Global.WINDOW_WIDTH, Global.WINDOW_HEIGHT, uiCamera );\n\n //Build the table.\n uiStage = new Stage( uiViewport );\n rootTable = new Table( VisUI.getSkin() );\n uiStage.addActor( rootTable );\n rootTable.setFillParent( true );\n rootTable.left().top();\n\n //Fill up the healthMeter is images to be used as healthBars.\n for ( int i = 0; i < 20; i++ ) {\n healthMeter.add( new Image( healthBars.findRegion( \"highHealth\" ) ) );\n }\n }", "public void buildGUI() {\r\n\t\t//Top menu\r\n\t\tHStack menuHStack= new HStack();\r\n\t\tmenuHStack.setHeight(25);\r\n\t\tmenuHStack.setWidth(200);\r\n\t\tmenuHStack.addMember(createLoginLogoutPanel());\r\n\t\t \r\n\t\t//The rest\r\n\t\tVStack swagItemsVStack = new VStack();\r\n\t\tswagItemsVStack.addMember(createSearchBox());\r\n\t\tswagItemsVStack.addMember(createSortDropDown());\r\n\t\tswagItemsVStack.addMember(createItemsTileGrid());\r\n\t\t\r\n\t\t//hide app until data has loaded\r\n\t\tDOM.setStyleAttribute(RootPanel.get(\"gwtApp\").getElement(), \"display\", \"none\");\r\n\t\titemsTileGrid.fetchData(null, new DSCallback() {\r\n\t\t\tpublic void execute(DSResponse response, Object rawData, DSRequest request) {\r\n\t\t\t\t//hide loading div and it's border\r\n\t\t\t\tDOM.setInnerHTML(RootPanel.get(\"loading\").getElement(),\"\");\r\n\t\t\t\tDOM.setStyleAttribute(DOM.getElementById(\"loading\"), \"border\", \"0\");\r\n\t\t\t\t//show app\r\n\t\t\t\tDOM.setStyleAttribute(RootPanel.get(\"gwtApp\").getElement(), \"display\", \"block\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswagItemsVStack.setWidth(350);\r\n\t\tswagItemsVStack.setHeight(552);\r\n\t\tswagItemsVStack.setBorder(\"1px solid #C0C3C7\"); //blue like the rest of the app\r\n\t\tswagItemsVStack.setShowEdges(false);\r\n\t\tswagItemsVStack.setCanDragResize(true);\r\n\t\tswagItemsVStack.setShowResizeBar(true);\r\n\t\t\r\n\t\t//Put itemsTileGrid next to createEditComments\r\n\t\tHStack itemsEditCommentsHStack = new HStack();\r\n\t\titemsEditCommentsHStack.addMember(swagItemsVStack);\r\n//\t\taddImageUpload(itemsAndEditHStack);\r\n\t\titemsEditCommentsHStack.addMember(createEditForm());\r\n\t\titemsEditCommentsHStack.setHeight(720);\r\n\t\t\r\n\t\tVStack mainStack = new VStack();\r\n\t\t//vertical scrolling if browser window is too small\r\n\t\tmainStack.setOverflow(Overflow.AUTO); \r\n\t\tmainStack.setWidth100();\r\n\t\tmainStack.setHeight100();\r\n\t\tmainStack.addMember(menuHStack);\r\n\t\tmainStack.addMember(itemsEditCommentsHStack);\r\n\t\t\r\n\t\tRootPanel.get(\"gwtApp\").add(mainStack); //anchored on GWT html page\r\n\r\n\t\tmainStack.draw();\r\n\t}", "public void buildGUI(){\n\n\t\tsetLayout(new BorderLayout());//Setting a borderlayout for the frame\n\t\toptionsPane.setBorder(BorderFactory.createLineBorder(Color.black));//This sets a border around the options panel\n\t\tadd(disclaimer, BorderLayout.SOUTH);//Adds the disclaimer panel to the frame\n\t\tadd(optionsPane, BorderLayout.LINE_START);//Adds the options panel to the frame\n\t\tadd(scrollbar);//Adds the scrollbar to the frame (contains the search frame)\n\t\toptionsPane.add(jpCmbBoxes, BorderLayout.NORTH);//Adds the combo boxes to the options pane\n\t\toptionsPane.add(pic, BorderLayout.SOUTH);//Adds the picture to the options pane\n\t\tdisclaimer.add(disclaim, BorderLayout.LINE_START);//Adds the disclaimer text to the disclaimer panel\n\t\t\n\t\t/*Sets borders around each of the combo boxes, buttons and the disclaimer text */\n\t\ttrackingRange.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tgenderBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tstageofLifeBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\ttagLocationBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchButton.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tdisclaimer.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchByName.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tsearchResults.setLayout((new BoxLayout(searchResults, BoxLayout.PAGE_AXIS)));//Setting the layout for search results panel\n\t\tsearchResults.setBorder(BorderFactory.createLineBorder(Color.black));//Sets a border around the panel\n\t\t/*Adding components to the combo boxes panel */\n\t\tjpCmbBoxes.setLayout(new BoxLayout(jpCmbBoxes, BoxLayout.Y_AXIS));//Sets the layout for this panel\n\t\tjpCmbBoxes.add(subTitle);\n\t\tjpCmbBoxes.add(trackingRangeLabel);\n\t\tjpCmbBoxes.add(trackingRange);\n\t\tjpCmbBoxes.add(genderLabel);\n\t\tjpCmbBoxes.add(genderBox);\n\t\tjpCmbBoxes.add(stageOfLifeLabel);\n\t\tjpCmbBoxes.add(stageofLifeBox);\n\t\tjpCmbBoxes.add(tagLocationLabel);\n\t\tjpCmbBoxes.add(tagLocationBox);\n\t\tjpCmbBoxes.add(searchButton);\n\t\tjpCmbBoxes.add(searchByName);\n\t\t\n\t\ttry {//Importing the image for this panel\n\t\t\tsharkImage = ImageIO.read(new File(\"source/images/shark2.png\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJLabel image = new JLabel(new ImageIcon(sharkImage));//Creating a label and adding the image to the label\n\t\tpic.add(image);//adding the label to the panel\n\t}", "private void createUIComponents() {\n }", "private void makeComponents() {\n Font font = new Font(\"Open Sans\", Font.PLAIN, 14);\n\n //Create The buttons and configure their visual design.\n searchArea.setFont(font);\n searchArea.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(4, 7, 4, 7, DrawAttribute.lightblue), BorderFactory.createRaisedBevelBorder()));\n searchArea.setBounds(20, 20, 300, 37);\n searchArea.setActionCommand(\"searchAreaInput\");\n\n makeFrontGUIButtons();\n }", "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void buildUI() {\n grid.setPadding(new Insets(10));\n grid.setHgap(10);\n grid.setVgap(10);\n \n // First row\n grid.add(tagsSelectLabel, 0, 0, 1, 1);\n selectTextSelector = new TextSelector();\n /*selectTextSelector.setEditable(true);\n selectTextSelector.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n UserPrefs.getShared().setPref\n (SELECT_TAGS, selectTextSelector.getText());\n }\n }); */\n grid.add(selectTextSelector, 1, 0, 1, 1);\n \n // Second row\n grid.add(tagsSuppressLabel, 0, 1, 1, 1);\n suppressTextSelector = new TextSelector();\n /* suppressTextSelector.setEditable(true);\n suppressTextSelector.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n UserPrefs.getShared().setPref\n (SUPPRESS_TAGS, suppressTextSelector.getText());\n }\n }); */\n grid.add(suppressTextSelector, 1, 1, 1, 1);\n \n selectTextSelector.setText\n (UserPrefs.getShared().getPref (SELECT_TAGS, \"\"));\n suppressTextSelector.setText\n (UserPrefs.getShared().getPref (SUPPRESS_TAGS, \"\"));\n \n }", "private void buildUI()\n {\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridy = 0;\n\n // Adds the title to the panel, changes the font, and centers it\n c.gridwidth = 2;\n Font displayFont = new Font(\"Serif\", Font.BOLD, 18);\n JLabel cardTitle = new JLabel(\"Transition Options\");\n cardTitle.setFont(displayFont);\n cardTitle.setHorizontalAlignment(JLabel.CENTER);\n add(cardTitle, c);\n\n // Adds a separator between the title and the rules text field\n c.gridy++;\n JSeparator separator = new JSeparator();\n separator.setPreferredSize(new Dimension(0, 15));\n add(separator, c);\n\n // Adds a label for the rules field\n c.gridy++;\n c.gridwidth = 1;\n JLabel rulesLabel = new JLabel(\"Rules:\");\n add(rulesLabel, c);\n\n // Sets the insets to 3 on every side\n c.insets = new Insets(3, 3, 3, 3);\n\n // Creates the rules text field of size 100, sets the action command\n // to enter\n c.gridy++;\n c.ipadx = 100;\n ruleTextField = new JTextField();\n ruleTextField.setActionCommand(\"enter\");\n ruleTextField.addActionListener(this);\n add(ruleTextField, c);\n\n // Creates an enter button, resets padding to 0\n c.gridx = 1;\n c.ipadx = 0;\n enterButton = new JButton(\"Enter\");\n enterButton.setActionCommand(\"enter\");\n enterButton.addActionListener(this);\n add(enterButton, c);\n\n // Creates a button that adds an epsilon transition to the rule text field\n c.gridy++;\n c.gridx = 0;\n c.gridwidth = 2;\n epsilonButton = new JButton(\"Add Epsilon Transition\");\n epsilonButton.setActionCommand(\"epsilon\");\n epsilonButton.addActionListener(this);\n add(epsilonButton, c);\n\n // Adds a separator between the rule text field items and the delete button\n c.gridy++;\n separator = new JSeparator();\n separator.setPreferredSize(new Dimension(0, 15));\n add(separator, c);\n\n // Creates a delete button\n c.gridy++;\n deleteButton = new JButton(\"Delete Transition\");\n deleteButton.setVerticalTextPosition(AbstractButton.BOTTOM);\n deleteButton.setHorizontalTextPosition(AbstractButton.CENTER);\n deleteButton.setActionCommand(\"delete\");\n deleteButton.addActionListener(this);\n add(deleteButton, c);\n\n // I hate Alby for making this work.\n // Pushes the panel to the top\n c.gridy++;\n c.weighty = 1;\n JLabel blank = new JLabel();\n add(blank, c);\n }", "private void createComponents()\n\t{\n\t\t// Create search results' table header\n\t\tm_ResultHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\t\tm_ResultHeader.setBackground(Color.lightGray);\n\t\t// Add tool tips for long header categories before adding to GUI\n\t\tm_ResultHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t\tm_PrinterList = ToolBox.generatePrinterList();\n\t}", "private void buildControls() {\n\t\tsetLayout(new FillLayout());\n\t\tSashForm child = new SashForm(this, SWT.VERTICAL);\n\t\ttable = new Table(child, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER );\n\t\ttable.addSelectionListener(createSelctionListener());\n\t\tviewer = buildAndLayoutTable(table);\n\t\taddDNDSupport(viewer);\n\t\tattachContentProvider(viewer);\n\t\tattachLabelProvider(viewer);\n\t\tsingleRating = new RatingTable(child, null, SWT.HORIZONTAL, model);\n\t\t//Zum Debuggen ist das Textfeld sehr nützlich\n\t\t//Text target = new Text(child, SWT.NONE);\n\t\t//initDropTest(target);\n\t\t//child.setWeights(new int[] {2, 1, 1});\n\t\tchild.setWeights(new int[]{2, 1});\n\t\taddFilter(viewer);\n\t\tviewer.setInput(webtrace);\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new FormLayout(\"fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow\", \"center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow\"));\n panel.add(panel1);\n panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null));\n final JLabel label1 = new JLabel();\n label1.setHorizontalAlignment(11);\n label1.setText(\"<html><b>Directory</b></html>\");\n label1.setToolTipText(\"The start directory containing child directories (or raw files directly) that will be processed\");\n CellConstraints cc = new CellConstraints();\n panel1.add(label1, cc.xy(1, 1));\n final JLabel label2 = new JLabel();\n label2.setHorizontalAlignment(11);\n label2.setText(\"<html><b>File name regex</b></html>\");\n label2.setDisplayedMnemonic('R');\n label2.setDisplayedMnemonicIndex(19);\n label2.setToolTipText(\"A regular expression used to match the file name of the raw files that need to be processed\");\n panel1.add(label2, cc.xy(1, 3));\n final JLabel label3 = new JLabel();\n label3.setHorizontalAlignment(11);\n label3.setText(\"Starting date\");\n label3.setToolTipText(\"Only files with a modification date later then the starting date will be processed\");\n panel1.add(label3, cc.xy(1, 5));\n final JLabel label4 = new JLabel();\n label4.setHorizontalAlignment(11);\n label4.setText(\"<html>Number of threads</html>\");\n label4.setDisplayedMnemonic('T');\n label4.setDisplayedMnemonicIndex(16);\n label4.setToolTipText(\"The number of worker threads used for collecting the raw files and processing them\");\n panel1.add(label4, cc.xy(1, 7));\n panel1.add(spinnerThreads, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new BorderLayout(1, 0));\n panel1.add(panel2, cc.xy(3, 1));\n labelDirectory = new JLabel();\n labelDirectory.setIcon(new ImageIcon(getClass().getResource(\"/images/nok.png\")));\n labelDirectory.setInheritsPopupMenu(false);\n labelDirectory.setMaximumSize(new Dimension(350, 16));\n labelDirectory.setMinimumSize(new Dimension(350, 16));\n labelDirectory.setPreferredSize(new Dimension(350, 16));\n labelDirectory.setText(\"<html><i>no directory configured</i></html>\");\n panel2.add(labelDirectory, BorderLayout.CENTER);\n buttonDirectory = new JButton();\n buttonDirectory.setHorizontalTextPosition(0);\n buttonDirectory.setIcon(new ImageIcon(getClass().getResource(\"/images/add.png\")));\n buttonDirectory.setMaximumSize(new Dimension(24, 24));\n buttonDirectory.setMinimumSize(new Dimension(24, 24));\n buttonDirectory.setPreferredSize(new Dimension(24, 24));\n buttonDirectory.setText(\"\");\n panel2.add(buttonDirectory, BorderLayout.EAST);\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new BorderLayout(1, 0));\n panel1.add(panel3, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n textFieldRegex = new JTextField();\n textFieldRegex.setText(\"^.*\\\\.raw$\");\n panel3.add(textFieldRegex, BorderLayout.CENTER);\n buttonRegex = new JButton();\n buttonRegex.setHorizontalTextPosition(0);\n buttonRegex.setIcon(new ImageIcon(getClass().getResource(\"/images/search.png\")));\n buttonRegex.setMaximumSize(new Dimension(24, 24));\n buttonRegex.setMinimumSize(new Dimension(24, 24));\n buttonRegex.setPreferredSize(new Dimension(24, 24));\n buttonRegex.setText(\"\");\n panel3.add(buttonRegex, BorderLayout.EAST);\n panelDate = new JPanel();\n panelDate.setLayout(new BorderLayout(0, 0));\n panel1.add(panelDate, cc.xy(3, 5));\n checkBoxUnique = new JCheckBox();\n checkBoxUnique.setText(\"Enforce unique run names\");\n checkBoxUnique.setMnemonic('U');\n checkBoxUnique.setDisplayedMnemonicIndex(8);\n panel1.add(checkBoxUnique, cc.xyw(1, 9, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n label2.setLabelFor(textFieldRegex);\n label4.setLabelFor(spinnerThreads);\n }", "public void build()\n\t{\n\t\t// TODO: Is the order okay?\n\n\t\t// Frame\n\t\tthis.setDefaultCloseOperation(HIDE_ON_CLOSE);\n\t\tthis.contentPane = new JPanel();\n\t\tthis.contentPane.setLayout(new BorderLayout(0, 0));\n\t\tthis.setContentPane(contentPane);\n\n\t\t// Split pane\n\t\tthis.splitPane = new JSplitPane();\n\t\tthis.splitPane.setBorder(new EmptyBorder(0, 5, 5, 5));\n\t\tthis.contentPane.add(splitPane, BorderLayout.CENTER);\n\n\t\t// tree pane (left side)\n\t\tJPanel panel = new JPanel();\n\t\tthis.splitPane.setLeftComponent(panel);\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\n\n\t\tthis.treePane = new JScrollPane();\n\t\tpanel.add(treePane);\n\n\t\t// Context pane (right side)\n\t\tJPanel panel_1 = new JPanel();\n\t\tthis.splitPane.setRightComponent(panel_1);\n\t\tpanel_1.setLayout(new BoxLayout(panel_1, BoxLayout.X_AXIS));\n\n\t\tthis.contextPane = new JScrollPane();\n\t\tpanel_1.add(contextPane);\n\n\t\tJPanel buttonPanel = createButtonPanel();\n\t\tthis.add(buttonPanel, BorderLayout.SOUTH);\n\n\t\tthis.splitPane.setDividerLocation(DEFAULT_DIVIDER_LOCATION);\n\n\t\t// Menu bar\n\t\tthis.menuBar = new StyleEditorMenuBar(this.guiController);\n\t\tthis.setJMenuBar(menuBar);\n\n\t\t// Tool bar\n\t\tthis.styleEditorToolBar = new StyleEditorToolBar(this.guiController);\n\t\tthis.add(styleEditorToolBar, BorderLayout.NORTH);\n\n\t\t// Combo box (from tool bar)\n\t\tthis.styleComboBox = this.styleEditorToolBar.getComboBox();\n\n\t\t// Create style tree(s):\n\t\tsynchronizeStyles();\n\n\t\t// Tree object\n\t\tthis.treePane.setViewportView(getCurrentStyleTree());\n\t\tgetCurrentStyleTree().updateTree();\n\n\t\tthis.contextPane.setViewportView(getCurrentStyleTree().getRoot().getPanel());\n\t\tthis.contextPane.getVerticalScrollBar().setUnitIncrement(10);\n\t\tthis.synchronizeStyles();\n\n\t\tthis.pack();\n\n\t\tthis.built = true;\n\t}", "private void buildUI() {\n\n fxUtils = FXUtils.getShared();\n int rowCount = 0;\n\n\t\toutputTab = new Tab(\"Output\");\n\n\t\toutputPane = new GridPane();\n\t\tfxUtils.applyStyle(outputPane);\n\n\t\topenOutputDataButton = new Button(\"Save Output\");\n\t\tTooltip openOutputDataButtonTip \n = new Tooltip(\"Specify the Output File Name and Location\");\n Tooltip.install(openOutputDataButton, openOutputDataButtonTip);\n openOutputDataButton.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n saveOutputFile();\n\t\t } // end handle method\n\t\t}); // end event handler\n\t\toutputPane.add(openOutputDataButton, 0, rowCount, 1, 1);\n\t\topenOutputDataButton.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(openOutputDataButton, Priority.SOMETIMES);\n openOutputDataButton.setDisable (true);\n\n\t\trowCount++;\n\n\t\topenOutputDataLabel = new Label(\"Output Data Destination\");\n\t\tfxUtils.applyHeadingStyle(openOutputDataLabel);\n\t\toutputPane.add(openOutputDataLabel, 0, rowCount, 1, 1);\n\t\topenOutputDataLabel.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(openOutputDataLabel, Priority.SOMETIMES);\n\n\t\toutputDictionaryLabel = new Label(\"Data Dictionary Output\");\n\t\tfxUtils.applyHeadingStyle(outputDictionaryLabel);\n\t\toutputPane.add(outputDictionaryLabel, 1, rowCount, 1, 1);\n\t\toutputDictionaryLabel.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(outputDictionaryLabel, Priority.SOMETIMES);\n\n\t\trowCount++;\n\n\t\topenOutputDataName = new Label();\n\t\tfxUtils.applyHeadingStyle(openOutputDataName);\n\t\toutputPane.add(openOutputDataName, 0, rowCount, 1, 1);\n\t\topenOutputDataName.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(openOutputDataName, Priority.SOMETIMES);\n\n\t\toutputDictionaryCkBox = new CheckBox(\"Save Companion Dictionary?\");\n outputDictionaryCkBox.setSelected (false);\n usingDictionary = false;\n outputDictionaryCkBox.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n usingDictionary = outputDictionaryCkBox.isSelected();\n setDictionaryImplications();\n\t\t } // end handle method\n\t\t}); // end event handler\n\t\toutputPane.add(outputDictionaryCkBox, 1, rowCount, 1, 1);\n\t\toutputDictionaryCkBox.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(outputDictionaryCkBox, Priority.SOMETIMES);\n\n\t\toutputPlaceHolder = new Label(\" \");\n\t\toutputPane.add(outputPlaceHolder, 2, rowCount, 1, 1);\n\t\toutputPlaceHolder.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(outputPlaceHolder, Priority.SOMETIMES);\n\n\t\trowCount++;\n\n\t\toutputTab.setContent(outputPane);\n\t\toutputTab.setClosable(false);\n }", "private void createUIComponents() {\n this.removeAll();\n this.setLayout(new GridBagLayout());\n\n selectionListener = e -> update();\n\n categorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategorySet.class, new Full_Set<>(database, CategorySet.class), false, this);\n categorySet_panel.addControlButtons(new CategorySet_ElementController(database, this));\n categorySet_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n virtualCategory_set = new OneParent_Children_Set<>(VirtualCategory.class, null);\n virtualCategory_elementController = new VirtualCategory_ElementController(database, this);\n virtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), VirtualCategory.class, virtualCategory_set, false, this);\n virtualCategory_panel.addControlButtons(virtualCategory_elementController);\n virtualCategory_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n categoryToCategorySet_set = new OneParent_Children_Set<>(CategoryToCategorySet.class, null);\n categoryToCategorySet_elementController = new CategoryToCategorySet_ElementController(database, this);\n categoryToCategorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToCategorySet.class, categoryToCategorySet_set, false, this);\n categoryToCategorySet_panel.addControlButtons(categoryToCategorySet_elementController);\n\n categoryToVirtualCategory_set = new OneParent_Children_Set<>(CategoryToVirtualCategory.class, null);\n categoryToVirtualCategory_elementController = new CategoryToVirtualCategory_ElementController(database, this);\n categoryToVirtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToVirtualCategory.class, categoryToVirtualCategory_set, false, this);\n categoryToVirtualCategory_panel.addControlButtons(categoryToVirtualCategory_elementController);\n\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.fill = GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridheight = 2;\n\n gridBagConstraints.gridx = 0;\n this.add(categorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 1;\n gridBagConstraints.gridx = 1;\n this.add(virtualCategory_panel, gridBagConstraints);\n\n gridBagConstraints.weighty = 2;\n this.add(categoryToCategorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridx = 2;\n this.add(categoryToVirtualCategory_panel, gridBagConstraints);\n }", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private void build() {\r\n \tapplyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n setContentPane(buildContentPane());\r\n setTitle(getWindowTitle());\r\n setJMenuBar(\r\n createMenuBuilder(this).buildMenuBar(\r\n settings,\r\n createHelpActionListener(),\r\n createAboutActionListener()));\r\n setIconImage(readImageIcon(\"eye_16x16.gif\").getImage());\r\n }", "public void buildMainGUI(){\n // Clear the frame\n rebuildFrame();\n \n // Header options in main GUI\n header.setText(\" Problem choice: \");\n \n //------Unique panel objects here---------\n \n JButton project1Button = new JButton(\"Project 1 - Search, Constraint Satisfaction, and Graph Coloring\");\n project1Button.addActionListener((ActionEvent e) -> {\n \n // If pressed, build project 1 GUI\n buildProject1GUI();\n \n });\n controlPanel.add(project1Button);\n \n \n //----------------------------------------\n \n // Display GUI after finished building\n controlFrame.pack();\n controlFrame.setVisible(true);\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setForeground(new Color(-1));\n sectionTitle = new JLabel();\n Font sectionTitleFont = this.$$$getFont$$$(\"Droid Sans\", Font.BOLD, 18, sectionTitle.getFont());\n if (sectionTitleFont != null) sectionTitle.setFont(sectionTitleFont);\n this.$$$loadLabelText$$$(sectionTitle, ResourceBundle.getBundle(\"language\").getString(\"title_resources\"));\n panel.add(sectionTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n resourceList.setModel(defaultListModel1);\n resourceList.setSelectionMode(1);\n scrollPane1.setViewportView(resourceList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n publishButton = new JButton();\n publishButton.setEnabled(false);\n this.$$$loadButtonText$$$(publishButton, ResourceBundle.getBundle(\"language\").getString(\"button_publishResource\"));\n panel1.add(publishButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n pullButton = new JButton();\n pullButton.setEnabled(false);\n this.$$$loadButtonText$$$(pullButton, ResourceBundle.getBundle(\"language\").getString(\"button_pullResource\"));\n panel1.add(pullButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "private void buildGUI() {\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Swing Client Demo - CORBA\");\n \n GridLayout westGridLayout = new GridLayout(4, 1); // rows, columns\n westGridLayout.setHgap(10);\n westGridLayout.setVgap(10);\n JPanel dataEntryWestJPanel = new JPanel(westGridLayout); \n dataEntryWestJPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));\n \n GridLayout dataEntryGridLayout = new GridLayout(4, 1); // rows, columns\n dataEntryGridLayout.setHgap(10);\n dataEntryGridLayout.setVgap(10);\n JPanel dataEntryCenterJPanel = new JPanel(dataEntryGridLayout);\n dataEntryCenterJPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10));\n \n FlowLayout buttonLayout = new FlowLayout(FlowLayout.RIGHT);\n buttonLayout.setHgap(10);\n JPanel dataEntryButtonJPanel = new JPanel(buttonLayout);\n \n \n JPanel dataEntryJPanel = new JPanel(new BorderLayout());\n JPanel dataViewJPanel = new JPanel(new GridLayout(1, 1));\n dataViewJPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\n JLabel recordNumLbl = new JLabel(\"Record Number\");\n JLabel omegaLbl = new JLabel(\"Omega\");\n JLabel thetaLbl = new JLabel(\"Theta\");\n JLabel deltaLbl = new JLabel(\"Delat\");\n JLabel uuidLbl = new JLabel(\"UUID\");\n JLabel idLbl = new JLabel(\"ID\");\n\n JButton addJButton = new JButton(\"Add Tuna\");\n JButton viewAllJButton = new JButton(\"View All Tunas\");\n JButton cleanJButton = new JButton(\"Clean text fields\");\n \n recordNumLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));//top,left,bottom,right\n omegaLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n thetaLbl.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n deltaLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n uuidLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n idLbl.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n \n TunaTxtArea.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n addJButton.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n viewAllJButton.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n cleanJButton.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n \n dataEntryWestJPanel.add(recordNumLbl);\n dataEntryWestJPanel.add(omegaLbl);\n dataEntryWestJPanel.add(thetaLbl);\n dataEntryWestJPanel.add(deltaLbl);\n dataEntryWestJPanel.add(uuidLbl);\n dataEntryWestJPanel.add(idLbl);\n\n dataEntryButtonJPanel.add(addJButton);\n dataEntryButtonJPanel.add(viewAllJButton);\n dataEntryButtonJPanel.add(cleanJButton);\n\n dataEntryCenterJPanel.add(recordNumTxtField);\n dataEntryCenterJPanel.add(omegaTxtField);\n dataEntryCenterJPanel.add(thetaTxtField);\n dataEntryCenterJPanel.add(deltaTxtField);\n dataEntryCenterJPanel.add(uuidTxtField);\n dataEntryCenterJPanel.add(idTxtField);\n dataEntryCenterJPanel.add(dataEntryButtonJPanel);\n\n dataEntryJPanel.add(dataEntryWestJPanel, BorderLayout.WEST);\n dataEntryJPanel.add(dataEntryCenterJPanel, BorderLayout.CENTER);\n\n JScrollPane scrollPane = new JScrollPane(TunaTxtArea);\n scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n dataViewJPanel.add(scrollPane);\n\n this.getContentPane().add(dataEntryJPanel, BorderLayout.NORTH);\n this.getContentPane().add(dataViewJPanel, BorderLayout.CENTER);\n\n addJButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n if(remoteTuna != null){\n Tuna Tuna = new Tuna();\n Tuna.setRecordNumber(Integer.parseInt(recordNumTxtField.getText()));\n Tuna.setOmega(omegaTxtField.getText());\n Tuna.setLambda(thetaTxtField.getText());\n Tuna.setOmega(deltaTxtField.getText());\n Tuna.setLambda(uuidTxtField.getText());\n Tuna.setOmega(idTxtField.getText());\n \n remoteTuna.create(Tuna);\n }\n else{\n JOptionPane.showMessageDialog(\n Assignment4SwingClient.this, \"Problem. No remote object available\");\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(\n Assignment4SwingClient.this, \"Problem Cause: \\n\" + ex.getMessage());\n }\n }\n });\n\n viewAllJButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n if(remoteTuna != null){\n List<Tuna> tunas = remoteTuna.findAll();\n TunaTxtArea.setText(\"\");\n for (Tuna s : tunas) {\n TunaTxtArea.append(s.toString() + \"\\n\");\n }\n }\n else{\n JOptionPane.showMessageDialog(\n Assignment4SwingClient.this, \"Problem. No remote object available\");\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(\n Assignment4SwingClient.this, \"Problem Cause: \\n\" + ex.getMessage());\n }\n }\n });\n \n /** click on clean button to bound to an event to clean the data hold in the text fields */\n cleanJButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n recordNumTxtField.setText(\"\");\n omegaTxtField.setText(\"\");\n thetaTxtField.setText(\"\");\n deltaTxtField.setText(\"\");\n uuidTxtField.setText(\"\");\n idTxtField.setText(\"\");\n }\n });\n\n //this.pack();\n this.setSize(800, 600);\n // null causes window to be centered on screen\n // see: stackoverflow.com (). How to set JFrame to appear centered, regardless of monitor resolution? Retrieved from\n // https://stackoverflow.com/questions/2442599/how-to-set-jframe-to-appear-centered-regardless-of-monitor-resolution\n this.setLocationRelativeTo(null);\n this.setVisible(true);\n this.setResizable(true);\n }", "protected void buildUi() {\n\t\t\t LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);\n\t\t\n\t\t\t map = new MapWidget(cawkerCity, 2);\n\t\t\t map.setSize(\"100%\", \"100%\");\n\t\t\t // Add some controls for the zoom level\n\t\t\t map.addControl(new LargeMapControl());\n\t\t\n\t\t\t // Add a marker\n\t\t\t map.addOverlay(new Marker(cawkerCity));\n\t\t\n\t\t\t // Add an info window to highlight a point of interest\n\t\t\t map.getInfoWindow().open(map.getCenter(),\n\t\t\t new InfoWindowContent(\"World's Largest Ball of Sisal Twine\"));\n\t\t\n\t\t\t root.addNorth(map, 500);\n\n\t}", "public void createComponents()\n {\n VBox col = new VBox(SPACING);\n\n Label lblStatus = new Label(\"Machine Status\");\n lblStatus.getStyleClass().add(\"bordered-titled-title\");\n\n lblCurrFile = new Label(\"No File Currently Loaded\");\n lblConnection = new Label(\"Not Connected\");\n\n btnConnect = new Button(\"Connect to Machine\");\n btnConnect.setOnAction(new ConnectEventHandler());\n //btnConnect.getStyleClass().add(\"glass-grey\");\n\n ivConnection = new ImageView(\n new Image(getClass().getResourceAsStream(\"/Resources/Not Connected.png\")));\n\n lblMachineStatus = new Label(\"Status: Good\");\n HBox r1 = new HBox(SPACING);\n r1.getChildren().addAll(lblConnection, ivConnection);\n\n col.getChildren().addAll(btnConnect, r1, lblCurrFile, lblMachineStatus);\n getChildren().addAll(lblStatus, col);\n\n }", "private void createComponents() {\n \n Dimension thisSize = this.getSize();\n \n this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n \n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < recordCount; ++i) {\n numbers.add(i);\n }\n \n recordList = new JList(numbers.toArray());\n recordList.addListSelectionListener(selectionListener);\n JScrollPane listPane = new JScrollPane(recordList);\n listPane.setPreferredSize(new Dimension(thisSize.width / 3, thisSize.height));\n \n select(0, 0);\n \n this.add(listPane);\n \n recordForm = new RecordForm(fields, thisSize);\n entryForm = new JScrollPane(recordForm);\n \n this.add(entryForm);\n \n selectionAction = WAITING_ON_SELECTION;\n \n }", "public void build() {\n VBox rootLayout = new VBox();\n Pane topPane = new Pane();\n HBox bottomBox = new HBox();\n Pane pluginPane = new Pane();\n Pane iconPane = new Pane();\n rootLayout.setPrefSize(300, 623);\n topPane.setPrefSize(300, 50);\n bottomBox.setPrefSize(300, 573);\n pluginPane.setPrefSize(250, 573);\n iconPane.setPrefSize(50, 573);\n Button b1 = new Button(\"h\");\n pluginPane.getChildren().addAll(b1);\n bottomBox.getChildren().addAll(pluginPane, iconPane);\n rootLayout.getChildren().addAll(topPane, bottomBox);\n\n Scene scene = new Scene(rootLayout);\n setScene(scene);\n }", "void buildBasicGUI()\r\n\t{\r\n\t\tJLabel dateLabel;\r\n\t\tJLabel nameLabel;\r\n\t\tJLabel codeLabel;\r\n\t\tJLabel inMileLabel;\r\n\t\tJLabel retMileLabel;\r\n\t\tJLabel billRateLabel;\r\n\t\tJLabel comLabel;\r\n\r\n\t\tdateLabel = new JLabel(\"Date (MM-dd-yyyy)\");\r\n\t\tnameLabel = new JLabel(\"Patient Name\");\r\n\t\tcodeLabel = new JLabel(\"Service Code\");\r\n\t\tinMileLabel = new JLabel(\"Initial Miles\");\r\n\t\tretMileLabel = new JLabel(\"Return Miles\");\r\n\t\tbillRateLabel = new JLabel(\"Bill Rate\");\r\n\t\tcomLabel = new JLabel(\"Comment\");\r\n\r\n\t\tdateOfTripTF = new JTextField(\"\");\r\n\t\tpatientNameTF = new JTextField(\"\");\r\n\t\tinitialMileTF = new JTextField(\"\");\r\n\t\tretMileTF = new JTextField(\"\");\r\n\t\tbillRateTF = new JTextField(\"\");\r\n\t\tcommentTF = new JTextField(\"\");\r\n\r\n\t\tString[] array = new String[]{\"A0428 Non-emergency transport\",\r\n\t\t\t\t\t\t\t\t\t\t\"A0429 Emergency transport\",\r\n\t\t\t\t\t\t\t\t\t\t\"A0427 Advanced life support\",\r\n\t\t\t\t\t\t\t\t\t\t\"A0434 Specialty care transport\"};\r\n\r\n\t\tservCodeList = new JComboBox(array);\r\n\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGroupLayout layout = new GroupLayout(panel);\r\n\t\tpanel.setLayout(layout);\r\n\r\n\t\tlayout.setAutoCreateGaps(true);\r\n\r\n\t\tlayout.setAutoCreateContainerGaps(true);\r\n\r\n\t\tGroupLayout.SequentialGroup hGroup = layout.createSequentialGroup();\r\n\r\n\t\thGroup.addGroup(layout.createParallelGroup().addComponent(dateLabel).\r\n\t\t\t\taddComponent(nameLabel).addComponent(codeLabel).\r\n\t\t\t\taddComponent(inMileLabel).addComponent(retMileLabel).\r\n\t\t\t\taddComponent(billRateLabel).addComponent(comLabel));\r\n\r\n\t\thGroup.addGroup(layout.createParallelGroup().addComponent(dateOfTripTF).\r\n\t\t\t\taddComponent(patientNameTF).addComponent(servCodeList).\r\n\t\t\t\taddComponent(initialMileTF).addComponent(retMileTF).addComponent(billRateTF).\r\n\t\t\t\taddComponent(commentTF));\r\n\r\n\t\tlayout.setHorizontalGroup(hGroup);\r\n\r\n\t\tGroupLayout.SequentialGroup vGroup = layout.createSequentialGroup();\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(dateLabel).addComponent(dateOfTripTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(nameLabel).addComponent(patientNameTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(codeLabel).addComponent(servCodeList));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(inMileLabel).addComponent(initialMileTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(retMileLabel).addComponent(retMileTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(billRateLabel).addComponent(billRateTF));\r\n\r\n\t\tvGroup.addGroup(layout.createParallelGroup(Alignment.BASELINE).\r\n\t\t\t\taddComponent(comLabel).addComponent(commentTF));\r\n\r\n\t\tlayout.setVerticalGroup(vGroup);\r\n\r\n\t\tadd(panel, BorderLayout.CENTER);\r\n\r\n\t\t//setupDialog();\r\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private void createComponents() {\r\n // create a title\r\n indexTitle = new JLabel(\"Indexing\");\r\n indexTitle.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\r\n dirUrl = new JTextField();\r\n dirUrl.setColumns(70);\r\n dirUrl.setEditable(false);\r\n\r\n openDir = new JButton(\"Open Dir\");\r\n fileChooser = new JFileChooser();\r\n\r\n startIndexing = new JButton(\"Start\");\r\n startIndexing.setPreferredSize(new Dimension(95, 22));\r\n\r\n indexProgress = new JProgressBar();\r\n //progressBar.setStringPainted(true);\r\n // progressBar.setString(\"Indexing State..\");\r\n\r\n addExistingCheck = new JCheckBox();\r\n }", "private void createUIComponents() {\n billboardJList = new JList<>();\n model = new DefaultListModel<>();\n\n for (Billboard billboard : billboardList) {\n model.addElement(billboard.getBillboardName());\n }\n\n billboardJList.setModel(model);\n\n previewBillboardContentsFrame = new JFrame();\n previewBillboardContentsFrame.setPreferredSize(new Dimension(500, 500));\n }", "private void buildview() {\n\t\tCssLayout cd= new CssLayout();\n\t\t\n\t\t//table.setSizeFull();\n\t\t\t\n\t\t\ttable.setContainerDataSource(container);\n\t\t\ttable.setVisibleColumns(new Object[]{\"Name\",\"Component\",\"Indication\",\"Comment\",\"MethodofAdministration\"});\n\t\t\ttable.setColumnHeader(\"MethodofAdministration\", \"Method of Administration\");\n\t\t\t\n\t\t\ttable.setWidth(\"100%\");\n\t\t\tcd.addComponent(table);\n\t\t\tcd.setSizeFull();\n\t\t\tsetContent(cd);\n\t\t\n\t}", "private void createWidgets() {\n\t\tgrid = new GridPane();\n\t\ttxtNickname = new TextField();\n\t\ttxtPort = new TextField();\n\t\ttxtAdress = new TextField();\n\n\t\tlblNick = new Label(\"Nickname\");\n\t\tlblNickTaken = new Label();\n\t\tlblPort = new Label(\"Port\");\n\t\tlblAdress = new Label(\"Adress\");\n\t\tlblCardDesign = new Label(\"Carddesign\");\n\n\t\tbtnLogin = new Button(\"\");\n\t\timageStart = new Image(BTNSTARTWOOD, 85, 35, true, true);\n\t\timvStart = new ImageView();\n\n\t\tcardDesignOptions = FXCollections.observableArrayList(\n\t\t\t\t\"original design\", \"pirate design\", \"graveyard design\");\n\t\tcomboBoxCardDesign = new ComboBox<String>(cardDesignOptions);\n\n\t\tcomboBoxCardDesign\n\t\t\t\t.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> list) {\n\t\t\t\t\t\treturn new ExtCell();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}", "private void buildUpGUI() {\n\t\tsetLayout( new BorderLayout() );\n\t\tadd(new JScrollPane( summaryEditorPane) );\n\t}", "private void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"100%\");\r\n\t\tmainLayout.setMargin(false);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tmainLayout.setWidth(\"100.0%\");\r\n\t\tmainLayout.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// label\r\n\t\tlabel = new Label();\r\n\t\tlabel.setImmediate(false);\r\n\t\tlabel.setWidth(\"-1px\");\r\n\t\tlabel.setHeight(\"-1px\");\r\n\t\tlabel.setValue(\"Stellvertreter ernennen\");\r\n\t\tlabel.setStyleName(Runo.LABEL_H1);\r\n\t\tmainLayout.addComponent(label, \"top:25.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// benutzer\r\n\t\tbenutzer = new ListSelect();\r\n\t\tbenutzer.setImmediate(false);\r\n\t\tbenutzer.setWidth(\"46.0%\");\r\n\t\tbenutzer.setHeight(\"70.0%\");\r\n\t\tmainLayout.addComponent(benutzer, \"top:35.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// ok\r\n\t\tok = new Button();\r\n\t\tok.setCaption(\"Stellvertreter ernennen\");\r\n\t\tok.setImmediate(false);\r\n\t\tok.setWidth(\"25%\");\r\n\t\tok.setHeight(\"-1px\");\r\n\t\tok.addListener(this);\r\n\t\tmainLayout.addComponent(ok, \"top:83.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// delete\r\n\t\tdelete = new Button();\r\n\t\tdelete.setCaption(\"Stellvertreter löschen\");\r\n\t\tdelete.setImmediate(false);\r\n\t\tdelete.setWidth(\"25%\");\r\n\t\tdelete.setHeight(\"-1px\");\r\n\t\tdelete.addListener(this);\r\n\t\tmainLayout.addComponent(delete, \"top:88.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// logout\r\n\t\tlogout = new Button();\r\n\t\tlogout.setCaption(\"logout\");\r\n\t\tlogout.setImmediate(false);\r\n\t\tlogout.setWidth(\"-1px\");\r\n\t\tlogout.setHeight(\"-1px\");\r\n\t\tlogout.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tlogout.addListener(this);\r\n\t\tmainLayout.addComponent(logout, \"top:97.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// back\r\n\t\tback = new Button();\r\n\t\tback.setCaption(\"Startseite\");\r\n\t\tback.setImmediate(true);\r\n\t\tback.setWidth(\"-1px\");\r\n\t\tback.setHeight(\"-1px\");\r\n\t\tback.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tback.addListener(this);\r\n\t\tmainLayout.addComponent(back, \"top:94.0%;left:35.0%;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "private void buildPanel()\n\t{\n\t\tvoterIDMessage = new JLabel(\"Please Enter Your Voter ID.\");\n\t\tbutton1 = new JButton(\"Cancel\");\n\t\tbutton1.addActionListener(new ButtonListener());\n\t\tbutton2 = new JButton(\"OK\");\n\t\tbutton2.addActionListener(new ButtonListener());\n\t\tidText = new JTextField(10);\n\t\tpanel1 = new JPanel();\n\t\tpanel2 = new JPanel();\n\t\tpanel3 = new JPanel();\n\t\tpanel1.add(voterIDMessage);\n\t\tpanel2.add(idText);\n\t\tpanel3.add(button1);\n\t\tpanel3.add(button2);\n\t}", "private void build() {\r\n HBox teamholder = new HBox();\r\n teamholder.setPadding(new Insets(10, 10, 10, 10));\r\n teamholder.setSpacing(10);\r\n teamholder.getChildren().addAll(this.name_field, this.add_team_button, this.save_button, this.openentitiesbutton, this.coach);\r\n HBox selectorholder = new HBox(10);\r\n selectorholder.getChildren().addAll(this.passive_playerlist, this.roster);\r\n this.getChildren().addAll(teamholder, selectorholder, this.add_player_button);\r\n this.add_player_button.setOnAction((ActionEvent e) -> {\r\n this.addPlayer();\r\n });\r\n\r\n this.save_button.setOnAction((ActionEvent e) -> {\r\n this.save();\r\n this.tonotify.execute();\r\n });\r\n\r\n this.add_team_button.setOnAction((ActionEvent e) -> {\r\n this.newTeam();\r\n });\r\n this.openentitiesbutton.disableProperty().bind(this.esw.showingProperty());\r\n this.openentitiesbutton.setOnAction((ActionEvent e) -> {\r\n this.esw.loadEntities();\r\n this.esw.show();\r\n });\r\n this.save_button.disableProperty().bind(Bindings.not(this.getChanged()));\r\n\r\n }", "private void createComponents() {\n\t\tbuttons = new Button[9];\r\n\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\tbuttons[i] = new Button();\r\n\t\t}\r\n\r\n\t\t// Initialize components\r\n\t\tplayAgainButton = new Button(\"Play Again\");\r\n\t\tquitButton = new Button(\"Quit\");\r\n\r\n\t\t// Initialize layouts\r\n\t\tgameButtonGrid = new GridPane();\r\n\t\tgameButtonGrid.setStyle(\"-fx-background-color:Aquamarine;\");\r\n\t\tbottomButtonsHBox = new HBox();\r\n\t\tbottomButtonsHBox.setStyle(\"-fx-background-color:LightSlateGray;\");\r\n\t\tsceneVBox = new VBox();\r\n\t\t\r\n\t\t//Game components\r\n\t\tgameInfo = new GameInfo();\r\n\t}", "private void createUIComponents() {\n this.selectorApplication = new AzureArtifactComboBox(project, true);\n this.selectorApplication.refreshItems();\n }", "protected JComponent doMakeContents() {\n // Run super.doMakeContents()\n // It does some initialization on private components that we can't get at\n JComponent parentContents = super.doMakeContents();\n Element chooserNode = getXmlNode();\n \n String pathFromXml =\n XmlUtil.getAttribute(chooserNode, ATTR_PATH, (String)null);\n if (pathFromXml != null && Paths.get(pathFromXml).toFile().exists()) {\n setPath(pathFromXml);\n }\n \n JComponent typeComponent = new JPanel();\n if (XmlUtil.getAttribute(chooserNode, ATTR_DSCOMP, true)) {\n typeComponent = getDataSourcesComponent();\n }\n \n if (defaultDataSourceName != null) {\n typeComponent = new JLabel(defaultDataSourceName);\n McVGuiUtils.setLabelBold((JLabel) typeComponent, true);\n McVGuiUtils.setComponentHeight(typeComponent, new JComboBox());\n }\n \n // Create the different panels... extending classes can override these\n topPanel = getTopPanel();\n centerPanel = getCenterPanel();\n bottomPanel = getBottomPanel();\n \n JPanel innerPanel = centerPanel;\n if (topPanel != null && bottomPanel != null) {\n innerPanel = McVGuiUtils.topCenterBottom(topPanel, centerPanel, bottomPanel);\n } else if (topPanel != null) {\n innerPanel = McVGuiUtils.topBottom(topPanel, centerPanel, McVGuiUtils.Prefer.BOTTOM);\n } else if (bottomPanel != null) {\n innerPanel = McVGuiUtils.topBottom(centerPanel, bottomPanel, McVGuiUtils.Prefer.TOP);\n }\n // Start building the whole thing here\n JPanel outerPanel = new JPanel();\n \n JLabel typeLabel = McVGuiUtils.makeLabelRight(getDataSourcesLabel());\n \n JLabel statusLabelLabel = McVGuiUtils.makeLabelRight(\"\");\n \n McVGuiUtils.setLabelPosition(statusLabel, Position.RIGHT);\n McVGuiUtils.setComponentColor(statusLabel, TextColor.STATUS);\n \n JButton helpButton = McVGuiUtils.makeImageButton(ICON_HELP, \"Show help\");\n helpButton.setActionCommand(GuiUtils.CMD_HELP);\n helpButton.addActionListener(this);\n \n JButton refreshButton = McVGuiUtils.makeImageButton(ICON_REFRESH, \"Refresh\");\n refreshButton.setActionCommand(GuiUtils.CMD_UPDATE);\n refreshButton.addActionListener(this);\n \n McVGuiUtils.setButtonImage(loadButton, ICON_ACCEPT_SMALL);\n McVGuiUtils.setComponentWidth(loadButton, Width.DOUBLE);\n \n // This is how we know if the action was initiated by a button press\n loadButton.addActionListener(e -> {\n buttonPressed = true;\n Misc.runInABit(1000, () -> buttonPressed = false);\n });\n \n GroupLayout layout = new GroupLayout(outerPanel);\n outerPanel.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(LEADING)\n .addGroup(TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(helpButton)\n .addGap(GAP_RELATED)\n .addComponent(refreshButton)\n .addPreferredGap(RELATED)\n .addComponent(loadButton))\n .addGroup(LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(LEADING)\n .addComponent(innerPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(typeLabel)\n .addGap(GAP_RELATED)\n .addComponent(typeComponent))\n .addGroup(layout.createSequentialGroup()\n .addComponent(statusLabelLabel)\n .addGap(GAP_RELATED)\n .addComponent(statusLabel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(BASELINE)\n .addComponent(typeLabel)\n .addComponent(typeComponent))\n .addPreferredGap(UNRELATED)\n .addComponent(innerPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(UNRELATED)\n .addGroup(layout.createParallelGroup(BASELINE)\n .addComponent(statusLabelLabel)\n .addComponent(statusLabel))\n .addPreferredGap(UNRELATED)\n .addGroup(layout.createParallelGroup(BASELINE)\n .addComponent(loadButton)\n .addComponent(refreshButton)\n .addComponent(helpButton))\n .addContainerGap())\n );\n outerPanel.addAncestorListener(this);\n return outerPanel;\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 2, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(11, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Tags\");\n panel1.add(label1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n listTags = new JList();\n panel1.add(listTags, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addTagButton = new JButton();\n addTagButton.setText(\"Add Tag\");\n panel2.add(addTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel2.add(spacer2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n deleteTagButton = new JButton();\n deleteTagButton.setText(\"Delete Tag\");\n panel2.add(deleteTagButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"State\");\n panel1.add(label2, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Media Type\");\n panel1.add(label3, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"New Contributor\");\n panel1.add(label4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel3, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Type\");\n panel3.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboContributorType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"select\");\n defaultComboBoxModel1.addElement(\"USER\");\n defaultComboBoxModel1.addElement(\"MACHINE\");\n comboContributorType.setModel(defaultComboBoxModel1);\n panel3.add(comboContributorType, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Username\");\n panel3.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textUsername = new JTextField();\n panel3.add(textUsername, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label7 = new JLabel();\n label7.setText(\"Created\");\n panel1.add(label7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textCreatedDate = new JTextField();\n panel1.add(textCreatedDate, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label8 = new JLabel();\n label8.setText(\"Field Sets\");\n panel1.add(label8, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listFieldSets = new JList();\n panel1.add(listFieldSets, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label9 = new JLabel();\n label9.setText(\"Contributors\");\n panel1.add(label9, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listContributors = new JList();\n panel1.add(listContributors, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label10 = new JLabel();\n label10.setText(\"Workgroups\");\n panel1.add(label10, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listWorkgroups = new JList();\n panel1.add(listWorkgroups, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label11 = new JLabel();\n label11.setText(\"Last Updated\");\n panel1.add(label11, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textLastUpdated = new JTextField();\n panel1.add(textLastUpdated, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n comboMediaType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();\n defaultComboBoxModel2.addElement(\"select\");\n defaultComboBoxModel2.addElement(\"CHAT\");\n defaultComboBoxModel2.addElement(\"EMAIL\");\n defaultComboBoxModel2.addElement(\"EVENT\");\n defaultComboBoxModel2.addElement(\"MOBILE\");\n defaultComboBoxModel2.addElement(\"SOCIAL\");\n defaultComboBoxModel2.addElement(\"VIDEO\");\n defaultComboBoxModel2.addElement(\"VOICE\");\n defaultComboBoxModel2.addElement(\"WEB\");\n comboMediaType.setModel(defaultComboBoxModel2);\n panel1.add(comboMediaType, new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboState = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel3 = new DefaultComboBoxModel();\n defaultComboBoxModel3.addElement(\"select\");\n defaultComboBoxModel3.addElement(\"ACTIVE\");\n defaultComboBoxModel3.addElement(\"CLOSED\");\n comboState.setModel(defaultComboBoxModel3);\n panel1.add(comboState, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label12 = new JLabel();\n label12.setText(\"Pod ID\");\n panel1.add(label12, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldId = new JTextField();\n panel1.add(textFieldId, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel4, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel4.add(spacer3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel5 = new JPanel();\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel4.add(panel5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonSave = new JButton();\n buttonSave.setText(\"Save\");\n panel5.add(buttonSave, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel5.add(buttonClose, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel6 = new JPanel();\n panel6.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(300, -1), null, 0, false));\n panel6.add(panelDataElements, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 1, false));\n final Spacer spacer4 = new Spacer();\n panel6.add(spacer4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }", "private void buildMainPanel() {\n\t\t\n\t\tif(theMode == MODE_FPC) {\n\t\t\ttheFields = new PropertyComponent[9];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"\", 1, false, false);\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", FPC_GRP_SORT, 0, true, false);\t\t\t\n\t\t\t//theFields[5] = new PropertyComponent(\"grp_order\", \"\", 1, true, false);\t\t\t\n\t\t\ttheFields[4] = new PropertyComponent(\"cbsize\", \"1200\", 1, false, false);\t\t\t\n\t\t\ttheFields[5] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[6] = new PropertyComponent(\"fpc_file\", \"\", true, true, true);\n\t\t\ttheFields[7] = new PropertyComponent(\"bes_files\", \"\", true, true, false);\n\t\t\ttheFields[8] = new PropertyComponent(\"marker_files\", \"\", true, true, false);\n\t\t} else { //MODE_PSEUDO\n\t\t\ttheFields = new PropertyComponent[13];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"Chr\", 1, false, false);\t\t\t\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", PSEUDO_GRP_SORT, 0, true, false);\n\t\t\ttheFields[4] = new PropertyComponent(\"order_against\", getProjectSelections(), 0, false, true);\n\t\t\ttheFields[5] = new PropertyComponent(\"mask_all_but_genes\", PSEUDO_MASK_GENES, 1, false, true);\n\t\t\ttheFields[6] = new PropertyComponent(\"min_size\", \"100000\", 1, true, false);\t\t\t\n\t\t\ttheFields[7] = new PropertyComponent(\"min_display_size_bp\", \"0\", 1, false, false);\t\t\t\n\t\t\ttheFields[8] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[9] = new PropertyComponent(\"annot_keywords\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[10] = new PropertyComponent(\"annot_kw_mincount\", \"50\", 2, false, false);\t\n\t\t\ttheFields[11] = new PropertyComponent(\"anno_files\", \"\", true, true, false);\n\t\t\ttheFields[12] = new PropertyComponent(\"sequence_files\", \"\", true, true, false);\n\t\t}\n\t\t\t\n\t\tJPanel tempPanel = new JPanel();\n\t\ttempPanel.setLayout(new BoxLayout(tempPanel, BoxLayout.PAGE_AXIS));\n\t\ttempPanel.setBackground(Color.WHITE);\n\t\t\n\t\tfor(int x=0; x<theFields.length; x++) {\n\t\t\ttempPanel.add(Box.createVerticalStrut(5));\n\t\t\ttheFields[x].setTextListener(theListener);\n\t\t\ttempPanel.add(theFields[x]);\n\t\t}\n\t\ttempPanel.add(Box.createVerticalStrut(20));\n\t\ttempPanel.add(createButtonPanel());\n\t\ttempPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\t\ttempPanel.setMaximumSize(tempPanel.getPreferredSize());\n\t\ttempPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\t\n\t\tgetContentPane().add(tempPanel);\n\t}", "protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n lblPlatform = new javax.swing.JLabel();\n platformComboBox = new javax.swing.JComboBox();\n btnManagePlatforms = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 100), new java.awt.Dimension(0, 0));\n progressLabel = new javax.swing.JLabel();\n progressPanel = new javax.swing.JPanel();\n\n setLayout(new java.awt.GridBagLayout());\n\n lblPlatform.setLabelFor(platformComboBox);\n lblPlatform.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_ComboBox\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 12);\n add(lblPlatform, gridBagConstraints);\n lblPlatform.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_labelPlatform\")); // NOI18N\n lblPlatform.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_labelPlatform\")); // NOI18N\n\n platformComboBox.setModel(platformsModel);\n platformComboBox.setRenderer(platformsCellRenderer);\n platformComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n platformComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.weightx = 0.1;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);\n add(platformComboBox, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnManagePlatforms, org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_PanelOptions_Manage_Button\")); // NOI18N\n btnManagePlatforms.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagePlatformsActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_TRAILING;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n add(btnManagePlatforms, gridBagConstraints);\n btnManagePlatforms.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_buttonManagePlatforms\")); // NOI18N\n btnManagePlatforms.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_buttonManagePlatforms\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.weighty = 0.1;\n add(filler1, gridBagConstraints);\n\n progressLabel.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_Progress\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n add(progressLabel, gridBagConstraints);\n progressLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_platformProgress\")); // NOI18N\n progressLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_platformProgress\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n add(progressPanel, gridBagConstraints);\n }", "void fillInnerParts() {\n // TODO: change the method to get each category panel\n adminPanel = new CategoryPanel(logic.getUiTaskList().getAdminList(), \"Admin\");\n categoryPanelPlaceholder.getChildren().add(adminPanel.getRoot());\n topicPanel = new CategoryPanel(logic.getUiTaskList().getTopicList(), \"Topic\");\n categoryPanelPlaceholder.getChildren().add(topicPanel.getRoot());\n ipPanel = new CategoryPanel(logic.getUiTaskList().getIpList(), \"Ip\");\n categoryPanelPlaceholder.getChildren().add(ipPanel.getRoot());\n tpPanel = new CategoryPanel(logic.getUiTaskList().getTpList(), \"Tp\");\n categoryPanelPlaceholder.getChildren().add(tpPanel.getRoot());\n refreshTitle();\n\n int currentWeekNumber = AppUtil.getCurrentWeekNumber().getWeekValueInt();\n Double num = (double) currentWeekNumber / (double) 13;\n progressBar.setProgress(num);\n\n weekDisplay = new WeekDisplay(currentWeekNumber);\n\n weekDisplayPlaceholder.getChildren().add(weekDisplay.getRoot());\n\n feedbackBox = new FeedbackBox();\n feedbackBoxPlaceholder.getChildren().add(feedbackBox.getRoot());\n CommandBox commandBox = new CommandBox(this::executeCommand); // bottom of Ace CS2103/T\n commandBoxPlaceholder.getChildren().add(commandBox.getRoot());\n }", "void createComponent() {\n\t\t//Initialize all components\n\t\tsetLayout(new BorderLayout());\n\t\ttextEditor = new JTextArea();\n\t\terrorTextArea = new JTextArea();\n\t\topenButton = new JButton(\"Open\");\n\t\tsaveButton = new JButton(\"Save\");\n\t\tfindButton = new JButton(\"Find\");\n\t\treplaceButton = new JButton(\"Replace\");\n\t\tcompileButton = new JButton(\"Compile\");\n\t\trunButton = new JButton(\"Run\");\n\t\tfindField = new JTextField();\n\t\treplaceField = new JTextField();\n\t\tfontSizeItems = new Integer[17];\n\t\tfontStyle = new JComboBox<>(fontStyleItems);\n\t\tfinder = new ArrayList<>();\n\t\t\n\t\t//Assigns values to components\n\t\ttextEditor.setTabSize(2);\n\t\tint index = 0;\n\t\tfor(int i=8;i<=40;i+=2) {\n\t\t\tfontSizeItems[index] = i;\n\t\t\tindex++;\n\t\t}\n\t\tfontSize = new JComboBox<>(fontSizeItems);\n\t\tfontSize.setSelectedIndex(2);\n\t\terrorTextArea.setText(\"Error outputs here...\");\n\t\terrorTextArea.setEditable(false);\n\t\terrorTextArea.setFont(new Font(null, 0, 17));\n\t\terrorTextArea.setLineWrap(true);\n\t\terrorTextArea.setWrapStyleWord(true);\n\t\t\n\t\topenButton.setPreferredSize(optionSize);\n\t\tsaveButton.setPreferredSize(optionSize);\n\t\tfindButton.setPreferredSize(optionSize);\n\t\treplaceButton.setPreferredSize(optionSize);\n\t\t\n\t\thighlighter = textEditor.getHighlighter();\n\t\t\n\t\t//Add all components to panels\n\t\tJScrollPane scrollPane = new JScrollPane(textEditor);\n\t\tJPanel navigationPanel = new JPanel(new BorderLayout());\n\t\tJPanel optionsPanel = new JPanel(new GridLayout(2,5,5,5));\n\t\tJPanel executePanel = new JPanel(new GridLayout(2,1));\n\t\tJPanel errorPanel = new JPanel(new BorderLayout());\n\t\t\n\t\toptionsPanel.add(openButton);\n\t\toptionsPanel.add(fontSize);\n\t\toptionsPanel.add(findField);\n\t\toptionsPanel.add(findButton);\n\t\t\n\t\toptionsPanel.add(saveButton);\n\t\toptionsPanel.add(fontStyle);\n\t\toptionsPanel.add(replaceField);\n\t\toptionsPanel.add(replaceButton);\n\t\t\n\t\texecutePanel.add(compileButton);\n\t\texecutePanel.add(runButton);\n\t\t\n\t\terrorPanel.add(errorTextArea);\n\t\t\n\t\tnavigationPanel.add(optionsPanel,BorderLayout.CENTER);\n\t\tnavigationPanel.add(errorPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Add panels to the main frame\n\t\tthis.add(scrollPane,BorderLayout.CENTER);\n\t\tthis.add(navigationPanel, BorderLayout.SOUTH);\n\t\tthis.add(executePanel, BorderLayout.EAST);\n\t}", "private void createWidgets() {\n\n\t\tJPanel filmPanel = createFilmPanel();\n\t\tJPanel musicPanel = createMusicPanel();\n\t\tJPanel unclassPanel = createUnclassifiedPanel();\n\n\t\tthis.add(filmPanel);\n\t\tthis.add(musicPanel);\n\t\tthis.add(unclassPanel);\n\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildInfo_container() {\n\t\tinfo_container = new HorizontalLayout();\n\t\tinfo_container.setImmediate(false);\n\t\tinfo_container.setWidth(\"100.0%\");\n\t\tinfo_container.setHeight(\"-1px\");\n\t\tinfo_container.setMargin(false);\n\t\t\n\t\t// nativeButton_upVote\n\t\tnativeButton_upVote = new NativeButton();\n\t\tnativeButton_upVote.setCaption(\"Up Vote\");\n\t\tnativeButton_upVote.setImmediate(false);\n\t\tnativeButton_upVote.setWidth(\"-1px\");\n\t\tnativeButton_upVote.setHeight(\"-1px\");\n nativeButton_upVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_upVote);\n\t\t\n\t\t// nativeButton_downVote\n\t\tnativeButton_downVote = new NativeButton();\n\t\tnativeButton_downVote.setCaption(\"Down Vote\");\n\t\tnativeButton_downVote.setImmediate(false);\n\t\tnativeButton_downVote.setWidth(\"-1px\");\n\t\tnativeButton_downVote.setHeight(\"-1px\");\n nativeButton_downVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_downVote);\n\n //nativeButton_accept\n nativeButton_accept = new NativeButton();\n nativeButton_accept.setCaption(\"Accept\");\n nativeButton_accept.setVisible(false);\n nativeButton_accept.setStyleName(\"accept-button\");\n info_container.addComponent(nativeButton_accept);\n\n //label_date\n label_date = new Label();\n label_date.setStyleName(\"date-label\");\n label_date.setWidth(\"-1px\");\n label_date.setHeight(\"-1px\");\n info_container.addComponent(label_date);\n info_container.setExpandRatio(label_date, 1.0f);\n info_container.setComponentAlignment(label_date, Alignment.MIDDLE_RIGHT);\n\t\t\n\t\t// label_user\n\t\tlabel_user = new Label();\n\t\tlabel_user.setImmediate(false);\n\t\tlabel_user.setWidth(\"-1px\");\n\t\tlabel_user.setHeight(\"-1px\");\n\t\tlabel_user.setValue(\"By \");\n label_user.setStyleName(\"user-label\");\n\t\tinfo_container.addComponent(label_user);\n//\t\tinfo_container.setExpandRatio(label_user, 1.0f);\n\t\tinfo_container.setComponentAlignment(label_user, new Alignment(34));\n\t\t\n\t\treturn info_container;\n\t}", "private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }", "public void uiBuilder(){\n fontLoader();\n\n jfFrame = new JFrame(String.format(\"Coronos - %s\", username));\n jfFrame.setLayout(new BorderLayout());\n //Instantiate JFrame, add Title, add LayoutManager GridLayout\n\n\n jmMenuBar = new JMenuBar();\n //Instantiate JMenuBar\n\n jmFile = new JMenu(\"File\");\n jmHelp = new JMenu(\"Help\");\n //Adding Menus to JMenuBar\n\n jmExit = new JMenuItem(\"Exit\");\n jmAbout = new JMenuItem(\"About\");\n //Instantiating Options for JMenus\n\n jmExit.addActionListener(this);\n jmAbout.addActionListener(this);\n\n jmFile.add(jmExit);\n jmHelp.add(jmAbout);\n //adding Options to JMenus\n\n jmMenuBar.add(jmFile);\n jmMenuBar.add(jmHelp);\n //adding JMenus to JMenuBar\n\n jfFrame.setJMenuBar(jmMenuBar);\n //adding JMenuBar to JFrame\n\n jpClockPanel = new JPanel(new FlowLayout());\n jpContainerPanel = new JPanel(new FlowLayout());\n Border blackLine = BorderFactory.createTitledBorder(\"Current Time\");\n jpClockPanel.setBorder(blackLine);\n //instantiate JPanel for clock\n\n clockLabelOne = new JLabel();\n clockLabelOne.setFont(customFont);\n clockLabelOne.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelOne);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n clockLabelTwo = new JLabel();\n clockLabelTwo.setFont(customFont);\n clockLabelTwo.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelTwo);\n clockLabelTwo.setVisible(false);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n jpGridPanel1 = new JPanel(new GridLayout(4, 1, 15, 15));\n jpGridPanel2 = new JPanel(new GridLayout(4, 1, 15, 15));\n\n jbPunchIn = new JButton(\"Punch In\");\n jbReport = new JButton(\"View Report\");\n jbProfile = new JButton(\"View Profile\");\n jbSave = new JButton(\"Save\");\n jbPunchOut = new JButton(\"Punch Out\");\n jbViewPunches = new JButton(\"View Punches\");\n jbFormatTime = new JButton(\"12/24HR Time\");\n jbHideChat = new JButton(\"Hide Chat\");\n\n jbHideChat.setToolTipText(\"Hate your co-workers? Want to hide from your boss? Just close chat!\");\n\n jbPunchIn.addActionListener(this);\n jbReport.addActionListener(this);\n jbProfile.addActionListener(this);\n jbSave.addActionListener(this);\n jbPunchOut.addActionListener(this);\n jbViewPunches.addActionListener(this);\n jbFormatTime.addActionListener(this);\n jbHideChat.addActionListener(this);\n\n jpGridPanel1.add(jbPunchIn);\n jpGridPanel1.add(jbReport);\n jpGridPanel1.add(jbProfile);\n jpGridPanel1.add(jbSave);\n\n jpGridPanel2.add(jbPunchOut);\n jpGridPanel2.add(jbViewPunches);\n jpGridPanel2.add(jbFormatTime);\n jpGridPanel2.add(jbHideChat);\n\n jpActionPanel = new JPanel(new FlowLayout());\n Border actionBorder = BorderFactory.createTitledBorder(\"Employee Actions\");\n jpActionPanel.setBorder(actionBorder);\n jpActionPanel.add(jpGridPanel1);\n jpActionPanel.add(jpGridPanel2);\n jpContainerPanel.add(jpActionPanel);\n\n jpChatPanel = new JPanel(new BorderLayout());\n jpAreaPanel = new JPanel(new FlowLayout());\n jtaChatArea = new JTextArea(10, 10);\n jtaChatArea.setLineWrap(true);\n jtaChatArea.setWrapStyleWord(true);\n jtaChatArea.setEditable(false);\n jspChatPane = new JScrollPane(jtaChatArea);\n jtfChatField = new JTextField(12);\n jtfChatField.addActionListener(this);\n jtfChatField.setActionCommand(\"Send\");\n chatButton = new JButton(\"Send\");\n chatButton.addActionListener(this);\n jpSendPanel = new JPanel(new FlowLayout());\n jpSendPanel.add(jtfChatField);\n jpSendPanel.add(chatButton);\n Border chatBorder = BorderFactory.createTitledBorder(\"Chat\");\n jpChatPanel.setBorder(chatBorder);\n jpChatPanel.add(jspChatPane, BorderLayout.NORTH);\n jpChatPanel.add(jpSendPanel, BorderLayout.SOUTH);\n jpContainerPanel.add(jpChatPanel);\n\n // jfFrame.add(clockPanelTwo, BorderLayout.NORTH);\n jfFrame.add(jpClockPanel, BorderLayout.NORTH);\n jfFrame.add(jpContainerPanel, BorderLayout.SOUTH);\n\n //adding JPanels to JFrame\n\n jfFrame.setLocationRelativeTo(null);\n jfFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jfFrame.setVisible(false);\n jfFrame.pack();\n jfFrame.setSize(600, 375);\n jfFrame.setResizable(false);\n \n //settings for frame\n\n ActionListener clockUpdateOne = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerOne = new javax.swing.Timer(0, clockUpdateOne);\n clockTimerOne.start();\n //timer to update clockLabel\n ActionListener clockUpdateTwo = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerTwo = new javax.swing.Timer(0, clockUpdateTwo);\n clockTimerTwo.start();\n\n }", "private void initComponents() {\n\t\tjava.awt.GridBagConstraints gridBagConstraints;\n\n\t\tSqlDateModel fromSqlModel = new SqlDateModel();\n\t\tProperties pFrom = new Properties();\n\t\tpFrom.put(\"text.today\", \"Today\");\n\t\tpFrom.put(\"text.month\", \"Month\");\n\t\tpFrom.put(\"text.year\", \"Year\");\n\t\tJDatePanelImpl fromDatePanel = new JDatePanelImpl(fromSqlModel, pFrom);\n\n\t\t// Don't know about the formatter, but there it is...\n\t\tfromDatePicker = new JDatePickerImpl(fromDatePanel, new DateLabelFormatter());\n\n\t\tSqlDateModel toSqlModel = new SqlDateModel();\n\t\tProperties pTo = new Properties();\n\t\tpTo.put(\"text.today\", \"Today\");\n\t\tpTo.put(\"text.month\", \"Month\");\n\t\tpTo.put(\"text.year\", \"Year\");\n\t\tJDatePanelImpl toDatePanel = new JDatePanelImpl(toSqlModel, pTo);\n\t\ttoDatePicker = new JDatePickerImpl(toDatePanel, new DateLabelFormatter());\n\n\t\t// JCBClient = new JComboBox<>();\n\n\t\tJCBClient = PublicMethods.fillComboClient(\n\t\t\t\t\"Select clientId, firstName, middleName, lastName from clients order by firstName asc, middlename asc, lastname asc\",\n\t\t\t\tthis.cnFoodDataEntry);\n\n\t\tJCBFoodUnit = new JComboBox<>();\n\t\tJCBFoodUnit.setModel(\n\t\t\t\tnew javax.swing.DefaultComboBoxModel<>(energySourceDetail.get(FoodIntake).keySet().toArray()));\n\n\t\tJCBLandfillingFoodWasteUnit = new JComboBox<>();\n\t\tJCBLandfillingFoodWasteUnit.setModel(new javax.swing.DefaultComboBoxModel<>(\n\t\t\t\tenergySourceDetail.get(LandfillingFoodWaste).keySet().toArray()));\n\n\t\tJCBCompostingFoodWasteUnit = new JComboBox<>();\n\t\tJCBCompostingFoodWasteUnit.setModel(\n\t\t\t\tnew javax.swing.DefaultComboBoxModel<>(energySourceDetail.get(CompostingFoodWaste).keySet().toArray()));\n\n\t\tsetLayout(new java.awt.GridBagLayout());\n\n\t\tImageIcon image = new ImageIcon(\"images/foodcalculator.jpg\");\n\t\tJLImage = new JLabel(\"\", image, JLabel.CENTER);\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 0;\n\t\tgridBagConstraints.gridy = 0;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tgridBagConstraints.gridheight = 17;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tadd(JLImage, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 0;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tJLHeader.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 35));\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(JLHeader, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 1;\n\t\tJLSelectClient.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(JLSelectClient, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 2;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1);\n\t\tadd(JCBClient, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 1;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tJLDateRange.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(JLDateRange, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 2;\n\t\tJLFromDate.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLFromDate, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 2;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(fromDatePicker, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 3;\n\t\tJLToDate.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLToDate, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 3;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(toDatePicker, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 6;\n\t\tJLFood.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLFood, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 7;\n\t\tJLLandfillingFoodWaste.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLLandfillingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 8;\n\t\tgridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);\n\t\tJLCompostingFoodWaste.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLCompostingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 6;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(JTFFood, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 7;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(JTFLandfillingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 8;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(JTFCompostingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 5;\n\t\tJLUnit.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tadd(JLUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 6;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 10);\n\t\tadd(JCBFoodUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 7;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 10);\n\t\tadd(JCBLandfillingFoodWasteUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 8;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 10);\n\t\tadd(JCBCompostingFoodWasteUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 14;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tcalculateButton.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tcalculateButton.setBackground(new Color(92, 184, 92));\n\t\tcalculateButton.setForeground(Color.WHITE);\n\t\tcalculateButton.addActionListener(actionListener);\n\t\tcalculateButton.setActionCommand(\"CALCULATE\");\n\t\tadd(calculateButton, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 16;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tJTFResult.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tJTFResult.setEditable(false);\n\t\tadd(JTFResult, gridBagConstraints);\n\n\t\tJPanel jpanel = new JPanel();\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 0;\n\t\tgridBagConstraints.gridy = 0;\n\t\tgridBagConstraints.gridwidth = 1;\n\t\t// gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\t// gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tsaveButton.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tsaveButton.addActionListener(actionListener);\n\t\tsaveButton.setActionCommand(\"SAVE\");\n\t\tjpanel.add(saveButton, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 18;\n\t\tgridBagConstraints.gridwidth = 1;\n\t\t// gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(jpanel, gridBagConstraints);\n\n\t\tsetBackground(Color.WHITE);\n\n\t}", "private void $$$setupUI$$$() {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n targetClassesTextField = new JTextField();\n panel.add(targetClassesTextField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel.add(spacer1, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n targetClassesLabel = new JLabel();\n targetClassesLabel.setText(\"Target classes\");\n panel.add(targetClassesLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n sourceDirTextField = new JTextField();\n panel.add(sourceDirTextField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sourceDirLabel = new JLabel();\n sourceDirLabel.setText(\"Source dir\");\n panel.add(sourceDirLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n reportDirTextField = new JTextField();\n panel.add(reportDirTextField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n reportDirLabel = new JLabel();\n reportDirLabel.setText(\"Report dir\");\n panel.add(reportDirLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n otherParamsTextField = new JTextField();\n panel.add(otherParamsTextField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n otherParamsLabel = new JLabel();\n otherParamsLabel.setText(\"Other params\");\n panel.add(otherParamsLabel, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void buildComponent() {\n\t\tStoreItemCell cell = new StoreItemCell(\"Turret\");\n\t\tcell.initialize(mySize);\n\t\tmyContainer.getChildren().add(cell.getNode());\n\t}", "@AutoGenerated\r\n\tprivate AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"360px\");\r\n\t\tmainLayout.setHeight(\"440px\");\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tsetWidth(\"360px\");\r\n\t\tsetHeight(\"440px\");\r\n\t\t\r\n\t\t// userSelect\r\n\t\tuserSelect = new ListSelect();\r\n\t\tuserSelect.setCaption(\"Select User\");\r\n\t\tuserSelect.setImmediate(false);\r\n\t\tuserSelect.setWidth(\"320px\");\r\n\t\tuserSelect.setHeight(\"326px\");\r\n\t\tmainLayout.addComponent(userSelect, \"top:34.0px;left:20.0px;\");\r\n\t\t\r\n\t\t// submitButton\r\n\t\tsubmitButton = new Button();\r\n\t\tsubmitButton.setCaption(\"OK\");\r\n\t\tsubmitButton.setImmediate(true);\r\n\t\tsubmitButton.setWidth(\"-1px\");\r\n\t\tsubmitButton.setHeight(\"-1px\");\r\n\t\tmainLayout.addComponent(submitButton, \"top:394.0px;left:155.0px;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "public void fillInnerParts() {\n //retrieve the filtered list of module or event.\n listPanel = new ListPanel(logic.getFilteredFocusedList(), this);\n listPanelPlaceholder.getChildren().add(listPanel.getRoot());\n\n resultDisplay = new ResultDisplay();\n resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());\n\n StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getModuloFilePath());\n statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());\n\n rightPanel = new RightPanel(logic.getFocusedDisplayable(), this);\n slideWindowListPlaceholder.getChildren().add(rightPanel.getRoot());\n\n commandBox = new CommandBox(this::executeCommand);\n commandBoxPlaceholder.getChildren().add(commandBox.getRoot());\n\n if (logic.getFilteredFocusedList().size() == 0) {\n moduleButton.getStyleClass().add(\"active\");\n resultDisplay.setFeedbackToUser(\"Use the module command to get started!\");\n } else if (logic.getFilteredFocusedList().get(0) instanceof Event) {\n eventButton.getStyleClass().add(\"active\");\n } else {\n moduleButton.getStyleClass().add(\"active\");\n }\n\n }", "private void initComponents() {\n\n jButtonGroupTools = new javax.swing.ButtonGroup();\n jButtonGroupFill = new javax.swing.ButtonGroup();\n jSeparator2 = new javax.swing.JSeparator();\n jToolBarTools = new javax.swing.JToolBar();\n jButtonNew = new javax.swing.JButton();\n jButtonOpen = new javax.swing.JButton();\n jButtonSave = new javax.swing.JButton();\n jButtonDuplicate = new javax.swing.JButton();\n jSeparator3 = new javax.swing.JToolBar.Separator();\n jToggleButtonPoint = new javax.swing.JToggleButton();\n jToggleButtonLine = new javax.swing.JToggleButton();\n jToggleButtonRectangle = new javax.swing.JToggleButton();\n jToggleButtonRoundRectangle = new javax.swing.JToggleButton();\n jToggleButtonArc = new javax.swing.JButton();\n jToggleButtonCurve = new javax.swing.JToggleButton();\n jToggleButtonPolyline = new javax.swing.JToggleButton();\n jToggleButtonPolygon = new javax.swing.JToggleButton();\n jToggleButtonEllipse = new javax.swing.JToggleButton();\n jToggleButtonMove = new javax.swing.JToggleButton();\n jToggleButtonText = new javax.swing.JToggleButton();\n jSeparator10 = new javax.swing.JToolBar.Separator();\n jButtonFont = new javax.swing.JButton();\n jSeparator4 = new javax.swing.JToolBar.Separator();\n jButtonColorChooserFront = new UI.ColorChooserButton(Color.BLACK);\n jButtonColorChooserBack = new UI.ColorChooserButton(Color.WHITE);\n jSeparator5 = new javax.swing.JToolBar.Separator();\n jPanelStroke = new UI.StrokeChooserComboBox();\n jSpinnerStroke = new javax.swing.JSpinner();\n jSeparator8 = new javax.swing.JToolBar.Separator();\n jToggleButtonNoFill = new javax.swing.JToggleButton();\n jToggleButtonSolidFill = new javax.swing.JToggleButton();\n jToggleButtonHorizontalFill = new javax.swing.JToggleButton();\n jToggleButtonVerticalFill = new javax.swing.JToggleButton();\n jToggleButtonRadialFill = new javax.swing.JToggleButton();\n jToggleButtonDiagonal1Fill = new javax.swing.JToggleButton();\n jToggleButtonDiagonal2Fill = new javax.swing.JToggleButton();\n jSeparator9 = new javax.swing.JToolBar.Separator();\n jToggleButtonAntialiasing = new javax.swing.JToggleButton();\n jSliderAlpha = new javax.swing.JSlider();\n jSeparator6 = new javax.swing.JToolBar.Separator();\n jToggleButtonRecord = new javax.swing.JToggleButton();\n jLabelRecordTime = new javax.swing.JLabel();\n jSeparator7 = new javax.swing.JToolBar.Separator();\n jButtonWebCam = new javax.swing.JButton();\n jButtonSnapShot = new javax.swing.JButton();\n jPanelCenter = new javax.swing.JPanel();\n jSplitPane1 = new javax.swing.JSplitPane();\n desktop = new javax.swing.JDesktopPane();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jListShapes = new javax.swing.JList<String>();\n jPanel2 = new javax.swing.JPanel();\n jButtonMoveUp = new javax.swing.JButton();\n jButtonMoveDown = new javax.swing.JButton();\n jToolBarImage = new javax.swing.JToolBar();\n jPanelImageBrightness = new javax.swing.JPanel();\n jSliderBrightness = new javax.swing.JSlider();\n jPanelImageFilter = new javax.swing.JPanel();\n jComboBoxFilter = new javax.swing.JComboBox<String>();\n jPanelImageContrast = new javax.swing.JPanel();\n jButtonConstrast = new javax.swing.JButton();\n jButtonConstrastBright = new javax.swing.JButton();\n jButtonContrastDark = new javax.swing.JButton();\n jPanelImageOperations = new javax.swing.JPanel();\n jButtonSinus = new javax.swing.JButton();\n jButtonSepia = new javax.swing.JButton();\n jButtonSobel = new javax.swing.JButton();\n jButtonTinted = new javax.swing.JButton();\n jButtonNegative = new javax.swing.JButton();\n jButtonGrayScale = new javax.swing.JButton();\n jButtonRandomBlack = new javax.swing.JButton();\n jPanelImageBinary = new javax.swing.JPanel();\n jButtonBinaryAdd = new javax.swing.JButton();\n jButtonBinarySubstract = new javax.swing.JButton();\n jButtonBinaryProduct = new javax.swing.JButton();\n jSliderBinaryOperations = new javax.swing.JSlider();\n jPanelUmbralization = new javax.swing.JPanel();\n jSliderUmbralization = new javax.swing.JSlider();\n jPanelStatusBar = new javax.swing.JPanel();\n jToolBarImageRotation = new javax.swing.JToolBar();\n jPanelImageRotate = new javax.swing.JPanel();\n jSliderRotate = new javax.swing.JSlider();\n jButtonRotate90 = new javax.swing.JButton();\n jButton180 = new javax.swing.JButton();\n jButtonRotate270 = new javax.swing.JButton();\n jPanelZoom = new javax.swing.JPanel();\n jButtonZoomMinus = new javax.swing.JButton();\n jButtonZoomPlus = new javax.swing.JButton();\n jStatusBarTool = new javax.swing.JLabel();\n jPanelCursorAndColor = new javax.swing.JPanel();\n jStatusBarCursor = new javax.swing.JLabel();\n jStatusBarColor = new javax.swing.JLabel();\n jMenuBar = new javax.swing.JMenuBar();\n jMenuFile = new javax.swing.JMenu();\n jMenuItemNew = new javax.swing.JMenuItem();\n jMenuOpen = new javax.swing.JMenuItem();\n jMenuSave = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n jMenuItemExit = new javax.swing.JMenuItem();\n jMenuEdit = new javax.swing.JMenu();\n jMenuItemCut = new javax.swing.JMenuItem();\n jMenuItemCopy = new javax.swing.JMenuItem();\n jMenuItemPaste = new javax.swing.JMenuItem();\n jMenuView = new javax.swing.JMenu();\n jCheckBoxMenuItemToolBar = new javax.swing.JCheckBoxMenuItem();\n jCheckBoxMenuItemToolBarImageOperations = new javax.swing.JCheckBoxMenuItem();\n jCheckBoxMenuItemToolBarImageRotation = new javax.swing.JCheckBoxMenuItem();\n jCheckBoxMenuItemStatusBar = new javax.swing.JCheckBoxMenuItem();\n jMenuImage = new javax.swing.JMenu();\n jMenuItemChangeSize = new javax.swing.JMenuItem();\n jMenuItemDuplicateImage = new javax.swing.JMenuItem();\n jMenuItemHistogram = new javax.swing.JMenuItem();\n jMenuHelp = new javax.swing.JMenu();\n jMenuItemHelpAbout = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(600, 500));\n\n jToolBarTools.setRollover(true);\n\n jButtonNew.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_new.png\"))); // NOI18N\n jButtonNew.setToolTipText(\"Nueva imagen\");\n jButtonNew.setFocusable(false);\n jButtonNew.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonNew.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonNew.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonNewActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonNew);\n\n jButtonOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_open.png\"))); // NOI18N\n jButtonOpen.setToolTipText(\"Abrir\");\n jButtonOpen.setFocusable(false);\n jButtonOpen.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonOpen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonOpen.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonOpenActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonOpen);\n\n jButtonSave.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_save.png\"))); // NOI18N\n jButtonSave.setToolTipText(\"Guardar\");\n jButtonSave.setFocusable(false);\n jButtonSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSaveActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonSave);\n\n jButtonDuplicate.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_duplicate.png\"))); // NOI18N\n jButtonDuplicate.setToolTipText(\"Duplicar\");\n jButtonDuplicate.setFocusable(false);\n jButtonDuplicate.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonDuplicate.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonDuplicate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonDuplicateActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonDuplicate);\n jToolBarTools.add(jSeparator3);\n\n jButtonGroupTools.add(jToggleButtonPoint);\n jToggleButtonPoint.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_pencil.png\"))); // NOI18N\n jToggleButtonPoint.setSelected(true);\n jToggleButtonPoint.setToolTipText(\"Punto\");\n jToggleButtonPoint.setFocusable(false);\n jToggleButtonPoint.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonPoint.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonPoint.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonPointActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonPoint);\n\n jButtonGroupTools.add(jToggleButtonLine);\n jToggleButtonLine.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_line.png\"))); // NOI18N\n jToggleButtonLine.setToolTipText(\"Linea\");\n jToggleButtonLine.setFocusable(false);\n jToggleButtonLine.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonLine.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonLine.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonLineActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonLine);\n\n jButtonGroupTools.add(jToggleButtonRectangle);\n jToggleButtonRectangle.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_rectangle.png\"))); // NOI18N\n jToggleButtonRectangle.setToolTipText(\"Rectangulo\");\n jToggleButtonRectangle.setFocusable(false);\n jToggleButtonRectangle.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonRectangle.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonRectangle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonRectangleActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonRectangle);\n\n jButtonGroupTools.add(jToggleButtonRoundRectangle);\n jToggleButtonRoundRectangle.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_roundrectangle.png\"))); // NOI18N\n jToggleButtonRoundRectangle.setToolTipText(\"Rectangulo redondeado\");\n jToggleButtonRoundRectangle.setFocusable(false);\n jToggleButtonRoundRectangle.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonRoundRectangle.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonRoundRectangle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonRoundRectangleActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonRoundRectangle);\n\n jToggleButtonArc.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_arc.png\"))); // NOI18N\n jToggleButtonArc.setToolTipText(\"Arco\");\n jButtonGroupTools.add(jToggleButtonArc);\n jToggleButtonArc.setFocusable(false);\n jToggleButtonArc.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonArc.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonArc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonArcActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonArc);\n\n jButtonGroupTools.add(jToggleButtonCurve);\n jToggleButtonCurve.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_curve.png\"))); // NOI18N\n jToggleButtonCurve.setToolTipText(\"Curva\");\n jToggleButtonCurve.setFocusable(false);\n jToggleButtonCurve.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonCurve.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonCurve.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonCurveActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonCurve);\n\n jButtonGroupTools.add(jToggleButtonPolyline);\n jToggleButtonPolyline.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_polygon.png\"))); // NOI18N\n jToggleButtonPolyline.setToolTipText(\"Polilínea\");\n jToggleButtonPolyline.setFocusable(false);\n jToggleButtonPolyline.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonPolyline.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonPolyline.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonPolylineActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonPolyline);\n\n jButtonGroupTools.add(jToggleButtonPolygon);\n jToggleButtonPolygon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_polygon.png\"))); // NOI18N\n jToggleButtonPolygon.setToolTipText(\"Poligono\");\n jToggleButtonPolygon.setFocusable(false);\n jToggleButtonPolygon.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonPolygon.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonPolygon.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonPolygonActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonPolygon);\n\n jButtonGroupTools.add(jToggleButtonEllipse);\n jToggleButtonEllipse.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_ellipse.png\"))); // NOI18N\n jToggleButtonEllipse.setToolTipText(\"Elipse\");\n jToggleButtonEllipse.setFocusable(false);\n jToggleButtonEllipse.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonEllipse.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonEllipse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonEllipseActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonEllipse);\n\n jButtonGroupTools.add(jToggleButtonMove);\n jToggleButtonMove.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_move.png\"))); // NOI18N\n jToggleButtonMove.setToolTipText(\"Mover\");\n jToggleButtonMove.setFocusable(false);\n jToggleButtonMove.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonMove.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonMove.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonMoveActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonMove);\n\n jButtonGroupTools.add(jToggleButtonText);\n jToggleButtonText.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_text.png\"))); // NOI18N\n jToggleButtonText.setToolTipText(\"Texto\");\n jToggleButtonText.setFocusable(false);\n jToggleButtonText.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonText.setPreferredSize(new java.awt.Dimension(24, 24));\n jToggleButtonText.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonTextActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonText);\n jToolBarTools.add(jSeparator10);\n\n jButtonFont.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_font.png\"))); // NOI18N\n jButtonFont.setToolTipText(\"Fuente\");\n jButtonFont.setFocusable(false);\n jButtonFont.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonFont.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonFont.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonFont.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonFontActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonFont);\n jToolBarTools.add(jSeparator4);\n\n jButtonColorChooserFront.setToolTipText(\"Color de borde\");\n jButtonColorChooserFront.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButtonColorChooserFront.setBorderPainted(false);\n jButtonColorChooserFront.setFocusable(false);\n jButtonColorChooserFront.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonColorChooserFront.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBarTools.add(jButtonColorChooserFront);\n\n jButtonColorChooserBack.setForeground(new java.awt.Color(255, 255, 255));\n jButtonColorChooserBack.setToolTipText(\"Color de fondo\");\n jButtonColorChooserBack.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButtonColorChooserBack.setBorderPainted(false);\n jButtonColorChooserBack.setFocusable(false);\n jButtonColorChooserBack.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonColorChooserBack.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBarTools.add(jButtonColorChooserBack);\n jToolBarTools.add(jSeparator5);\n jToolBarTools.add(jPanelStroke);\n\n jSpinnerStroke.setModel(new javax.swing.SpinnerNumberModel(1, 1, 20, 1));\n jSpinnerStroke.setToolTipText(\"Grosor de linea\");\n jSpinnerStroke.setEditor(new javax.swing.JSpinner.NumberEditor(jSpinnerStroke, \"\"));\n jSpinnerStroke.setFocusable(false);\n jSpinnerStroke.setValue(1);\n jSpinnerStroke.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jSpinnerStrokeStateChanged(evt);\n }\n });\n jToolBarTools.add(jSpinnerStroke);\n jToolBarTools.add(jSeparator8);\n\n jButtonGroupFill.add(jToggleButtonNoFill);\n jToggleButtonNoFill.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_fillno.png\"))); // NOI18N\n jToggleButtonNoFill.setSelected(true);\n jToggleButtonNoFill.setToolTipText(\"Sin relleno\");\n jToggleButtonNoFill.setFocusable(false);\n jToggleButtonNoFill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonNoFill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonNoFill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonNoFillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonNoFill);\n\n jButtonGroupFill.add(jToggleButtonSolidFill);\n jToggleButtonSolidFill.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_fill.png\"))); // NOI18N\n jToggleButtonSolidFill.setToolTipText(\"Relleno sólido\");\n jToggleButtonSolidFill.setFocusable(false);\n jToggleButtonSolidFill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonSolidFill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonSolidFill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonSolidFillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonSolidFill);\n\n jButtonGroupFill.add(jToggleButtonHorizontalFill);\n jToggleButtonHorizontalFill.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_fill_horizontal.png\"))); // NOI18N\n jToggleButtonHorizontalFill.setToolTipText(\"Degradado horizontal\");\n jToggleButtonHorizontalFill.setFocusable(false);\n jToggleButtonHorizontalFill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonHorizontalFill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonHorizontalFill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonHorizontalFillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonHorizontalFill);\n\n jButtonGroupFill.add(jToggleButtonVerticalFill);\n jToggleButtonVerticalFill.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_fill_vertical.png\"))); // NOI18N\n jToggleButtonVerticalFill.setToolTipText(\"Degradado horizontal\");\n jToggleButtonVerticalFill.setFocusable(false);\n jToggleButtonVerticalFill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonVerticalFill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonVerticalFill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonVerticalFillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonVerticalFill);\n\n jButtonGroupFill.add(jToggleButtonRadialFill);\n jToggleButtonRadialFill.setText(\"R\");\n jToggleButtonRadialFill.setToolTipText(\"Degradado Radial\");\n jToggleButtonRadialFill.setFocusable(false);\n jToggleButtonRadialFill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonRadialFill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonRadialFill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonRadialFillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonRadialFill);\n\n jButtonGroupFill.add(jToggleButtonDiagonal1Fill);\n jToggleButtonDiagonal1Fill.setText(\"D1\");\n jToggleButtonDiagonal1Fill.setFocusable(false);\n jToggleButtonDiagonal1Fill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonDiagonal1Fill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonDiagonal1Fill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonDiagonal1FillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonDiagonal1Fill);\n\n jButtonGroupFill.add(jToggleButtonDiagonal2Fill);\n jToggleButtonDiagonal2Fill.setText(\"D2\");\n jToggleButtonDiagonal2Fill.setFocusable(false);\n jToggleButtonDiagonal2Fill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonDiagonal2Fill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonDiagonal2Fill.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonDiagonal2FillActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonDiagonal2Fill);\n jToolBarTools.add(jSeparator9);\n\n jToggleButtonAntialiasing.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_antialiasing.png\"))); // NOI18N\n jToggleButtonAntialiasing.setToolTipText(\"Suavizado\");\n jToggleButtonAntialiasing.setFocusable(false);\n jToggleButtonAntialiasing.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonAntialiasing.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonAntialiasing.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonAntialiasingActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonAntialiasing);\n\n jSliderAlpha.setPaintTicks(true);\n jSliderAlpha.setToolTipText(\"Transparencia\");\n jSliderAlpha.setValue(100);\n jSliderAlpha.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jSliderAlphaStateChanged(evt);\n }\n });\n jToolBarTools.add(jSliderAlpha);\n jToolBarTools.add(jSeparator6);\n\n jToggleButtonRecord.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_record.png\"))); // NOI18N\n jToggleButtonRecord.setToolTipText(\"Grabar\");\n jToggleButtonRecord.setFocusable(false);\n jToggleButtonRecord.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButtonRecord.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToggleButtonRecord.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonRecordActionPerformed(evt);\n }\n });\n jToolBarTools.add(jToggleButtonRecord);\n\n jLabelRecordTime.setText(\"00:00\");\n jToolBarTools.add(jLabelRecordTime);\n jToolBarTools.add(jSeparator7);\n\n jButtonWebCam.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_webcam.png\"))); // NOI18N\n jButtonWebCam.setToolTipText(\"Abrir webcam\");\n jButtonWebCam.setFocusable(false);\n jButtonWebCam.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonWebCam.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonWebCam.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonWebCamActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonWebCam);\n\n jButtonSnapShot.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_snapshot.png\"))); // NOI18N\n jButtonSnapShot.setToolTipText(\"Tomar captura\");\n jButtonSnapShot.setFocusable(false);\n jButtonSnapShot.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonSnapShot.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonSnapShot.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSnapShotActionPerformed(evt);\n }\n });\n jToolBarTools.add(jButtonSnapShot);\n\n getContentPane().add(jToolBarTools, java.awt.BorderLayout.PAGE_START);\n\n jPanelCenter.setLayout(new java.awt.BorderLayout());\n\n desktop.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n desktopMouseMoved(evt);\n }\n });\n desktop.addVetoableChangeListener(new java.beans.VetoableChangeListener() {\n public void vetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {\n desktopVetoableChange(evt);\n }\n });\n\n javax.swing.GroupLayout desktopLayout = new javax.swing.GroupLayout(desktop);\n desktop.setLayout(desktopLayout);\n desktopLayout.setHorizontalGroup(\n desktopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n desktopLayout.setVerticalGroup(\n desktopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n jSplitPane1.setLeftComponent(desktop);\n\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n jListShapes.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n jListShapes.setEnabled(false);\n jListShapes.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n jListShapesValueChanged(evt);\n }\n });\n jScrollPane2.setViewportView(jListShapes);\n\n jPanel1.add(jScrollPane2, java.awt.BorderLayout.CENTER);\n\n jPanel2.setLayout(new java.awt.GridLayout(1, 0));\n\n jButtonMoveUp.setText(\"Hacia delante\");\n jButtonMoveUp.setToolTipText(\"Mover Arriba\");\n jButtonMoveUp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonMoveUpActionPerformed(evt);\n }\n });\n jPanel2.add(jButtonMoveUp);\n\n jButtonMoveDown.setText(\"Hacia el fondo\");\n jButtonMoveDown.setToolTipText(\"Mover Abajo\");\n jButtonMoveDown.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonMoveDownActionPerformed(evt);\n }\n });\n jPanel2.add(jButtonMoveDown);\n\n jPanel1.add(jPanel2, java.awt.BorderLayout.PAGE_START);\n\n jSplitPane1.setRightComponent(jPanel1);\n\n jPanelCenter.add(jSplitPane1, java.awt.BorderLayout.CENTER);\n\n jToolBarImage.setRollover(true);\n jToolBarImage.setMinimumSize(new java.awt.Dimension(544, 90));\n jToolBarImage.setPreferredSize(new java.awt.Dimension(722, 80));\n\n jPanelImageBrightness.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Brillo\"));\n jPanelImageBrightness.setDoubleBuffered(false);\n jPanelImageBrightness.setEnabled(false);\n jPanelImageBrightness.setLayout(new java.awt.GridLayout(1, 0));\n\n jSliderBrightness.setMaximum(255);\n jSliderBrightness.setMinimum(-255);\n jSliderBrightness.setValue(0);\n jSliderBrightness.setPreferredSize(new java.awt.Dimension(70, 29));\n jSliderBrightness.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jSliderBrightnessStateChanged(evt);\n }\n });\n jSliderBrightness.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jSliderBrightnessFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jSliderBrightnessFocusLost(evt);\n }\n });\n jPanelImageBrightness.add(jSliderBrightness);\n\n jToolBarImage.add(jPanelImageBrightness);\n\n jPanelImageFilter.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Filtro\"));\n jPanelImageFilter.setDoubleBuffered(false);\n jPanelImageFilter.setEnabled(false);\n jPanelImageFilter.setMinimumSize(new java.awt.Dimension(108, 70));\n jPanelImageFilter.setLayout(new java.awt.GridLayout(1, 0));\n\n jComboBoxFilter.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"--seleccione filtro--\", \"Emborronamiento media\", \"Emborronamiento binomial\", \"Enfoque\", \"Relieve\", \"Detector de fronteras laplaciano\" }));\n jComboBoxFilter.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBoxFilterItemStateChanged(evt);\n }\n });\n jComboBoxFilter.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jComboBoxFilterFocusGained(evt);\n }\n });\n jComboBoxFilter.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxFilterActionPerformed(evt);\n }\n });\n jPanelImageFilter.add(jComboBoxFilter);\n\n jToolBarImage.add(jPanelImageFilter);\n\n jPanelImageContrast.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Constraste\"));\n jPanelImageContrast.setDoubleBuffered(false);\n jPanelImageContrast.setEnabled(false);\n jPanelImageContrast.setMinimumSize(new java.awt.Dimension(96, 70));\n jPanelImageContrast.setLayout(new java.awt.GridLayout(1, 3));\n\n jButtonConstrast.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_contrast.png\"))); // NOI18N\n jButtonConstrast.setToolTipText(\"Constraste\");\n jButtonConstrast.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonConstrastActionPerformed(evt);\n }\n });\n jPanelImageContrast.add(jButtonConstrast);\n\n jButtonConstrastBright.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_bright.png\"))); // NOI18N\n jButtonConstrastBright.setToolTipText(\"Brillante\");\n jButtonConstrastBright.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonConstrastBrightActionPerformed(evt);\n }\n });\n jPanelImageContrast.add(jButtonConstrastBright);\n\n jButtonContrastDark.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_dark.png\"))); // NOI18N\n jButtonContrastDark.setToolTipText(\"Oscuro\");\n jButtonContrastDark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonContrastDarkActionPerformed(evt);\n }\n });\n jPanelImageContrast.add(jButtonContrastDark);\n\n jToolBarImage.add(jPanelImageContrast);\n\n jPanelImageOperations.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Operaciones\"));\n jPanelImageOperations.setDoubleBuffered(false);\n jPanelImageOperations.setEnabled(false);\n jPanelImageOperations.setPreferredSize(new java.awt.Dimension(158, 64));\n jPanelImageOperations.setLayout(new java.awt.GridLayout(1, 3));\n\n jButtonSinus.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_sinusoidal.png\"))); // NOI18N\n jButtonSinus.setToolTipText(\"Seno\");\n jButtonSinus.setAlignmentX(10.0F);\n jButtonSinus.setAlignmentY(0.0F);\n jButtonSinus.setBorderPainted(false);\n jButtonSinus.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonSinus.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSinusActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonSinus);\n\n jButtonSepia.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_sepia_1.png\"))); // NOI18N\n jButtonSepia.setToolTipText(\"Sepia\");\n jButtonSepia.setAlignmentY(0.0F);\n jButtonSepia.setBorderPainted(false);\n jButtonSepia.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonSepia.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSepiaActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonSepia);\n\n jButtonSobel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_gradient.png\"))); // NOI18N\n jButtonSobel.setToolTipText(\"Gradiente Sobel\");\n jButtonSobel.setAlignmentY(0.0F);\n jButtonSobel.setBorderPainted(false);\n jButtonSobel.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonSobel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSobelActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonSobel);\n\n jButtonTinted.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_tinted.png\"))); // NOI18N\n jButtonTinted.setToolTipText(\"Tintado\");\n jButtonTinted.setAlignmentY(0.0F);\n jButtonTinted.setBorderPainted(false);\n jButtonTinted.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonTinted.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonTintedActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonTinted);\n\n jButtonNegative.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_negative.png\"))); // NOI18N\n jButtonNegative.setToolTipText(\"Negativo\");\n jButtonNegative.setAlignmentY(0.0F);\n jButtonNegative.setBorderPainted(false);\n jButtonNegative.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonNegative.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonNegativeActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonNegative);\n\n jButtonGrayScale.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_gray.png\"))); // NOI18N\n jButtonGrayScale.setToolTipText(\"Escala de grises\");\n jButtonGrayScale.setAlignmentY(0.0F);\n jButtonGrayScale.setBorderPainted(false);\n jButtonGrayScale.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonGrayScale.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonGrayScaleActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonGrayScale);\n\n jButtonRandomBlack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_sepia.png\"))); // NOI18N\n jButtonRandomBlack.setToolTipText(\"Propia\");\n jButtonRandomBlack.setAlignmentY(0.0F);\n jButtonRandomBlack.setBorderPainted(false);\n jButtonRandomBlack.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonRandomBlack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRandomBlackActionPerformed(evt);\n }\n });\n jPanelImageOperations.add(jButtonRandomBlack);\n\n jToolBarImage.add(jPanelImageOperations);\n\n jPanelImageBinary.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Binarias\"));\n jPanelImageBinary.setDoubleBuffered(false);\n jPanelImageBinary.setEnabled(false);\n java.awt.GridBagLayout jPanelImageBinaryLayout = new java.awt.GridBagLayout();\n jPanelImageBinaryLayout.columnWidths = new int[] {10, 10, 10};\n jPanelImageBinaryLayout.rowHeights = new int[] {1};\n jPanelImageBinary.setLayout(jPanelImageBinaryLayout);\n\n jButtonBinaryAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_add.png\"))); // NOI18N\n jButtonBinaryAdd.setToolTipText(\"suma binaria\");\n jButtonBinaryAdd.setMaximumSize(new java.awt.Dimension(20, 28));\n jButtonBinaryAdd.setMinimumSize(new java.awt.Dimension(24, 24));\n jButtonBinaryAdd.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonBinaryAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonBinaryAddActionPerformed(evt);\n }\n });\n jPanelImageBinary.add(jButtonBinaryAdd, new java.awt.GridBagConstraints());\n\n jButtonBinarySubstract.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_substract.png\"))); // NOI18N\n jButtonBinarySubstract.setToolTipText(\"resta binaria\");\n jButtonBinarySubstract.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonBinarySubstract.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonBinarySubstractActionPerformed(evt);\n }\n });\n jPanelImageBinary.add(jButtonBinarySubstract, new java.awt.GridBagConstraints());\n\n jButtonBinaryProduct.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_product.png\"))); // NOI18N\n jButtonBinaryProduct.setToolTipText(\"multiplicacion binaria\");\n jButtonBinaryProduct.setMargin(new java.awt.Insets(0, 0, 0, 0));\n jButtonBinaryProduct.setMaximumSize(new java.awt.Dimension(20, 28));\n jButtonBinaryProduct.setMinimumSize(new java.awt.Dimension(24, 24));\n jButtonBinaryProduct.setPreferredSize(new java.awt.Dimension(24, 24));\n jButtonBinaryProduct.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonBinaryProductActionPerformed(evt);\n }\n });\n jPanelImageBinary.add(jButtonBinaryProduct, new java.awt.GridBagConstraints());\n\n jSliderBinaryOperations.setPreferredSize(new java.awt.Dimension(150, 29));\n jSliderBinaryOperations.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jSliderBinaryOperationsStateChanged(evt);\n }\n });\n jSliderBinaryOperations.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jSliderBinaryOperationsFocusGained(evt);\n }\n });\n jSliderBinaryOperations.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jSliderBinaryOperationsMouseExited(evt);\n }\n });\n jPanelImageBinary.add(jSliderBinaryOperations, new java.awt.GridBagConstraints());\n\n jToolBarImage.add(jPanelImageBinary);\n\n jPanelUmbralization.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Umbralizacion\"));\n jPanelUmbralization.setDoubleBuffered(false);\n jPanelUmbralization.setEnabled(false);\n jPanelUmbralization.setLayout(new java.awt.GridLayout(1, 0));\n\n jSliderUmbralization.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jSliderUmbralizationStateChanged(evt);\n }\n });\n jSliderUmbralization.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jSliderUmbralizationFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jSliderUmbralizationFocusLost(evt);\n }\n });\n jPanelUmbralization.add(jSliderUmbralization);\n\n jToolBarImage.add(jPanelUmbralization);\n\n jPanelCenter.add(jToolBarImage, java.awt.BorderLayout.PAGE_END);\n\n getContentPane().add(jPanelCenter, java.awt.BorderLayout.CENTER);\n\n jPanelStatusBar.setLayout(new java.awt.BorderLayout());\n\n jToolBarImageRotation.setRollover(true);\n\n jPanelImageRotate.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Rotación\"));\n jPanelImageRotate.setPreferredSize(new java.awt.Dimension(300, 62));\n jPanelImageRotate.setLayout(new java.awt.GridLayout(1, 4));\n\n jSliderRotate.setMaximum(360);\n jSliderRotate.setMinorTickSpacing(90);\n jSliderRotate.setPaintTicks(true);\n jSliderRotate.setValue(0);\n jSliderRotate.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jSliderRotateStateChanged(evt);\n }\n });\n jSliderRotate.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jSliderRotateFocusGained(evt);\n }\n });\n jPanelImageRotate.add(jSliderRotate);\n\n jButtonRotate90.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_rotate_90.png\"))); // NOI18N\n jButtonRotate90.setToolTipText(\"90 Grados\");\n jButtonRotate90.setFocusable(false);\n jButtonRotate90.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonRotate90.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonRotate90.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRotate90ActionPerformed(evt);\n }\n });\n jPanelImageRotate.add(jButtonRotate90);\n\n jButton180.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_rotate_180.png\"))); // NOI18N\n jButton180.setToolTipText(\"180 Grados\");\n jButton180.setFocusable(false);\n jButton180.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton180.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton180.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton180ActionPerformed(evt);\n }\n });\n jPanelImageRotate.add(jButton180);\n\n jButtonRotate270.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_rotate_270.png\"))); // NOI18N\n jButtonRotate270.setToolTipText(\"270 Grados\");\n jButtonRotate270.setFocusable(false);\n jButtonRotate270.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonRotate270.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonRotate270.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRotate270ActionPerformed(evt);\n }\n });\n jPanelImageRotate.add(jButtonRotate270);\n\n jToolBarImageRotation.add(jPanelImageRotate);\n\n jPanelZoom.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Escala\"));\n jPanelZoom.setLayout(new java.awt.GridLayout(1, 0));\n\n jButtonZoomMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_zoom_minus.png\"))); // NOI18N\n jButtonZoomMinus.setToolTipText(\"Reducir\");\n jButtonZoomMinus.setFocusable(false);\n jButtonZoomMinus.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonZoomMinus.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonZoomMinus.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonZoomMinusActionPerformed(evt);\n }\n });\n jPanelZoom.add(jButtonZoomMinus);\n\n jButtonZoomPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_zoom_plus.png\"))); // NOI18N\n jButtonZoomPlus.setToolTipText(\"Ampliar\");\n jButtonZoomPlus.setFocusable(false);\n jButtonZoomPlus.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonZoomPlus.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonZoomPlus.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonZoomPlusActionPerformed(evt);\n }\n });\n jPanelZoom.add(jButtonZoomPlus);\n\n jToolBarImageRotation.add(jPanelZoom);\n\n jPanelStatusBar.add(jToolBarImageRotation, java.awt.BorderLayout.NORTH);\n\n jStatusBarTool.setText(\"Barra Estado\");\n jStatusBarTool.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanelStatusBar.add(jStatusBarTool, java.awt.BorderLayout.WEST);\n\n jPanelCursorAndColor.setLayout(new java.awt.BorderLayout());\n\n jStatusBarCursor.setText(\"(x,y)\");\n jStatusBarCursor.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanelCursorAndColor.add(jStatusBarCursor, java.awt.BorderLayout.WEST);\n\n jStatusBarColor.setText(\"RGB\");\n jStatusBarColor.setOpaque(true);\n jPanelCursorAndColor.add(jStatusBarColor, java.awt.BorderLayout.EAST);\n\n jPanelStatusBar.add(jPanelCursorAndColor, java.awt.BorderLayout.EAST);\n\n getContentPane().add(jPanelStatusBar, java.awt.BorderLayout.SOUTH);\n\n jMenuFile.setText(\"Archivo\");\n\n jMenuItemNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.META_MASK));\n jMenuItemNew.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_new.png\"))); // NOI18N\n jMenuItemNew.setText(\"Nuevo\");\n jMenuItemNew.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemNewActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuItemNew);\n\n jMenuOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_open.png\"))); // NOI18N\n jMenuOpen.setText(\"Abrir\");\n jMenuOpen.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuOpenActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuOpen);\n\n jMenuSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.META_MASK));\n jMenuSave.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_save.png\"))); // NOI18N\n jMenuSave.setText(\"Guardar\");\n jMenuSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuSaveActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuSave);\n jMenuFile.add(jSeparator1);\n\n jMenuItemExit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_exit.png\"))); // NOI18N\n jMenuItemExit.setText(\"Salir\");\n jMenuItemExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemExitActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuItemExit);\n\n jMenuBar.add(jMenuFile);\n\n jMenuEdit.setText(\"Editar\");\n\n jMenuItemCut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.META_MASK));\n jMenuItemCut.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_cut.png\"))); // NOI18N\n jMenuItemCut.setText(\"Cortar\");\n jMenuItemCut.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemCutActionPerformed(evt);\n }\n });\n jMenuEdit.add(jMenuItemCut);\n\n jMenuItemCopy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.META_MASK));\n jMenuItemCopy.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_copy.png\"))); // NOI18N\n jMenuItemCopy.setText(\"Copiar\");\n jMenuItemCopy.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemCopyActionPerformed(evt);\n }\n });\n jMenuEdit.add(jMenuItemCopy);\n\n jMenuItemPaste.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.META_MASK));\n jMenuItemPaste.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_paste.png\"))); // NOI18N\n jMenuItemPaste.setText(\"Pegar\");\n jMenuItemPaste.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemPasteActionPerformed(evt);\n }\n });\n jMenuEdit.add(jMenuItemPaste);\n\n jMenuBar.add(jMenuEdit);\n\n jMenuView.setText(\"Ver\");\n\n jCheckBoxMenuItemToolBar.setSelected(true);\n jCheckBoxMenuItemToolBar.setText(\"Barra de herramientas\");\n jCheckBoxMenuItemToolBar.setToolTipText(\"\");\n jCheckBoxMenuItemToolBar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxMenuItemToolBarActionPerformed(evt);\n }\n });\n jMenuView.add(jCheckBoxMenuItemToolBar);\n\n jCheckBoxMenuItemToolBarImageOperations.setSelected(true);\n jCheckBoxMenuItemToolBarImageOperations.setText(\"Barra de imagen\");\n jCheckBoxMenuItemToolBarImageOperations.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxMenuItemToolBarImageOperationsActionPerformed(evt);\n }\n });\n jMenuView.add(jCheckBoxMenuItemToolBarImageOperations);\n\n jCheckBoxMenuItemToolBarImageRotation.setSelected(true);\n jCheckBoxMenuItemToolBarImageRotation.setText(\"Barra de rotacion y escalado\");\n jCheckBoxMenuItemToolBarImageRotation.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxMenuItemToolBarImageRotationActionPerformed(evt);\n }\n });\n jMenuView.add(jCheckBoxMenuItemToolBarImageRotation);\n\n jCheckBoxMenuItemStatusBar.setSelected(true);\n jCheckBoxMenuItemStatusBar.setText(\"Barra de estado\");\n jCheckBoxMenuItemStatusBar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxMenuItemStatusBarActionPerformed(evt);\n }\n });\n jMenuView.add(jCheckBoxMenuItemStatusBar);\n\n jMenuBar.add(jMenuView);\n\n jMenuImage.setText(\"Imagen\");\n\n jMenuItemChangeSize.setText(\"Cambiar tamaño\");\n jMenuItemChangeSize.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemChangeSizeActionPerformed(evt);\n }\n });\n jMenuImage.add(jMenuItemChangeSize);\n\n jMenuItemDuplicateImage.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_duplicate.png\"))); // NOI18N\n jMenuItemDuplicateImage.setText(\"Duplicar imagen\");\n jMenuItemDuplicateImage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemDuplicateImageActionPerformed(evt);\n }\n });\n jMenuImage.add(jMenuItemDuplicateImage);\n\n jMenuItemHistogram.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sm/images/icon_histogram.png\"))); // NOI18N\n jMenuItemHistogram.setText(\"Histograma\");\n jMenuItemHistogram.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemHistogramActionPerformed(evt);\n }\n });\n jMenuImage.add(jMenuItemHistogram);\n\n jMenuBar.add(jMenuImage);\n\n jMenuHelp.setText(\"Ayuda\");\n\n jMenuItemHelpAbout.setText(\"Acerca de...\");\n jMenuItemHelpAbout.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemHelpAboutActionPerformed(evt);\n }\n });\n jMenuHelp.add(jMenuItemHelpAbout);\n\n jMenuBar.add(jMenuHelp);\n\n setJMenuBar(jMenuBar);\n\n pack();\n }", "private void buildUserInterface() {\n\t\t// Create layout manager\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tlayout.horizontalSpacing = 6;\n\t\tlayout.verticalSpacing = 6;\n\t\t\n\t\t// Layout data for the text input fields\n\t\tGridData gridData = new GridData();\n\t\tgridData.horizontalAlignment = SWT.FILL;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\n\t\t// Create composite\n\t\tComposite login = new Composite(shell, SWT.NONE);\n\t\tlogin.setLayout(layout);\n\n\t\t// Add name label\n\t\tLabel nameLabel = new Label(login, SWT.NONE);\n\t\tnameLabel.setText(\"Dein Name: \");\n\n\t\t// Add name input\n\t\tname = new Text(login, SWT.SINGLE | SWT.BORDER);\n\t\tname.setText(\"test \" + (int)(Math.random() * 30));\n\t\tname.selectAll();\n\t\tname.setLayoutData(gridData);\n\n\t\t// Add server label\n\t\tLabel serverLabel = new Label(login, SWT.NONE);\n\t\tserverLabel.setText(\"Server: \");\n\n\t\t// Add server input\n\t\tserver = new Text(login, SWT.SINGLE | SWT.BORDER);\n\t\tserver.setText(\"localhost\");\n\t\tserver.setLayoutData(gridData);\n\n\t\t// Add \"join game\" button\n\t\tjoinGame = new Button(login, SWT.PUSH);\n\t\tjoinGame.setText(\"Spiel beitreten\");\n\t\tshell.setDefaultButton(joinGame);\n\n\t\t// Add \"load game\" button\n\t\tloadGame = new Button(login, SWT.PUSH);\n\t\tloadGame.setText(\"Spiel laden\");\n\n\t\tlogin.setBounds(0, 0, 250, 250);\n\n\t\t// Create composite\n\t\tComposite about = new Composite(shell, SWT.NONE);\n\t\tabout.setLayout(layout);\n\n\t\t// Add about text\n\t\tLabel aboutlabel = new Label(about, SWT.NONE);\n\t\taboutlabel.setText(AppClient.name + \"\\n\" + \"Hochschule Bremen 2011\\n\"\n\t\t\t\t+ \"Hendrik Druse, Jannes Meyer, Timur Teker\");\n\n\t\tabout.setBounds(0, 300, 250, 50);\n\t}", "private void $$$setupUI$$$() {\r\n createUIComponents();\r\n pnlMain = new JPanel();\r\n pnlMain.setLayout(new FormLayout(\"fill:d:grow\", \"fill:38dlu:noGrow,top:4dlu:noGrow,fill:225dlu:noGrow,top:4dlu:noGrow,fill:16dlu:noGrow\"));\r\n pnlMain.setMinimumSize(new Dimension(400, 480));\r\n pnlMain.setPreferredSize(new Dimension(500, 480));\r\n pnlForm.setLayout(new FormLayout(\"fill:50dlu:noGrow,left:4dlu:noGrow,fill:100dlu:noGrow,left:4dlu:noGrow,fill:50dlu:noGrow\", \"fill:12dlu:noGrow\"));\r\n CellConstraints cc = new CellConstraints();\r\n pnlMain.add(pnlForm, cc.xy(1, 1));\r\n lblBuscar = new JLabel();\r\n lblBuscar.setText(\"Buscar \");\r\n pnlForm.add(lblBuscar, cc.xy(1, 1));\r\n txtBuscar = new JTextField();\r\n pnlForm.add(txtBuscar, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\r\n btnSearch = new JButton();\r\n btnSearch.setText(\"Buscar\");\r\n pnlForm.add(btnSearch, cc.xy(5, 1));\r\n pnlGrid.setLayout(new FormLayout(\"fill:d:grow\", \"center:max(d;4px):noGrow,top:4dlu:noGrow,fill:14dlu:noGrow,top:4dlu:noGrow,fill:d:grow\"));\r\n pnlGrid.setMinimumSize(new Dimension(400, 333));\r\n pnlGrid.setPreferredSize(new Dimension(500, 333));\r\n pnlMain.add(pnlGrid, cc.xy(1, 3));\r\n pnlTitGrid = new JPanel();\r\n pnlTitGrid.setLayout(new FormLayout(\"fill:16dlu:noGrow,left:4dlu:noGrow,fill:100dlu:noGrow\", \"fill:16dlu:noGrow\"));\r\n pnlGrid.add(pnlTitGrid, cc.xy(1, 1));\r\n chkSel = new JCheckBox();\r\n chkSel.setText(\"\");\r\n pnlTitGrid.add(chkSel, cc.xy(1, 1));\r\n lblTitGrid = new JLabel();\r\n lblTitGrid.setText(\"Lista de Laboratorios\");\r\n pnlTitGrid.add(lblTitGrid, cc.xy(3, 1));\r\n pnlResult = new JScrollPane();\r\n pnlResult.setMinimumSize(new Dimension(400, 300));\r\n pnlResult.setPreferredSize(new Dimension(500, 300));\r\n pnlGrid.add(pnlResult, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.FILL));\r\n tblGrid = new JTable();\r\n pnlResult.setViewportView(tblGrid);\r\n pnlToolBarGrid = new JPanel();\r\n pnlToolBarGrid.setLayout(new FormLayout(\"\", \"\"));\r\n pnlGrid.add(pnlToolBarGrid, cc.xy(1, 3));\r\n footerPanel = new JPanel();\r\n footerPanel.setLayout(new FormLayout(\"fill:d:noGrow,left:4dlu:noGrow,right:d:grow\", \"fill:d:grow\"));\r\n pnlMain.add(footerPanel, cc.xy(1, 5));\r\n lblEnter = new JLabel();\r\n lblEnter.setText(\"F2 = Seleccionar\");\r\n footerPanel.add(lblEnter, cc.xy(1, 1));\r\n lblEsc = new JLabel();\r\n lblEsc.setText(\"Esc = Salir\");\r\n footerPanel.add(lblEsc, cc.xy(3, 1));\r\n }", "private void addWidgets() {\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(5);\n\t\tgrid.setPadding(new Insets(150, 80, 80, 80));\n\t\tgrid.add(lblPort, 0, 1);\n\t\tgrid.add(txtPort, 1, 1);\n\t\tgrid.add(lblAdress, 0, 2);\n\t\tgrid.add(txtAdress, 1, 2);\n\t\tgrid.add(lblNick, 0, 4);\n\t\tgrid.add(txtNickname, 1, 4);\n\t\tgrid.add(lblNickTaken, 1, 5);\n\t\tgrid.add(lblCardDesign, 0, 3);\n\t\tgrid.add(comboBoxCardDesign, 1, 3);\n\t\tgrid.add(btnLogin, 0, 7);\n\t\timvStart.setImage(imageStart);\n\t}", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }", "private void initComponents() {\n\n projectNameLabel = new javax.swing.JLabel();\n projectNameTextField = new javax.swing.JTextField();\n projectLocationLabel = new javax.swing.JLabel();\n projectLocationTextField = new javax.swing.JTextField();\n browseButton = new javax.swing.JButton();\n createdFolderLabel = new javax.swing.JLabel();\n createdFolderTextField = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n inputFiles = new javax.swing.JList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n outputFolder = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n\n projectNameLabel.setLabelFor(projectNameTextField);\n org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.projectNameLabel.text\")); // NOI18N\n\n projectLocationLabel.setLabelFor(projectLocationTextField);\n org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.projectLocationLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.browseButton.text\")); // NOI18N\n browseButton.setActionCommand(org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.browseButton.actionCommand\")); // NOI18N\n browseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browseButtonActionPerformed(evt);\n }\n });\n\n createdFolderLabel.setLabelFor(createdFolderTextField);\n org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.createdFolderLabel.text\")); // NOI18N\n\n createdFolderTextField.setEditable(false);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jLabel1.text\")); // NOI18N\n\n inputFiles.setModel(getListModel());\n jScrollPane1.setViewportView(inputFiles);\n inputFiles.setModel(getListModel());\n inputFiles.setCellRenderer(new FileListCellRenderer());\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton1.text\")); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton2.text\")); // NOI18N\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jLabel2.text\")); // NOI18N\n\n outputFolder.setText(org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.outputFolder.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton3, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton3.text\")); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectNameLabel)\n .addComponent(projectLocationLabel)\n .addComponent(createdFolderLabel)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browseButton))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(outputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectNameLabel)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectLocationLabel)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(browseButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(createdFolderLabel)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(18, 18, 18)\n .addComponent(jButton2)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(36, 36, 36))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(outputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addContainerGap())))\n );\n }", "private void initComponents(int filesLengh) {\n\n\t\tPBar = new javax.swing.JProgressBar(0, filesLengh);\n\t\tBGenerate = new javax.swing.JButton();\n\t\tjLabel1 = new javax.swing.JLabel();\n\t\tjLabel2 = new javax.swing.JLabel();\n\t\tjLabel3 = new javax.swing.JLabel();\n\t\tCBXml = new javax.swing.JCheckBox();\n\t\tCBPlayer = new javax.swing.JCheckBox();\n\t\tTDirectory = new javax.swing.JTextField();\n\t\tBBrowse = new javax.swing.JButton();\n\t\tTPrefix = new javax.swing.JTextField();\n\t\tjLabel5 = new javax.swing.JLabel();\n\t\tCBBuild = new javax.swing.JCheckBox();\n\t\tCBUpgrade = new javax.swing.JCheckBox();\n\t\tCBTrain = new javax.swing.JCheckBox();\n\t\tCBMove = new javax.swing.JCheckBox();\n\t\tCBSelect = new javax.swing.JCheckBox();\n\t\tCBHotKey = new javax.swing.JCheckBox();\n\t\tCBResearch = new javax.swing.JCheckBox();\n\t\tCBUseBA = new javax.swing.JCheckBox();\n\t\tCBClickMini = new javax.swing.JCheckBox();\n\t\tCBRightClick = new javax.swing.JCheckBox();\n\t\tCBUseUA = new javax.swing.JCheckBox();\n\t\tjLabel4 = new javax.swing.JLabel();\n\t\tlogoInsa = new javax.swing.JLabel();\n\t\tlogoLiris = new javax.swing.JLabel();\n\t\tjLabel6 = new javax.swing.JLabel();\n\t\tCBReplay = new javax.swing.JCheckBox();\n\t\tCBMap = new javax.swing.JCheckBox();\n\t\tCBIcon = new javax.swing.JCheckBox();\n\n\t\twindow.setResizable(false);\n\n\t\tPBar.addComponentListener(new java.awt.event.ComponentAdapter() {\n\t\t\tpublic void componentShown(java.awt.event.ComponentEvent evt) {\n\t\t\t\tdisplayCSV(CBXml.isSelected());\n\t\t\t}\n\n\t\t\tpublic void componentHidden(java.awt.event.ComponentEvent evt) {\n\t\t\t\tdisplayCSV(CBXml.isSelected());\n\t\t\t}\n\t\t});\n\n\t\tBGenerate.setText(\"Generate\");\n\t\tBGenerate.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n\t\tBGenerate.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tBGenerateActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjLabel1.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel1.setText(\"Files to generate : \");\n\n\t\tjLabel2.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel2.setText(\"Directory :\");\n\n\t\tjLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel3.setText(\"XML Files prefix :\");\n\n\t\tCBXml.setText(\"XML Files\");\n\t\tCBXml.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tCBXmlActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tCBPlayer.setText(\"Players Info.\");\n\n\t\tTDirectory.setBackground(java.awt.Color.lightGray);\n\t\tTDirectory.setFocusable(false);\n\n\t\tBBrowse.setText(\"Browse\");\n\t\tBBrowse.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tBBrowseActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel5.setText(\"Select action types :\");\n\n\t\tCBBuild.setText(\"Build\");\n\t\tCBUpgrade.setText(\"Upgrade\");\n\t\tCBTrain.setText(\"Train\");\n\t\tCBMove.setText(\"Move Screen\");\n\t\tCBSelect.setText(\"Select\");\n\t\tCBHotKey.setText(\"HotKey\");\n\t\tCBResearch.setText(\"Research\");\n\t\tCBUseBA.setText(\"Use Building Ability\");\n\t\tCBClickMini.setText(\"Click Minimap\");\n\t\tCBRightClick.setText(\"Right Click\");\n\t\tCBUseUA.setText(\"Use Unit Ability\");\n\n\t\tjLabel4.setFont(new java.awt.Font(\"DejaVu Serif\", 0, 10));\n\t\tjLabel4.setForeground(java.awt.Color.black);\n\t\tjLabel4.setText(\"Authors : Guillaume BOSC, Mehdi KAYTOUE\");\n\n\t\tlogoInsa.setIcon(new javax.swing.ImageIcon(\n\t\t\t\t\"./Plugins/Sc2Gears4DM/fig/INSA.jpg\"));\n\n\t\tlogoLiris.setIcon(new javax.swing.ImageIcon(\n\t\t\t\t\"./Plugins/Sc2Gears4DM/fig/LIRIS.jpg\"));\n\n\t\tjLabel6.setFont(new java.awt.Font(\"DejaVu Serif\", 0, 10));\n\t\tjLabel6.setForeground(java.awt.Color.black);\n\t\tjLabel6.setText(\"Contact : mehdi.kaytoue@insa-lyon.fr\");\n\n\t\tCBReplay.setText(\"Replays Info.\");\n\n\t\tCBMap.setText(\"Maps Info.\");\n\t\tCBMap.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (!alreadyDownloaded) {\n\t\t\t\t\tint retour = JOptionPane.showConfirmDialog(window,\n\t\t\t\t\t\t\t\"Do you want to download the corresponding maps ?\",\n\t\t\t\t\t\t\t\"Download maps\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\tif (retour == JOptionPane.YES_OPTION) {\n\t\t\t\t\t\tdownloadMapFile();\n\t\t\t\t\t\talreadyDownloaded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tCBIcon.setText(\"Map Icons\");\n\t\tCBIcon.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (!alreadyDownloaded) {\n\t\t\t\t\tint retour = JOptionPane.showConfirmDialog(window,\n\t\t\t\t\t\t\t\"Do you want to download the corresponding maps ?\",\n\t\t\t\t\t\t\t\"Download maps\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\tif (retour == JOptionPane.YES_OPTION) {\n\t\t\t\t\t\tdownloadMapFile();\n\t\t\t\t\t\talreadyDownloaded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * Display the window layout\n\t\t */\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(\n\t\t\t\twindow.getContentPane());\n\t\twindow.getContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(23, 23, 23)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel6)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel4)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoInsa)\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.addGap(61,\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\t61,\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\t61)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tBGenerate)\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.addPreferredGap(\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\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\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\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tlogoLiris))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5))\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.addGap(41,\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\t41,\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\t41)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBTrain)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBMove)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBHotKey)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseUA)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBRightClick)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBClickMini)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseBA)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBSelect)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBBuild)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUpgrade)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBResearch)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTPrefix,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t242,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel1)\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.addGap(52,\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\t52,\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\t52)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTDirectory,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t242,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBBrowse))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBPlayer)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBXml))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBReplay)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBMap)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBIcon)))))\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.addGap(0,\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\t45,\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\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPBar,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(23, 23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t23)))));\n\t\tlayout.setVerticalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(23, 23, 23)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBXml)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBReplay)))\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(CBPlayer)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(CBMap)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(CBIcon))\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(13, 13,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t13)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTDirectory,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBBrowse))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(18, 18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTPrefix,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(18, 18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBBuild)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBMove)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBSelect))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUpgrade)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBHotKey)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBRightClick))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBResearch)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBTrain)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBClickMini))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseUA)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseBA))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t99,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBGenerate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoInsa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoLiris)))\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(PBar,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t20,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(30, 30, 30)\n\t\t\t\t\t\t\t\t.addComponent(jLabel4)\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(jLabel6)));\n\t\twindow.pack();\n\t}", "private void buildContentPane() {\n\t\t// The JPanel that will become the content pane\n\t\tJPanel cp = new JPanel();\n\t\tcp.setLayout(new BoxLayout(cp, BoxLayout.PAGE_AXIS));\n\n\t\tlanguagePanel = initLanguagePanel();\n\t\tcp.add(languagePanel);\n\n\t\tinputPanel = initInputPanel();\n\t\tcp.add(inputPanel);\n\n\t\tJPanel btnPanel = initBtnPanel();\n\t\tcp.add(btnPanel);\n\n\t\toutputPanel = initOutputPanel();\n\t\tcp.add(outputPanel);\n\n\t\tJPanel picturePanel = initPicturePanel();\n\t\tif(picturePanel == null) {\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_SMALL_HEIGHT);\n\t\t}\n\t\telse {\n\t\t\tcp.add(picturePanel);\n\t\t}\n\n\t\tLanguage selectedLang = languagePanel.getSelectedLanguage();\n\t\tsetLanguage(selectedLang);\n\n\t\tframe.setContentPane(cp);\n\t}", "@SuppressWarnings({ \"unused\", \"unchecked\", \"rawtypes\" })\r\n\tprivate void buildPanel() {\r\n\t\tageField = new JComboBox(ageRanges);\r\n\t\tfNameField = new JTextField(20);\r\n\t\tGhostText fNameGhost = new GhostText(fNameField, \"First Name\");\r\n\t\tlNameField = new JTextField(20);\r\n\t\tGhostText lNameGhost = new GhostText(lNameField, \"Last Name\");\r\n\t\tmInitField = new JTextField(2);\r\n\t\tGhostText mInitGhost = new GhostText(mInitField, \"M\");\r\n\t\temailField = new JTextField(20);\r\n\t\tGhostText emailGhost = new GhostText(emailField, \"Email\");\r\n\t\tphoneNumberField = new JTextField(12);\r\n\t\timage = new JLabel();\r\n\t\tGhostText phoneNoGhost = new GhostText(phoneNumberField, \"Phone Number\");\r\n\t\tJPanel namePanel = new JPanel();\r\n\t\tJPanel emailPhoneAgePanel = new JPanel();\r\n\t\tJPanel northPanel = new JPanel();\r\n\t\tJPanel centerPanel = new JPanel();\r\n\t\temailPhoneAgePanel.setLayout(new GridLayout(0, 3));\r\n\t\temailPhoneAgePanel.setSize(new Dimension(400, 25));\r\n\t\temailPhoneAgePanel.setMaximumSize(new Dimension(400, 25));\r\n\t\tregisterButton = new JButton(\"Register & Save\");\r\n\t\tregisterButton.addActionListener(new registerButtonAction());\r\n\t\tregisterButton.setEnabled(false);\r\n\t\tuploadButton = new JButton(\"Upload Photo\");\r\n\t\tuploadButton.addActionListener(new uploadListener());\r\n\t\tnamePanel.add(fNameField);\r\n\t\tnamePanel.add(lNameField);\r\n\t\tnamePanel.add(mInitField);\r\n\t\tnamePanel.setBackground(Color.BLACK);\r\n\t\tnamePanel.setLayout(new GridBagLayout());\r\n\t\temailPhoneAgePanel.add(emailField);\r\n\t\temailPhoneAgePanel.add(phoneNumberField);\r\n\t\temailPhoneAgePanel.add(ageField);\r\n\t\temailPhoneAgePanel.setBackground(Color.BLACK);\r\n\t\temailPhoneAgePanel.setLayout(new GridBagLayout());\r\n\t\tcenterPanel.add(image);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tbuttonPanel.add(uploadButton);\r\n\t\tbuttonPanel.add(registerButton);\r\n\t\tnorthPanel.add(namePanel, BorderLayout.NORTH);\r\n\t\tnorthPanel.add(emailPhoneAgePanel, BorderLayout.CENTER);\r\n\t\tnorthPanel.setBackground(Color.BLACK);\r\n\t\tcenterPanel.setBackground(Color.BLACK);\r\n\t\tthis.add(northPanel, BorderLayout.NORTH);\r\n\t\tthis.add(centerPanel, BorderLayout.CENTER);\r\n\t\tthis.add(buttonPanel, BorderLayout.SOUTH);\t\r\n\t\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private void setUpPanel() {\n\n this.add(nameLabel);\n this.add(showMetadataButton);\n this.add(compressFilesButton);\n this.add(decompressFilesButton);\n this.add(compressionResultLabel);\n this.add(messageShorteningButton);\n this.add(messageShorteningResultLabel);\n }", "private JPanel buildContentPane(){\t\n\t\tinitialiseElements();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new FlowLayout());\n\t\tpanel.setBackground(Color.lightGray);\n\t\tpanel.add(scroll);\n\t\tpanel.add(bouton);\n\t\tpanel.add(bouton2);\n\t\treturn panel;\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void setupUI() {\r\n\t\tWindow.setTitle(\"Battle\");\r\n\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\tpanel.addStyleName(NAME);\r\n\t\tinitWidget(panel);\r\n\t\t\r\n\t\tlabelTitle = new Label(\"Battle\");\r\n\t\tlabelTitle.addStyleName(Styles.page_title);\r\n\t\tpanel.add(labelTitle);\r\n\t\t\r\n\t\tLabel instructions = new Label(\"Click to go!\");\r\n\t\tpanel.add(instructions);\r\n\r\n\t\tHorizontalPanel hPanel = new HorizontalPanel();\r\n\t\tpanel.add(hPanel);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\thPanel.add(canvas);\r\n\r\n\t\tVerticalPanel vPanelInfo = new VerticalPanel();\r\n\t\thPanel.add(vPanelInfo);\r\n\t\t\r\n\t\tlabelInfo = new Label();\r\n\t\tlabelInfo.addStyleName(Styles.battle_info);\r\n\t\tvPanelInfo.add(labelInfo);\r\n\t\t\r\n\t\tvPanelInfoHistory = new VerticalPanel();\r\n\t\tvPanelInfoHistory.addStyleName(Styles.battle_info_history);\r\n\t\tvPanelInfo.add(vPanelInfoHistory);\r\n\r\n\t\t\r\n\t\tcanvas.setWidth(width + \"px\");\r\n\t\tcanvas.setHeight(height + \"px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(width);\r\n\t\tcanvas.setCoordinateSpaceHeight(height);\r\n\r\n\t\t//Adding handlers seems to create a performance issue in Java\r\n\t\t//mode, but likely not in javascript\r\n\t\tcanvas.addMouseDownHandler(this);\r\n//\t\tcanvas.addMouseUpHandler(this);\r\n//\t\tcanvas.addMouseMoveHandler(this);\r\n\r\n\t\tcontext2d = canvas.getContext2d();\r\n\r\n\t\tlastUpdate = System.currentTimeMillis();\r\n\t\ttimer = new Timer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\t\tupdate(now - lastUpdate);\r\n\t\t\t\tlastUpdate = now;\r\n\r\n\t\t\t\tdraw();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttimer.scheduleRepeating(1000 / 60);\r\n\t}", "private void initGUI() {\r\n this.setLayout(new RiverLayout());\r\n\r\n /**\r\n * Add the following selectively\r\n */\r\n titledSearchResultsPanel = new Cab2bTitledPanel(\"Search Results :- \" + \"Total results ( \"\r\n + allElements.size() + \" )\");\r\n GradientPaint gp = new GradientPaint(new Point2D.Double(.05d, 0), new Color(185, 211, 238),\r\n new Point2D.Double(.95d, 0), Color.WHITE);\r\n titledSearchResultsPanel.setTitlePainter(new BasicGradientPainter(gp));\r\n titledSearchResultsPanel.setBorder(new EmptyBorder(0, 0, 0, 0));\r\n titledSearchResultsPanel.setTitleFont(new Font(\"SansSerif\", Font.BOLD, 11));\r\n titledSearchResultsPanel.setTitleForeground(Color.BLACK);\r\n\r\n pagination = initPagination(allElements);\r\n\r\n searchResultsPanel = new Cab2bPanel(new BorderLayout(0, 5));\r\n\r\n Cab2bComboBox serviceURLCombo = new Cab2bComboBox(serviceURLComboContents);\r\n serviceURLCombo.setPreferredSize(new Dimension(250, 20));\r\n serviceURLCombo.addActionListener(new ServiceURLSelectionListener());\r\n Cab2bPanel comboContainer = new Cab2bPanel(new RiverLayout(5, 5));\r\n \r\n JLabel jLabel = new JLabel(\"Results From\");\r\n jLabel.setForeground(new Cab2bHyperlink().getUnclickedColor());\r\n \r\n \r\n comboContainer.add(\"left\", jLabel);\r\n comboContainer.add(\"tab\", serviceURLCombo);\r\n\r\n searchResultsPanel.add(BorderLayout.NORTH, comboContainer);\r\n\r\n searchResultsPanel.add(BorderLayout.CENTER, pagination);\r\n initDataListSummaryPanel();\r\n initDataListButtons();\r\n\r\n Cab2bPanel buttonPanel = new Cab2bPanel(new RiverLayout(8, 0));\r\n buttonPanel.add(addToDataListButton);\r\n buttonPanel.add(m_applyAllButton);\r\n searchResultsPanel.add(BorderLayout.SOUTH, buttonPanel);\r\n\r\n m_addSummaryParentPanel = new Cab2bPanel(new BorderLayout());\r\n m_addSummaryParentPanel.add(searchResultsPanel, BorderLayout.CENTER);\r\n m_addSummaryParentPanel.add(myDataListParentPanel, BorderLayout.EAST);\r\n titledSearchResultsPanel.setContentContainer(m_addSummaryParentPanel);\r\n this.add(\"p vfill hfill\", titledSearchResultsPanel);\r\n }", "private void buildTransactionPane() // buildTransactionPane method start\n\t{\n\t\ttransactionPane.setLayout(new BorderLayout());\n\t\t\n\t\t// creating panel components\n\t\theader = new HeaderPanel();\n\t\tdebit = new DebitPanel();\n\t\tcredit = new CreditPanel();\n\t\tbuttonPanel = new JPanel();\n\t\tbuildButtonPanel();\n\t\t\n\t\t// adding components to panel\n\t\ttransactionPane.add(header, BorderLayout.NORTH);\n\t\ttransactionPane.add(debit, BorderLayout.WEST);\n\t\ttransactionPane.add(credit, BorderLayout.EAST);\n\t\ttransactionPane.add(buttonPanel, BorderLayout.SOUTH);\n\t}", "protected void setupUI() {\r\n this.setLayout(new GridLayout((this.needDefaultValue) ? 3 : 2, 2));\r\n\r\n this.nameLabel = new JLabel(this.nameLabelText);\r\n this.add(this.nameLabel);\r\n this.add(this.nameTextField);\r\n\r\n this.typeLabel = new JLabel(this.typeLabelText);\r\n this.add(this.typeLabel);\r\n this.add(this.typeDropDown);\r\n\r\n if (this.needDefaultValue) {\r\n this.defValLabel = new JLabel(this.defValLabelText);\r\n this.add(this.defValLabel);\r\n this.add(this.defValueTextField);\r\n }\r\n }" ]
[ "0.7932136", "0.78475475", "0.7497805", "0.7304477", "0.7155513", "0.71202374", "0.7071859", "0.6977375", "0.69622445", "0.6957242", "0.69528", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.69147277", "0.6881227", "0.6864814", "0.6843548", "0.68340987", "0.6832506", "0.6793103", "0.678982", "0.6741969", "0.6739338", "0.67212623", "0.67170835", "0.66955125", "0.6674733", "0.66633636", "0.6660256", "0.66369486", "0.6635875", "0.65878725", "0.65742654", "0.6572194", "0.65715694", "0.6562079", "0.6551927", "0.65039897", "0.6497747", "0.6484563", "0.64718014", "0.64690965", "0.6462698", "0.64611477", "0.64606214", "0.64502853", "0.6445303", "0.64446104", "0.64285755", "0.64220166", "0.64219743", "0.6419731", "0.6419731", "0.64184105", "0.64169073", "0.64122015", "0.6403035", "0.6399218", "0.63961655", "0.6395525", "0.6392141", "0.63851225", "0.6371881", "0.63664466", "0.636399", "0.6355759", "0.6346055", "0.63439107", "0.6339894", "0.6335677", "0.6322987", "0.6315414", "0.62944365", "0.6288461", "0.62864596", "0.62773114", "0.6275128", "0.6273207", "0.62724483", "0.6271108", "0.6268649", "0.62644935", "0.62621677", "0.62596184", "0.62564665", "0.62490875" ]
0.0
-1
Builds UI for popup conformation window
private Component buildConformationWindow(Window window, ComboBox feedbackMonth, TextArea emails) { VerticalLayout confirmationLayout = new VerticalLayout(); HorizontalLayout buttons = new HorizontalLayout(); Label msg = new Label(StringConstants.CONFORMATION_MSG); msg.setContentMode(ContentMode.HTML); Label confirm = new Label(StringConstants.CONFORMATION); Button yes = new Button(StringConstants.YES); Button no = new Button(StringConstants.NO); yes.addClickListener(e -> { window.close(); triggerReportGeneration(emails,feedbackMonth); }); no.addClickListener(e -> window.close()); buttons.addComponents(yes, no); buttons.setSizeFull(); buttons.setComponentAlignment(yes, Alignment.TOP_RIGHT); buttons.setComponentAlignment(no, Alignment.TOP_LEFT); confirmationLayout.addComponents(msg, confirm, buttons); confirmationLayout.setMargin(true); confirmationLayout.setSpacing(true); return confirmationLayout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createPopupWindow() {\r\n \t//\r\n }", "public CommonPopWindow build() {\n/* 65 */ if (this.mWidth != 0 && this.mHeight != 0) {\n/* 66 */ mPopupWindow = new PopupWindow(mContentView, this.mWidth, this.mHeight);\n/* */ } else {\n/* 68 */ mPopupWindow = new PopupWindow(mContentView, -2, -2);\n/* */ } \n/* */ \n/* */ \n/* 72 */ mPopupWindow.setTouchable(this.mTouchable);\n/* 73 */ mPopupWindow.setFocusable(this.mFocusable);\n/* 74 */ mPopupWindow.setOutsideTouchable(this.mOutsideTouchable);\n/* */ \n/* 76 */ if (this.mDrawable != null) {\n/* 77 */ mPopupWindow.setBackgroundDrawable(this.mDrawable);\n/* */ } else {\n/* 79 */ mPopupWindow.setBackgroundDrawable((Drawable)new ColorDrawable());\n/* */ } \n/* 81 */ if (this.mAnimationStyle != -1) {\n/* 82 */ mPopupWindow.setAnimationStyle(this.mAnimationStyle);\n/* */ }\n/* 84 */ if (this.mWidth == 0 || this.mHeight == 0) {\n/* 85 */ measureWidthAndHeight(mContentView);\n/* */ \n/* 87 */ this.mWidth = mPopupWindow.getContentView().getMeasuredWidth();\n/* 88 */ this.mHeight = mPopupWindow.getContentView().getMeasuredHeight();\n/* */ } \n/* */ \n/* 91 */ Activity activity = (Activity)this.mContext;\n/* 92 */ if (activity != null && this.mBackgroundDarkEnable) {\n/* 93 */ float alpha = (this.mDarkAlpha >= 0.0F || this.mDarkAlpha <= 1.0F) ? this.mDarkAlpha : 0.7F;\n/* 94 */ mWindow = activity.getWindow();\n/* 95 */ WindowManager.LayoutParams params = mWindow.getAttributes();\n/* 96 */ params.alpha = alpha;\n/* 97 */ mWindow.setAttributes(params);\n/* */ } \n/* */ \n/* 100 */ mPopupWindow.setOnDismissListener(this);\n/* */ \n/* 102 */ mPopupWindow.update();\n/* */ \n/* 104 */ if (this.mListener != null && this.mLayoutResId != 0) {\n/* 105 */ this.mListener.getChildView(mPopupWindow, mContentView, this.mLayoutResId);\n/* */ }\n/* */ \n/* 108 */ return this;\n/* */ }", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }", "private void buildWindow(){\r\n\t\tthis.setSize(new Dimension(600, 400));\r\n\t\tFunctions.setDebug(true);\r\n\t\tbackendConnector = new BackendConnector(this);\r\n\t\tguiManager = new GUIManager(this);\r\n\t\tmainCanvas = new MainCanvas(this);\r\n\t\tadd(mainCanvas);\r\n\t}", "private JFrame buildWindow() {\n frame = WindowFactory.mainFrame()\n .title(\"VISNode\")\n .menu(VISNode.get().getActions().buildMenuBar())\n .size(1024, 768)\n .maximized()\n .interceptClose(() -> {\n new UserPreferencesPersistor().persist(model.getUserPreferences());\n int result = JOptionPane.showConfirmDialog(panel, Messages.get().singleMessage(\"app.closing\"), null, JOptionPane.YES_NO_OPTION);\n return result == JOptionPane.YES_OPTION;\n })\n .create((container) -> {\n panel = new MainPanel(model);\n container.add(panel);\n });\n return frame;\n }", "public void run() {\n JPanel tempPanel = new JPanel(new GridBagLayout());\n JLabel label = new JLabel(\"Live Rearranger parsing file...\");\n Border b = BorderFactory.createRaisedBevelBorder();\n tempPanel.setBorder(b);\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.insets = new Insets(5, 5, 5, 5);\n tempPanel.add(label, constraints);\n Dimension d = outerPanel.getSize();\n Dimension c = tempPanel.getPreferredSize();\n int x = (d.width - c.width) / 2;\n int y = (d.height - c.height) / 2;\n if (x < 0) x = 0;\n if (y < 0) y = 0;\n popup = PopupFactory.getSharedInstance().getPopup(outerPanel, tempPanel, x, y);\n// popup.getContentPane().add(tempPanel);\n// popup.setLocation(x, y);\n LOG.debug(\"initial outerPanel size=\" + d + \", tempPanel preferred size=\" + c);\n LOG.debug(\"Constructing initial Popup at x,y=\" + x + \",\" + y);\n// popup.pack();\n// popup.setVisible(true);\n// popup.requestFocusInWindow();\n popup.show();\n Cursor cu = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);\n oldCursor = outerPanel.getCursor();\n LOG.debug(\"setCursor (WAIT)\" + cu + \" on \" + outerPanel);\n outerPanel.setCursor(cu);\n }", "protected Popup() {}", "@Override\n\tpublic void buildInfoPanel(Widget sourceWidget){\n\t\t\n\t\tPopupPanel panel = new PopupPanel();\n\t\tpanel.setAutoHideEnabled(true);\n\t\tpanel.setPopupPosition(sourceWidget.getAbsoluteLeft()+40, sourceWidget.getAbsoluteTop()+20);\n\t\tVerticalPanel dialogContents = new VerticalPanel();\n\t\tdialogContents.getElement().setId(\"dialogContents_VerticalPanel\");\n\t\tpanel.setWidget(dialogContents);\n\t\t\n\t\tHTML html1 = new HTML(\"CTRL-Alt-t : Timings\");\n\t\tHTML html2 = new HTML(\"Ctrl-Alt-f : Functions\");\n\t\tHTML html3 = new HTML(\"Ctrl-Alt-d : Definitions\");\n\t\tHTML html4 = new HTML(\"Ctrl-Alt-p : Parameters\");\n\t\tHTML html5 = new HTML(\"Ctrl-Alt-a : Attributes\");\n\t\tHTML html6 = new HTML(\"Ctrl-Space : All\");\n\t\tdialogContents.add(html1);\n\t\tdialogContents.add(html2);\n\t\tdialogContents.add(html3);\n\t\tdialogContents.add(html4);\n\t\tdialogContents.add(html5);\n\t\tdialogContents.add(html6);\n\t\t\n\t\tpanel.show();\n\t}", "private void constructPopup() {\n popupPanel = new JPanel();\n popupPanel.setLayout(new BoxLayout(popupPanel, BoxLayout.Y_AXIS));\n popupScrollPane = new JScrollPane(popupPanel);\n popupScrollPane.setMaximumSize(new Dimension(200, 300));\n\n shapeName = new JTextField(15);\n time = new JTextField(5);\n shapeTypes = new ArrayList<>();\n shapeTimes = new ArrayList<>();\n shapeNames = new ArrayList<>();\n\n x = new JTextField(5);\n y = new JTextField(5);\n width = new JTextField(5);\n height = new JTextField(5);\n r = new JTextField(3);\n g = new JTextField(3);\n b = new JTextField(3);\n\n }", "void startPopupDialog(String windowTitle, int colSize)\n { /* startPopupDialog */\n Panel buttonPanel= null;\t /* place buttons here */\n Button\n ok,\t\t /* update data */\n cancel;\t\t \t/* use default data */\n GridLayout gl; /* for layout of text fields, label, etc */\n \n \n /* [1] initialize */\n gl= new GridLayout(4,1);\n this.setLayout(gl);\t /* set gridlayout to frame */\n \n /* [1] Create User instruction label */\n label= new Label(spaces);\n \n /* [2] Create the buttons and arrange to handle button clicks */\n if(addButtonsCnt>0)\n { /* add button panel */\n buttonPanel= new Panel();\n \n if(addButtonsCnt==1)\n ok= new Button(\"Continue\");\n else ok= new Button(\"Ok\");\n ok.addActionListener(this);\n buttonPanel.add(\"Center\",ok);\n \n if(addButtonsCnt==2)\n {\n cancel= new Button(\" Cancel\");\n cancel.addActionListener(this);\n buttonPanel.add(\"Center\", cancel);\n }\n } /* add button panel */\n \n /* [3] add data text fields to panel */\n this.add(label); /* add to grid. data description label */\n if(addButtonsCnt>=2)\n {\n optionPanel= new Panel();\n this.add(optionPanel);\n \n textField= new TextField(colSize);\n this.add(textField); /* editable text */\n }\n \n /* [4] add buttons panel */\n if(buttonPanel!=null)\n this.add(buttonPanel); /* buttons (ok & cancel) */\n this.addWindowListener(this); /* listener for window events */\n \n /* [5] add components and create frame */\n this.setTitle(windowTitle); /* frame title */\n this.pack();\n \n /* Center frame on the screen, PC only */\n Dimension screen= Toolkit.getDefaultToolkit().getScreenSize();\n Point pos= new Point((screen.width-frame.getSize().width)/2,\n (screen.height-frame.getSize().height)/2);\n this.setLocation(pos);\n \n this.setVisible(false);\t /* hide frame which can be shown later */\n }", "public ActorPopup() {\n\t\tsuper(false);\n\t\tCSS.ensureInjected();\n\t\tcreateActions();\n\t\tsetWidget(createContent());\n\t\tsetStylePrimaryName(AbstractField.CSS.cbtAbstractPopup());\n\t}", "public void createEditEmployeePopup() {\n createPopupResources();\n getCancelButton().setOnAction((event -> popupStage.close()));\n setupPopupLayout();\n mainBox.setPrefSize(PREFERRED_POPUP_WIDTH, PREFERRED_POPUP_HEIGHT);\n popupStage.setScene(scene);\n popupStage.initModality(Modality.APPLICATION_MODAL);\n popupStage.show();\n }", "public void buildGUI() {\r\n\t\t//Top menu\r\n\t\tHStack menuHStack= new HStack();\r\n\t\tmenuHStack.setHeight(25);\r\n\t\tmenuHStack.setWidth(200);\r\n\t\tmenuHStack.addMember(createLoginLogoutPanel());\r\n\t\t \r\n\t\t//The rest\r\n\t\tVStack swagItemsVStack = new VStack();\r\n\t\tswagItemsVStack.addMember(createSearchBox());\r\n\t\tswagItemsVStack.addMember(createSortDropDown());\r\n\t\tswagItemsVStack.addMember(createItemsTileGrid());\r\n\t\t\r\n\t\t//hide app until data has loaded\r\n\t\tDOM.setStyleAttribute(RootPanel.get(\"gwtApp\").getElement(), \"display\", \"none\");\r\n\t\titemsTileGrid.fetchData(null, new DSCallback() {\r\n\t\t\tpublic void execute(DSResponse response, Object rawData, DSRequest request) {\r\n\t\t\t\t//hide loading div and it's border\r\n\t\t\t\tDOM.setInnerHTML(RootPanel.get(\"loading\").getElement(),\"\");\r\n\t\t\t\tDOM.setStyleAttribute(DOM.getElementById(\"loading\"), \"border\", \"0\");\r\n\t\t\t\t//show app\r\n\t\t\t\tDOM.setStyleAttribute(RootPanel.get(\"gwtApp\").getElement(), \"display\", \"block\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tswagItemsVStack.setWidth(350);\r\n\t\tswagItemsVStack.setHeight(552);\r\n\t\tswagItemsVStack.setBorder(\"1px solid #C0C3C7\"); //blue like the rest of the app\r\n\t\tswagItemsVStack.setShowEdges(false);\r\n\t\tswagItemsVStack.setCanDragResize(true);\r\n\t\tswagItemsVStack.setShowResizeBar(true);\r\n\t\t\r\n\t\t//Put itemsTileGrid next to createEditComments\r\n\t\tHStack itemsEditCommentsHStack = new HStack();\r\n\t\titemsEditCommentsHStack.addMember(swagItemsVStack);\r\n//\t\taddImageUpload(itemsAndEditHStack);\r\n\t\titemsEditCommentsHStack.addMember(createEditForm());\r\n\t\titemsEditCommentsHStack.setHeight(720);\r\n\t\t\r\n\t\tVStack mainStack = new VStack();\r\n\t\t//vertical scrolling if browser window is too small\r\n\t\tmainStack.setOverflow(Overflow.AUTO); \r\n\t\tmainStack.setWidth100();\r\n\t\tmainStack.setHeight100();\r\n\t\tmainStack.addMember(menuHStack);\r\n\t\tmainStack.addMember(itemsEditCommentsHStack);\r\n\t\t\r\n\t\tRootPanel.get(\"gwtApp\").add(mainStack); //anchored on GWT html page\r\n\r\n\t\tmainStack.draw();\r\n\t}", "public void initPopupLayout() {\n popup = new BackToMainScreenPopup(this.getContext(), getActivity());\n popup.showPopupWindow();\n }", "void initializePopup() {\n\t\t\n\t\tsetDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\t\tsetBounds(100, 100, 450, 475);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\tcontentPanel.setLayout(null);\n\n\t\tJLabel lblThemeName = new JLabel(\"Theme Name\");\n\t\tlblThemeName.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblThemeName.setBounds(6, 31, 87, 16);\n\t\tcontentPanel.add(lblThemeName);\n\n\t\tname = new JTextField();\n\t\tname.setBounds(134, 26, 294, 26);\n\t\tcontentPanel.add(name);\n\t\tname.setColumns(10);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Words\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(6, 76, 87, 16);\n\t\tcontentPanel.add(lblNewLabel);\n\n\t\tJLabel lblLetterOrder = new JLabel(\"Letter Order\");\n\t\tlblLetterOrder.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblLetterOrder.setBounds(6, 235, 87, 16);\n\t\tcontentPanel.add(lblLetterOrder);\n\n\t\twords = new JTextPane();\n\t\twords.setBounds(134, 75, 294, 149);\n\t\tcontentPanel.add(words);\n\n\t\tletters = new JTextPane();\n\t\tletters.setBounds(134, 235, 294, 149);\n\t\tcontentPanel.add(letters);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\\\" signals unselected tile\");\n\t\tlblNewLabel_1.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 13));\n\t\tlblNewLabel_1.setBounds(6, 392, 157, 16);\n\t\tcontentPanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Use % to signal for a random letter\");\n\t\tlblNewLabel_2.setBounds(202, 392, 242, 16);\n\t\tcontentPanel.add(lblNewLabel_2);\n\t\t\n\t\tJLabel lblRowsOf = new JLabel(\"6 rows of 6 letters\");\n\t\tlblRowsOf.setBounds(6, 340, 116, 16);\n\t\tcontentPanel.add(lblRowsOf);\n\t\t\n\t\tJLabel lblQQu = new JLabel(\"Q = Qu\");\n\t\tlblQQu.setBounds(6, 368, 61, 16);\n\t\tcontentPanel.add(lblQQu);\n\t\t{\n\t\t\tJPanel buttonPane = new JPanel();\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\t{\n\t\t\t\tokButton = new JButton(\"OK\");\n\t\t\t\tokButton.setActionCommand(\"OK\");\n\t\t\t\tokButton.addActionListener(new AcceptThemeController(this));\n\t\t\t\tbuttonPane.add(okButton);\n\t\t\t\tgetRootPane().setDefaultButton(okButton);\n\t\t\t}\n\t\t\t{\n\t\t\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\t\t\tcancelButton.setActionCommand(\"Cancel\");\n\t\t\t\tcancelButton.addActionListener(new CloseThemeController(this, model));\n\t\t\t\tbuttonPane.add(cancelButton);\n\t\t\t}\n\t\t}\n\t}", "public void initiatePopupWindow(View v) {\n try {\n //We need to get the instance of the LayoutInflater, use the context of this activity\n LayoutInflater inflater = (LayoutInflater) Activity_Lesson_Unit_Point_Display_FlashCardActivity.this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //Inflate the view from a predefined XML layout\n\n View view = inflater.inflate(R.layout.popup_screen,\n (ViewGroup) findViewById(R.id.popup_element));\n RelativeLayout layout = view.findViewById(R.id.popup_element);\n int width = 650;\n int height = 600;\n width = layout.getWidth();\n height = layout.getHeight();\n //Instantiate grid view\n gridView = view.findViewById(R.id.scroll_grid);\n //Instantiate grid adapter\n// scrollAdapter = new ScrollGridCardAdapter(FlashCardActivity.this,gja_questions,knownList,donknowList,skipList,getScreenSize());\n scrollAdapter = new ScrollGridCardAdapter(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,questionList,getScreenSize());\n //Setting Adapter to gridview\n gridView.setAdapter(scrollAdapter);\n // create a 300px width and 570px height PopupWindow\n pw = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n // display the popup in the center\n pw.showAtLocation(v, Gravity.CENTER, 0, 0);\n if (android.os.Build.VERSION.SDK_INT > 20) {\n pw.setElevation(10);\n }\n// TextView mResultText = (TextView) layout.findViewById(R.id.server_status_text);\n Button cancelButton = (Button) view.findViewById(R.id.pop_close_button);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pw.dismiss();\n// disableEnableViews(myrlayout);\n mHideRunnable.run();\n }\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tprotected final void createAppWindows() {\r\n \t//Instantiate only DD-specific windows. SFDC-scope windows (such as mainWindow) are static\r\n \t// objects in the EISTestBase class\r\n \tmyDocumentsPopUp = createWindow(\"WINDOW_MY_DOCUMENTS_POPUP_PROPERTIES_FILE\");\r\n }", "public void buildGui() {\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "private void showPopUpWindow() {\n Log.d(TwoPlayersActivity.LOG_TAG, \"show popup\");\n LayoutInflater layoutInflater = (LayoutInflater) this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n View popupView = layoutInflater.inflate(R.layout.pop_up,\n (ViewGroup) findViewById(R.id.pop_up));\n\n popupWindow = new PopupWindow(popupView,\n LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, true);\n\n popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);\n\n Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);\n\n btnDismiss.setOnClickListener(new Button.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWindow.dismiss();\n }\n });\n }", "private void buildUI() {\n initComponents();\n\n FormLayout layout = new FormLayout(\"3dlu, pref:grow, 3dlu\",\n \"3dlu, pref, 3dlu, pref, 3dlu, fill:0:grow\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n CellConstraints cc = new CellConstraints();\n\n // Toolbar\n JPanel toolbar = createToolBar();\n toolbar.setOpaque(false);\n builder.add(toolbar, cc.xy(2, 2));\n builder.addSeparator(null, cc.xyw(1, 4, 2));\n\n // Main panel in scroll pane\n JPanel mainPanel = buildMainPanel();\n mainPanel.setOpaque(false);\n JScrollPane scrollPane = new JScrollPane(mainPanel);\n scrollPane.setOpaque(false);\n scrollPane.getVerticalScrollBar().setUnitIncrement(10);\n UIUtil.removeBorder(scrollPane);\n builder.add(scrollPane, cc.xyw(1, 6, 2));\n\n uiComponent = builder.getPanel();\n }", "private void buildUI() {\n\n fxUtils = FXUtils.getShared();\n int rowCount = 0;\n\n\t\toutputTab = new Tab(\"Output\");\n\n\t\toutputPane = new GridPane();\n\t\tfxUtils.applyStyle(outputPane);\n\n\t\topenOutputDataButton = new Button(\"Save Output\");\n\t\tTooltip openOutputDataButtonTip \n = new Tooltip(\"Specify the Output File Name and Location\");\n Tooltip.install(openOutputDataButton, openOutputDataButtonTip);\n openOutputDataButton.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n saveOutputFile();\n\t\t } // end handle method\n\t\t}); // end event handler\n\t\toutputPane.add(openOutputDataButton, 0, rowCount, 1, 1);\n\t\topenOutputDataButton.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(openOutputDataButton, Priority.SOMETIMES);\n openOutputDataButton.setDisable (true);\n\n\t\trowCount++;\n\n\t\topenOutputDataLabel = new Label(\"Output Data Destination\");\n\t\tfxUtils.applyHeadingStyle(openOutputDataLabel);\n\t\toutputPane.add(openOutputDataLabel, 0, rowCount, 1, 1);\n\t\topenOutputDataLabel.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(openOutputDataLabel, Priority.SOMETIMES);\n\n\t\toutputDictionaryLabel = new Label(\"Data Dictionary Output\");\n\t\tfxUtils.applyHeadingStyle(outputDictionaryLabel);\n\t\toutputPane.add(outputDictionaryLabel, 1, rowCount, 1, 1);\n\t\toutputDictionaryLabel.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(outputDictionaryLabel, Priority.SOMETIMES);\n\n\t\trowCount++;\n\n\t\topenOutputDataName = new Label();\n\t\tfxUtils.applyHeadingStyle(openOutputDataName);\n\t\toutputPane.add(openOutputDataName, 0, rowCount, 1, 1);\n\t\topenOutputDataName.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(openOutputDataName, Priority.SOMETIMES);\n\n\t\toutputDictionaryCkBox = new CheckBox(\"Save Companion Dictionary?\");\n outputDictionaryCkBox.setSelected (false);\n usingDictionary = false;\n outputDictionaryCkBox.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent evt) {\n usingDictionary = outputDictionaryCkBox.isSelected();\n setDictionaryImplications();\n\t\t } // end handle method\n\t\t}); // end event handler\n\t\toutputPane.add(outputDictionaryCkBox, 1, rowCount, 1, 1);\n\t\toutputDictionaryCkBox.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(outputDictionaryCkBox, Priority.SOMETIMES);\n\n\t\toutputPlaceHolder = new Label(\" \");\n\t\toutputPane.add(outputPlaceHolder, 2, rowCount, 1, 1);\n\t\toutputPlaceHolder.setMaxWidth(Double.MAX_VALUE);\n\t\tGridPane.setHgrow(outputPlaceHolder, Priority.SOMETIMES);\n\n\t\trowCount++;\n\n\t\toutputTab.setContent(outputPane);\n\t\toutputTab.setClosable(false);\n }", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "public InfoPopup() {\n initComponents();\n }", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) \r\n\t\t\t{\n\t\t\t\tif(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cibernauta\"))\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_cibernauta(canalL.getValue()));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Vista_Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_vista_usuario(canalL.getValue(), contratacion, idModalidad));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contratacion || idModalidad.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\t\tsubWindow.setContent(new Contratar_cliente(canalL.getValue()));\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdoNavigate(Crear_incidencia.VIEW_NAME + \"/\" + \"contratacion\" +\";\" +canalL.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public CustomPopUp(String lblText, String titleText, String btnText, int height, int width) \r\n {\r\n \r\n stage = new Stage();\r\n btn = new Button(btnText);\r\n prompt = new Label(lblText);\r\n pane = new VBox();\r\n pane.getChildren().addAll(prompt,btn);\r\n pane.setAlignment(Pos.CENTER);\r\n scene = new Scene(pane,height,width);\r\n stage.setTitle(titleText);\r\n stage.setScene(scene);\r\n \r\n btn.setOnAction(event ->\r\n {\r\n this.stage.close();\r\n }); \r\n \r\n }", "public BillPopup() {\n initComponents();\n }", "void createWindow();", "private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "protected void buildUi() {\n\t\t\t LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);\n\t\t\n\t\t\t map = new MapWidget(cawkerCity, 2);\n\t\t\t map.setSize(\"100%\", \"100%\");\n\t\t\t // Add some controls for the zoom level\n\t\t\t map.addControl(new LargeMapControl());\n\t\t\n\t\t\t // Add a marker\n\t\t\t map.addOverlay(new Marker(cawkerCity));\n\t\t\n\t\t\t // Add an info window to highlight a point of interest\n\t\t\t map.getInfoWindow().open(map.getCenter(),\n\t\t\t new InfoWindowContent(\"World's Largest Ball of Sisal Twine\"));\n\t\t\n\t\t\t root.addNorth(map, 500);\n\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n wrapperPanel = new JPanel();\n wrapperPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n wrapperPanel.setMinimumSize(new Dimension(640, 480));\n wrapperPanel.setPreferredSize(new Dimension(800, 600));\n boringPanel = new JPanel();\n boringPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n boringPanel.setInheritsPopupMenu(false);\n boringPanel.setMaximumSize(new Dimension(200, 2147483647));\n boringPanel.setMinimumSize(new Dimension(100, 174));\n boringPanel.setOpaque(false);\n boringPanel.setPreferredSize(new Dimension(150, 228));\n boringPanel.setRequestFocusEnabled(true);\n wrapperPanel.add(boringPanel, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(100, -1), new Dimension(150, -1), new Dimension(200, -1), 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n boringPanel.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n captionLabel = new JLabel();\n captionLabel.setText(\"Label\");\n boringPanel.add(captionLabel, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n numberOfLayersCaptionLabel = new JLabel();\n numberOfLayersCaptionLabel.setText(\"Label\");\n boringPanel.add(numberOfLayersCaptionLabel, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(82, 14), null, 0, false));\n numberOfLayersLabel = new JLabel();\n numberOfLayersLabel.setText(\"\");\n boringPanel.add(numberOfLayersLabel, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_EAST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n matrixTextArea = new JTextArea();\n boringPanel.add(matrixTextArea, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(82, 50), null, 0, false));\n commitButton = new JButton();\n commitButton.setText(\"Button\");\n boringPanel.add(commitButton, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n graphPanel.setBackground(new Color(-1));\n graphPanel.setMinimumSize(new Dimension(530, 24));\n graphPanel.setOpaque(true);\n wrapperPanel.add(graphPanel, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JToolBar toolBar1 = new JToolBar();\n toolBar1.setFloatable(false);\n wrapperPanel.add(toolBar1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(-1, 20), null, 0, false));\n loadButton = new JButton();\n loadButton.setText(\"Button\");\n toolBar1.add(loadButton);\n }", "private void initialize() {\n\t\tframeUnableToBuyPopup = new JFrame();\n\t\tframeUnableToBuyPopup.setUndecorated(true);\n\t\tframeUnableToBuyPopup.setBounds(100, 100, 450, 211);\n\t\tframeUnableToBuyPopup.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframeUnableToBuyPopup.getContentPane().setLayout(null);\n\n\t\tJLabel lblHeading = new JLabel(\"Unable To Purchase Item\");\n\t\tlblHeading.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\n\t\tlblHeading.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblHeading.setBounds(10, 11, 430, 60);\n\t\tframeUnableToBuyPopup.getContentPane().add(lblHeading);\n\n\t\tJLabel lblReason = new JLabel(\"Reason\");\n\n\t\tlblReason.setText(reason);\n\n\t\tlblReason.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblReason.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblReason.setBounds(10, 68, 430, 60);\n\t\tframeUnableToBuyPopup.getContentPane().add(lblReason);\n\n\t\tJButton btnBack = new JButton(\"BACK\");\n\t\tbtnBack.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfinishedWindow();\n\t\t\t}\n\t\t});\n\t\tbtnBack.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnBack.setBounds(10, 139, 430, 60);\n\t\tframeUnableToBuyPopup.getContentPane().add(btnBack);\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "public void initKnowledgePointPopupLayout() {\n knowledgePointPopup = new FrontGateKnowledgePointPopup(this.getContext());\n knowledgePointPopup.showPopupWindow();\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n public void createPopUpWindow(AchievementCardsAdapter.ViewHolder viewHolder) {\n ViewGroup container = (ViewGroup) LayoutInflater.from(context).inflate(R.layout.fragment_achievements_popup_activity,null);\n\n // which view you pass in doesn't matter, it is only used for the window tolken\n @SuppressLint(\"WrongViewCast\")\n View view = (View) recyclerView.getParent();\n\n final PopupWindow popupWindow = new PopupWindow(container, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true);\n popupWindow.setElevation(30);\n\n //Handler to thread sleep and slow down process\n Handler handler=new Handler();\n Runnable r=new Runnable() {\n public void run() {\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n }\n };\n handler.postDelayed(r, 250);\n\n //Handler to thread sleep and slow down process\n r = () -> setUpAchievementActivity(container);\n handler.postDelayed(r, 250);\n\n this.popupWindow = popupWindow;\n }", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "public void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\r\n\t\tmenuItem = new JMenuItem(\"刷新频道\");\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tpopup.add(menuItem);\r\n\r\n\t\thideMenuItem = new JMenuItem(\"隐藏公共频道\");\r\n\t\thideMenuItem.addActionListener(this);\r\n\t\tpopup.add(hideMenuItem);\r\n\t\t// Add listener to the text area so the popup menu can come up.\r\n\t\tMouseListener popupListener = new PopupListener(popup);\r\n\t\tcommonArea.addMouseListener(popupListener);\r\n\t\tmyMsgArea.addMouseListener(popupListener);\r\n\t}", "private void createActionsPanel() {\n DefaultActionGroup group = new DefaultActionGroup();\n group.add(new CloseAction());\n ActionManager actionManager = ActionManager.getInstance();\n JComponent actionsToolbar = actionManager\n .createActionToolbar(ActionPlaces.CODE_INSPECTION, group, false)\n .getComponent();\n JPanel actionsPanel = new JPanel(new BorderLayout());\n actionsPanel.add(actionsToolbar, BorderLayout.WEST);\n add(actionsPanel, BorderLayout.WEST);\n }", "CartogramWizardOptionsWindow ()\n\t{\n\t\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(\"Advanced options\");\n\t\t\t\n\t\tthis.setSize(500, 580);\n\t\tthis.setLocation(40, 50);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\tthis.setModal(true);\n\t\t\n\t\t\n\t\t\t\t\n\t\t// GRID LAYER CHECK BOX\n\t\tmGridLayerCheckBox = \n\t\t\tnew JCheckBox(\"Create a transformation grid layer\");\n\t\t\n\t\tmGridLayerCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getCreateGridLayer());\n\t\t\t\n\t\tmGridLayerCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmGridLayerCheckBox.setLocation(20, 20);\n\t\tmGridLayerCheckBox.setSize(300, 26);\n\t\tthis.add(mGridLayerCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// DEFORMATION GRID LAYER HELP TEXT\n\t\t\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tJTextPane deformationGridPane = new JTextPane();\n\t\tString deformationText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"DeformationGridLayerText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tdeformationText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tdeformationGridPane.setContentType(\"text/html\");\n\t\tdeformationGridPane.setText(deformationText);\n\t\tdeformationGridPane.setEditable(false);\n\t\tdeformationGridPane.addHyperlinkListener(this);\n\t\tdeformationGridPane.setBackground(null);\n\t\tdeformationGridPane.setLocation(45, 45);\n\t\tdeformationGridPane.setSize(400, 30);\n\t\tthis.add(deformationGridPane);\n\t\t\n\t\t\n\t\t\n\t\t// GRID SIZE TEXT FIELD\n\t\tJLabel gridSizeLabel = new JLabel(\"Enter the number of rows:\");\n\t\tgridSizeLabel.setLocation(45, 85);\n\t\tgridSizeLabel.setSize(140, 26);\n\t\tgridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tthis.add(gridSizeLabel);\n\t\t\n\t\tint gridSize = AppContext.cartogramWizard.getDeformationGridSize();\n\t\tString gridSizeString = \"\" + gridSize;\n\t\tmGridSizeTextField = new JTextField(gridSizeString);\n\t\tmGridSizeTextField.setLocation(240, 85);\n\t\tmGridSizeTextField.setSize(50, 26);\n\t\tmGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tthis.add(mGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Separator\n\t\tJSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);\n\t\tseparator.setLocation(20, 120);\n\t\tseparator.setSize(460, 10);\n\t\tthis.add(separator);\n\t\t\n\t\t\n\t\t\n\t\t// ADVANCED OPTIONS CHECK BOX\n\t\tmAdvancedOptionsCheckBox = \n\t\t\tnew JCheckBox(\"Define cartogram parameters manually\");\n\t\t\n\t\tmAdvancedOptionsCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getAdvancedOptionsEnabled());\n\t\t\t\n\t\tmAdvancedOptionsCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmAdvancedOptionsCheckBox.setLocation(20, 140);\n\t\tmAdvancedOptionsCheckBox.setSize(360, 26);\n\t\tmAdvancedOptionsCheckBox.addChangeListener(this);\n\t\tthis.add(mAdvancedOptionsCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t// Manual parameters text\n\t\tmManualParametersPane = new JTextPane();\n\t\tString manualParametersText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"ManualParametersText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tmanualParametersText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmManualParametersPane.setContentType(\"text/html\");\n\t\tmManualParametersPane.setText(manualParametersText);\n\t\tmManualParametersPane.setEditable(false);\n\t\tmManualParametersPane.addHyperlinkListener(this);\n\t\tmManualParametersPane.setBackground(null);\n\t\tmManualParametersPane.setLocation(45, 170);\n\t\tmManualParametersPane.setSize(400, 30);\n\t\tmManualParametersPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mManualParametersPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 1 text\n\t\tmGrid1Pane = new JTextPane();\n\t\tString grid1Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid1Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid1Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid1Pane.setContentType(\"text/html\");\n\t\tmGrid1Pane.setText(grid1Text);\n\t\tmGrid1Pane.setEditable(false);\n\t\tmGrid1Pane.addHyperlinkListener(this);\n\t\tmGrid1Pane.setBackground(null);\n\t\tmGrid1Pane.setLocation(45, 210);\n\t\tmGrid1Pane.setSize(400, 60);\n\t\tmGrid1Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid1Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cartogram grid size\n\t\tmCartogramGridSizeLabel = \n\t\t\tnew JLabel(\"Enter the number of grid rows:\");\n\t\t\t\n\t\tmCartogramGridSizeLabel.setLocation(45, 270);\n\t\tmCartogramGridSizeLabel.setSize(170, 26);\n\t\tmCartogramGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeLabel);\n\t\t\n\t\tint cgGridSizeX = AppContext.cartogramWizard.getCartogramGridSizeInX();\n\t\tint cgGridSizeY = AppContext.cartogramWizard.getCartogramGridSizeInY();\n\t\tint cgGridSize = Math.max(cgGridSizeX, cgGridSizeY);\n\t\tString cgGridSizeString = \"\" + cgGridSize;\n\t\tmCartogramGridSizeTextField = new JTextField(cgGridSizeString);\n\t\tmCartogramGridSizeTextField.setLocation(240, 270);\n\t\tmCartogramGridSizeTextField.setSize(50, 26);\n\t\tmCartogramGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmCartogramGridSizeTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 2 text\n\t\tmGrid2Pane = new JTextPane();\n\t\tString grid2Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid2Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid2Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid2Pane.setContentType(\"text/html\");\n\t\tmGrid2Pane.setText(grid2Text);\n\t\tmGrid2Pane.setEditable(false);\n\t\tmGrid2Pane.addHyperlinkListener(this);\n\t\tmGrid2Pane.setBackground(null);\n\t\tmGrid2Pane.setLocation(45, 315);\n\t\tmGrid2Pane.setSize(400, 50);\n\t\tmGrid2Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid2Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Diffusion grid size\n\t\tmDiffusionGridSizeLabel = new JLabel(\"Diffusion grid size:\");\n\t\tmDiffusionGridSizeLabel.setLocation(45, 365);\n\t\tmDiffusionGridSizeLabel.setSize(170, 26);\n\t\tmDiffusionGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionGridSizeLabel);\n\t\t\n\t\tmDiffusionGridMenu = new JComboBox();\n\t\tmDiffusionGridMenu.setBounds(240, 365, 100, 26);\n\t\tmDiffusionGridMenu.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridMenu.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tmDiffusionGridMenu.addItem(\"64\");\n\t\tmDiffusionGridMenu.addItem(\"128\");\n\t\tmDiffusionGridMenu.addItem(\"256\");\n\t\tmDiffusionGridMenu.addItem(\"512\");\n\t\tmDiffusionGridMenu.addItem(\"1024\");\n\t\t\n\t\tString strGridSize = \n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionGridSize();\n\t\t\t\n\t\tmDiffusionGridMenu.setSelectedItem(strGridSize);\n\t\t\n\t\tthis.add(mDiffusionGridMenu);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations text\n\t\tmIterPane = new JTextPane();\n\t\tString iterText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"GastnerIterationsText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\titerText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmIterPane.setContentType(\"text/html\");\n\t\tmIterPane.setText(iterText);\n\t\tmIterPane.setEditable(false);\n\t\tmIterPane.addHyperlinkListener(this);\n\t\tmIterPane.setBackground(null);\n\t\tmIterPane.setLocation(45, 405);\n\t\tmIterPane.setSize(400, 45);\n\t\tmIterPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations of diffusion algorithm\n\t\tmIterationsLabel = \n\t\t\tnew JLabel(\"Enter the number of iterations:\");\n\t\t\t\n\t\tmIterationsLabel.setLocation(45, 450);\n\t\tmIterationsLabel.setSize(190, 26);\n\t\tmIterationsLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmIterationsLabel.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterationsLabel);\n\n\t\tmDiffusionIterationsTextField = new JTextField(\n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionIterations());\n\t\tmDiffusionIterationsTextField.setLocation(240, 450);\n\t\tmDiffusionIterationsTextField.setSize(50, 26);\n\t\tmDiffusionIterationsTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionIterationsTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmDiffusionIterationsTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionIterationsTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cancel button\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\tcancelButton.setLocation(270, 510);\n\t\tcancelButton.setSize(100, 26);\n\t\t\n\t\tcancelButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithoutSaving\", this));\n\t\t\t\n\t\tthis.add(cancelButton);\n\t\t\n\t\t\n\t\t// Ok button\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.setLocation(380, 510);\n\t\tokButton.setSize(100, 26);\n\t\t\n\t\tokButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithSaving\", this));\n\t\t\t\n\t\tthis.add(okButton);\n\t\t\n\n\n\n\t\t// ADD THE HELP BUTTON\n\t\t\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tJButton helpButton = \n\t\t\tnew JButton(helpIcon);\n\t\t\n\t\thelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\thelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\thelpButton.setSize(30, 30);\n\t\thelpButton.setLocation(20, 510);\n\t\thelpButton.setFocusable(false);\n\t\thelpButton.setContentAreaFilled(false);\n\t\thelpButton.setBorderPainted(false);\n\t\t\n\t\thelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/c-transformation-parameters.php#advanced-options\"));\n\t\t\n\t\tthis.add(helpButton);\n\n\n\n\t\n\t}", "private void initPopupViewControls(){\n // Get layout inflater object.\n LayoutInflater layoutInflater = LayoutInflater.from(getActivity());\n\n // Inflate the popup dialog from a layout xml file.\n popupInputDialogView = layoutInflater.inflate(R.layout.custom_popup_add_new_communication_record, null);\n\n // Get user input edittext and button ui controls in the popup dialog.\n _interactionTypeSpinner = popupInputDialogView.findViewById(R.id.inteructionTypeSpinner);\n _details = popupInputDialogView.findViewById(R.id.details);\n _specialNote = popupInputDialogView.findViewById(R.id.specialNote);\n _nextActionTypeSpinner = popupInputDialogView.findViewById(R.id.nextActionTypeSpinner);\n _nextActionDate = popupInputDialogView.findViewById(R.id.nextActionDate);\n _nextMeetingLocation = popupInputDialogView.findViewById(R.id.nextMeetingLocation);\n\n _saveFamilyMember = popupInputDialogView.findViewById(R.id.button_save_user_data);\n _cancelInput = popupInputDialogView.findViewById(R.id.button_cancel_user_data);\n\n\n }", "private void createUI() throws FactoryException {\n assert theGame != null;\n assert ghostController != null;\n\n buttonPanel = new ButtonPanel(this);\n buttonPanel.initialize();\n\n pi = new PacmanInteraction(this, theGame);\n pi.addController(ghostController);\n buttonPanel.setListener(pi);\n this.addKeyListener(new PacmanKeyListener(pi));\n\n boardView = createBoardView();\n animator = new Animator(boardView);\n pi.addController(animator);\n\n points = new PointsPanel();\n points.initialize(theGame.getPointManager());\n theGame.attach(points);\n\n JPanel mainGrid = new JPanel();\n mainGrid.setLayout(new BorderLayout());\n mainGrid.setName(\"jpacman.topdown\");\n mainGrid.add(points, BorderLayout.NORTH);\n mainGrid.add(boardView, BorderLayout.CENTER);\n mainGrid.add(buttonPanel, BorderLayout.SOUTH);\n\n getContentPane().add(mainGrid);\n\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n int height = boardView.windowHeight() + buttonPanel.getHeight();\n setSize(width, height);\n setGridSize();\n\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n setName(\"jpacman.main\");\n setTitle(\"JPacman\");\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setLayout(new GridLayout(1, false));\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t{\r\n\t\t\tfinal Button btnShowTheFake = new Button(shell, SWT.TOGGLE);\r\n\t\t\tbtnShowTheFake.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t\tif (btnShowTheFake.getSelection()) {\r\n\t\t\t\t\t\tRectangle bounds = btnShowTheFake.getBounds();\r\n\t\t\t\t\t\tPoint pos = shell.toDisplay(bounds.x + 5, bounds.y + bounds.height);\r\n\t\t\t\t\t\ttooltip = showTooltip(shell, pos.x, pos.y);\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Hide it\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (tooltip != null && !tooltip.isDisposed())\r\n\t\t\t\t\t\t\ttooltip.dispose();\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t}\r\n\t}", "private void $$$setupUI$$$() {\n myMainPanel = new JPanel();\n myMainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n myArchetypesPanel = new JPanel();\n myArchetypesPanel.setLayout(new BorderLayout(0, 0));\n myArchetypesPanel.setInheritsPopupMenu(true);\n myMainPanel.add(myArchetypesPanel, new GridConstraints(2, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n alsoDownloadExampleSourceCheckBox = new JCheckBox();\n this.$$$loadButtonText$$$(alsoDownloadExampleSourceCheckBox, ResourceBundle.getBundle(\"Bundle\").getString(\"AsposeWizardPanel.WizardStep.ExampleChkbox\"));\n myArchetypesPanel.add(alsoDownloadExampleSourceCheckBox, BorderLayout.SOUTH);\n fieldTextPane = new JTextPane();\n fieldTextPane.setText(\"\");\n myArchetypesPanel.add(fieldTextPane, BorderLayout.WEST);\n bannerLbl = new JLabel();\n bannerLbl.setAlignmentY(0.0f);\n bannerLbl.setHorizontalAlignment(2);\n bannerLbl.setHorizontalTextPosition(2);\n bannerLbl.setIcon(new ImageIcon(getClass().getResource(\"/resources/long_bannerIntelliJ.png\")));\n bannerLbl.setIconTextGap(0);\n bannerLbl.setText(\"\");\n bannerLbl.setVerticalAlignment(1);\n bannerLbl.setVerticalTextPosition(1);\n myMainPanel.add(bannerLbl, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(10, -1), new Dimension(390, -1), new Dimension(66666, -1), 1, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 2, new Insets(10, 10, 10, 10), -1, -1));\n panel1.setAlignmentX(0.0f);\n panel1.setAlignmentY(0.0f);\n panel1.setOpaque(true);\n myMainPanel.add(panel1, new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n panel1.setBorder(BorderFactory.createTitledBorder(null, ResourceBundle.getBundle(\"Bundle\").getString(\"AsposeWizardPanel.WizardStep.headingMavn\"), TitledBorder.LEFT, TitledBorder.DEFAULT_POSITION, new Font(panel1.getFont().getName(), panel1.getFont().getStyle(), panel1.getFont().getSize()), new Color(-16777216)));\n final JLabel label1 = new JLabel();\n label1.setText(\"GroupId\");\n panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myGroupIdField = new JTextField();\n panel1.add(myGroupIdField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(444, 24), null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"ArtifactId\");\n panel1.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myArtifactIdField = new JTextField();\n panel1.add(myArtifactIdField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(444, 24), null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Version\");\n panel1.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myVersionField = new JTextField();\n myVersionField.setText(\"\");\n panel1.add(myVersionField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(444, 24), null, 0, false));\n }", "public void buildGUI(){\n\n\t\tsetLayout(new BorderLayout());//Setting a borderlayout for the frame\n\t\toptionsPane.setBorder(BorderFactory.createLineBorder(Color.black));//This sets a border around the options panel\n\t\tadd(disclaimer, BorderLayout.SOUTH);//Adds the disclaimer panel to the frame\n\t\tadd(optionsPane, BorderLayout.LINE_START);//Adds the options panel to the frame\n\t\tadd(scrollbar);//Adds the scrollbar to the frame (contains the search frame)\n\t\toptionsPane.add(jpCmbBoxes, BorderLayout.NORTH);//Adds the combo boxes to the options pane\n\t\toptionsPane.add(pic, BorderLayout.SOUTH);//Adds the picture to the options pane\n\t\tdisclaimer.add(disclaim, BorderLayout.LINE_START);//Adds the disclaimer text to the disclaimer panel\n\t\t\n\t\t/*Sets borders around each of the combo boxes, buttons and the disclaimer text */\n\t\ttrackingRange.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tgenderBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tstageofLifeBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\ttagLocationBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchButton.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tdisclaimer.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchByName.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tsearchResults.setLayout((new BoxLayout(searchResults, BoxLayout.PAGE_AXIS)));//Setting the layout for search results panel\n\t\tsearchResults.setBorder(BorderFactory.createLineBorder(Color.black));//Sets a border around the panel\n\t\t/*Adding components to the combo boxes panel */\n\t\tjpCmbBoxes.setLayout(new BoxLayout(jpCmbBoxes, BoxLayout.Y_AXIS));//Sets the layout for this panel\n\t\tjpCmbBoxes.add(subTitle);\n\t\tjpCmbBoxes.add(trackingRangeLabel);\n\t\tjpCmbBoxes.add(trackingRange);\n\t\tjpCmbBoxes.add(genderLabel);\n\t\tjpCmbBoxes.add(genderBox);\n\t\tjpCmbBoxes.add(stageOfLifeLabel);\n\t\tjpCmbBoxes.add(stageofLifeBox);\n\t\tjpCmbBoxes.add(tagLocationLabel);\n\t\tjpCmbBoxes.add(tagLocationBox);\n\t\tjpCmbBoxes.add(searchButton);\n\t\tjpCmbBoxes.add(searchByName);\n\t\t\n\t\ttry {//Importing the image for this panel\n\t\t\tsharkImage = ImageIO.read(new File(\"source/images/shark2.png\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJLabel image = new JLabel(new ImageIcon(sharkImage));//Creating a label and adding the image to the label\n\t\tpic.add(image);//adding the label to the panel\n\t}", "private void $$$setupUI$$$()\n {\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(6, 1, new Insets(20, 20, 20, 20), -1, -1));\n panel.setAutoscrolls(true);\n buttonSettings = new JButton();\n buttonSettings.setEnabled(true);\n buttonSettings.setText(\"Open Application Settings\");\n panel.add(buttonSettings,\n new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonStartGit = new JButton();\n buttonStartGit.setEnabled(true);\n buttonStartGit.setText(\"Start Git Management\");\n panel.add(buttonStartGit,\n new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,\n null, new Dimension(500, 500), null, 0, false));\n textPaneConsole = new JTextPane();\n textPaneConsole.setEditable(false);\n scrollPane1.setViewportView(textPaneConsole);\n buttonOpenBenchmarkDialog = new JButton();\n buttonOpenBenchmarkDialog.setText(\"Open YCSB Benchmark Dialog\");\n panel.add(buttonOpenBenchmarkDialog,\n new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonShowGitSettings = new JButton();\n buttonShowGitSettings.setEnabled(true);\n buttonShowGitSettings.setText(\"Open Git Management\");\n panel.add(buttonShowGitSettings,\n new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,\n GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,\n GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Console Output\");\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,\n GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,\n null, null, 0, false));\n }", "private void buildDialogWindow(Ingredient aIng) {\n\t\t\n \t\tGridBagLayout layout = new GridBagLayout();\n GridBagConstraints lc = new GridBagConstraints();\n getContentPane().setLayout(layout);\n\n \n lc.anchor = GridBagConstraints.EAST;\n lc.insets = new Insets(5, 5, 5, 5);\n\n aLabel = new JLabel(\"Name\");\n lc.gridx = 0; lc.gridy = 0;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n\n aLabel = new JLabel(\"Food Group\");\n lc.gridx = 0; lc.gridy = 1;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n \n aLabel = new JLabel(\"Shelf Life\");\n lc.gridx = 0; lc.gridy = 2;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n\n aLabel = new JLabel(\"Calories\");\n lc.gridx = 0; lc.gridy = 3;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(aLabel, lc);\n getContentPane().add(aLabel);\n\n \t\t// Add the name field\n\t\tnameField = new JTextField(aIng.getName());\n\t\tnameField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 0;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(nameField, lc);\n \t\tgetContentPane().add(nameField);\n\n\t\t// Add the address field\n\t\tfoodGroupField = new JTextField(aIng.getFoodGroup());\n\t\tfoodGroupField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 1;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(foodGroupField, lc);\n \t\tgetContentPane().add(foodGroupField);\n\n \t\tshelfLifeField = new JTextField(\"\"+aIng.getShelfLife());\n \t\tshelfLifeField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 2;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(shelfLifeField, lc);\n \t\tgetContentPane().add(shelfLifeField);\n \t\t\n \t\tcaloriesField = new JTextField(\"\"+aIng.getCalories());\n \t\tcaloriesField.setFont(UIFont);\n lc.gridx = 1; lc.gridy = 3;\n lc.gridwidth = 3; lc.gridheight = 1;\n lc.fill = GridBagConstraints.BOTH;\n lc.weightx = 1.0; lc.weighty = 0.0;\n layout.setConstraints(caloriesField, lc);\n \t\tgetContentPane().add(caloriesField);\n \t\t\n\t\t// Add the Update button\n\t\tupdateButton = new JButton(\"UPDATE\");\n lc.gridx = 1; lc.gridy = 6;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(updateButton, lc);\n \t\tgetContentPane().add(updateButton);\n \n\t\t// Add the Delete button\n\t\tdeleteButton = new JButton(\"DELETE\");\n lc.gridx = 2; lc.gridy = 6;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(deleteButton, lc);\n \t\tgetContentPane().add(deleteButton);\n\n \t\t// Add the Cancel button\n\t\tcancelButton = new JButton(\"CANCEL\");\n \n lc.gridx = 3; lc.gridy = 6;\n lc.gridwidth = 1; lc.gridheight = 1;\n lc.weightx = 0.0; lc.weighty = 0.0;\n layout.setConstraints(cancelButton, lc);\n \t\tgetContentPane().add(cancelButton);\n\t\t\n\t\t\n\t}", "private void createUI(Container pane) {\n try {\n setupTrayIcon();\n } catch (Exception e) { }\n\n EmptyBorder emptyBorder = new EmptyBorder(5, 5, 5, 5);\n GridBagConstraints gbc = new GridBagConstraints();\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weightx = 1; gbc.ipadx = 2; gbc.gridx = 0;\n gbc.weighty = 0; gbc.ipady = 2; gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.PAGE_START;\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException | IllegalAccessException e) {\n LOGGER.error(\"[!] Exception setting system theme:\", e);\n }\n\n ripTextfield = new JTextField(\"\", 20);\n ripTextfield.addMouseListener(new ContextMenuMouseListener());\n ImageIcon ripIcon = new ImageIcon(mainIcon);\n ripButton = new JButton(\"<html><font size=\\\"5\\\"><b>Rip</b></font></html>\", ripIcon);\n stopButton = new JButton(\"<html><font size=\\\"5\\\"><b>Stop</b></font></html>\");\n stopButton.setEnabled(false);\n try {\n Image stopIcon = ImageIO.read(getClass().getClassLoader().getResource(\"stop.png\"));\n stopButton.setIcon(new ImageIcon(stopIcon));\n } catch (Exception ignored) { }\n JPanel ripPanel = new JPanel(new GridBagLayout());\n ripPanel.setBorder(emptyBorder);\n\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weightx = 0;\n gbc.gridx = 0; ripPanel.add(new JLabel(\"URL:\", JLabel.RIGHT), gbc);\n gbc.weightx = 1;\n gbc.weighty = 1;\n gbc.gridx = 1; ripPanel.add(ripTextfield, gbc);\n gbc.weighty = 0;\n gbc.weightx = 0;\n gbc.gridx = 2; ripPanel.add(ripButton, gbc);\n gbc.gridx = 3; ripPanel.add(stopButton, gbc);\n gbc.weightx = 1;\n\n statusLabel = new JLabel(rb.getString(\"inactive\"));\n statusLabel.setHorizontalAlignment(JLabel.CENTER);\n openButton = new JButton();\n openButton.setVisible(false);\n JPanel statusPanel = new JPanel(new GridBagLayout());\n statusPanel.setBorder(emptyBorder);\n\n gbc.gridx = 0; statusPanel.add(statusLabel, gbc);\n gbc.gridy = 1; statusPanel.add(openButton, gbc);\n gbc.gridy = 0;\n\n JPanel progressPanel = new JPanel(new GridBagLayout());\n progressPanel.setBorder(emptyBorder);\n statusProgress = new JProgressBar(0, 100);\n progressPanel.add(statusProgress, gbc);\n\n JPanel optionsPanel = new JPanel(new GridBagLayout());\n optionsPanel.setBorder(emptyBorder);\n optionLog = new JButton(rb.getString(\"Log\"));\n optionHistory = new JButton(rb.getString(\"History\"));\n optionQueue = new JButton(rb.getString(\"Queue\"));\n optionConfiguration = new JButton(rb.getString(\"Configuration\"));\n optionLog.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n optionHistory.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n optionQueue.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n optionConfiguration.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n try {\n Image icon;\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"comment.png\"));\n optionLog.setIcon(new ImageIcon(icon));\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"time.png\"));\n optionHistory.setIcon(new ImageIcon(icon));\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"list.png\"));\n optionQueue.setIcon(new ImageIcon(icon));\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"gear.png\"));\n optionConfiguration.setIcon(new ImageIcon(icon));\n } catch (Exception e) { }\n gbc.gridx = 0; optionsPanel.add(optionLog, gbc);\n gbc.gridx = 1; optionsPanel.add(optionHistory, gbc);\n gbc.gridx = 2; optionsPanel.add(optionQueue, gbc);\n gbc.gridx = 3; optionsPanel.add(optionConfiguration, gbc);\n\n logPanel = new JPanel(new GridBagLayout());\n logPanel.setBorder(emptyBorder);\n logText = new JTextPane();\n logText.setEditable(false);\n JScrollPane logTextScroll = new JScrollPane(logText);\n logTextScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n logPanel.setVisible(false);\n logPanel.setPreferredSize(new Dimension(300, 250));\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weighty = 1;\n logPanel.add(logTextScroll, gbc);\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weighty = 0;\n\n historyPanel = new JPanel(new GridBagLayout());\n historyPanel.setBorder(emptyBorder);\n historyPanel.setVisible(false);\n historyPanel.setPreferredSize(new Dimension(300, 250));\n historyTableModel = new AbstractTableModel() {\n private static final long serialVersionUID = 1L;\n @Override\n public String getColumnName(int col) {\n return HISTORY.getColumnName(col);\n }\n @Override\n public Class<?> getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }\n @Override\n public Object getValueAt(int row, int col) {\n return HISTORY.getValueAt(row, col);\n }\n @Override\n public int getRowCount() {\n return HISTORY.toList().size();\n }\n @Override\n public int getColumnCount() {\n return HISTORY.getColumnCount();\n }\n @Override\n public boolean isCellEditable(int row, int col) {\n return (col == 0 || col == 4);\n }\n @Override\n public void setValueAt(Object value, int row, int col) {\n if (col == 4) {\n HISTORY.get(row).selected = (Boolean) value;\n historyTableModel.fireTableDataChanged();\n }\n }\n };\n historyTable = new JTable(historyTableModel);\n historyTable.addMouseListener(new HistoryMenuMouseListener());\n historyTable.setAutoCreateRowSorter(true);\n for (int i = 0; i < historyTable.getColumnModel().getColumnCount(); i++) {\n int width = 130; // Default\n switch (i) {\n case 0: // URL\n width = 270;\n break;\n case 3:\n width = 40;\n break;\n case 4:\n width = 15;\n break;\n }\n historyTable.getColumnModel().getColumn(i).setPreferredWidth(width);\n }\n JScrollPane historyTableScrollPane = new JScrollPane(historyTable);\n historyButtonRemove = new JButton(rb.getString(\"remove\"));\n historyButtonClear = new JButton(rb.getString(\"clear\"));\n historyButtonRerip = new JButton(rb.getString(\"re-rip.checked\"));\n gbc.gridx = 0;\n // History List Panel\n JPanel historyTablePanel = new JPanel(new GridBagLayout());\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weighty = 1;\n historyTablePanel.add(historyTableScrollPane, gbc);\n gbc.ipady = 180;\n gbc.gridy = 0;\n historyPanel.add(historyTablePanel, gbc);\n gbc.ipady = 0;\n JPanel historyButtonPanel = new JPanel(new GridBagLayout());\n historyButtonPanel.setPreferredSize(new Dimension(300, 10));\n historyButtonPanel.setBorder(emptyBorder);\n gbc.gridx = 0; historyButtonPanel.add(historyButtonRemove, gbc);\n gbc.gridx = 1; historyButtonPanel.add(historyButtonClear, gbc);\n gbc.gridx = 2; historyButtonPanel.add(historyButtonRerip, gbc);\n gbc.gridy = 1; gbc.gridx = 0;\n gbc.weighty = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n historyPanel.add(historyButtonPanel, gbc);\n\n queuePanel = new JPanel(new GridBagLayout());\n queuePanel.setBorder(emptyBorder);\n queuePanel.setVisible(false);\n queuePanel.setPreferredSize(new Dimension(300, 250));\n queueListModel = new DefaultListModel();\n JList queueList = new JList(queueListModel);\n queueList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n queueList.addMouseListener(new QueueMenuMouseListener());\n JScrollPane queueListScroll = new JScrollPane(queueList,\n JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,\n JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n for (String item : Utils.getConfigList(\"queue\")) {\n queueListModel.addElement(item);\n }\n updateQueueLabel();\n gbc.gridx = 0;\n JPanel queueListPanel = new JPanel(new GridBagLayout());\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weighty = 1;\n queueListPanel.add(queueListScroll, gbc);\n queuePanel.add(queueListPanel, gbc);\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weighty = 0;\n gbc.ipady = 0;\n\n configurationPanel = new JPanel(new GridBagLayout());\n configurationPanel.setBorder(emptyBorder);\n configurationPanel.setVisible(false);\n // TODO Configuration components\n configUpdateButton = new JButton(rb.getString(\"check.for.updates\"));\n configUpdateLabel = new JLabel( rb.getString(\"current.version\") + \": \" + UpdateUtils.getThisJarVersion(), JLabel.RIGHT);\n configThreadsLabel = new JLabel(rb.getString(\"max.download.threads\") + \":\", JLabel.RIGHT);\n configTimeoutLabel = new JLabel(rb.getString(\"timeout.mill\"), JLabel.RIGHT);\n configRetriesLabel = new JLabel(rb.getString(\"retry.download.count\"), JLabel.RIGHT);\n configThreadsText = new JTextField(Integer.toString(Utils.getConfigInteger(\"threads.size\", 3)));\n configTimeoutText = new JTextField(Integer.toString(Utils.getConfigInteger(\"download.timeout\", 60000)));\n configRetriesText = new JTextField(Integer.toString(Utils.getConfigInteger(\"download.retries\", 3)));\n configOverwriteCheckbox = addNewCheckbox(rb.getString(\"overwrite.existing.files\"), \"file.overwrite\", false);\n configAutoupdateCheckbox = addNewCheckbox(rb.getString(\"auto.update\"), \"auto.update\", true);\n configPlaySound = addNewCheckbox(rb.getString(\"sound.when.rip.completes\"), \"play.sound\", false);\n configShowPopup = addNewCheckbox(rb.getString(\"notification.when.rip.starts\"), \"download.show_popup\", false);\n configSaveOrderCheckbox = addNewCheckbox(rb.getString(\"preserve.order\"), \"download.save_order\", true);\n configSaveLogs = addNewCheckbox(rb.getString(\"save.logs\"), \"log.save\", false);\n configSaveURLsOnly = addNewCheckbox(rb.getString(\"save.urls.only\"), \"urls_only.save\", false);\n configSaveAlbumTitles = addNewCheckbox(rb.getString(\"save.album.titles\"), \"album_titles.save\", true);\n configClipboardAutorip = addNewCheckbox(rb.getString(\"autorip.from.clipboard\"), \"clipboard.autorip\", false);\n configSaveDescriptions = addNewCheckbox(rb.getString(\"save.descriptions\"), \"descriptions.save\", true);\n configPreferMp4 = addNewCheckbox(rb.getString(\"prefer.mp4.over.gif\"),\"prefer.mp4\", false);\n configWindowPosition = addNewCheckbox(rb.getString(\"restore.window.position\"), \"window.position\", true);\n configURLHistoryCheckbox = addNewCheckbox(rb.getString(\"remember.url.history\"), \"remember.url_history\", true);\n configUrlFileChooserButton = new JButton(rb.getString(\"download.url.list\"));\n\n configLogLevelCombobox = new JComboBox<>(new String[] {\"Log level: Error\", \"Log level: Warn\", \"Log level: Info\", \"Log level: Debug\"});\n configSelectLangComboBox = new JComboBox<>(supportedLanges);\n configLogLevelCombobox.setSelectedItem(Utils.getConfigString(\"log.level\", \"Log level: Debug\"));\n setLogLevel(configLogLevelCombobox.getSelectedItem().toString());\n configSaveDirLabel = new JLabel();\n try {\n String workingDir = (Utils.shortenPath(Utils.getWorkingDirectory()));\n configSaveDirLabel.setText(workingDir);\n configSaveDirLabel.setForeground(Color.BLUE);\n configSaveDirLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n } catch (Exception e) { }\n configSaveDirLabel.setToolTipText(configSaveDirLabel.getText());\n configSaveDirLabel.setHorizontalAlignment(JLabel.RIGHT);\n configSaveDirButton = new JButton(rb.getString(\"select.save.dir\") + \"...\");\n\n addItemToConfigGridBagConstraints(gbc, 0, configUpdateLabel, configUpdateButton);\n addItemToConfigGridBagConstraints(gbc, 1, configAutoupdateCheckbox, configLogLevelCombobox);\n addItemToConfigGridBagConstraints(gbc, 2, configThreadsLabel, configThreadsText);\n addItemToConfigGridBagConstraints(gbc, 3, configTimeoutLabel, configTimeoutText);\n addItemToConfigGridBagConstraints(gbc, 4, configRetriesLabel, configRetriesText);\n addItemToConfigGridBagConstraints(gbc, 5, configOverwriteCheckbox, configSaveOrderCheckbox);\n addItemToConfigGridBagConstraints(gbc, 6, configPlaySound, configSaveLogs);\n addItemToConfigGridBagConstraints(gbc, 7, configShowPopup, configSaveURLsOnly);\n addItemToConfigGridBagConstraints(gbc, 8, configClipboardAutorip, configSaveAlbumTitles);\n addItemToConfigGridBagConstraints(gbc, 9, configSaveDescriptions, configPreferMp4);\n addItemToConfigGridBagConstraints(gbc, 10, configWindowPosition, configURLHistoryCheckbox);\n addItemToConfigGridBagConstraints(gbc, 11, configSelectLangComboBox, configUrlFileChooserButton);\n addItemToConfigGridBagConstraints(gbc, 12, configSaveDirLabel, configSaveDirButton);\n\n\n\n\n emptyPanel = new JPanel();\n emptyPanel.setPreferredSize(new Dimension(0, 0));\n emptyPanel.setSize(0, 0);\n\n gbc.anchor = GridBagConstraints.PAGE_START;\n gbc.gridy = 0; pane.add(ripPanel, gbc);\n gbc.gridy = 1; pane.add(statusPanel, gbc);\n gbc.gridy = 2; pane.add(progressPanel, gbc);\n gbc.gridy = 3; pane.add(optionsPanel, gbc);\n gbc.weighty = 1;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.gridy = 4; pane.add(logPanel, gbc);\n gbc.gridy = 5; pane.add(historyPanel, gbc);\n gbc.gridy = 5; pane.add(queuePanel, gbc);\n gbc.gridy = 5; pane.add(configurationPanel, gbc);\n gbc.gridy = 5; pane.add(emptyPanel, gbc);\n gbc.weighty = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n }", "ViewGroup activatePopupContainer();", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "private void displayPopUp(Parent root) {\n Scene scene = new Scene(root, 300, 200);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.showAndWait();\n }", "@FXML\n void expandElement (Element element) {\n\n// expand request from Menu\n if (messageLabel.isVisible()) {\n\n// if Element is a Timeline, calls edit Timeline function\n if (element instanceof Timeline)\n openEditTimelineWindow((Timeline) element);\n\n// if Element is an Event, calls edit Event function\n else if (element instanceof Event)\n openEditEventWindow((Event) element);\n }\n\n// expand request from Main\n else {\n\n// create a new pop-up window\n Stage popUp = new Stage();\n popUp.setTitle(\"\");\n popUp.getIcons().add(logo);\n\n// create a temporary VerticalBox to place all Nodes\n VBox content = new VBox();\n\n// Label with the name of the Element\n Label name = new Label(element.name);\n name.setStyle(stylesheet.toString());\n name.getStyleClass().add(\"nameLabel\");\n\n content.getChildren().add(name);\n\n\n// if Element is a Timeline, list all Events\n if (element instanceof Timeline) {\n Label label;\n for (Event event : ((Timeline) element).events) {\n label = new Label(event.name);\n label.setStyle(stylesheet.toString());\n label.getStyleClass().add(\"detailsLabel\");\n content.getChildren().add(label);\n }\n }\n\n// if Element is an Event, creates Labels for dates and notes\n else if (element instanceof Event) {\n Label date = new Label(\n ((Event) element).startDate[0] + \" \" + getMonth(((Event) element).startDate[1]) + \" \" + ((Event) element).startDate[2] + \" – \" +\n ((Event) element).endDate[0] + \" \" + getMonth(((Event) element).endDate[1]) + \" \" + ((Event) element).endDate[2]);\n date.setStyle(stylesheet.toString());\n date.getStyleClass().add(\"detailsLabel\");\n\n Label notes = new Label(((Event) element).notes);\n notes.setStyle(stylesheet.toString());\n notes.getStyleClass().add(\"notesLabel\");\n\n content.getChildren().addAll(date, notes);\n }\n\n// creates the pop-up\n Scene scene = new Scene(content);\n scene.getStylesheets().add(getClass().getResource(\"stylesheet.css\").toExternalForm());\n scene.getStylesheets().add(stylesheet.toString());\n\n popUp.setScene(scene);\n popUp.show();\n }\n }", "public void triggerPopup();", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "protected Control createContents(Composite parent) {\n\t\tgetOverlayStore().load();\r\n\t\tgetOverlayStore().start();\r\n Composite composite = createContainer(parent);\r\n \r\n // The layout info for the preference page\r\n GridLayout gridLayout = new GridLayout();\r\n gridLayout.marginHeight = 0;\r\n gridLayout.marginWidth = 0;\r\n composite.setLayout(gridLayout);\r\n \r\n // A panel for the preference page\r\n Composite defPanel = new Composite(composite, SWT.NONE);\r\n GridLayout layout = new GridLayout();\r\n int numColumns = 2;\r\n layout.numColumns = numColumns;\r\n defPanel.setLayout(layout);\r\n GridData gridData =\r\n new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);\r\n defPanel.setLayoutData(gridData);\r\n \r\n\r\n // Browser options\r\n\t\tGroup wrappingGroup= createGroup(numColumns, defPanel, \"Web Browser\");\r\n\t\tString labelText= \"Use tabbed browsing\";\r\n\t\tlabelText= \"Used tabbed browsing\";\r\n\t\taddCheckBox(wrappingGroup, labelText, CFMLPreferenceConstants.P_TABBED_BROWSER, 1);\r\n \r\n // File paths\r\n createFilePathGroup(defPanel);\r\n \r\n // Images tooltips\r\n\t\tGroup imageGroup= createGroup(numColumns, defPanel, \"Images\");\r\n\t\tlabelText= \"Show Image Tooltips (restart required)\";\r\n\t\taddCheckBox(imageGroup, labelText, CFMLPreferenceConstants.P_IMAGE_TOOLTIPS, 1);\r\n \t\t\r\n\t\t// default help url\r\n\t\tGroup helpGroup= createGroup(numColumns, defPanel, \"External Help Documentation\");\r\n\t\tlabelText= \"Default URL:\";\r\n\t\taddTextField(helpGroup, labelText, CFMLPreferenceConstants.P_DEFAULT_HELP_URL, 50, 0, null);\r\n\t\tlabelText= \"Use external broswer\";\r\n\t\taddCheckBox(helpGroup, labelText, CFMLPreferenceConstants.P_HELP_URL_USE_EXTERNAL_BROWSER, 1);\r\n \r\n // Template Sites\r\n \r\n // createTemplateSitesPathGroup(defPanel);\r\n\r\n\t\tinitializeFields();\r\n\t\tapplyDialogFont(defPanel);\r\n\r\n\t\treturn composite;\r\n }", "private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }", "public void createLoginPopUp(JButton loginButton) {\n\t\tJPanel loginPanel = new JPanel();\n\n\t\tHintTextField usernameEntry = new HintTextField(\"Username\");\n\t\tusernameEntry.setPreferredSize(new Dimension(150, 25));\n\n\t\tHintPasswordField passwordEntry = new HintPasswordField(\"Password\");\n\t\tpasswordEntry.setPreferredSize(new Dimension(150, 25));\n\n\t\tBox vBox = Box.createVerticalBox(); // Align components in one column\n\t\tvBox.add(usernameEntry);\n\t\tvBox.add(passwordEntry);\n\n\t\tloginPanel.add(vBox);\n\t\tObject options[] = { \"Login\", \"Cancel\" };\n\n\t\tint selection = JOptionPane.showOptionDialog(null, loginPanel, \"BTS Login\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\n\t\tif (selection == JOptionPane.OK_OPTION) {\n\t\t\tString username = usernameEntry.getText();\n\t\t\tString password = String.valueOf(passwordEntry.getPassword());\n\t\t\t// Call Login method in uicontroller and take action based on result\n\t\t\tEmployee logged_in_result = uiController_.login(username + \":\" + password);\n\t\t\tif (logged_in_result == null) {\n\t\t\t\t// Show login failed message\n\t\t\t\tJOptionPane.showMessageDialog(uiController_.getFrame(), \"Unrecognized Login Credentials\",\n\t\t\t\t\t\t\"Invalid Login\", JOptionPane.WARNING_MESSAGE);\n\t\t\t} else if (logged_in_result instanceof Manager) {\n\t\t\t\t// Get components\n\t\t\t\t((DefaultComboBoxModel<String>) pageSelector.getModel()).addElement(\"Assignment\");\n\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\tloginButton.setVisible(false);\n\n\t\t\t\t// Create new ManagerPanel if it doesn't exist\n\t\t\t\tif (!uiController_.checkPanelExists(\"ManagerPanel\", viewHolder)) {\n\t\t\t\t\tviewHolder.add(new ManagerPanel(uiController_).getPanel_(), \"ManagerPanel\");\n\t\t\t\t}\n\n\t\t\t\t// Change view to manager panel\n\t\t\t\tlayout.show(viewHolder, \"ManagerPanel\");\n\t\t\t} else if (logged_in_result instanceof Developer) {\n\t\t\t\t((DefaultComboBoxModel<String>) pageSelector.getModel()).addElement(\"Assignment\");\n\t\t\t\tpageSelector.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif (pageSelector.getSelectedItem().equals(\"Assignment\")) {\n\t\t\t\t\t\t\t// Switch to Ordinary panel\n\t\t\t\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\t\t\t\tlayout.show(viewHolder, \"DeveloperPanel\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\t// Get components\n\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\tloginButton.setVisible(false);\n\t\t\t\t// Create new DeveloperPanel if it doesn't exist\n\t\t\t\tif (!uiController_.checkPanelExists(\"DeveloperPanel\", viewHolder)) {\n\t\t\t\t\tviewHolder.add(new DeveloperPanel(uiController_).getPanel_(), \"DeveloperPanel\");\n\t\t\t\t}\n\n\t\t\t\t// Change view to developer panel\n\t\t\t\tlayout.show(viewHolder, \"DeveloperPanel\");\n\t\t\t}\n\t\t}\n\t}", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "private void displayPopup(NativeEvent event, Element parent) {\n if (displayed) {\n return;\n }\n displayed = true;\n\n HorizontalPanel holder = new HorizontalPanel();\n SimplePanel arrow = new SimplePanel();\n arrow.addStyleName(\"arrow-left\");\n\n HTMLPanel panel = new HTMLPanel(tooltip);\n panel.addStyleName(\"panel\");\n\n holder.add(arrow);\n holder.add(panel);\n\n popup.clear();\n popup.add(holder);\n popup.addStyleName(StyleResource.INSTANCE.modal().tooltip());\n popup.show();\n popup.setPopupPosition(parent.getAbsoluteLeft() + 33, parent.getAbsoluteTop() + 2);\n }", "private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }", "void fillInnerParts() {\n browserPanel = new BrowserPanel();\n\t\tTemplateClass.instrum(\"LineNumber: \",\"129\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\", \"VariableName: \",\"browserPanel\", \"VariableName: \",\"BrowserPanel\");\n browserPlaceholder.getChildren().add(browserPanel.getRoot());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"130\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n\n personListPanel = new PersonListPanel(logic.getFilteredPersonList());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"132\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"133\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n\n ResultDisplay resultDisplay = new ResultDisplay();\n\t\tTemplateClass.instrum(\"LineNumber: \",\"135\", \"Type: \",\"org.eclipse.jdt.core.dom.VariableDeclarationStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\", \"VariableName: \",\"ResultDisplay\", \"VariableName: \",\"resultDisplay\", \"VariableName: \",\"ResultDisplay\");\n resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"136\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n\n StatusBarFooter statusBarFooter = new StatusBarFooter(prefs.getAddressBookFilePath());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"138\", \"Type: \",\"org.eclipse.jdt.core.dom.VariableDeclarationStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"139\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n\n CommandBox commandBox = new CommandBox(logic);\n\t\tTemplateClass.instrum(\"LineNumber: \",\"141\", \"Type: \",\"org.eclipse.jdt.core.dom.VariableDeclarationStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\", \"VariableName: \",\"CommandBox\", \"VariableName: \",\"commandBox\", \"VariableName: \",\"CommandBox\", \"VariableName: \",\"logic\");\n commandBoxPlaceholder.getChildren().add(commandBox.getRoot());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"142\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"fillInnerParts\", \"Class: \",\"MainWindow\");\n }", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "public void buildMainGUI(){\n // Clear the frame\n rebuildFrame();\n \n // Header options in main GUI\n header.setText(\" Problem choice: \");\n \n //------Unique panel objects here---------\n \n JButton project1Button = new JButton(\"Project 1 - Search, Constraint Satisfaction, and Graph Coloring\");\n project1Button.addActionListener((ActionEvent e) -> {\n \n // If pressed, build project 1 GUI\n buildProject1GUI();\n \n });\n controlPanel.add(project1Button);\n \n \n //----------------------------------------\n \n // Display GUI after finished building\n controlFrame.pack();\n controlFrame.setVisible(true);\n }", "public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }", "public Popup makeEditPopup() {\n Popup popup = new Popup();\n popup.setY(0);\n popup.setX(0);\n GridPane pane = new GridPane();\n setUpPopupTexts();\n pane.setVgap(8);\n pane.setHgap(8);\n addColumn0(pane);\n addColumn1(pane);\n popup.getContent().add(pane);\n return popup;\n }", "private static void createAndShowGUI() {\n if (!SystemTray.isSupported()) {\r\n return;\r\n }\r\n final PopupMenu popup = new PopupMenu();\r\n final TrayIcon trayIcon =\r\n new TrayIcon(createImage(\"/config/mut3.png\", \"JFileImporter\"));\r\n final SystemTray tray = SystemTray.getSystemTray();\r\n Font itemFont = new Font(\"Ariel\",Font.BOLD,12);\r\n // Create a popup menu components\r\n MenuItem aboutItem = new MenuItem(\"About\");\r\n MenuItem maxItem = new MenuItem(\"Maximize\");\r\n MenuItem minItem = new MenuItem(\"Minimize\");\r\n MenuItem showSchedulerItem = new MenuItem(\"Show Scheduler\");\r\n MenuItem showImporterItem = new MenuItem(\"Show Importer\");\r\n MenuItem exitItem = new MenuItem(\"Exit\");\r\n\r\n aboutItem.setFont(itemFont);\r\n maxItem.setFont(itemFont);\r\n minItem.setFont(itemFont);\r\n showSchedulerItem.setFont(itemFont);\r\n showImporterItem.setFont(itemFont);\r\n exitItem.setFont(itemFont);\r\n //Add components to popup menu\r\n popup.add(aboutItem);\r\n popup.addSeparator();\r\n popup.add(maxItem);\r\n popup.add(minItem);\r\n popup.addSeparator();\r\n popup.add(showSchedulerItem);\r\n popup.add(showImporterItem); \r\n popup.addSeparator();\r\n popup.add(exitItem);\r\n \r\n trayIcon.setPopupMenu(popup);\r\n \r\n try {\r\n tray.add(trayIcon);\r\n } catch (AWTException e) {\r\n \tJOptionPane.showMessageDialog(null, \"Tray Icon could not be added \"+e, \"Error creating Tray Icon\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n trayIcon.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJImporterMain.maximize();\r\n }\r\n });\r\n \r\n maxItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJImporterMain.maximize();\r\n }\r\n });\r\n minItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \ttrayIcon.displayMessage(\"JFileImporter\", \"Importer Still Running! Right Click for more options\", TrayIcon.MessageType.INFO);\r\n \tJImporterMain.minimize();\r\n \t\r\n }\r\n });\r\n \r\n aboutItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \ttrayIcon.displayMessage(\"About\", \"JFileImporter\\nVersion\\t1.00\\nDeveloped By:\\tAnil Sehgal\", TrayIcon.MessageType.INFO);\r\n }\r\n });\r\n \r\n showImporterItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJImporterMain.showImporter();\r\n }\r\n });\r\n showSchedulerItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tString schedulerShown = LoadProfileUI.showScheduler();\r\n \tif(schedulerShown.equals(\"npe\")){\r\n \t\ttrayIcon.displayMessage(\"Scheduler\", \"Please initialize the Scheduler from Menu\", TrayIcon.MessageType.WARNING);\r\n \t}else if(schedulerShown.equals(\"ge\")){\r\n \t\ttrayIcon.displayMessage(\"Scheduler\", \"Error Launching Scheduler, Please contact technical support\", TrayIcon.MessageType.ERROR);\r\n \t}\r\n }\r\n });\r\n trayIcon.setImageAutoSize(true);\r\n trayIcon.setToolTip(\"JFileImporter\"); \r\n exitItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tint option = JOptionPane.showConfirmDialog(null, \"If You Quit the Application, the scheduled job will terminate!\", \"Exit Confirmation\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);\r\n \tif(option == JOptionPane.OK_OPTION){\r\n\t tray.remove(trayIcon);\r\n\t System.exit(0);\r\n \t}\r\n }\r\n });\r\n }", "private void buildPanel()\n\t{\n\t\tvoterIDMessage = new JLabel(\"Please Enter Your Voter ID.\");\n\t\tbutton1 = new JButton(\"Cancel\");\n\t\tbutton1.addActionListener(new ButtonListener());\n\t\tbutton2 = new JButton(\"OK\");\n\t\tbutton2.addActionListener(new ButtonListener());\n\t\tidText = new JTextField(10);\n\t\tpanel1 = new JPanel();\n\t\tpanel2 = new JPanel();\n\t\tpanel3 = new JPanel();\n\t\tpanel1.add(voterIDMessage);\n\t\tpanel2.add(idText);\n\t\tpanel3.add(button1);\n\t\tpanel3.add(button2);\n\t}", "public void uiBuilder(){\n fontLoader();\n\n jfFrame = new JFrame(String.format(\"Coronos - %s\", username));\n jfFrame.setLayout(new BorderLayout());\n //Instantiate JFrame, add Title, add LayoutManager GridLayout\n\n\n jmMenuBar = new JMenuBar();\n //Instantiate JMenuBar\n\n jmFile = new JMenu(\"File\");\n jmHelp = new JMenu(\"Help\");\n //Adding Menus to JMenuBar\n\n jmExit = new JMenuItem(\"Exit\");\n jmAbout = new JMenuItem(\"About\");\n //Instantiating Options for JMenus\n\n jmExit.addActionListener(this);\n jmAbout.addActionListener(this);\n\n jmFile.add(jmExit);\n jmHelp.add(jmAbout);\n //adding Options to JMenus\n\n jmMenuBar.add(jmFile);\n jmMenuBar.add(jmHelp);\n //adding JMenus to JMenuBar\n\n jfFrame.setJMenuBar(jmMenuBar);\n //adding JMenuBar to JFrame\n\n jpClockPanel = new JPanel(new FlowLayout());\n jpContainerPanel = new JPanel(new FlowLayout());\n Border blackLine = BorderFactory.createTitledBorder(\"Current Time\");\n jpClockPanel.setBorder(blackLine);\n //instantiate JPanel for clock\n\n clockLabelOne = new JLabel();\n clockLabelOne.setFont(customFont);\n clockLabelOne.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelOne);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n clockLabelTwo = new JLabel();\n clockLabelTwo.setFont(customFont);\n clockLabelTwo.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelTwo);\n clockLabelTwo.setVisible(false);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n jpGridPanel1 = new JPanel(new GridLayout(4, 1, 15, 15));\n jpGridPanel2 = new JPanel(new GridLayout(4, 1, 15, 15));\n\n jbPunchIn = new JButton(\"Punch In\");\n jbReport = new JButton(\"View Report\");\n jbProfile = new JButton(\"View Profile\");\n jbSave = new JButton(\"Save\");\n jbPunchOut = new JButton(\"Punch Out\");\n jbViewPunches = new JButton(\"View Punches\");\n jbFormatTime = new JButton(\"12/24HR Time\");\n jbHideChat = new JButton(\"Hide Chat\");\n\n jbHideChat.setToolTipText(\"Hate your co-workers? Want to hide from your boss? Just close chat!\");\n\n jbPunchIn.addActionListener(this);\n jbReport.addActionListener(this);\n jbProfile.addActionListener(this);\n jbSave.addActionListener(this);\n jbPunchOut.addActionListener(this);\n jbViewPunches.addActionListener(this);\n jbFormatTime.addActionListener(this);\n jbHideChat.addActionListener(this);\n\n jpGridPanel1.add(jbPunchIn);\n jpGridPanel1.add(jbReport);\n jpGridPanel1.add(jbProfile);\n jpGridPanel1.add(jbSave);\n\n jpGridPanel2.add(jbPunchOut);\n jpGridPanel2.add(jbViewPunches);\n jpGridPanel2.add(jbFormatTime);\n jpGridPanel2.add(jbHideChat);\n\n jpActionPanel = new JPanel(new FlowLayout());\n Border actionBorder = BorderFactory.createTitledBorder(\"Employee Actions\");\n jpActionPanel.setBorder(actionBorder);\n jpActionPanel.add(jpGridPanel1);\n jpActionPanel.add(jpGridPanel2);\n jpContainerPanel.add(jpActionPanel);\n\n jpChatPanel = new JPanel(new BorderLayout());\n jpAreaPanel = new JPanel(new FlowLayout());\n jtaChatArea = new JTextArea(10, 10);\n jtaChatArea.setLineWrap(true);\n jtaChatArea.setWrapStyleWord(true);\n jtaChatArea.setEditable(false);\n jspChatPane = new JScrollPane(jtaChatArea);\n jtfChatField = new JTextField(12);\n jtfChatField.addActionListener(this);\n jtfChatField.setActionCommand(\"Send\");\n chatButton = new JButton(\"Send\");\n chatButton.addActionListener(this);\n jpSendPanel = new JPanel(new FlowLayout());\n jpSendPanel.add(jtfChatField);\n jpSendPanel.add(chatButton);\n Border chatBorder = BorderFactory.createTitledBorder(\"Chat\");\n jpChatPanel.setBorder(chatBorder);\n jpChatPanel.add(jspChatPane, BorderLayout.NORTH);\n jpChatPanel.add(jpSendPanel, BorderLayout.SOUTH);\n jpContainerPanel.add(jpChatPanel);\n\n // jfFrame.add(clockPanelTwo, BorderLayout.NORTH);\n jfFrame.add(jpClockPanel, BorderLayout.NORTH);\n jfFrame.add(jpContainerPanel, BorderLayout.SOUTH);\n\n //adding JPanels to JFrame\n\n jfFrame.setLocationRelativeTo(null);\n jfFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jfFrame.setVisible(false);\n jfFrame.pack();\n jfFrame.setSize(600, 375);\n jfFrame.setResizable(false);\n \n //settings for frame\n\n ActionListener clockUpdateOne = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerOne = new javax.swing.Timer(0, clockUpdateOne);\n clockTimerOne.start();\n //timer to update clockLabel\n ActionListener clockUpdateTwo = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerTwo = new javax.swing.Timer(0, clockUpdateTwo);\n clockTimerTwo.start();\n\n }", "protected void createContents() {\n\t\tshlCarbAndRemainder = new Shell(Display.getDefault(), SWT.TITLE|SWT.CLOSE|SWT.BORDER);\n\t\tshlCarbAndRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tshlCarbAndRemainder.setSize(323, 262);\n\t\tshlCarbAndRemainder.setText(\"CARB and Remainder\");\n\t\t\n\t\tGroup grpCarbSetting = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpCarbSetting.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpCarbSetting.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpCarbSetting.setText(\"CARB Setting\");\n\t\t\n\t\tgrpCarbSetting.setBounds(10, 0, 295, 106);\n\t\t\n\t\tLabel lblCARBValue = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblCARBValue.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblCARBValue.setBounds(10, 32, 149, 22);\n\t\tlblCARBValue.setText(\"CARB Value\");\n\t\t\n\t\tLabel lblAuthenticationPIN = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblAuthenticationPIN.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblAuthenticationPIN.setBounds(10, 68, 149, 22);\n\t\tlblAuthenticationPIN.setText(\"Authentication PIN\");\n\t\t\n\t\tSpinner spinnerCARBValue = new Spinner(grpCarbSetting, SWT.BORDER);\n\t\tspinnerCARBValue.setBounds(206, 29, 72, 22);\n\t\t\n\t\ttextAuthenticationPIN = new Text(grpCarbSetting, SWT.BORDER|SWT.PASSWORD);\n\t\ttextAuthenticationPIN.setBounds(206, 65, 72, 21);\n\t\t\t\t\n\t\tGroup grpRemainder = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpRemainder.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpRemainder.setText(\"Remainder\");\n\t\tgrpRemainder.setBounds(10, 112, 296, 106);\n\t\t\n\t\tButton btnInjectBolus = new Button(grpRemainder, SWT.NONE);\n\t\tbtnInjectBolus.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnInjectBolus.setBounds(183, 38, 103, 41);\n\t\tbtnInjectBolus.setText(\"INJECT BOLUS\");\n\t\t\n\t\tButton btnCancel = new Button(grpRemainder, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshlCarbAndRemainder.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(10, 38, 80, 41);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnSnooze = new Button(grpRemainder, SWT.NONE);\n\t\tbtnSnooze.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnSnooze.setBounds(96, 38, 81, 41);\n\t\tbtnSnooze.setText(\"Snooze\");\n\n\t}", "public JPanel buildProjectProperties()\n\t{\n\t\tprojectProperties.setPreferredSize(new Dimension(200, 190)); //Set the size of the window\n \tprojectProperties.setBorder (projectTitle); //Add a border around the window\n \t\n \treturn projectProperties;\n\t}", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "@Override\r\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\r\n\t\tGridData dGrid = new GridData();\r\n\t\tdGrid.horizontalSpan = 180;\r\n\t\tdGrid.horizontalAlignment = GridData.FILL;\r\n\t\tcontainer.setLayoutData(dGrid);\r\n\t\t\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tString labelText = \"Most of the features for SimplifIDE require knowledge of the project structure.\\r\\n\";\r\n\t\tlabelText += \"Currently you are editting a file outside of the project where many features will not work properly.\\r\\n\";\r\n\t\tlabelText += \"Instructions for setting up your project can be found at http://simplifide.com/html2/project_structure/simplifide_structure.htm, or\\r\\n\";\r\n\t\tlabelText += \"for a simple project only containing rtl files at http://simplifide.com/html2/getting_started/simple_suite.htm.\\r\\n\";\r\n\t\tnameLabel.setText(labelText);\r\n\t\t\r\n\t\tthis.ONESHOT = true;\r\n\t\t\r\n\t\treturn container;\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}", "public NewCityDialog(MainWindow owner, boolean showCancelOption) {\r\n\t\tsetText(owner.guiStrings.get(\"welcome.caption\"));\r\n\t\tthis.owner = owner;\r\n\t\t\r\n\t\tVerticalPanel vp1 = new VerticalPanel();\r\n\t\tHorizontalPanel hp1 = new HorizontalPanel();\r\n\t\tvp1.add(hp1);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\tif (canvas == null){\r\n\t\t\tWindow.alert(\"canvs not suported\");\r\n\t\t}\r\n\t\tcanvas.setWidth(\"360px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(360);\r\n\r\n\t\tcanvas.setHeight(\"300px\");\r\n\t\tcanvas.setCoordinateSpaceHeight(300);\r\n\t\t\r\n\t\thp1.add(canvas);\r\n\t\t\r\n\t\tVerticalPanel levelBox = new VerticalPanel();\r\n\t\thp1.add(levelBox);\r\n\t\t\r\n\t\tHorizontalPanel buttonPane = new HorizontalPanel();\r\n\t\tvp1.add(buttonPane);\r\n\r\n\t\tengine = new Micropolis();\r\n\t\tnew MapGenerator(engine).generateNewCity();\r\n\t\t\r\n\t\tmapPane = new OverlayMapView(engine,canvas);\r\n\t\t\r\n\t\t//drawArea.add(mapPane, BorderLayout.CENTER);*/\r\n\t\t\r\n\t\tRadioButton radioBtn;\r\n\t\tfor (int lev = GameLevel.MIN_LEVEL; lev <= GameLevel.MAX_LEVEL; lev++) {\r\n\t\t\tfinal int x = lev;\r\n\t\t\tradioBtn = new RadioButton(\"level\",owner.guiStrings.get(\"menu.difficulty.\" + lev));\r\n\t\t\tradioBtn.addClickHandler(new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tsetGameLevel(x);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tlevelBox.add(radioBtn);\r\n\t\t\tlevelBtns.put(lev, radioBtn);\r\n\t\t}\r\n\t\tsetGameLevel(GameLevel.MIN_LEVEL);\r\n\r\n\t\tButton btn;\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.previous_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonPreviousMapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\t\tbtn.setEnabled(false);\r\n\t\tpreviousMapBtn = btn;\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.next_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonNextMapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.load_city\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tmicropolis.client.Micropolis.mainWindow.loadGame();\r\n\t\t\t\thide();\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (!micropolis.client.Micropolis.userInfo.logined){\r\n\t\t\tbtn.setEnabled(false);\r\n\t\t}\r\n\t\tbuttonPane.add(btn);\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.play_this_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonPlayClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\t\tbtn.setFocus(true);\r\n\t\tif (showCancelOption) {\r\n\t\t\tbtn = new Button(owner.guiStrings.get(\"welcome.cancel\"),new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\tonCancelClicked();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbuttonPane.add(btn);\r\n\t\t}else{\r\n\t\t\tbtn = new Button(owner.guiStrings.get(\"welcome.quit\"),new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\tonQuitClicked();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbuttonPane.add(btn);\r\n\t\t}\r\n\t\tadd(vp1);\r\n\t}", "private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "protected void CreateWindow(){\n\t\tdouble[] colWeight = {1,1,1,1,1,1};\n\t\tdouble[] rowWeight = {5,1,1,1,1};\n\t\tint[] colWidth = {1,1,1,1,1,1};\n\t\tint[] rowHeight = {5,1,1,1,1};\n\t\t\n\t\t//creates new GridBagLayout and the Constraints for it\n\t\tGridBagLayout normal = new GridBagLayout();\n\t\t\n\t\tGridBagConstraints constrain = new GridBagConstraints();\n\t\t\n\t\tnormal.rowHeights = rowHeight;\n\t\tnormal.columnWidths = colWidth;\n\t\tnormal.columnWeights = colWeight;\n\t\tnormal.rowWeights = rowWeight;\n\t\t\n\t\tsetBounds(100,100,400,600);\n\t\tsetLayout(normal);\n\t\t\n\t\t//create messagefield. set the Grid Layout for it.\n\t\tchatDisplay.messageField.setSize(300, 500);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 5;\n\t\tconstrain.gridheight = 18;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 0;\n\t\tnormal.setConstraints(chatDisplay.messageField, constrain);\n\t\t\n\t\t//create input. set the Grid Layout for it.\n\t\tthis.input.setSize(450, 20);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 4;\n\t\tconstrain.gridheight = 2;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.input, constrain);\n\t\t\n\t\t//create send button. set the Grid Layout for it.\n\t\tthis.send.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.send, constrain);\n\t\t\n\t\tthis.quit.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 19;\n\t\tnormal.setConstraints(this.quit, constrain);\n\t\t\n\t\tthis.server.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 20;\n\t\tnormal.setConstraints(this.server, constrain);\n\t\t\n\t\tthis.client.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 21;\n\t\tnormal.setConstraints(this.client, constrain);\n\t\t\n\t\t//add the fields...\n\t\tadd(this.input);\n\t\tadd(chatDisplay.messageField);\n\t\tadd(this.send);\n\t\tadd(this.quit);\n\t\tadd(this.server);\n\t\tadd(this.client);\n\t\t\n\t\t//set windowlistener and set the window resizability to true\n\t\taddWindowListener(this);\n\t\tsetResizable(true);\n\t\t\n\t\t//adds action listeners for use later on.\n\t\tinput.addActionListener(this);\n\t\tsend.addActionListener(this);\n\t\tquit.addActionListener(this);\n\t\tserver.addActionListener(this);\n\t\tclient.addActionListener(this);\n\t\t\n\t\tthis.setVisible(true);\n\t\t\n\t\trun();\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "private void buildAndShowWindow() {\n SwingUtilities.invokeLater(() -> {\n buildWindow().setVisible(true);\n });\n }", "private void setupPopupLayout() {\n mainBox.getChildren().addAll(errorLabel, buttonBox);\n buttonBox.setAlignment(Pos.CENTER);\n }", "private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }", "private void initComponents() {\n\n jPopupMenu = new javax.swing.JPopupMenu();\n jMenuItemNewKeyFrame = new javax.swing.JMenuItem();\n jMenuItemNewTransition = new javax.swing.JMenuItem();\n jMenuItemPaste = new javax.swing.JMenuItem();\n\n jMenuItemNewKeyFrame.setText(\"New KeyFrame\");\n jMenuItemNewKeyFrame.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemNewKeyFrameMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemNewKeyFrame);\n\n jMenuItemNewTransition.setText(\"New Transition\");\n jMenuItemNewTransition.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemNewTransitionMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemNewTransition);\n\n jMenuItemPaste.setText(\"Paste\");\n jMenuItemPaste.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemPasteMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemPaste);\n\n setBackground(new java.awt.Color(255, 255, 255));\n setComponentPopupMenu(jPopupMenu);\n setOpaque(true);\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n formComponentResized(evt);\n }\n });\n addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n formPropertyChange(evt);\n }\n });\n }", "private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}", "private void setupUI() {\r\n\t\tWindow.setTitle(\"Battle\");\r\n\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\tpanel.addStyleName(NAME);\r\n\t\tinitWidget(panel);\r\n\t\t\r\n\t\tlabelTitle = new Label(\"Battle\");\r\n\t\tlabelTitle.addStyleName(Styles.page_title);\r\n\t\tpanel.add(labelTitle);\r\n\t\t\r\n\t\tLabel instructions = new Label(\"Click to go!\");\r\n\t\tpanel.add(instructions);\r\n\r\n\t\tHorizontalPanel hPanel = new HorizontalPanel();\r\n\t\tpanel.add(hPanel);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\thPanel.add(canvas);\r\n\r\n\t\tVerticalPanel vPanelInfo = new VerticalPanel();\r\n\t\thPanel.add(vPanelInfo);\r\n\t\t\r\n\t\tlabelInfo = new Label();\r\n\t\tlabelInfo.addStyleName(Styles.battle_info);\r\n\t\tvPanelInfo.add(labelInfo);\r\n\t\t\r\n\t\tvPanelInfoHistory = new VerticalPanel();\r\n\t\tvPanelInfoHistory.addStyleName(Styles.battle_info_history);\r\n\t\tvPanelInfo.add(vPanelInfoHistory);\r\n\r\n\t\t\r\n\t\tcanvas.setWidth(width + \"px\");\r\n\t\tcanvas.setHeight(height + \"px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(width);\r\n\t\tcanvas.setCoordinateSpaceHeight(height);\r\n\r\n\t\t//Adding handlers seems to create a performance issue in Java\r\n\t\t//mode, but likely not in javascript\r\n\t\tcanvas.addMouseDownHandler(this);\r\n//\t\tcanvas.addMouseUpHandler(this);\r\n//\t\tcanvas.addMouseMoveHandler(this);\r\n\r\n\t\tcontext2d = canvas.getContext2d();\r\n\r\n\t\tlastUpdate = System.currentTimeMillis();\r\n\t\ttimer = new Timer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\t\tupdate(now - lastUpdate);\r\n\t\t\t\tlastUpdate = now;\r\n\r\n\t\t\t\tdraw();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttimer.scheduleRepeating(1000 / 60);\r\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "Hotel_GUI() throws IOException {\r\n \tsetLayout(new BorderLayout()); \r\n \t\r\n \tinitialize();\r\n \r\n for(int i=0; i<12; i++){\r\n \tfor(int j=0; j<15; j++){\r\n \t\thelp_square[i][j].setLabel(help_square[i][j].getType());\r\n \t\tboard_panel.add(help_square[i][j]);\r\n \t}\r\n }\r\n \t\r\n \tfinal JPanel toolBar = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n \t\r\n \tcreateCards();\r\n \tfor(int i=0; i<hotelNumber; i++){\r\n \t\tsetPopUp(i);\r\n \t}\r\n \t\r\n \t\r\n\t\tfinal JPopupMenu popup1 = new JPopupMenu();\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Start\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t \tpopupCards.removeAll();\t \t\t\r\n\t \thotelItems.clear();\r\n\t \t\r\n\t \tbutton2.setEnabled(true);\r\n\t\t\t button3.setEnabled(true);\r\n\t\t\t button4.setEnabled(true);\r\n\t\t\t button5.setEnabled(true);\r\n\t\t\t button6.setEnabled(true);\r\n\t\t\t button7.setEnabled(true);\r\n\t\t\t button8.setEnabled(true);\r\n\t \t\r\n\t\t\t myGame = null;\r\n\t \tmyGame = new NewGame(board_panel, help_square);\r\n\t \tmyGame.initialization();\r\n\t \ttry {\r\n\t\t\t\t\t\tcreateCards();\r\n\t\t\t\t\t} catch (FileNotFoundException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t \tfor(int i=0; i<hotelNumber; i++){\r\n\t \t\tsetPopUp(i);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i=0; i<3; i++){\r\n\t \t\tsetProfitsPopUp(i);\r\n\t \t\tsetEntrancesPopUp(i);\r\n\t \t}\r\n\t \tgameStarted = true;\r\n\t \tmyGame.new_game();\r\n\t }\r\n\t \t\t }));\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Stop\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t t.stop();\r\n\t button2.setEnabled(false);\r\n\t\t\t button3.setEnabled(false);\r\n\t\t\t button4.setEnabled(false);\r\n\t\t\t button5.setEnabled(false);\r\n\t\t\t button6.setEnabled(false);\r\n\t\t\t button7.setEnabled(false);\r\n\t\t\t button8.setEnabled(false);\r\n\t }\r\n\t }));\r\n\t popup1.add(popupCards);\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Exit\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t System.exit(0);\r\n\t }\r\n\t }));\r\n\t final JButton button1 = new JButton(\"Game\");\r\n\t button1.addMouseListener(new MouseAdapter() {\r\n\t public void mousePressed(MouseEvent e) {\r\n\t popup1.show(e.getComponent(), e.getX(), e.getY());\r\n\t }\r\n\t });\r\n\t toolBar.add(button1);\r\n\t \r\n\t final JPopupMenu popup2 = new JPopupMenu();\r\n\t popup2.add(gameHotels);\r\n\t popup2.add(playerEntrances);\r\n\t popup2.add(playerProfits);\r\n\t \r\n\t button2 = new JButton(\"Statistics\");\r\n\t button2.addMouseListener(new MouseAdapter() {\r\n\t public void mousePressed(MouseEvent e) {\r\n\t popup2.show(e.getComponent(), e.getX(), e.getY());\r\n\t }\r\n\t });\r\n\t toolBar.add(button2);\r\n \t\r\n\t\tJPanel infos1 = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n\t\tinfos1.add(new JLabel(\"Player1: \"));\r\n\t\tinfos1.add(p1Money);\r\n\t\tinfos1.add(new JLabel(\" \"));\r\n\t\tinfos1.add(new JLabel(\"Player2: \"));\r\n\t\tinfos1.add(p2Money);\r\n\t\tinfos1.add(new JLabel(\" \"));\r\n\t\tinfos1.add(new JLabel(\"Player3: \"));\r\n\t\tinfos1.add(p3Money);\r\n\t\tJPanel infos2 = new JPanel(new FlowLayout(FlowLayout.RIGHT));\r\n\t\tinfos2.add(new JLabel(\"Available Hotels: \"));\r\n\t\tinfos2.add(hotelAv);\r\n\t\tinfos2.add(new JLabel(\" \"));\r\n\t\tinfos2.add(new JLabel(\"Total Time: \"));\r\n\t\tinfos2.add(timer);\r\n\t\tJPanel infoPanel = new JPanel(new GridLayout(1,2));\r\n\t\tinfoPanel.add(infos1);\r\n\t\tinfoPanel.add(infos2);\r\n\t\tJPanel twoPanels = new JPanel(new GridLayout(2,1));\r\n\t\ttwoPanels.add(toolBar);\r\n\t\ttwoPanels.add(infoPanel);\r\n\t\tadd(twoPanels, BorderLayout.NORTH);\r\n\t\t\r\n\t\t\r\n\t\tbutton3 = new JButton(\"Roll dice & result\");\r\n\t\tbutton3.addActionListener(this);\r\n button4 = new JButton(\"Request building & result\");\r\n button4.addActionListener(this);\r\n button5 = new JButton(\"Buy hotel\");\r\n button5.addActionListener(this);\r\n button6 = new JButton(\"Buy entrance\");\r\n button6.addActionListener(this);\r\n button7 = new JButton(\"Request +1000 from bank\");\r\n button7.addActionListener(this);\r\n button8 = new JButton(\"Finish round\");\r\n button8.addActionListener(this);\r\n \r\n final JPanel options = new JPanel(new GridLayout(6,1));\r\n options.add(button3);\r\n options.add(button4);\r\n options.add(button5);\r\n options.add(button6);\r\n options.add(button7);\r\n options.add(button8);\r\n add(options, BorderLayout.EAST);\r\n \r\n add(board_panel, BorderLayout.CENTER);\r\n \r\n \r\n \r\n \r\n }", "private void buildUpGUI() {\n\t\tsetLayout( new BorderLayout() );\n\t\tadd(new JScrollPane( summaryEditorPane) );\n\t}", "public void inspectBugPopUp() {\n\t\tJPanel bugPanel = new JPanel();\n\t\tif (buglist.isSelectionEmpty())\n\t\t\treturn;\n\n\t\t// Separate bug id from the rest of the string\n\t\tint bugID = Integer.parseInt(buglist.getSelectedValue().split(\" \")[0]);\n\n\t\tArrayList<Bug> bugs = uiController_.BrowseBugs();\n\t\tfor (Bug b : bugs) {\n\t\t\tif (b.getBugId_() == bugID) {\n\t\t\t\tJLabel title = new JLabel(\"<HTML><U>Bug</U></HTML>\");\n\t\t\t\tJLabel bugTitle = new JLabel(\"Name: \" + b.getBugTitle_());\n\t\t\t\tJLabel bugid = new JLabel(\"ID: \" + b.getBugId_());\n\t\t\t\tJLabel bugDescription = new JLabel(\"Description: \" + b.getDescription_());\n\t\t\t\tJLabel bugState = new JLabel(\"Status: \" + b.getState_().toString());\n\t\t\t\tArrayList<Product> productlist = uiController_.BrowseProducts();\n\n\t\t\t\tfor (Product p : productlist) {\n\t\t\t\t\tif (p.getProductId_() == b.getProductId_()) {\n\t\t\t\t\t\tJLabel productTitle = new JLabel(\"<HTML><U>Product Information</U></HTML>\");\n\t\t\t\t\t\tJLabel productID = new JLabel(\"ID: \" + p.getProductId_());\n\t\t\t\t\t\tJLabel productName = new JLabel(\"Name: \" + p.getProductName_());\n\t\t\t\t\t\tJLabel productDescription = new JLabel(\"Description: \" + p.getProductDescription());\n\n\t\t\t\t\t\t// Set Font\n\t\t\t\t\t\tFont font = new Font(\"Calibri\", Font.PLAIN, 20);\n\t\t\t\t\t\tFont big_underline_font = new Font(\"Calibri\", Font.PLAIN, 30);\n\t\t\t\t\t\ttitle.setFont(big_underline_font);\n\t\t\t\t\t\tbugid.setFont(font);\n\t\t\t\t\t\tbugTitle.setFont(font);\n\t\t\t\t\t\tproductTitle.setFont(big_underline_font);\n\t\t\t\t\t\tproductID.setFont(font);\n\t\t\t\t\t\tproductName.setFont(font);\n\t\t\t\t\t\tbugDescription.setFont(font);\n\t\t\t\t\t\tproductDescription.setFont(font);\n\t\t\t\t\t\tbugState.setFont(font);\n\n\t\t\t\t\t\t// Add textfields to parent component\n\t\t\t\t\t\tBox vBox = Box.createVerticalBox();\n\t\t\t\t\t\tvBox.add(title);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(bugTitle);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(bugid);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(bugDescription);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(bugState);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(productTitle);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(productID);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(productName);\n\t\t\t\t\t\tvBox.add(Box.createVerticalStrut(15));\n\t\t\t\t\t\tvBox.add(productDescription);\n\t\t\t\t\t\tbugPanel.add(vBox);\n\n\t\t\t\t\t\tObject options[] = { \"OK\" };\n\t\t\t\t\t\tJOptionPane.showOptionDialog(null, bugPanel, \"Inspect Bug\", JOptionPane.OK_OPTION,\n\t\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7720446", "0.68575513", "0.6826131", "0.678717", "0.66637427", "0.66403323", "0.6637264", "0.6618816", "0.65834635", "0.65719", "0.6511175", "0.64665616", "0.64508224", "0.6428722", "0.6411324", "0.6387212", "0.6351751", "0.6351393", "0.63223135", "0.63216776", "0.628127", "0.6278799", "0.62645584", "0.6255872", "0.6228706", "0.62227166", "0.62145716", "0.6212654", "0.6209832", "0.61939794", "0.61935115", "0.6185134", "0.61779463", "0.6163779", "0.61468714", "0.61363524", "0.61298907", "0.6118601", "0.6117376", "0.6117292", "0.6116602", "0.61112815", "0.610355", "0.6092127", "0.6082206", "0.6080713", "0.6077471", "0.6076392", "0.6070363", "0.6062456", "0.6062155", "0.6044581", "0.6042089", "0.60412705", "0.60338783", "0.6016262", "0.60096306", "0.6008108", "0.60070187", "0.60008824", "0.59988695", "0.5997735", "0.59969485", "0.59925103", "0.59917414", "0.59861565", "0.5982226", "0.5978697", "0.59705323", "0.59703416", "0.5969404", "0.5962753", "0.5962636", "0.5956057", "0.59552336", "0.5951827", "0.59506464", "0.59485745", "0.594484", "0.594453", "0.5942284", "0.59376293", "0.5931174", "0.5930094", "0.5928925", "0.59078044", "0.5907093", "0.59051126", "0.5904821", "0.5904735", "0.5903616", "0.5901772", "0.5895327", "0.58937114", "0.58886063", "0.5888102", "0.5885048", "0.58781576", "0.5876441", "0.5873118" ]
0.6164606
33
Generate area wise sheets in report
private void generateAreaWiseSheets(ExcelReportGenerator excelReport, List<QualityVO> qualities, ComboBox feedbackMonth) { String employeeName; String feedbackType; String projectName; for (QualityVO quality : qualities) { excelReport.GenerateAreaSheet(quality.getQualityName()); List<QualityFeedbackVO> feedbacks = QualityFeedbackDAO.getQualiyWiseFeedbacks(feedbackMonth, quality.getQualityName(), user.getTProject()); for (QualityFeedbackVO qualityfeedback : feedbacks) { employeeName = FeedbackDAO.getEmployeeName(qualityfeedback.getFeedbackId()); projectName = FeedbackDAO.getProjectName(qualityfeedback.getFeedbackId()); feedbackType = qualityfeedback.getSatisfyIndicator() ? StringConstants.SATISFIED : StringConstants.NOT_SATISFIED; excelReport.addRow(employeeName, projectName, feedbackType, qualityfeedback.getComment()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public final void testSinglePrintAreaWOSheet() throws Exception\n {\n Workbook workbook = _testDataProvider.createWorkbook();\n workbook.createSheet(\"Test Print Area\");\n String sheetName = workbook.getSheetName(0);\n\n String reference = \"$A$1:$B$1\";\n workbook.setPrintArea(0, reference);\n\n String retrievedPrintArea = workbook.getPrintArea(0);\n\n assertNotNull(retrievedPrintArea, \"Print Area not defined for first sheet\");\n assertEquals(\"'\" + sheetName + \"'!\" + reference, retrievedPrintArea);\n\n workbook.close();\n }", "public void writeExcel(String file_name, String path, DepartmentDto department,\n StageDto stage) throws FileNotFoundException, IOException {\n\n List<SlotDto> slots = null;\n\n try {\n\n //create workbook to generate .xls file\n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(file_name);\n\n\n // Create a Font for styling header cells\n Font headerFont = workbook.createFont();\n headerFont.setBold(false);\n headerFont.setFontHeightInPoints((short) 14);\n headerFont.setColor(IndexedColors.BLACK.getIndex());\n\n\n Font headerFont2 = workbook.createFont();\n headerFont2.setBold(true);\n headerFont2.setFontHeightInPoints((short) 14);\n headerFont2.setColor(IndexedColors.DARK_BLUE.getIndex());\n\n Font headerFont1 = workbook.createFont();\n headerFont1.setBold(true);\n headerFont1.setFontHeightInPoints((short) 14);\n headerFont1.setColor(IndexedColors.DARK_BLUE.getIndex());\n\n CellStyle headerCellStyle3 = workbook.createCellStyle();\n headerCellStyle3.setFont(headerFont1);\n headerCellStyle3.setAlignment(HorizontalAlignment.LEFT);\n\n // Create a CellStyle with the font\n CellStyle headerCellStyle = workbook.createCellStyle();\n headerCellStyle.setFont(headerFont2);\n headerCellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex());\n headerCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle.setAlignment(HorizontalAlignment.CENTER);\n\n // Create a CellStyle with the font\n CellStyle headerCellStyle2 = workbook.createCellStyle();\n headerCellStyle2.setFont(headerFont);\n headerCellStyle2.setFillForegroundColor(IndexedColors.WHITE.getIndex());\n headerCellStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle2.setAlignment(HorizontalAlignment.LEFT);\n\n\n // Create a CellStyle with the font for day\n CellStyle headerCellStyle1 = workbook.createCellStyle();\n headerCellStyle1.setFont(headerFont);\n headerCellStyle1.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex());\n headerCellStyle1.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle1.setAlignment(HorizontalAlignment.LEFT);\n\n\n // get arraylist of slots of schedule\n slots = new ArrayList<>();\n slots = slotBao.viewSlotsOfSchedule(stage, department);\n\n\n //create all rows\n for (int r = 0; r < 30; r++) {\n // Create a Row\n XSSFRow headerRow = sheet.createRow(r);\n\n // Create all cells in row and set their style\n for (int i = 0; i < 9; i++) {\n Cell cell = headerRow.createCell(i);\n\n if ((i == 0 && r > 2) || r == 3 || r == 4)\n cell.setCellStyle(headerCellStyle);\n else if (r > 4)\n cell.setCellStyle(headerCellStyle2);\n else if (r < 3)\n cell.setCellStyle(headerCellStyle3);\n\n\n }\n\n }\n\n // create row and cell to set the schedule department\n sheet.getRow(0)\n .getCell(0)\n .setCellValue(department.getName());\n sheet.getRow(0)\n .getCell(1)\n .setCellValue(department.getCode());\n\n // create row and cell to set the academic year\n sheet.getRow(1)\n .getCell(0)\n .setCellValue(\"Academic year\");\n sheet.getRow(1)\n .getCell(1)\n .setCellValue(stage.getNumber());\n\n\n // create row and cells to set the term of schedule\n sheet.getRow(2)\n .getCell(0)\n .setCellValue(\"Term\");\n sheet.getRow(2)\n .getCell(1)\n .setCellValue(slots.get(0).getTerm());\n\n // create rows and cells to set time slots number and day\n sheet.getRow(3)\n .getCell(0)\n .setCellValue(\"Time slot\");\n sheet.getRow(3)\n .getCell(1)\n .setCellValue(\"Slot 1\");\n sheet.getRow(3)\n .getCell(3)\n .setCellValue(\"Slot 2\");\n sheet.getRow(3)\n .getCell(5)\n .setCellValue(\"Slot 3\");\n sheet.getRow(3)\n .getCell(7)\n .setCellValue(\"Slot 4\");\n\n\n // ceate row and cells to set start and end time of slots\n sheet.getRow(4)\n .getCell(1)\n .setCellValue(\"F 09:00-T 10:20\");\n sheet.getRow(4)\n .getCell(3)\n .setCellValue(\"F 10:30-T 12:00\");\n sheet.getRow(4)\n .getCell(5)\n .setCellValue(\"F 12:20-T 01:50\");\n sheet.getRow(4)\n .getCell(7)\n .setCellValue(\"F 2:00-T 03:30\");\n\n\n //set days\n sheet.getRow(5)\n .getCell(0)\n .setCellValue(\"Sunday\");\n sheet.getRow(10)\n .getCell(0)\n .setCellValue(\"Monday\");\n sheet.getRow(15)\n .getCell(0)\n .setCellValue(\"Tuesday\");\n sheet.getRow(20)\n .getCell(0)\n .setCellValue(\"Wednesday\");\n sheet.getRow(25)\n .getCell(0)\n .setCellValue(\"Thursday\");\n\n\n // Resize all columns to fit the content size\n for (int i = 0; i < 9; i++) {\n sheet.autoSizeColumn(i);\n }\n\n\n // loop to get slot of indexed day and time slot\n for (int i = 0; i < slots.size(); i++) {\n\n //define slot day\n int r = -1;\n\n if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Sunday\"))\n r = 5;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Monday\"))\n r = 10;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Tuesday\"))\n r = 15;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Wednesday\"))\n r = 20;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Thursday\"))\n r = 25;\n\n\n int cell = slots.get(i).getNum() * 2 - 1;\n\n // set style for cells\n if ((r % 2 == 0 && (cell == 1 || cell == 2 || cell == 5 || cell == 6)) ||\n (r % 2 != 0 && (cell == 3 || cell == 4 || cell == 7 || cell == 8))) {\n\n sheet.getRow(r)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 1)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 1)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 2)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 2)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 3)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 4)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 4)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n }\n\n // set course name and code of slot\n sheet.getRow(r)\n .getCell(cell)\n .setCellValue(slots.get(i)\n .getCourse()\n .getName());\n sheet.getRow(r)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getCode());\n\n // set type of slot\n sheet.getRow(r + 2)\n .getCell(cell)\n .setCellValue(slots.get(i).getSlot_type());\n\n // set location of slot\n sheet.getRow(r + 3)\n .getCell(cell)\n .setCellValue(slots.get(i)\n .getLocation()\n .getName());\n\n\n // check slot type then set plt of slot\n if (slots.get(i)\n .getSlot_type()\n .equals(\"LECTURE\")) {\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getPlt_lecture()\n .getCode());\n }\n if (slots.get(i)\n .getSlot_type()\n .equals(\"SECTION\")) {\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getPlt_section()\n .getCode());\n }\n\n\n // set student number of slot\n sheet.getRow(r + 4)\n .getCell(cell)\n .setCellValue(\"Student number\");\n sheet.getRow(r + 4)\n .getCell(cell + 1)\n .setCellValue(slots.get(i).getStudent_number());\n\n /*\n * set staff of slot then check if members > 1\n * then concatenate all members' names\n * and set to cell */\n String staff = slots.get(i)\n .getStaff()\n .get(0)\n .getPosition() + \"/\" + slots.get(i)\n .getStaff()\n .get(0)\n .getName();\n\n /*\n * set staff user email of slot then check if members > 1\n * then concatenate all members' emails\n * and set to cell */\n String[] email = slots.get(i)\n .getStaff()\n .get(0)\n .getUser()\n .getEmail()\n .split(\"@\", 2);\n String user = email[0];\n\n\n for (int j = 1; j < slots.get(i)\n .getStaff()\n .size(); j++) {\n staff = staff + \" # \" + slots.get(i)\n .getStaff()\n .get(j)\n .getPosition() + \"/\" + slots.get(i)\n .getStaff()\n .get(j)\n .getName();\n\n String[] _email = slots.get(i)\n .getStaff()\n .get(j)\n .getUser()\n .getEmail()\n .split(\"@\", 2);\n user = user + \" # \" + _email[0];\n }\n\n sheet.getRow(r + 1)\n .getCell(cell)\n .setCellValue(staff);\n sheet.getRow(r + 1)\n .getCell(cell + 1)\n .setCellValue(user);\n\n }\n\n\n // write data to the file\n\n FileOutputStream fileOut = new FileOutputStream(path + \"\\\\\" + file_name);\n workbook.write(fileOut);\n fileOut.close();\n\n\n // Closing the workbook\n workbook.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\tpublic void export(HttpServletRequest request, HttpServletResponse response, Map<String, Object> map) {\n\t\tString sheetName = \"石砌边沟过路涵\";\n\t\t//表头\n\t\tString[] head0 = new String[] { \"编号\", \"中心桩号\", \"孔数-孔径(孔-米)\", \"位置\", \"L(m)\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\",\"备注\"};\n\t\tString[] head1 = new String[] { \"过路板钢筋(Kg)\", \"过路板混凝土C30(m3)\", \"涂料(m2)\", \"涵面铺装钢筋(Kg)\",\"涵面铺装混凝土C30(m3)\", \"C20混凝土台帽(m3)\", \"M15浆砌片石涵台身及基础(m2)\", \"涵身顶面1cm厚油毛毡(m2)\",\"透水性砾料(m3)\" };\n\t\t//对应excel中的行和列,下表从0开始{\"开始行,结束行,开始列,结束列\"}\n\t\tString[] headnum0 = new String[] { \"2,3,0,0\", \"2,3,1,1\", \"2,3,2,2\",\"2,3,3,3\", \"2,3,4,4\", \"2,2,5,13\" ,\"2,3,14,14\"};\n\t\tString[] headnum1 = new String[] { \"3,3,5,5\",\"3,3,6,6\", \"3,3,7,7\", \"3,3,8,8\",\"3,3,9,9\", \"3,3,10,10\", \"3,3,11,11\",\"3,3,12,12\",\"3,3,13,13\"};\n\t\t List<Map<String, Object>> dataList = passingCulvertNumberDao.getPassingCulvertNumberListEX(map);\n\t\t for (int i = 0; i < dataList.size(); i++) {\n\t\t\t dataList.get(i).put(\"row\", i+1);\n\t\t}\n\t\t String[] colName = new String[] { \"row\", \"PileNumber\", \"HoleCount\", \"Position\", \"L\", \"CrossingRebar\", \"CrossingConcrete\", \n\t\t\t\t \"Coating\", \"SpreadRebar\",\"SpreadConcrete\", \"ConcreteCap\", \"RubbleBasics\", \"ThickFelt\", \"PermeableGranules\",\"Remarks\"};\n\t\t Date now = new Date(); \n\t\t String date = \"创建时间\" + now.toString();\n\t\t try {\n\t\t\t //request, response, 数值,标题,第一行表头名字,第一行合并坐标,第二行表头名字,第二行合并坐标,数值对应列名称,创建时间,一共多少列,开始第二行表头列,结束第二行表头列,合计开始列\n\t\t\tReportMergeXls.reportMergeXls(request, response, dataList, sheetName, head0,headnum0, head1, headnum1, colName, date,15,5,14,5);\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}", "@Override\n protected void buildExcelDocument(Map<String, Object> model, Workbook workbook,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"Du Report.xls\\\"\");\n\n @SuppressWarnings(\"unchecked\")\n List<ReportByGroup> reportList = (List<ReportByGroup>) model.get(\"reportList\");\n\n String[] month = new String[] { \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\", \"January\",\n \"February\", \"March\" };\n\n // create excel xls sheet\n Sheet sheet = workbook.createSheet(\"Report Du Detail\");\n // sheet.setDefaultColumnWidth(12);\n\n // create style for header cells\n CellStyle style = workbook.createCellStyle();\n Font font = workbook.createFont();\n font.setFontName(\"Arial\");\n style.setFillForegroundColor(HSSFColor.BLUE.index);\n style.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n style.setAlignment(HorizontalAlignment.CENTER);\n style.setWrapText(true);\n style.setBorderRight(BorderStyle.THIN);\n style.setRightBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderLeft(BorderStyle.THIN);\n style.setLeftBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderTop(BorderStyle.THIN);\n style.setTopBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderBottom(BorderStyle.THIN);\n style.setBottomBorderColor(IndexedColors.BLACK.getIndex());\n font.setBold(true);\n font.setColor(HSSFColor.WHITE.index);\n style.setFont(font);\n\n CellStyle style1 = workbook.createCellStyle();\n // style1.setAlignment(HorizontalAlignment.CENTER);\n // style1.setWrapText(true);\n style1.setBorderRight(BorderStyle.THIN);\n style1.setRightBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderLeft(BorderStyle.THIN);\n style1.setLeftBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderTop(BorderStyle.THIN);\n style1.setTopBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderBottom(BorderStyle.THIN);\n style1.setBottomBorderColor(IndexedColors.BLACK.getIndex());\n // style1.setFont(font);\n\n // create header row\n Row header = sheet.createRow(0);\n Row header1 = sheet.createRow(1);\n Row header2 = sheet.createRow(2);\n\n header.createCell(0).setCellValue(\"STT\");\n header.getCell(0).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 0, // first column (0-based)\n 0 // last column (0-based)\n ));\n header.createCell(1).setCellValue(\"Vị trí\");\n header.getCell(1).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 1, // first column (0-based)\n 1 // last column (0-based)\n ));\n\n header.createCell(2).setCellValue(\"\");\n header.getCell(2).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 2, // first column (0-based)\n 2 // last column (0-based)\n ));\n\n header.createCell(3).setCellValue(\"Số lượng đã tuyển trong tháng\");\n header.getCell(3).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 0, // last row (0-based)\n 3, // first column (0-based)\n 26 // last column (0-based)\n ));\n header.createCell(27).setCellValue(\"SL tuyển dụng \" + this.year);\n header.getCell(27).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 27, // first column (0-based)\n 27 // last column (0-based)\n ));\n\n header1.createCell(0).setCellValue(\"\");\n header1.getCell(0).setCellStyle(style);\n header1.createCell(1).setCellValue(\"\");\n header1.getCell(1).setCellStyle(style);\n int k = 0;\n for (int i = 3; i < 27; i++) {\n if (i % 2 != 0) {\n header1.createCell(i).setCellValue(month[k++]);\n header1.getCell(i).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(1, // first row (0-based)\n 1, // last row (0-based)\n i, // first column (0-based)\n i + 1 // last column (0-based)\n ));\n } else {\n header1.createCell(i).setCellValue(\"\");\n header1.getCell(i).setCellStyle(style);\n }\n }\n\n header2.createCell(0).setCellValue(\"\");\n header2.getCell(0).setCellStyle(style);\n header2.createCell(1).setCellValue(\"\");\n header2.getCell(1).setCellStyle(style);\n for (int i = 3; i < 27; i++) {\n if (i % 2 != 0) {\n header2.createCell(i).setCellValue(\"NEW\");\n header2.getCell(i).setCellStyle(style);\n } else {\n header2.createCell(i).setCellValue(\"TT\");\n header2.getCell(i).setCellStyle(style);\n }\n }\n\n int rowCount = 3;\n\n for (ReportByGroup item : reportList) {\n Row row = sheet.createRow(rowCount++);\n row.createCell(0).setCellValue(rowCount - 3);\n if (item.getDepartment() == null) {\n row.createCell(1).setCellValue(item.getGroup());\n } else {\n row.createCell(1).setCellValue(\"\");\n }\n row.createCell(2).setCellValue(item.getDepartment());\n int a = 3;\n for (StatisticMonth number : item.getStatisticMonth()) {\n if (number.getNumberOfNew() == 0) {\n row.createCell(a++).setCellValue(\"\");\n } else {\n row.createCell(a++).setCellValue(number.getNumberOfNew());\n }\n if (number.getNumberOfTT() == 0) {\n row.createCell(a++).setCellValue(\"\");\n } else {\n row.createCell(a++).setCellValue(number.getNumberOfTT());\n }\n }\n if (item.getTotal() == 0) {\n row.createCell(a).setCellValue(\"\");\n } else {\n row.createCell(a).setCellValue(item.getTotal());\n }\n\n for (int i = 0; i < 28; i++) {\n row.getCell(i).setCellStyle(style1);\n }\n }\n sheet.autoSizeColumn(0);\n sheet.autoSizeColumn(1);\n sheet.autoSizeColumn(2);\n sheet.autoSizeColumn(3);\n sheet.autoSizeColumn(4);\n sheet.autoSizeColumn(5);\n sheet.autoSizeColumn(6);\n sheet.autoSizeColumn(7);\n sheet.autoSizeColumn(8);\n sheet.autoSizeColumn(9);\n sheet.autoSizeColumn(10);\n sheet.autoSizeColumn(11);\n sheet.autoSizeColumn(12);\n sheet.autoSizeColumn(13);\n sheet.autoSizeColumn(14);\n sheet.autoSizeColumn(15);\n sheet.autoSizeColumn(16);\n sheet.autoSizeColumn(17);\n sheet.autoSizeColumn(18);\n sheet.autoSizeColumn(19);\n sheet.autoSizeColumn(20);\n sheet.autoSizeColumn(21);\n sheet.autoSizeColumn(22);\n sheet.autoSizeColumn(23);\n sheet.autoSizeColumn(24);\n sheet.autoSizeColumn(25);\n }", "void createWorkSheet() {\n wb = new HSSFWorkbook();\n for (int SheetNumber = 0; SheetNumber < keywords.length - 1; SheetNumber++) {\n sheet[SheetNumber] = wb.createSheet(keywords[SheetNumber]);\n // Create row at index zero ( Top Row)\n HSSFRow row = sheet[SheetNumber].createRow((short) 0);\n String[] headers = {\"Title\", \"Category\", \"Developer\", \"Description\", \"Release Date\", \"currentVersionReleaseDate\", \"Version\", \"Website\", \"Rating Counts\", \"Average User Rating\", \"Average User Rating For Current Version\", \"Market URL\", \"Size\"};\n for (int i = 0; i <= 12; i++) {\n\n HSSFCell cell = row.createCell((short) i);\n cell.setCellType(HSSFCell.CELL_TYPE_STRING);\n cell.setCellValue(headers[i]);\n excelFileCreated = false;\n }\n }\n }", "@Override\n public ReportDesign buildReportDesign(ReportDefinition reportDefinition) {\n ReportDesign rd = createExcelTemplateDesign(getExcelDesignUuid(), reportDefinition, \"SMCRegister.xls\");\n Properties props = new Properties();\n props.put(\"repeatingSections\", \"sheet:1,row:10-12,dataset:SMC\");\n props.put(\"sortWeight\", \"5000\");\n rd.setProperties(props);\n return rd;\n }", "public void writeReport() {\n\t\tint gridSize = 55; // Total character spaces between the borders\n\t\tprint(\"+-------------------------------------------------------+\");\n\t\tprint(String.format(\"|%s|\", centerName(gridSize)));\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t/*\n\t\t * Loops through each room in the hotel and prints out the relevant\n\t\t * information on a new line And draws southern, eastern and western\n\t\t * borders to allow it to connect up to the main table.\n\t\t */\n\t\tfor (int i = 0; i < myHotel.getSize(); i++) {\n\t\t\tprint(formatRooms(i).toUpperCase());\n\t\t\tprint(formatAmount(i).toUpperCase());\n\t\t\tprint(formatSleepAmount(i).toUpperCase());\n\t\t\tprint(formatOccupied(i).toUpperCase());\n\t\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t}\n\t\t/*\n\t\t * After every hotel room's information has been displayed The overall\n\t\t * hotel information is displayed such as total occupancy, if there is a\n\t\t * vacancy. And if there is a vacancy, the total amount of free rooms\n\t\t * and beds.\n\t\t */\n\t\tprint(String.format(\"| Hotel\\t\\t|\\tTotal Occupancy:\\t%s\\t|\", getHotel().getTotalOccupancy()).toUpperCase());\n\t\tprint(String.format(\"| information:\\t|\\tHas Vacancies:\\t\\t%s\\t|\", convertBoolean(getHotel().getVacancies()))\n\t\t\t\t.toUpperCase());\n\t\tif (getHotel().getVacancies()) {\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Rooms:\\t\\t%s\\t|\", getHotel().getEmptyRooms()).toUpperCase());\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Beds:\\t\\t%s\\t|\", getHotel().getTotalVacancy()).toUpperCase());\n\t\t}\n\t\t/*\n\t\t * Draws a final southern border to close the table\n\t\t */\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t}", "@Test\n public final void testPrintAreaUnion() throws Exception {\n Workbook workbook = _testDataProvider.createWorkbook();\n workbook.createSheet(\"Test Print Area\");\n\n String reference = \"$A$1:$B$1,$D$1:$F$2\";\n workbook.setPrintArea(0, reference);\n String retrievedPrintArea = workbook.getPrintArea(0);\n assertNotNull(retrievedPrintArea, \"Print Area not defined for first sheet\");\n assertEquals(\"'Test Print Area'!$A$1:$B$1,'Test Print Area'!$D$1:$F$2\", retrievedPrintArea);\n\n workbook.close();\n }", "ISheet addSheet();", "@Test\n public final void testPrintAreaFile() throws Exception {\n Workbook wb1 = _testDataProvider.createWorkbook();\n wb1.createSheet(\"Test Print Area\");\n String sheetName = wb1.getSheetName(0);\n\n\n String reference = \"$A$1:$B$1\";\n wb1.setPrintArea(0, reference);\n\n Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1);\n\n String retrievedPrintArea = wb2.getPrintArea(0);\n assertNotNull(retrievedPrintArea, \"Print Area not defined for first sheet\");\n assertEquals(\"'\" + sheetName + \"'!$A$1:$B$1\", retrievedPrintArea);\n\n wb2.close();\n wb1.close();\n }", "@Test\n public final void testMultiplePrintAreaFile() throws Exception {\n try (Workbook wb1 = _testDataProvider.createWorkbook()) {\n\n wb1.createSheet(\"Sheet1\");\n wb1.createSheet(\"Sheet2\");\n wb1.createSheet(\"Sheet3\");\n String reference1 = \"$A$1:$B$1\";\n String reference2 = \"$B$2:$D$5\";\n String reference3 = \"$D$2:$F$5\";\n\n wb1.setPrintArea(0, reference1);\n wb1.setPrintArea(1, reference2);\n wb1.setPrintArea(2, reference3);\n\n //Check created print areas\n String retrievedPrintArea;\n\n retrievedPrintArea = wb1.getPrintArea(0);\n assertNotNull(retrievedPrintArea, \"Print Area Not Found (Sheet 1)\");\n assertEquals(\"Sheet1!\" + reference1, retrievedPrintArea);\n\n retrievedPrintArea = wb1.getPrintArea(1);\n assertNotNull(retrievedPrintArea, \"Print Area Not Found (Sheet 2)\");\n assertEquals(\"Sheet2!\" + reference2, retrievedPrintArea);\n\n retrievedPrintArea = wb1.getPrintArea(2);\n assertNotNull(retrievedPrintArea, \"Print Area Not Found (Sheet 3)\");\n assertEquals(\"Sheet3!\" + reference3, retrievedPrintArea);\n\n // Check print areas after re-reading workbook\n try (Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1)) {\n\n retrievedPrintArea = wb2.getPrintArea(0);\n assertNotNull(retrievedPrintArea, \"Print Area Not Found (Sheet 1)\");\n assertEquals(\"Sheet1!\" + reference1, retrievedPrintArea);\n\n retrievedPrintArea = wb2.getPrintArea(1);\n assertNotNull(retrievedPrintArea, \"Print Area Not Found (Sheet 2)\");\n assertEquals(\"Sheet2!\" + reference2, retrievedPrintArea);\n\n retrievedPrintArea = wb2.getPrintArea(2);\n assertNotNull(retrievedPrintArea, \"Print Area Not Found (Sheet 3)\");\n assertEquals(\"Sheet3!\" + reference3, retrievedPrintArea);\n }\n }\n }", "public void makeReport()\n\t{\n\t\tif (currentStage[currentSlice-1] > 1)\n\t\t{\n\t\t\tResultsTable rt = new ResultsTable();\n\t\t\tfor (int j=0;j<popSequence.N;j++)\n\t\t\t{\n\t\t\t\tpop = popSequence.PopList[j];\n\t\t\t\tint N = pop.N;\n\t\t\t\tfor (int i=0;i<N;i++)\n\t\t\t\t{\n\t\t\t\t\trt.incrementCounter();\n\t\t\t\t\tBalloon bal;\n\t\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\t\tbal.mass_geometry();\n\t\t\t\t\trt.addValue(\"X\",bal.x0);\n\t\t\t\t\trt.addValue(\"Y\",bal.y0);\n\t\t\t\t\trt.addValue(\"Z\",j);\n\t\t\t\t\trt.addValue(\"ID\",bal.id);\n\t\t\t\t\trt.addValue(\"AREA\",bal.area);\n\t\t\t\t\trt.addValue(\"Ixx\",bal.Ixx);\n\t\t\t\t\trt.addValue(\"Iyy\",bal.Iyy);\n\t\t\t\t\trt.addValue(\"Ixy\",bal.Ixy);\n\t\t\t\t\trt.addValue(\"Lx\",bal.lx);\n\t\t\t\t\trt.addValue(\"Ly\",bal.ly);\n\t\t\t\t}\n\t\t\t}\n\t\t\trt.show(\"Report\");\n\t\t\tcurrentSlice = i1.getCurrentSlice();\n\t\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\t\tpop = popSequence.PopList[currentSlice-1];\n\t\t}\n\t}", "protected void generarReporte(String fileNameOut){\n LinkedList datos;\n LinkedList listaHojas;\n frmHoja tmpSheet;\n Clases.Dato tmpDato;\n int numRows = 0;\n int numCols = 0;\n try{\n sw = new FileWriter(fileNameOut,true);\n //obtener lista de hojas desde el workplace\n listaHojas = wp.getListaHojas();\n\n //escribir encabezado de HTML a stream\n sw.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\">\\n\");\n sw.write(\"<html>\\n<head>\\n<meta content=\\\"text/html; charset=ISO-8859-1\\\" http-equiv=\\\"content-type\\\">\\n\");\n sw.write(\"<title>JExcel</title>\\n\");\n sw.write(\"</head>\\n<body>\\n\");\n sw.write(\"<big><span style=\\\"font-weight: bold;\\\">Hoja generada por JExcel</span></big><br>\\n\");\n sw.write(\"<small>Universidad Mariano Gálvez de Guatemala</small><br>\\n<br>\\n\");\n sw.write(\"<small>Extensión Morales Izabal</small><br>\\n<br>\\n\");\n sw.write(\"<small>(C) Amy C. Leiva - 4890-15-</small><br>\\n<br>\\n\");\n // Iterar sobre cada hoja en listaSheets\n for (int i = 0; i < listaHojas.size();i++){\n // obtener maximo numero de datos\n tmpSheet = (frmHoja) listaHojas.get(i);\n\n numRows = tmpSheet.getHoja().getRowCount();\n numCols = tmpSheet.getHoja().getColumnCount();\n sw.write(\"<table style=\\\"text-align: left; width: 100%;\\\" border=\\\"1\\\" cellpadding=\\\"2\\\" cellspacing=\\\"2\\\">\\n\");\n sw.write(\"<tbody>\\n\");\n sw.write(\" <tr> <td colspan=\\\"4\\\" rowspan=\\\"1\\\"><big><span style=\\\"font-weight: bold;\\\">\");\n sw.write(\"Nombre de la Hoja: \" + tmpSheet.getId());\n sw.write(\"</span></big></td>\\n</tr>\\n\");\n sw.write(\" <tr><td>Fila</td><td>Columna</td><td>Expresi&oacute;n</td> <td>Valor Num&eacute;rico</td> </tr>\\n\");\n // obtener lista de datos desde matriz\n if( tmpSheet.getHoja().getTabla().estaVacia() == false){ // si la tabla tiene datos\n datos = tmpSheet.getHoja().getTabla().getSubset(1,1,numCols,numRows);\n //escribir tabla con datos generados\n for (int j = 0; j < datos.size();j++){\n tmpDato = (Clases.Dato) datos.get(j); \n sw.write(\"<tr>\\n\");\n sw.write(\"<td>\" + tmpDato.getRow() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getCol() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getExpr() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.eval() + \"</td>\\n\");\n sw.write(\"</tr>\\n\");\n }\n }\n else{\n sw.write(\"<tr><td colspan=\\\"4\\\" rowspan=\\\"1\\\"> Hoja Vacia... </td></tr>\");\n }\n sw.write(\" </tbody></table>\\n<br><br><br>\");\n // sw.write();\n // sw.write();\n }\n //escribir fin de datos\n sw.write(\"</body></html>\");\n //escribir a archivo de salida\n sw.close();\n }\n catch(Exception e){\n System.out.println(\"No se pudo guardar archivo:\" + e);\n }\n \n }", "public void exportAllFactures(OutputStream outputStream) throws IOException {\n\n Workbook workbook = new XSSFWorkbook();\n \n // Styles des cellules: \n CellStyle styleGreen = workbook.createCellStyle();\n styleGreen.setFillForegroundColor(IndexedColors.GREEN.getIndex());\n styleGreen.setFillPattern(FillPatternType.SOLID_FOREGROUND); \n \n CellStyle styleBlue = workbook.createCellStyle();\n styleBlue.setFillForegroundColor(IndexedColors.DARK_BLUE.getIndex());\n styleBlue.setFillPattern(FillPatternType.SOLID_FOREGROUND); \n \n CellStyle styleYellow = workbook.createCellStyle();\n styleYellow.setFillForegroundColor(IndexedColors.YELLOW.getIndex());\n styleYellow.setFillPattern(FillPatternType.SOLID_FOREGROUND); \n \n Font font = workbook.createFont();\n font.setColor(IndexedColors.WHITE.getIndex());\n styleGreen.setFont(font);\n styleBlue.setFont(font);\n styleYellow.setFont(font);\n \n \n \n List<FactureDto> listAllFacturesAllClient = this.factureService.findAllFactures();\n \n \n for (FactureDto factureDto : listAllFacturesAllClient) {\n\t //SHEET\n\t Sheet sheet = workbook.createSheet(\"Facture\"+factureDto.getId());\n\t Row headerRow = sheet.createRow(0);\n\t //LIBELLES\n\t Cell cellLibelle0 = headerRow.createCell(0);\n\t Cell cellLibelle1 = headerRow.createCell(1);\n\t Cell cellLibelle2 = headerRow.createCell(2);\n\t Cell cellLibelle3 = headerRow.createCell(3);\n\t cellLibelle0.setCellValue(\"Désignation\");\n\t cellLibelle1.setCellValue(\"Quantité\");\n\t cellLibelle2.setCellValue(\"Prix Unitaire\");\n\t cellLibelle3.setCellValue(\"Prix ligne\");\n\t cellLibelle0.setCellStyle(styleGreen);\n\t cellLibelle1.setCellStyle(styleBlue);\n\t cellLibelle2.setCellStyle(styleYellow);\n\t cellLibelle3.setCellStyle(styleGreen);\n\n\t for (int i =0; i<factureDto.getLigneFactures().size(); i++) {\n\t \t\t \t\n\t Row newRow = sheet.createRow(i+1);\n\t \n\t Cell firstCell = newRow.createCell(0);\n\t firstCell.setCellStyle(styleGreen);\n\t firstCell.setCellValue(factureDto.getLigneFactures().get(i).getArticle().getLibelle());\n\t \n\t Cell secondCell =newRow.createCell(1);\n\t secondCell.setCellValue(factureDto.getLigneFactures().get(i).getQuantite());\n\t secondCell.setCellStyle(styleBlue);\n\t \n\t Cell thirdCell =newRow.createCell(3);\n\t thirdCell.setCellValue(factureDto.getLigneFactures().get(i).getArticle().getPrix());\n\t thirdCell.setCellStyle(styleYellow);\n\t \n\t Cell fourthCell =newRow.createCell(3);\n\t fourthCell.setCellValue(\n\t \t\t(factureDto.getLigneFactures().get(i).getArticle().getPrix())*(factureDto.getLigneFactures().get(i).getQuantite())\n\t \t\t);\n\t fourthCell.setCellStyle(styleGreen);\n\t \t\t}\n\t\t\t}\n\t\t\n\n workbook.write(outputStream);\n workbook.close();\n }", "@Override\n protected Sheet createSheet() {\n Sheet sheet = Sheet.createDefault();\n // Create a set of properties\n Sheet.Set set = Sheet.createPropertiesSet();\n\n set.put(getNameProperty());\n set.put(getMajorProperty());\n set.put(getMinorProperty());\n set.put(getPatchProperty());\n set.put(getDescriptionProperty());\n set.put( getGitProperty());\n set.put( getBranchProperty());\n\n // Add the set of properties to the sheet\n sheet.put(set);\n\n return sheet;\n }", "public void createXLS(String fileName){\r\n FileOutputStream fo = null;\r\n int totalColumns;\r\n try {\r\n WorkBookHandle h=new WorkBookHandle();\r\n WorkSheetHandle sheet1 = h.getWorkSheet(\"Sheet1\");\r\n \r\n int currentRow=1;\r\n char currentColumn;\r\n int underSessions;\r\n for(StudentResult i:(List<StudentResult>)results){\r\n if(results.indexOf(i)==0){\r\n sheet1.add(\"Register No.\", \"A1\");\r\n sheet1.add(\"Name of Student\", \"B1\");\r\n currentColumn='C';\r\n for(ExamResult j:i.subjectResults){\r\n sheet1.add(j.subCode, String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n currentColumn++;\r\n }\r\n sheet1.add(\"SGPA\", String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n currentColumn++;\r\n sheet1.add(\"No. of Under-sessions\", String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n totalColumns=currentColumn;\r\n }\r\n \r\n currentRow++;\r\n sheet1.add(i.regNo,\"A\"+String.valueOf(currentRow));\r\n sheet1.add(i.studentName,\"B\"+String.valueOf(currentRow));\r\n currentColumn='C';\r\n underSessions=0;\r\n for(ExamResult j:i.subjectResults){\r\n sheet1.add(j.grade, String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n if(MainFrame1.UNDER_SESION_GRADES.contains(j.grade)){\r\n underSessions++;\r\n } \r\n currentColumn++;\r\n }\r\n sheet1.add(i.averageGradePoint, String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n currentColumn++;\r\n sheet1.add(underSessions, String.valueOf(currentColumn)+String.valueOf(currentRow)); \r\n }\r\n fo = new FileOutputStream(\"Result.xls\");\r\n h.writeBytes(fo);\r\n fo.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(SpreadSheetCreator.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (WorkSheetNotFoundException ex) {\r\n Logger.getLogger(SpreadSheetCreator.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n try {\r\n fo.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(SpreadSheetCreator.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "void onActionFromExport() {\n\t\ttry {\n\t\t\tHSSFWorkbook document = new HSSFWorkbook();\n\t\t\tHSSFSheet sheet = ReportUtil.createSheet(document);\n\n\t\t\tsheet.setMargin((short) 0, 0.5);\n\t\t\tReportUtil.setColumnWidths(sheet, 0, 0.5, 1, 0.5, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 7, 2, 8, 3, 9, 3, 10,\n\t\t\t\t\t3, 11, 2, 12, 2);\n\n\t\t\tMap<String, HSSFCellStyle> styles = ReportUtil.createStyles(document);\n\n\t\t\tint sheetNumber = 0;\n\t\t\tint rowIndex = 1;\n\t\t\tint colIndex = 1;\n\t\t\tLong index = 1L;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"empList\"), styles.get(\"title\"), 5);\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, ++rowIndex, 1,\n\t\t\t\t\tmessages.get(\"date\") + \": \" + format.format(new Date()), styles.get(\"plain-left-wrap\"), 5);\n\t\t\trowIndex += 2;\n\n\t\t\t/* column headers */\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1, messages.get(\"number-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"firstname-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tif (lastname) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"lastname-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (origin1) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"persuasion-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (register) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"register-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (status) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"status-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (gender) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"gender-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (occ) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"occupation-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (birthday) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"birthDate-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (phoneNo) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"phoneNo-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (email) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"email-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (org) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"organization-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (appointment) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"appointment-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegree) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цэргийн цол\", styles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeStatus) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цолны статус\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeDate) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цол авсан огноо\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (TotalWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"TotalOrgWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (StateWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"stateWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"courtOrgTotalWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtMilitaryWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtSimpleWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (familyCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"familyCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (childCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"childCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\n\t\t\trowIndex++;\n\t\t\tif (listEmployee != null)\n\t\t\t\tfor (Employee empDTO : listEmployee) {\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\tlistEmployee.indexOf(empDTO) + 1 + \"\", styles.get(\"plain-left-wrap-border\"));\n\n\t\t\t\t\tif (lastname) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getLastname() != null) ? empDTO.getLastname() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++, empDTO.getFirstName(),\n\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\n\t\t\t\t\tif (origin1) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOrigin().getName() != null) ? empDTO.getOrigin().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (register) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getRegisterNo() != null) ? empDTO.getRegisterNo() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getEmployeeStatus() != null) ? empDTO.getEmployeeStatus().name() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gender) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\tmessages.get((empDTO.getGender() != null) ? empDTO.getGender().toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (occ) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOccupation() != null) ? empDTO.getOccupation().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (birthday) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getBirthDate() != null) ? format.format(empDTO.getBirthDate()) : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (phoneNo) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getPhoneNo() != null) ? empDTO.getPhoneNo() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (email) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.geteMail() != null) ? empDTO.geteMail() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (org) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getOrganization() != null) ? empDTO.getOrganization().getName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (appointment) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getAppointment() != null) ? empDTO.getAppointment().getAppointmentName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegree) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getMilitary().getMilitaryName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeStatus) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getDegreeStatus().name() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeDate) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? format.format(dao.getEmployeeMilitary(empDTO.getId()).getOlgosonOgnoo())\n\t\t\t\t\t\t\t\t\t\t: \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (TotalWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getTotalOrgWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getTotalOrgWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\tif (StateWorkedYear) {\n\t\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t\t((getStateWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t\t? getStateWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtOrgTotalWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtOrgTotalWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtMilitaryWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtMilitaryWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtSimpleWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtSimpleWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (familyCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getFamilyCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getFamilyCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (childCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getChildCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getChildCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\t\t\t\t\trowIndex++;\n\t\t\t\t\tindex++;\n\t\t\t\t\tcolIndex = 1;\n\n\t\t\t\t}\n\n\t\t\trowIndex += 2;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1,\n\t\t\t\t\t\"ТАЙЛАН ГАРГАСАН: \" + \"..................................... / \"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getLastname().charAt(0) + \".\"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getFirstName() + \" /\",\n\t\t\t\t\tstyles.get(\"plain-left-wrap\"), 8);\n\t\t\trowIndex++;\n\n\t\t\tOutputStream out = response.getOutputStream(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"employeeList.xls\\\"\");\n\n\t\t\tdocument.write(out);\n\t\t\tout.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public FileOutputStream generateFinance14Report(List<Finance14Dto> Finance14DtoList,String fileName) throws IOException, ClassNotFoundException, SQLException {\n\t\tFile file=new File(fileName);\n\n\t\tString sheetName = \"Sheet1\";// name of sheet\n\n//\t\tResultSet resultSet = getDatabase(villageId,yearmonth);\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(); \n\t XSSFSheet spreadsheet = workbook\n\t \t .createSheet(sheetName);\n\t \t XSSFRow row=spreadsheet.createRow(1);\n\t \t /* XSSFRow row1 = spreadsheet.createRow(2);*/\n\t \t XSSFCell cell;\n\t \t cell=row.createCell(1);\n\t \t cell.setCellValue(\"vid\");\n\t \t cell=row.createCell(2);\n\t \t cell.setCellValue(\"month\");\n\t \t cell=row.createCell(3);\n\t \t cell.setCellValue(\"year\");\n\t \t cell=row.createCell(4);\n\t \t cell.setCellValue(\"Total work\");\n\t \t cell=row.createCell(5);\n\t \t cell.setCellValue(\"Works approved\");\n\t \t cell=row.createCell(6);\n\t \t cell.setCellValue(\"Project not started\");\n\t \t cell=row.createCell(7);\n\t \t cell.setCellValue(\"Progress\");\n\t \t cell=row.createCell(8);\n\t \t cell.setCellValue(\"Completed\");\n\t \t cell=row.createCell(9);\n\t \t cell.setCellValue(\"Grant allocated\");\n\t \t cell=row.createCell(10);\n\t \t cell.setCellValue(\"Amount spent\");\n\t \t /* cell=row.createCell(11);\n\t \t cell.setCellValue(\"entry date\");*/\n\t \t \n\t \t int i=2;\n\t \t for(Finance14Dto finance14Dto:Finance14DtoList)\n//\t \t while(resultSet.next())\n\t \t {\n\t \t row=spreadsheet.createRow(i);\n\t \t /* row1=spreadsheet.createRow(i+1);*/\n\t \t cell=row.createCell(1);\n\t \t cell.setCellValue(finance14Dto.getVillageId());\n\t \t cell=row.createCell(2);\n\t \t cell.setCellValue(finance14Dto.getMonth());\n\t \t cell=row.createCell(3);\n\t \t cell.setCellValue(finance14Dto.getYear());\n//\t \t /* spreadsheet.addMergedRegion(new CellRangeAddress(3, 3, 4, 4));*/\n\t \t cell=row.createCell(4);\n\t \t cell.setCellValue(finance14Dto.getTotalWork());\n\t \t cell=row.createCell(5);\n\t \t cell.setCellValue(finance14Dto.getWorksApproved());\n\t \t cell=row.createCell(6);\n\t \t cell.setCellValue(finance14Dto.getProjectNotStarted());\n\t \t cell=row.createCell(7);\n\t \t cell.setCellValue(finance14Dto.getProgress());\n\t \t cell=row.createCell(8);\n\t \t cell.setCellValue(finance14Dto.getCompleted());\n\t \t cell=row.createCell(9);\n\t \t cell.setCellValue(finance14Dto.getGrantAllocated());\n\t \t cell=row.createCell(10);\n\t \t cell.setCellValue(finance14Dto.getAmountSpent());\n\t \t /*cell=row.createCell(11);\n\t \t cell.setCellValue(finance14Dto.getEntryDate());*/\n\t \t i++;\n\t \t }\n\t \t FileOutputStream out = new FileOutputStream(\n\t \t file);\n\t \t workbook.write(out);\n\t \t out.close();\n\t \t System.out.println(\n\t \t \"exceldatabase.xlsx written successfully\");\n\t \t \n\t \treturn out;\n\t}", "@Test\n public final void testSinglePrintArea() throws Exception {\n Workbook workbook = _testDataProvider.createWorkbook();\n workbook.createSheet(\"Test Print Area\");\n String sheetName = workbook.getSheetName(0);\n\n String reference = \"$A$1:$B$1\";\n workbook.setPrintArea(0, reference);\n\n String retrievedPrintArea = workbook.getPrintArea(0);\n\n assertNotNull(retrievedPrintArea, \"Print Area not defined for first sheet\");\n assertEquals(\"'\" + sheetName + \"'!$A$1:$B$1\", retrievedPrintArea);\n\n workbook.close();\n }", "public interface ReportService {\n /**\n * Some constants using in reports\n */\n String[] dashboardSheetNames = {\"Level And Quantity\", \"Level And Trainers\", \"Training And Quantity\"};\n String[] levelAndQuantityColumns = {\"Level\", \"Course Name\", \"Group Name\"};\n String[] levelAndTrainersColumns = {\"Trainer\", \"Course Name and Level\"};\n String[] trainingAndQuantityColumns = {\"Course Name\", \"Group Name\", \"Amount of Employees\"};\n String groupsNotFound = \"No groups to report\";\n String levelException = \"Can't find Level for Id \";\n\n /**\n * @return full attendance report of all courses and their groups\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel() throws IOException;\n\n /**\n * @return attendance report of all groups of current user\n * @param user user object, to get user information\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel(User user) throws IOException;\n\n /**\n * @return attendance report of particular group\n * @param groupId id, to find group in database\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel(Integer groupId) throws IOException;\n\n /**\n * @return dashboard report of all courses, their groups, and users\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getDashboardExcel() throws IOException;\n}", "public void exportAllFacturesClient(OutputStream outputStream, long id) throws IOException {\n\n Workbook workbook = new XSSFWorkbook();\n \n // Styles des cellules: \n CellStyle styleGreen = workbook.createCellStyle();\n styleGreen.setFillForegroundColor(IndexedColors.GREEN.getIndex());\n styleGreen.setFillPattern(FillPatternType.SOLID_FOREGROUND); \n \n CellStyle styleBlue = workbook.createCellStyle();\n styleBlue.setFillForegroundColor(IndexedColors.BLUE.getIndex());\n styleBlue.setFillPattern(FillPatternType.SOLID_FOREGROUND); \n \n CellStyle styleYellow = workbook.createCellStyle();\n styleYellow.setFillForegroundColor(IndexedColors.YELLOW.getIndex());\n styleYellow.setFillPattern(FillPatternType.SOLID_FOREGROUND); \n \n Font font = workbook.createFont();\n font.setColor(IndexedColors.WHITE.getIndex());\n styleGreen.setFont(font);\n styleBlue.setFont(font);\n styleYellow.setFont(font);\n \n \n \n List<FactureDto> listAllFacturesAllClient = this.factureService.findAllFactures();\n \n \n for (FactureDto factureDto : listAllFacturesAllClient) {\n\t\t\tif(factureDto.getClient().id == id) {\n\t //SHEET\n\t Sheet sheet = workbook.createSheet(\"Facture\"+factureDto.getId());\n\t Row headerRow = sheet.createRow(0);\n\t //LIBELLES\n\t Cell cellLibelle0 = headerRow.createCell(0);\n\t Cell cellLibelle1 = headerRow.createCell(1);\n\t Cell cellLibelle2 = headerRow.createCell(2);\n\t Cell cellLibelle3 = headerRow.createCell(3);\n\t cellLibelle0.setCellValue(\"Désignation\");\n\t cellLibelle1.setCellValue(\"Quantité\");\n\t cellLibelle2.setCellValue(\"Prix Unitaire\");\n\t cellLibelle3.setCellValue(\"Prix ligne\");\n\t cellLibelle0.setCellStyle(styleGreen);\n\t cellLibelle1.setCellStyle(styleBlue);\n\t cellLibelle2.setCellStyle(styleYellow);\n\t cellLibelle3.setCellStyle(styleGreen);\n\n\t for (int i =0; i<factureDto.getLigneFactures().size(); i++) {\n\t \t\t \t\n\t Row newRow = sheet.createRow(i+1);\n\t \n\t Cell firstCell = newRow.createCell(0);\n\t firstCell.setCellStyle(styleGreen);\n\t firstCell.setCellValue(factureDto.getLigneFactures().get(i).getArticle().getLibelle());\n\t \n\t Cell secondCell =newRow.createCell(1);\n\t secondCell.setCellValue(factureDto.getLigneFactures().get(i).getQuantite());\n\t secondCell.setCellStyle(styleBlue);\n\t \n\t Cell thirdCell =newRow.createCell(3);\n\t thirdCell.setCellValue(factureDto.getLigneFactures().get(i).getArticle().getPrix());\n\t thirdCell.setCellStyle(styleYellow);\n\t \n\t Cell fourthCell =newRow.createCell(3);\n\t fourthCell.setCellValue(\n\t \t\t(factureDto.getLigneFactures().get(i).getArticle().getPrix())*(factureDto.getLigneFactures().get(i).getQuantite())\n\t \t\t);\n\t fourthCell.setCellStyle(styleGreen);\n\t \t\t}\n\t\t\t}\n\t\t}\n\n workbook.write(outputStream);\n workbook.close();\n }", "@Override\n\tpublic String getLaqshyaReport() throws IOException {\n\t\tString usreName = \"admin\";\n\t\tList<LaqshyaData> datas = null;\n\n\t\tCollectUser user = collectUserRepository.findByUsername(usreName);\n\t\tArea userArea = user.getUserRoleFeaturePermissionMappings().get(0).getRoleFeaturePermissionScheme().getArea();\n\n\t\tString[] headerData = { \"Sr.No.\", \"District\", \"Name of Facility\", \"Type of Assessment \", \"Total Score \",\n\t\t\t\t\"Service Provision\", \"Patient Right\", \"Input\", \"Support Services\", \"Clinical Services\",\n\t\t\t\t\"Infection Control\", \"Quality Management\", \"Outcome\", \"State Assesment Done\",\n\t\t\t\t\"State Certification - Labor Room\", \"State Certification - OT\", \"National Certification - Labor Room\",\n\t\t\t\t\"National Certification - OT\" };\n\n\t\tif (usreName.equalsIgnoreCase(\"admin\") || userArea.getAreaId() == 2) {\n\t\t\tdatas = laqshyaDataRepository.findByIsLiveTrue();\n\t\t} else\n\t\t\tdatas = laqshyaDataRepository.findByDistrictIdAndIsLiveTrue(userArea);\n\n\t\tif (datas.size() > 1) {\n\n\t\t\tXSSFWorkbook xssfWorkbook = new XSSFWorkbook();\n\t\t\tRow row;\n\t\t\tCell cell;\n\t\t\tint rowNum = 0, colNum = 0;\n\n\t\t\tXSSFSheet sheet = xssfWorkbook.createSheet();\n//\t\tPOIXMLProperties xmlProps = xssfWorkbook.getProperties();\n//\t\tPOIXMLProperties.CoreProperties coreProps = xmlProps.getCoreProperties();\n//\t\tcoreProps.setCreator(\"dgaindia.org\");\n\n\t\t\tCellStyle headingStyle = xssfWorkbook.createCellStyle();\n\t\t\tFont font = xssfWorkbook.createFont();\n\t\t\tfont.setBold(true);\n\t\t\theadingStyle.setFont(font);\n\t\t\theadingStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);\n\t\t\theadingStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);\n\t\t\theadingStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);\n\t\t\theadingStyle.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND);\n\t\t\theadingStyle.setFillForegroundColor(IndexedColors.GREY_40_PERCENT.getIndex());\n\n\t\t\tCellStyle cellStyle = xssfWorkbook.createCellStyle();\n\t\t\tcellStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);\n\t\t\tcellStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);\n\t\t\tcellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);\n\n\t\t\trow = sheet.createRow(rowNum);\n\n\t\t\tfor (int i = 0; i < 18; i++) {\n\t\t\t\tcell = row.createCell(i);\n\t\t\t\tcell.setCellStyle(headingStyle);\n\t\t\t\tcell.setCellValue(headerData[i]);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\t\t\t}\n\t\t\trowNum++;\n\n\t\t\t// row = sheet.createRow(rowNum);\n\t\t\tint counter = 1;\n\t\t\tfor (int j = 0; j < datas.size(); j++) {\n\t\t\t\trow = sheet.createRow(rowNum + j);\n\t\t\t\tcell = row.createCell(0);\n//\t\t\tcell.setCellStyle(headingStyle);\n\t\t\t\tcell.setCellValue(j + counter);\n\t\t\t\tcell.setCellStyle(cellStyle);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\n\t\t\t\tcell = row.createCell(1);\n//\t\t\tcell.setCellStyle(headingStyle);\n\t\t\t\tcell.setCellValue(datas.get(j).getDistrictName());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\n\t\t\t\tcell = row.createCell(2);\n\t\t\t\tcell.setCellValue(datas.get(j).getFacilityName());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\n\t\t\t\tcell = row.createCell(3);\n\t\t\t\tcell.setCellValue(\"Peer Assessment\");\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(4);\n\t\t\t\tif (datas.get(j).getTotalScorePeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(datas.get(j).getTotalScorePeer());\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getTotalScorePeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(5);\n\t\t\t\tif (datas.get(j).getServiceProvisionPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getServiceProvisionPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(6);\n\t\t\t\tif (datas.get(j).getPatientRightPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getPatientRightPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(7);\n\t\t\t\tif (datas.get(j).getInputPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getInputPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(8);\n\t\t\t\tif (datas.get(j).getSupportServicesPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getSupportServicesPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(9);\n\t\t\t\tif (datas.get(j).getClinicalServicesPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getClinicalServicesPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(10);\n\t\t\t\tif (datas.get(j).getInfectionControlPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getInfectionControlPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(11);\n\t\t\t\tif (datas.get(j).getQualityManagementPeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getQualityManagementPeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(12);\n\t\t\t\tif (datas.get(j).getOutcomePeer().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getOutcomePeer()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(13);\n\t\t\t\tif (datas.get(j).getStateAssesmentDonePeer().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getStateCertificationLaborRoomBaseline().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getStateAssesmentDonePeer());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(14);\n\t\t\t\tif (datas.get(j).getStateCertificationLaborRoomPeer().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getStateCertificationLaborRoomPeer().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getStateCertificationLaborRoomPeer());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(15);\n\t\t\t\tif (datas.get(j).getStateCertificationOTPeer().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getStateCertificationOTPeer().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getStateCertificationOTPeer());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(16);\n\t\t\t\tif (datas.get(j).getNationalCertificationLaborRoomPeer().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getNationalCertificationLaborRoomPeer().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getNationalCertificationLaborRoomPeer());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(17);\n\t\t\t\tif (datas.get(j).getNationalCertificationOTPeer().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getNationalCertificationOTPeer().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getNationalCertificationOTPeer());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcounter++;\n\t\t\t\trowNum++;\n\t\t\t\trow = sheet.createRow(rowNum + j);\n\n\t\t\t\tcell = row.createCell(0);\n//\t\t\tcell.setCellStyle(headingStyle);\n\t\t\t\tcell.setCellValue(j + counter);\n\t\t\t\tcell.setCellStyle(cellStyle);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\n\t\t\t\tcell = row.createCell(1);\n//\t\t\tcell.setCellStyle(headingStyle);\n\t\t\t\tcell.setCellValue(datas.get(j).getDistrictName());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\n\t\t\t\tcell = row.createCell(2);\n\t\t\t\tcell.setCellValue(datas.get(j).getFacilityName());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\t\t\t\tsheet.autoSizeColumn(cell.getColumnIndex());\n\n\t\t\t\tcell = row.createCell(3);\n\t\t\t\tcell.setCellValue(\"Baseline Assessment Labor Room\");\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(4);\n\t\t\t\tif (datas.get(j).getTotalScoreBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getTotalScoreBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(5);\n\t\t\t\tif (datas.get(j).getServiceProvisionBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getServiceProvisionBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(6);\n\t\t\t\tif (datas.get(j).getPatientRightBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getPatientRightBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(7);\n\t\t\t\tif (datas.get(j).getInputBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getInputBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(8);\n\t\t\t\tif (datas.get(j).getSupportServicesBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getSupportServicesBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(9);\n\t\t\t\tif (datas.get(j).getClinicalServicesBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getClinicalServicesBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(10);\n\t\t\t\tif (datas.get(j).getInfectionControlBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getInfectionControlBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(11);\n\t\t\t\tif (datas.get(j).getQualityManagementBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getQualityManagementBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(12);\n\t\t\t\tif (datas.get(j).getOutcomeBaseline().isEmpty())\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(Float.valueOf(datas.get(j).getOutcomeBaseline()));\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(13);\n\t\t\t\tif (datas.get(j).getStateAssesmentDoneBaseline().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getStateAssesmentDoneBaseline().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getStateAssesmentDoneBaseline());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(14);\n\t\t\t\tif (datas.get(j).getStateCertificationLaborRoomBaseline().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getStateCertificationLaborRoomBaseline().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getStateCertificationLaborRoomBaseline());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(15);\n\t\t\t\tif (datas.get(j).getStateCertificationOTBaseline().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getStateCertificationOTBaseline().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getStateCertificationOTBaseline());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(16);\n\t\t\t\tif (datas.get(j).getNationalCertificationLaborRoomBaseline().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getNationalCertificationLaborRoomBaseline().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getNationalCertificationLaborRoomBaseline());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n\t\t\t\tcell = row.createCell(17);\n\t\t\t\tif (datas.get(j).getNationalCertificationOTBaseline().isEmpty()\n\t\t\t\t\t\t|| datas.get(j).getNationalCertificationOTBaseline().trim().equals(\"-\"))\n\t\t\t\t\tcell.setCellValue(\"\");\n\t\t\t\telse\n\t\t\t\t\tcell.setCellValue(datas.get(j).getNationalCertificationOTBaseline());\n\t\t\t\tcell.setCellStyle(cellStyle);\n\n//\t\t\tcounter++;\n//\t\t\trowNum++;\n\n\t\t\t}\n\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss-SSS\");\n\t\t\tString filepath = messages.getMessage(\"LaqshyaOutputPath\", null, null) + datas.get(0).getDistrictName()\n\t\t\t\t\t+ \"_\" + sdf.format(new Date()) + \".xlsx\";\n\n//\t\tsheet.createFreezePane(0, 1);\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(filepath);\n\t\t\txssfWorkbook.write(fileOutputStream);\n\t\t\txssfWorkbook.close();\n\n\t\t\treturn filepath;\n\t\t} else\n\t\t\treturn \"\";\n\t}", "private ExporterIndicatorFTS_XLSX buildSheets(final List<DataSerie> dss) {\n\t\tExporterIndicatorFTS_XLSX previous = null;\n\t\tfor (final DataSerie ds : dss) {\n\t\t\tExporterIndicatorFTS_XLSX aSheet = null;\n\t\t\tif (previous == null) {\n\t\t\t\taSheet = new ExporterIndicatorFTS_XLSX(this, ds.getIndicatorCode(), ds.getIndicatorCode());\n\t\t\t} else {\n\t\t\t\taSheet = new ExporterIndicatorFTS_XLSX(previous, ds.getIndicatorCode(), ds.getIndicatorCode());\n\t\t\t}\n\t\t\tprevious = aSheet;\n\t\t}\n\t\treturn previous;\n\t}", "public void setup() {\n\t\tsize(1300, 800);\n\t\tint seed = 4346;\n\t\tran = new Random(seed);\n\t\trandompolys = randomPolygons(210);// prepare the input polygons\n\n\t\tDouble segment_len = useAbey ? null : segment_max_length;\n\t\tPack pack = new Pack(randompolys, margin, segment_len, rotSteps, WID, HEI, preferX);\n\t\tpack.packOneSheet(useAbey);\n\t\tpacks.add(pack);\n\n\t\tfor (int i = 0; i < 100; i++) { // packing one sheet after another, 100 is estimated\n\t\t\tint size = packs.size();\n\t\t\tif (packs.get(size - 1).isEmpty()) {\n\t\t\t\tprintln(size + \" sheets\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpack = packs.get(size - 1).clone();\n\t\t\tpack.packOneSheet(useAbey);\n\t\t\tpacks.add(pack);\n\t\t}\n\t\treport();\n\t}", "public int xlsWriter(List<CeoMypageDto> datas, String fileName, CeoMypageDto ceoDto )\n\t{\n\t\tint flag = 1;\n\t\tint startRow =2;\n\t\tint startCol =1;\n\t\t//workbook생성\n\t\tHSSFWorkbook workBook = new HSSFWorkbook();\n\t\t\n\t\t//work sheet생성\n\t\tif(fileName.equals(\"\"))fileName=\"sheet1\";\n\t\tHSSFSheet workSheet = workBook.createSheet(fileName);\n\t\t\n\t\t//행생성\n\t\tHSSFRow row = workSheet.createRow(startRow);\n\t\tHSSFRow row1 = workSheet.createRow(startRow+1);\n\t\tHSSFRow row2 = workSheet.createRow(startRow+2);\n\t\t\n\t\t//cell생성\n\t\tHSSFCell cell;\n\t\t\n\t\t//스타일 설정\n\n\n\t\t//스타일 객체 생성 \n\t\tHSSFCellStyle styleHd = workBook.createCellStyle(); //제목 스타일\n\t\tHSSFCellStyle styleBody = workBook.createCellStyle(); //내용 스타일\n\n\n\t\t//제목 폰트\n\t\tHSSFFont font = workBook.createFont();\n\t\tfont.setFontHeightInPoints((short)12);\n\t\tfont.setBoldweight((short)font.BOLDWEIGHT_BOLD);\n\n\t\t//제목 스타일에 폰트 적용, 정렬\n\t\tstyleHd.setFont(font);\n\t\tstyleHd.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\tstyleHd.setVerticalAlignment (HSSFCellStyle.VERTICAL_CENTER);\n styleHd.setFillBackgroundColor(HSSFColor.SKY_BLUE.index);\n styleHd.setFillForegroundColor(HSSFColor.SKY_BLUE.index);\n \n \n\t\tstyleHd.setFillPattern(CellStyle.SOLID_FOREGROUND);\n\t\t\n\t\t//날짜부분\n\t\tcell = row.createCell(startCol);\n\t\tcell.setCellValue(ceoDto.getSTART_DATE());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row.createCell(startCol+2);\n\t\tcell.setCellValue(ceoDto.getEND_DATE());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\t//검색어, 페이지넘 부분 \n\t\tcell = row1.createCell(startCol);\n\t\tcell.setCellValue(ceoDto.getSEARCH().replace(\"%\", \"\"));\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row1.createCell(startCol+2);\n\t\tcell.setCellValue(ceoDto.getPAGE_NUM());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t// 제목부분 \n\t\tcell = row2.createCell(startCol);\n\t\tcell.setCellValue(\"분류\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+1);\n\t\tcell.setCellValue(\"상품이름\");\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+2);\n\t\tcell.setCellValue(\"구매색상\");\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+3);\n\t\tcell.setCellValue(\"구매사이즈\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+4);\n\t\tcell.setCellValue(\"구매자\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+5);\n\t\tcell.setCellValue(\"상품수량\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+6);\n\t\tcell.setCellValue(\"재고\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+7);\n\t\tcell.setCellValue(\"실제 구매가격\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+8);\n\t\tcell.setCellValue(\"구매시간\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+9);\n\t\tcell.setCellValue(\"배송상태\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\n\n\t\t\n\t\tfor(int i=0;i<datas.size();i++)\n\t\t{\n\t\t\tCeoMypageDto vo = (CeoMypageDto)datas.get(i);\n\t\t\trow = workSheet.createRow(i+(startRow+3));\n\t\t \t\n\t\t\tcell = row.createCell(startCol+0);\n\t\t\tcell.setCellValue(vo.getITEM());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+1);\n\t\t\tcell.setCellValue(vo.getPRO_NAME());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+2);\n\t\t\tcell.setCellValue(vo.getSEL_COLOR());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+3);\n\t\t\tcell.setCellValue(vo.getSEL_SIZE());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+4);\n\t\t\tcell.setCellValue(vo.getUSER_ID());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+5);\n\t\t\tcell.setCellValue(vo.getSEL_NUM());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+6);\n\t\t\tcell.setCellValue(vo.getSTOCK());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+7);\n\t\t\tcell.setCellValue(vo.getFINAL_PRICE());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+8);\n\t\t\tcell.setCellValue(vo.getSELTIME());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+9);\n\t\t\tcell.setCellValue(vo.getDEL_STEP());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor (int i=0;i<4;i++) \n\t\t{ \n\t\t\tworkSheet.autoSizeColumn(i);\n\t\t\tworkSheet.setColumnWidth(i, (workSheet.getColumnWidth(i))+512 ); //이건 자동으로 조절 하면 너무 딱딱해 보여서 자동조정한 사이즈에 (short)512를 추가해 주니 한결 보기 나아졌다.\n\t\t}\n\t\tworkSheet.setColumnWidth(0, 200);\n\t\t\n\t\t\n\t\tFile file=new File(PATH+fileName+\"_\"+ExcelUtil.getPK()+\".xls\" );\n\t\tFileOutputStream fo = null;\n\t\ttry{\n\t\t\tfo = new FileOutputStream(file);\n\t\t\tworkBook.write(fo);\n\t\t}catch(FileNotFoundException fnf){\n\t\t\tflag = -1;\n\t\t\tfnf.printStackTrace();\n\t\t\t\n\t\t}catch(IOException io){\n\t\t\tflag = -1;\n\t\t\tio.printStackTrace();\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\tif(workBook!=null)workBook.close();\n\t\t\t\tif(fo!=null)fo.close();\n\t\t\t\t\n\t\t\t}catch(IOException io){\n\t\t\t\tflag = -1;\n\t\t\t\tio.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn flag;\n\t}", "@RequestMapping(value = \"/report/xls\")\r\n\tpublic ModelAndView generateXLSReport() {\r\n\r\n\t\tMap<String, Object> parameterMap = new HashMap<String, Object>();\r\n\r\n\t\tList<Person> personList = personService.getAll();\r\n\r\n\t\tJRDataSource person_list = new JRBeanCollectionDataSource(personList);\r\n\r\n\t\tparameterMap.put(\"person_list\", person_list);\r\n\r\n\t\treturn new ModelAndView(\"personReportList_xls\", parameterMap);\r\n\r\n\t}", "@Override\n\tprotected void createShell() {\n\t\tRectangle bounds = new Rectangle(100, 50, 600, 510);\n\t\tString shellTxt = \"Cohorts Report\";\n\t\tbuildShell(shellTxt, bounds);\n\t\t// create the composites\n\t\tcreateMyGroups();\n\t}", "public static void main(String[] args) {\n Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(),\n new ConfigurationActivator(),\n new StandaloneModeActivator(),\n new ModuleHealActivator(),\n new StateServiceActivator(),\n new ChartBaseActivator(),\n new SchedulerActivator(),\n new ReportBaseActivator(),\n new RestrictionActivator(),\n new ReportActivator(),\n new WriteActivator());\n SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl());\n String envpath = \"//Applications//FineReport10_325//webapps//webroot//WEB-INF\";\n SimpleWork.checkIn(envpath);\n I18nResource.getInstance();\n module.start();\n\n\n ResultWorkBook rworkbook = null;\n try {\n // read the workbook\n TemplateWorkBook workbook = TemplateWorkBookIO.readTemplateWorkBook(\"//doc//Primary//Parameter//Parameter.cpt\");\n // get the parameters and set value\n Parameter[] parameters = workbook.getParameters();\n parameters[0].setValue(\"华东\");\n // define a parameter map to execute the workbook\n java.util.Map parameterMap = new java.util.HashMap();\n for (int i = 0; i < parameters.length; i++) {\n parameterMap.put(parameters[i].getName(), parameters[i]\n .getValue());\n }\n\n FileOutputStream outputStream;\n\n // unaltered export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//ExcelExport.xls\"));\n ExcelExporter excel = new ExcelExporter();\n excel.setVersion(true);\n excel.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // unaltered export to xlsx\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//ExcelExport.xlsx\"));\n StreamExcel2007Exporter excel1 = new StreamExcel2007Exporter();\n excel.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // full page export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageExcelExport.xls\"));\n PageExcelExporter page = new PageExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(workbook.execute(parameterMap,new WriteActor())));\n page.setVersion(true);\n page.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // full page export to xlsx\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageExcelExport.xlsx\"));\n PageExcel2007Exporter page1 = new PageExcel2007Exporter(ReportUtils.getPaperSettingListFromWorkBook(rworkbook));\n page1.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // page to sheet export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageSheetExcelExport.xls\"));\n PageToSheetExcelExporter sheet = new PageToSheetExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(workbook.execute(parameterMap,new WriteActor())));\n sheet.setVersion(true);\n sheet.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // page to sheet export to xlsx\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageSheetExcelExport.xlsx\"));\n PageToSheetExcel2007Exporter sheet1 = new PageToSheetExcel2007Exporter(ReportUtils.getPaperSettingListFromWorkBook(rworkbook));\n sheet1.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // Large data volume export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//LargeExcelExport.zip\"));\n LargeDataPageExcelExporter large = new LargeDataPageExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(workbook.execute(parameterMap,new WriteActor())), true);\n\n // Large data volume export to xlsx\n // outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//LargeExcelExport.xlsx\"));\n // LargeDataPageExcel2007Exporter large = new LargeDataPageExcel2007Exporter(ReportUtils.getPaperSettingListFromWorkBook(rworkbook), true);\n large.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n outputStream.close();\n module.stop();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void creatTemplate(Sheet sheet, String title) {\n\n String label1 = \"TẬP ĐOÀN VIỄN THÔNG QUÂN ĐỘI\";\n String label2 = \"TỔNG CÔNG TY VIỄN THÔNG VIETTEL\";\n String label3 = \"CỘNG HOÀ XÃ HỘI CHỦ NGHĨA VIỆT NAM\";\n String label4 = \"Độc Lập - Tự Do - Hạnh Phúc\";\n\n createCellObject(sheet, 0, 0, label1, getCsSubTitle());\n createCellObject(sheet, 0, 1, label2, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 5, 0, label3, getCsSubTitle());\n createCellObject(sheet, 5, 1, label4, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 1, 4, title, getCsTitle());\n\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 4, 4, 1, 6);\n\n setRowHeight(sheet, 4, 630);\n }", "public static int create(EcoSystem system){\n \n \n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(\"Customer Details\");\n\n //Custom font style for header\n CellStyle cellStyle = sheet.getWorkbook().createCellStyle();\n Font font = sheet.getWorkbook().createFont();\n font.setBold(true);\n cellStyle.setFont(font);\n \n int rowCount = 0;\n int columnCount1 = 0;\n \n //Creating header row\n \n String s[] = {\"CUSTOMER ID\",\"CUSTOMER NAME\",\"CONTACT NO.\",\"EMAIL ID\",\"USAGE(Gallons)\",\"BILLING DATE\",\"TOTAL BILL($)\"};\n Row row1 = sheet.createRow(++rowCount);\n for(String s1 : s){\n Cell header = row1.createCell(++columnCount1);\n header.setCellValue(s1);\n header.setCellStyle(cellStyle);\n }\n \n \n \n for(Network network : system.getNetworkList()){\n for(Enterprise enterprise : network.getEnterpriseDirectory().getEnterpriseList()){\n if(enterprise instanceof WaterEnterprise){\n for(Organization organization : enterprise.getOrganizationDirectory().getOrganizationList()){\n if(organization instanceof CustomerOrganization){\n for(Employee employee : organization.getEmployeeDirectory().getEmployeeList()){\n Customer customer = (Customer) employee;\n Row row = sheet.createRow(++rowCount);\n int columnCount = 0;\n for(int i = 0 ; i<7 ; i++ ){\n Cell cell = row.createCell(++columnCount);\n if(i==0){\n cell.setCellValue(customer.getId());\n }\n else if(i == 1){\n cell.setCellValue(customer.getName());\n }\n else if(i == 2){\n cell.setCellValue(customer.getContactNo());\n }\n else if(i == 3){\n cell.setCellValue(customer.getEmailId());\n }\n else if(i == 4){\n cell.setCellValue(customer.getTotalUsageVolume());\n }\n else if(i == 5){\n if(customer.getBillingDate() != null)\n cell.setCellValue(String.valueOf(customer.getBillingDate()));\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n else if(i == 6){\n if(customer.getTotalBill() != 0)\n cell.setCellValue(customer.getTotalBill());\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n }\n }\n }\n }\n }\n }\n }\n \n \n try (FileOutputStream outputStream = new FileOutputStream(\"Customer_details.xlsx\")) {\n workbook.write(outputStream);\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"File not found\");\n return 0;\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"IOException\");\n return 0;\n }\n return 1;\n }", "public void exportXLS() {\n\t\t// Create a Workbook\n\t\tWorkbook workbook = new HSSFWorkbook(); // new HSSFWorkbook() for\n\t\t\t\t\t\t\t\t\t\t\t\t// generating `.xls` file\n\n\t\t/*\n\t\t * CreationHelper helps us create instances of various things like DataFormat,\n\t\t * Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way\n\t\t */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n\n\t\t// Create a Sheet\n\t\tSheet sheet = workbook.createSheet(\"العقود\");\n\n\t\t// Create a Font for styling header cells\n\t\tFont headerFont = workbook.createFont();\n\t\theaderFont.setBold(true);\n\t\theaderFont.setFontHeightInPoints((short) 14);\n\t\theaderFont.setColor(IndexedColors.RED.getIndex());\n\n\t\t// Create a CellStyle with the font\n\t\tCellStyle headerCellStyle = workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\n\t\t// Create a Row\n\t\tRow headerRow = sheet.createRow(0);\n\n\t\tString[] columns = { \"الرقم\", \"رقم العقد \", \"تاريخ البداية\", \"تاريخ النهاية\", \"المستثمر\", \"حالة الفاتورة\" };\n\t\t// Create cells\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tCell cell = headerRow.createCell(i);\n\t\t\tcell.setCellValue(columns[i]);\n\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\n\t\t// Create Cell Style for formatting Date\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum = 1;\n\t\tint num = 1;\n//\t\tfor (ContractDirect contObj : contractsDirectList) {\n//\t\t\tRow row = sheet.createRow(rowNum++);\n//\t\t\trow.createCell(0).setCellValue(num);\n//\t\t\trow.createCell(1).setCellValue(contObj.getContractNum());\n//\n//\t\t\tif (!tableHigriMode) {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartContDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndContDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t} else {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t}\n//\n//\t\t\tInvestor inv = (Investor) dataAccessService.findEntityById(Investor.class, contObj.getInvestorId());\n//\t\t\trow.createCell(4).setCellValue(inv.getName());\n//\t\t\trow.createCell(5).setCellValue(contObj.getPayStatusName());\n//\t\t\tnum++;\n//\t\t}\n\n\t\t// Resize all columns to fit the content size\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tsheet.autoSizeColumn(i);\n\t\t}\n\n\t\t// Write the output to a file\n\n\t\ttry {\n\t\t\tString path = \"D:/العقود.xls\";\n\t\t\tFileOutputStream fileOut = new FileOutputStream(path);\n\t\t\tworkbook.write(fileOut);\n\t\t\tfileOut.close();\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\ttry {\n\n\t\t\tworkbook.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Closing the workbook\n\n\t}", "public Sheet createSheet() {\n\t\treturn null;\n\t}", "public void expandCells() {\n\t\t//For the first pollutant create a new set of files\n\t\tString[] pollutants = factorsTable.keySet().toArray(new String[1]);\n\t\t\n\t\t//Now, for each row, we need to expand the total flow for each \n\t\t//type of day and for each hour of the day.\n\t\tdouble[] factorsRow = null;\n\t\tString key = null;\n\t\tfor(String type:types){\n\t\t\ttotalsTable = new TableTotal(0, 83, 84);\n\t\t\ttotalsTable.setLabels(pollutants);\n\t\t\tfor(int i=0;i<nHours;i++){\t\n\t\t\t\tkey = pollutants[0];\n\t\t\t\tfactorsRow = factorsTable.get(key);\n\t\t\t\t//Open the output file\n\t\t\t\tOutputSheet outputSheet =new OutputSheet(outputModel);\n\t\t\t\toutputSheet.setPost(\"_\"+key+\"_\"+type+\"_\"+(i*100));\n\t\t\t\t\n\t\t\t\t//Get iterator to all the rows in current sheet\n\t\t\t\tIterator<Row> rowIterator = cells.iterator();\n\t\t\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\t\t\tRow row = null;//The current cell\n\t\t\t\t//int k=0;\n\t\t\t\twhile(rowIterator.hasNext()){\n\t\t\t\t\t//System.out.println(k++);\n\t\t\t\t\trow = rowIterator.next();\n\t\t\t\t\tdouble sharedKey = row.getCell(CELLKEY).getNumericCellValue();\n\t\t\t\t\tint fidGrid = (int)row.getCell(CELL_FID_GRID).getNumericCellValue();\n\t\t\t\t\t//double total = row.getCell(CELLQUERY).getNumericCellValue();\n\t\t\t\t\tdouble longitude = row.getCell(CELL_LONGUITUDE).getNumericCellValue();\n\t\t\t\t\t\n\t\t\t\t\tString fullKey = Math.round(sharedKey)+type+i*100;\n\t\t\t\t\tdouble[] values = null;\n\t\t\t\t\tif(tableValues.containsKey(fullKey)){\n\t\t\t\t\t\tvalues = tableValues.get(fullKey);\n\t\t\t\t\t\toutputSheet.push(values, fidGrid, longitude);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutputSheet.replaceFactors(factorsRow);\n\t\t\t\toutputSheet.save();\n\t\t\t\t//Update the total\n\t\t\t\ttotalsTable.updateTotals(outputSheet.getSheet(), 0);\n\t\t\t\t\n\t\t\t\t//Now, for each other contaminant a new set of files have to be created\n\t\t\t\tfor(int k=pollutants.length-1;k>0;k--){\n\t\t\t\t\tkey=pollutants[k];\n\t\t\t\t\tfactorsRow = factorsTable.get(key);\n\t\t\t\t\toutputSheet.setPost(\"_\"+key+\"_\"+type+\"_\"+(i*100));\n\t\t\t\t\toutputSheet.replaceFactors(factorsRow);\n\t\t\t\t\toutputSheet.save();\n\t\t\t\t\t\n\t\t\t\t\t//Update the total\n\t\t\t\t\ttotalsTable.updateTotals(outputSheet.getSheet(), k);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\ttotalsTable.save(new File(outputModel.getAbsolutePath().replace(\"output.xlsx\", \"outputTotals_\"+type+\".csv\")));\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"The totals file could not be saved\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void createReport(HSSFWorkbook outWb, List<Integer> errorRows) {\n\t\tSheet reportSheet = outWb.createSheet(\"report\");\n\t\tif(!errorRows.isEmpty()) {\n\t\t\t// create report\n\t\t\tint i = 0;\n\t\t\tfor(Integer rowIndex: errorRows) {\n\t\t\t\tRow newRow = reportSheet.createRow(i);\n\t\t\t\tRow fromRow = outWb.getSheetAt(0).getRow(rowIndex);\n\t\t\t\tSheet fromSheet = outWb.getSheetAt(0);\n\t\t\t\tExcelUtil.copyRow(fromSheet, fromRow, reportSheet, newRow);\n\t\t\t\ti++;\n\t\t\t}\n\t\t} else {\n\t\t\t// report OK\n\t\t\tRow firstRow = reportSheet.createRow(0);\n\t\t\tCell firstCell = firstRow.createCell(0);\n\t\t\tfirstCell.setCellValue(\"OK\");\n\t\t\t\n\t\t\tCellStyle style = outWb.createCellStyle();\n\t\t style.setFillForegroundColor(IndexedColors.GREEN.getIndex());\n\t\t style.setFillPattern(CellStyle.SOLID_FOREGROUND);\n\t\t Font font = outWb.createFont();\n\t\t font.setBoldweight(Font.BOLDWEIGHT_BOLD);\n\t\t style.setFont(font);\n\t\t firstCell.setCellStyle(style);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "private void createContent(WritableSheet sheet,List<ReportRowDataMapper> reportContent) throws WriteException,\r\n\t\t\tRowsExceededException {\n\t\t\r\n\t\tfor (ReportRowDataMapper reportRowDataMapper : reportContent) {\r\n\t\t\t\r\n\t\t}\r\n\t\tfor (int i = 1; i < 20; i++) {\r\n\t\t\t// First column\r\n\t\t\taddLabel(sheet, 0, i, \"Boring text \" + i);\r\n\t\t\t// Second column\r\n\t\t\taddLabel(sheet, 1, i, \"Another text\");\r\n\t\t}\r\n\t}", "public void generateChart(){\n String[][] contents = retrieveFields();\n\n// String msg = \"test - \";\n// printCells(contents);\n\n String[] houseDisplay = new String[12];\n houseDisplay = new String[]{\"6\",\"4\",\"2\",\"1\",\"4\",\"6\",\"3\",\"5\",\"7/8\",\"\",\"5\",\"3\"};\n display(houseDisplay);\n }", "public static byte[] getDashboardPDFAsByteArray() {\n\n\t\tString localProviderURL = \"t3://localhost:7001\";\n\t\tSystem.setProperty(Context.INITIAL_CONTEXT_FACTORY, \"weblogic.jndi.WLInitialContextFactory\");\n\t\tSystem.setProperty(Context.PROVIDER_URL, localProviderURL);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Generating VINSight DashBoard Reports\");\n\n\t\t\n\t\t\n\t\t\n\t\t// step 1: creation of a document-object\n\t\tDocument document = new Document();\n\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(100000);\n\n \ttry {\n \t\t// step 2\n \t\tPdfWriter writer;\n\t\t\twriter = PdfWriter.getInstance(document, baos);\n\t\t\t// step 3\n \t\tdocument.open();\n\t\t\t// step 4: we add a paragraph to the document\n\t\t\tdocument.add(new Paragraph(\"VINSight Health Check\"));\n\t\t\tdocument.add(new Paragraph(\"Report 1\"));\n\n\t\t\t//create the chart1 image\n\t\t\tJFreeChart chart1 = VINSightDashboardReport.createVINSightDashBoardChart1();\n\t\t\tBufferedImage image1 = chart1.createBufferedImage(350, 350);\n\t\t\timage1.flush();\n\n\t\t\tdocument.add(com.lowagie.text.Image.getInstance(image1, null) );\n\t\t\tdocument.add(new Paragraph(\"Report 2\"));\n\t\t\tJFreeChart chart2 = VINSightDashboardReport.createVINSightDashBoardChart2();\n\t\t\tBufferedImage image2 = chart2.createBufferedImage(350, 350);\n\t\t\timage2.flush();\n\n\t\t\tdocument.add(com.lowagie.text.Image.getInstance(image2, null) );\n \t\t\n\t\t\n \t}\n \tcatch(DocumentException de) {\n \t\tde.printStackTrace();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}finally{\n \t// step 5\n \t\tdocument.close();\n \t\t\ttry{ baos.close();}catch(IOException ioe){/*ignore*/}\n \t}\n \t\n \treturn baos.toByteArray();\n\t\t\n\t}", "public void outputToExcel(String startTime,String endTime) throws ParseException {\n\t\tDate[] dates = new Date[2];\r\n\t\tif (startTime != null && endTime != null) {\r\n\t\t\t\r\n\t\t\tString dateRange = startTime +\" - \"+endTime;\r\n\t\t\tdates = WebUtil.changeDateRangeToDate(dateRange);\r\n\t\t}else {\r\n\t\t\tdates[0] = null;\r\n\t\t\tdates[1] = null;\r\n\t\t}\r\n\t\t\r\n\t\tList<Profit> profits = profitMapper.getProfit(dates[0], dates[1]);\r\n\t\tList<CourseProfit> courseProfits = courseSelectMapper.getCourseProfit(dates[0],WebUtil.getEndTime(dates[1], 1));\r\n\t\tList<CardProfit> cardProfits = cardFeeMapper.getCardProfit(dates[0], WebUtil.getEndTime(dates[1], 1));\r\n\t\tList<MachineBuyConfig> machineBuyConfigs = machineConfigMapper.getMachineProfit(dates[0], WebUtil.getEndTime(dates[1], 1));\r\n\t\t\r\n\t\tMap<String, String> profitMap = new LinkedHashMap<String, String>();\r\n\t\tprofitMap.put(\"date\", \"时间\");\r\n\t\tprofitMap.put(\"vip\", \"会员收益\");\r\n\t\tprofitMap.put(\"course\", \"课程收益\");\r\n\t\tprofitMap.put(\"mechine\", \"器械支出\");\r\n\t\tprofitMap.put(\"sum\", \"总计\");\r\n\t\tString sheetName = \"财务总表\";\r\n\t\t\r\n\t\tMap<String, String> courseProfitMap = new LinkedHashMap<String, String>();\r\n\t\tcourseProfitMap.put(\"selectTime\", \"时间\");\r\n\t\tcourseProfitMap.put(\"courseName\", \"课程名称\");\r\n\t\tcourseProfitMap.put(\"vipName\", \"会员姓名\");\r\n\t\tcourseProfitMap.put(\"courseCost\", \"课程收益\");\r\n\t\tString courseSheet = \"课程收益\";\r\n\t\t\r\n\t\tMap<String, String> cardProfitMap = new LinkedHashMap<String, String>();\r\n\t\tcardProfitMap.put(\"startTime\", \"时间\");\r\n\t\tcardProfitMap.put(\"vipName\", \"会员姓名\");\r\n\t\tcardProfitMap.put(\"cardType\", \"办卡类型\");\r\n\t\tcardProfitMap.put(\"cardFee\", \"办卡收益\");\r\n\t\tString cardSheet = \"办卡收益(1、年卡会员 2、季卡会员 3、月卡会员)\";\r\n\t\t\r\n\t\tMap<String, String> machineOutMap = new LinkedHashMap<String, String>();\r\n\t\tmachineOutMap.put(\"time\", \"时间\");\r\n\t\tmachineOutMap.put(\"machineName\", \"器械名称\");\r\n\t\tmachineOutMap.put(\"machineBrand\", \"器械品牌\");\r\n\t\tmachineOutMap.put(\"machineCost\", \"单价\");\r\n\t\tmachineOutMap.put(\"machineCount\", \"购买数量\");\r\n\t\tmachineOutMap.put(\"sumCost\", \"支出\");\r\n\t\tString machineSheet = \"器械支出\";\r\n\t\t\r\n\t\tExportExcel.excelExport(profits, profitMap, sheetName);\r\n\t\tExportExcel.excelExport(courseProfits, courseProfitMap, courseSheet);\r\n\t\tExportExcel.excelExport(cardProfits, cardProfitMap, cardSheet);\r\n\t\tExportExcel.excelExport(machineBuyConfigs, machineOutMap, machineSheet);\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\Leonardo\\\\git\\\\repository5\\\\HandleExcelWithApachePoi\\\\src\\\\arquivo_excel.xls\");\r\n\t\t\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\t\t\r\n\t\tPessoa p1 = new Pessoa();\r\n\t\tp1.setEmail(\"pessoa1@gmail.com\");\r\n\t\tp1.setIdade(50);\r\n\t\tp1.setNome(\"Ricardo Edigio\");\r\n\t\t\r\n\t\tPessoa p2 = new Pessoa();\r\n\t\tp2.setEmail(\"pessoa2@gmail.com\");\r\n\t\tp2.setIdade(40);\r\n\t\tp2.setNome(\"Marcos Tadeu\");\r\n\t\t\r\n\t\tPessoa p3 = new Pessoa();\r\n\t\tp3.setEmail(\"pessoa3@gmail.com\");\r\n\t\tp3.setIdade(30);\r\n\t\tp3.setNome(\"Maria Julia\");\r\n\t\t\r\n\t\tList<Pessoa> pessoas = new ArrayList<Pessoa>();\r\n\t\tpessoas.add(p1);\r\n\t\tpessoas.add(p2);\r\n\t\tpessoas.add(p3);\r\n\t\t\r\n\t\t\r\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /*escrever na planilha*/\r\n\t\tHSSFSheet linhasPessoa = hssfWorkbook.createSheet(\"Planilha de pessoas\"); /*criar planilha*/\r\n\t\t\r\n\t\tint nlinha = 0;\r\n\t\tfor (Pessoa p : pessoas) {\r\n\t\t\tRow linha = linhasPessoa.createRow(nlinha ++); /*criando a linha na planilha*/\r\n\t\t\t\r\n\t\t\tint celula = 0;\r\n\t\t\t\r\n\t\t\tCell celNome = linha.createCell(celula ++); /*celula 1*/\r\n\t\t\tcelNome.setCellValue(p.getNome());\r\n\t\t\t\r\n\t\t\tCell celEmail = linha.createCell(celula ++); /*celula 2*/\r\n\t\t\tcelEmail.setCellValue(p.getEmail());\r\n\t\t\t\r\n\t\t\tCell celIdade = linha.createCell(celula ++); /*celula 3*/\r\n\t\t\tcelIdade.setCellValue(p.getIdade());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tFileOutputStream saida = new FileOutputStream(file);\r\n\t\thssfWorkbook.write(saida);\r\n\t\t\r\n\t\tsaida.flush();\r\n\t\tsaida.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Planilha Criada com Sucesso!\");\r\n\t\t\r\n\t}", "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "public static byte[] writeExcel(List<Object[]> objectList) throws IOException {\n\n String sheetName = \"Sheet1\";//name of sheet\n\n XSSFWorkbook wb = new XSSFWorkbook();\n XSSFSheet sheet = wb.createSheet(sheetName);\n Map<String, CellStyle> styles = createStyles(wb);\n int contRow = 0;\n for (Object[] obj : objectList) {\n XSSFRow row = sheet.createRow(contRow);\n int contCell = 0;\n\n for (Object s : obj) {\n\n XSSFCell cell = row.createCell(contCell);\n\n /*if (contCell == 0 && contRow > 0) {\n nomAct = s.toString();\n }*/\n \n /*if (contCell == 1 && contRow > 0) {\n descripAct = s.toString();\n }*/\n\n if (contRow == 0) {\n cell.setCellValue(s.toString());\n cell.setCellStyle(styles.get(\"header\"));\n } else {\n /*if (nomAct.equals(nomAnt) && contCell == 0) {\n cell.setCellValue(\"\");\n cell.setCellStyle(styles.get(\"cell_normal_rol\"));\n }\n if (descripAct.equals(descripAnt) && contCell == 1) {\n cell.setCellValue(\"\");\n cell.setCellStyle(styles.get(\"cell_normal_rol\"));\n } else {*/\n cell.setCellValue(s.toString());\n /* if (contCell == 0 || contCell==1) {\n cell.setCellStyle(styles.get(\"cell_normal_rol\"));\n nomAnt = nomAct;\n descripAnt = descripAct;\n } else {\n cell.setCellStyle(styles.get(\"cell_normal\"));\n }*/\n //}\n }\n\n contCell++;\n }\n contRow++;\n }\n\n/*\n sheet.addMergedRegion(new CellRangeAddress(1, contRow - 1, 0, 0));\n sheet.addMergedRegion(new CellRangeAddress(1, contRow - 1, 1, 1));*/\n\n\n /*//iterating r number of rows\n for (int r = 0; r < 5; r++) {\n XSSFRow row = sheet.createRow(r);\n\n //iterating c number of columns\n for (int c = 0; c < 5; c++) {\n for (int c = 0; c < 5; c++) {\n XSSFCell cell = row.createCell(c);\n\n cell.setCellValue(\"Cell \" + r + \" \" + c);\n }\n }*/\n\n // FileOutputStream fileOut = new FileOutputStream(excelFileName);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n wb.write(byteArrayOutputStream);\n return byteArrayOutputStream.toByteArray();\n\n //write this workbook to an Outputstream.\n/* wb.write(fileOut);\n fileOut.flush();\n fileOut.close();*/\n }", "@Test\n public final void testPrintAreaCoords() throws Exception {\n Workbook workbook = _testDataProvider.createWorkbook();\n workbook.createSheet(\"Test Print Area\");\n String sheetName = workbook.getSheetName(0);\n\n workbook.setPrintArea(0, 0, 1, 0, 0);\n\n String retrievedPrintArea = workbook.getPrintArea(0);\n\n assertNotNull(retrievedPrintArea, \"Print Area not defined for first sheet\");\n assertEquals(\"'\" + sheetName + \"'!$A$1:$B$1\", retrievedPrintArea);\n\n workbook.close();\n }", "private static void showExcel(Experiment e1, ArrayList<Institution> bank) {\n\n\n\n\t\tfinal String INPUT_DIR=\"D:/Users/atsushi/Desktop/実験結果/\";\n\t\tWorkbook book=null;\n\n\t\ttry{\n\t\t\tbook = new HSSFWorkbook();\n\t\t\tFileOutputStream fileOut=new FileOutputStream(\"workbook.xls\");\n\t\t\tString safename=WorkbookUtil.createSafeSheetName(\"[OutPut]\");\n\t\t\tString safename1=WorkbookUtil.createSafeSheetName(\"[Bank]\");\n\t\t\tString safename2=WorkbookUtil.createSafeSheetName(\"[Firm]\");\n\t\t\tSheet sheet1=book.createSheet(safename);\n\t\t\tSheet sheet2=book.createSheet(safename1);\n\t\t\tSheet sheet3=book.createSheet(safename2);\n\t\t\tCreationHelper createHelper=book.getCreationHelper();\n\n\t\t\t//100タームごとに改行\n\t\t\tint rowterm=e1.getTerm()/100+1;\n\t\t\tint term=e1.getTerm();\n\t\t\tint xterm=100;\n\t\t\tint a=0,b=xterm-1;\n\t\t\t//if(e1.getTerm()>100) {xterm=100;a=0;b=xterm-1;}else {xterm=0;a=0;b=e1.getTerm()-1;}\n\t\t\tfor(int x=0;x<rowterm;x++){\n\t\t\tRow row = sheet1.createRow((short)x);//行\n\t\t\tRow row1=sheet1.createRow((short)(x+rowterm+2));\n\t\t\tRow row2=sheet1.createRow((short)(x+rowterm*2+2));\n\t\t\tRow row3=sheet1.createRow((short)(x+rowterm*3+2));\n\t\t\tRow row4=sheet1.createRow((short)(x+rowterm*4+2));\n\t\t\tRow row5=sheet1.createRow((short)(x+rowterm*5+2));\n\t\t\tRow row6=sheet1.createRow((short)(x+rowterm*6+2));\n\t\t\tRow row7=sheet1.createRow((short)(x+rowterm*7+2));\n\t\t\tRow row8=sheet1.createRow((short)(x+rowterm*8+2));\n\t\t\tRow row9=sheet1.createRow((short)(x+rowterm*9+2));\n\t\t\tRow row10=sheet1.createRow((short)(x+rowterm*10+2));\n\t\t\tRow row11=sheet1.createRow((short)(x+rowterm*11+2));\n\t\t\tRow row12=sheet1.createRow((short)(x+rowterm*12+2));\n\t\t\tRow row13=sheet1.createRow((short)(x+rowterm*11+2));\n\n\t\t\tint j=0;\n\t\t\tfor(j=a;j<=b;j++){\n\t\t\trow.createCell(j-(x*xterm)).setCellValue(e1.getAgrregateOP(j));\n\t\t\trow1.createCell(j-(x*xterm)).setCellValue(e1.getGrowthRateOP(j));\n\t\t\trow2.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirm(j));\n\t\t\trow3.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirmrate(j));\n\t\t\trow4.createCell(j-(x*xterm)).setCellValue(e1.getBadLoan(j));\n\t\t\trow5.createCell(j-(x*xterm)).setCellValue(e1.getAVGInterest(j));\n\t\t\trow6.createCell(j-(x*xterm)).setCellValue(e1.getMoneyStock(j));\n\t\t\trow7.createCell(j-(x*xterm)).setCellValue(e1.getCreditMoney(j));\n\t\t\trow8.createCell(j-(x*xterm)).setCellValue(e1.getResidual(j));\n\t\t\trow9.createCell(j-(x*xterm)).setCellValue(e1.getGrossDemand(j));\n\t\t\trow10.createCell(j-(x*xterm)).setCellValue(e1.getGrossSupply(j));\n\t\t\trow11.createCell(j-(x*xterm)).setCellValue(e1.getRejectFinancing(j));\n\n\n\t\t //cell.setCellValue(createHelper.createRichTextString(\"sample String\"));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(j=a;j<e1.getAliveBank();j++) {\n\t\t\t\trowx.createCell(j-(x*e1.getAliveBank())).setCellValue(e1.getBankCAR(j));\n\t\t\t}*/\n\t\t\tif(term>100){\n\t\t\tif(term-1>xterm+j){\n\t\t\t\tif(term-j-1>xterm){\n\t\t\t\t\ta=j;b=j+xterm-1;\n\t\t\t\t}}else{\n\t\t\t\t\ta=j;\n\t\t\t\t\tb=term-1;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}\n\n\t\t\t//企業list\n\t\t\te1.setSortFirmK();\n\t\t\tint rowfirm=e1.getalivefirm()/100;\n\t\t\tint firmnode=e1.getalivefirm();\n\t\t\tint fn=100;\n\t\t\tint c=0,d=fn-1;\n\t\t\tint t=0;\n\n\t\t\tRow row00= sheet3.createRow((short)t);\n\t\t\trow00.createCell(0).setCellValue(\"総資産\");\n\t\t\tRow row02=sheet3.createRow((short)t+15);\n\t\t\trow02.createCell(0).setCellValue(\"取引先\");\n\t\t\tRow row04=sheet3.createRow((short)t+30);\n\t\t\trow04.createCell(0).setCellValue(\"Leverage\");\n\t\t\tRow row06=sheet3.createRow((short)t+45);\n\t\t\trow06.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\tRow row08=sheet3.createRow((short)t+60);\n\t\t\trow08.createCell(0).setCellValue(\"RejectOrder\");\n\t\t\tRow row010=sheet3.createRow((short)t+75);\n\t\t\trow010.createCell(0).setCellValue(\"NonBuffer\");\n\t\t\t\tfor(int x=0;x<rowfirm;x++){\n\t\t\t\t/*\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\t*/\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x+1);//行\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x+16);\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x+31);\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x+46);\n\t\t\t\t\tRow row9 =sheet3.createRow((short)x+61);\n\t\t\t\t\tRow row11 =sheet3.createRow((short)x+76);\n\t\t\t\tint j=0;\n\t\t\t\tfor(j=c;j<=d;j++){\n\t\t\t\t\t//System.out.print(d);\n\t\t\t\t\trow1.createCell(j-(x*fn)).setCellValue(e1.getFirmK(j));\n\t\t\t\t\trow3.createCell(j-(x*fn)).setCellValue(e1.getFirmCandidateNum(j));\n\t\t\t\t\trow5.createCell(j-(x*fn)).setCellValue(e1.getFirmLeverage(j));\n\t\t\t\t\trow7.createCell(j-(x*fn)).setCellValue(e1.getFirmnextLeverage(j));\n\t\t\t\t\trow9.createCell(j-(x*fn)).setCellValue(e1.getFirmRejectOrderNum(j));\n\t\t\t\t\trow11.createCell(j-(x*fn)).setCellValue(e1.getFirmNonBufferNum(j));\n\t\t\t\t}\n\n\t\t\t\tif(firmnode-1>fn+j){\n\t\t\t\t\tif(firmnode-j-1>fn){\n\t\t\t\t\t\tc=j;d=j+fn-1;\n\t\t\t\t\t}}else{\n\t\t\t\t\t\tc=j;\n\t\t\t\t\t\td=firmnode-1;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif(rowfirm==0) {\n\t\t\t\t\tint x=0;\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x);//行\n\t\t\t\t\tRow row2=sheet3.createRow((short)x+15);\n\t\t\t\t\trow2.createCell(0).setCellValue(\"取引先\");\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row4=sheet3.createRow((short)x+30);\n\t\t\t\t\trow4.createCell(0).setCellValue(\"Leverate\");\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row6=sheet3.createRow((short)x+45);\n\t\t\t\t\trow6.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row8 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row9=sheet3.createRow((short)x+20);\n\t\t\t\tfor(int i=0;i<firmnode;i++) {\n\t\t\t\t\trow1.createCell(i).setCellValue(e1.getFirmK(i));\n\t\t\t\t\trow3.createCell(i).setCellValue(e1.getFirmCandidateNum(i));\n\t\t\t\t\trow5.createCell(i).setCellValue(e1.getFirmLeverage(i));\n\t\t\t\t\trow7.createCell(i).setCellValue(e1.getFirmnextLeverage(i));\n\t\t\t\t\t//row4.createCell(i).setCellValue(e1.getFirmLevNowEvalue(i));\n\t\t\t\t}\n\t\t\t\t}\n*/\n\n\t\t\t//銀行リスト\n\n\t\t\tint banknode=e1.getAliveBank();\n\n\t\t\tfor(int x=0;x<1;x++) {\n\t\t\tRow row0=sheet2.createRow((short)x);\n\t\t\tRow row1=sheet2.createRow((short)x+2);\n\t\t\trow1.createCell(0).setCellValue(\"CAR\");\n\t\t\tRow row2=sheet2.createRow((short)x+3);\n\t\t\tRow row3=sheet2.createRow((short)x+4);\n\t\t\trow3.createCell(0).setCellValue(\"企業への貸付:IBloan:IBborrow\");\n\t\t\tRow row4=sheet2.createRow((short)x+5);\n\t\t\tRow row5=sheet2.createRow((short)x+6);\n\t\t\tRow row6=sheet2.createRow((short)x+7);\n\t\t\tRow row7=sheet2.createRow((short)x+8);\n\t\t\trow7.createCell(0).setCellValue(\"銀行資産規模K\");\n\t\t\tRow row8=sheet2.createRow((short)x+9);\n\t\t\tRow row9=sheet2.createRow((short)x+10);\n\t\t\trow9.createCell(0).setCellValue(\"銀行buffer\");\n\t\t\tRow row10=sheet2.createRow((short)x+11);\n\t\t\tRow row11=sheet2.createRow((short)x+12);\n\t\t\trow11.createCell(0).setCellValue(\"銀行総badloan\");\n\t\t\tRow row12=sheet2.createRow((short)x+13);\n\t\t\tRow row13=sheet2.createRow((short)x+14);\n\t\t\trow13.createCell(0).setCellValue(\"銀行residual\");\n\t\t\tRow row14=sheet2.createRow((short)x+15);\n\t\t\tRow row15=sheet2.createRow((short)x+16);\n\t\t\trow15.createCell(0).setCellValue(\"銀行総LFlistsize\");\n\t\t\tRow row16=sheet2.createRow((short)x+17);\n\t\t\tRow row17=sheet2.createRow((short)x+18);\n\t\t\trow17.createCell(0).setCellValue(\"銀行市場性資産\");\n\t\t\tRow row18=sheet2.createRow((short)x+19);\n\t\t\tRow row19=sheet2.createRow((short)x+20);\n\t\t\trow19.createCell(0).setCellValue(\"ClientNumber\");\n\t\t\tRow row20=sheet2.createRow((short)x+21);\n\n\t\t\tfor(int i=0;i<banknode;i++) {\n\t\t\trow0.createCell(i).setCellValue(e1.getBankId(i));\n\t\t\trow2.createCell(i).setCellValue(e1.getBankCAR(i));\n\t\t\trow4.createCell(i).setCellValue(e1.getBankLf(i));\n\t\t\trow5.createCell(i).setCellValue(e1.getBankLb(i));\n\t\t\trow6.createCell(i).setCellValue(e1.getBankBb(i));\n\t\t\trow8.createCell(i).setCellValue(e1.getBankK(i));\n\t\t\trow10.createCell(i).setCellValue(e1.getBankBuffer(i));\n\t\t\trow12.createCell(i).setCellValue(e1.getBankGrossBadLoan(i));\n\t\t\trow14.createCell(i).setCellValue(e1.getBankResidual(i));\n\t\t\trow16.createCell(i).setCellValue(e1.getBankLFSize(i));\n\t\t\trow18.createCell(i).setCellValue(e1.getBankLiqAsset(i));\n\t\t\trow20.createCell(i).setCellValue(e1.getBankClientNum(i));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(int i=0;i<bank.get(0).levlist.size();i++) {\n\t\t\t\trow18.createCell(i).setCellValue(e1.getBanklevlevelvalue(i));\n\t\t\t}\n\t\t\t*/\n\n\n\n\n\n\t\t\t}\n\t\t book.write(fileOut);\n\t\t //fileOut.close();\n\n\t\t // 1つ目のセルを作成 ※行と同じく、0からスタート\n\t\t //Cell a1 = row.createCell(0); // Excel上、「A1」の場所\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\n\n\t\t}\n\n\n\t}", "public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public void fillAntarDashaTable(PdfContentByte canvas,AstroBean astrobean,ColorElement mycolor) {\n\t\tLinkedHashMap<String, Vector<MahaDashaBean>> antardashaDetailHashTable = null;\n\n\n\n\t\ttry {\n\n\t\t\tantardashaDetailHashTable = astrobean.getAntardashaDetailHashTable();\n\t\t} catch (Exception ex) {\n\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tPlanet[] planetName = Planet.values();\n\t\tint j = 0;\n\n\t\tVector<MahaDashaBean> antardashavector = null;\n\n\n\t\tIterator it = antardashaDetailHashTable.values().iterator();\n\t\twhile (it.hasNext()) {\n\n\n\t\t\tantardashavector = (Vector) it.next();\n\t\t\t// logger.info(\"Plane Name is\"+planetName[j].toString());\n\t\t\tPdfPTable mahadashaTable = null;\n\n\t\t\t\t\n\t\t\tswitch (j) {\n\t\t\t\t\t\n\t\t\t\tcase 0:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 50, (toXYCord(210)),mycolor);\n\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 225, (toXYCord(210)),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 400, (toXYCord(210)),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 50, toXYCord(380),mycolor);\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase 4:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 225, toXYCord(380),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 400, toXYCord(380),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 50, toXYCord(550),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 225, toXYCord(550),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 400, toXYCord(550),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tj++;\n\n\t\t}\n\t\t//\t}\n}", "AREA createAREA();", "public void generarReporteTablaAmortiDetalles(String sAccionBusqueda,List<TablaAmortiDetalle> tablaamortidetallesParaReportes) throws Exception {\n\t\tLong iIdUsuarioSesion=0L;\t\r\n\t\t\r\n\t\t\r\n\t\tif(usuarioActual==null) {\r\n\t\t\tthis.usuarioActual=new Usuario();\r\n\t\t}\r\n\t\t\r\n\t\tiIdUsuarioSesion=usuarioActual.getId();\r\n\t\t\r\n\t\tString sPathReportes=\"\";\r\n\t\t\r\n\t\tInputStream reportFile=null;\r\n\t\tInputStream imageFile=null;\r\n\t\t\t\r\n\t\timageFile=AuxiliarImagenes.class.getResourceAsStream(\"LogoReporte.jpg\");\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathReporteFinal=\"\";\r\n\t\t\r\n\t\tif(!esReporteAccionProceso) {\r\n\t\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\t\tif(!this.esReporteDinamico) {\r\n\t\t\t\t\tsPathReporteFinal=\"TablaAmortiDetalle\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsPathReporteFinal=this.sPathReporteDinamico;\r\n\t\t\t\t\treportFile = new FileInputStream(sPathReporteFinal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"TablaAmortiDetalleMasterRelaciones\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\r\n\t\t\t\t//sPathReportes=reportFile.getPath().replace(\"TablaAmortiDetalleMasterRelacionesDesign.jasper\", \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"TablaAmortiDetalle\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t}\r\n\t\t\r\n\t\tif(reportFile==null) {\r\n\t\t\tthrow new JRRuntimeException(sPathReporteFinal+\" no existe\");\r\n\t\t}\r\n\t\t\r\n\t\tString sUsuario=\"\";\r\n\t\t\r\n\t\tif(usuarioActual!=null) {\r\n\t\t\tsUsuario=usuarioActual.getuser_name();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"usuario\", sUsuario);\r\n\t\t\r\n\t\tparameters.put(\"titulo\", Funciones.GetTituloSistemaReporte(this.parametroGeneralSg,this.moduloActual,this.usuarioActual));\r\n\t\tparameters.put(\"subtitulo\", \"Reporte De Tabla Amortizacion Detalles\");\t\t\r\n\t\tparameters.put(\"busquedapor\", TablaAmortiDetalleConstantesFunciones.getNombreIndice(sAccionBusqueda)+sDetalleReporte);\r\n\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\tparameters.put(\"SUBREPORT_DIR\", sPathReportes);\r\n\t\t}\r\n\t\t\r\n\t\tparameters.put(\"con_grafico\", this.conGraficoReporte);\r\n\t\t\r\n\t\tJasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);\r\n\t\t\t\t\r\n\t\tthis.cargarDatosCliente();\r\n\t\t\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//FK DEBERIA TRAERSE DE ANTEMANO\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t//CLASSES PARA REPORTES OBJETOS RELACIONADOS\r\n\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\tclasses=new ArrayList<Classe>();\r\n\t\t}\r\n\t\t\r\n\t\tJRBeanArrayDataSource jrbeanArrayDataSourceTablaAmortiDetalle=null;\r\n\t\t\r\n\t\tif(this.sTipoReporteExtra!=null && !this.sTipoReporteExtra.equals(\"\")) {\r\n\t\t\tTablaAmortiDetalleConstantesFunciones.S_TIPOREPORTE_EXTRA=this.sTipoReporteExtra;\r\n\t\t} else {\r\n\t\t\tTablaAmortiDetalleConstantesFunciones.S_TIPOREPORTE_EXTRA=\"\";\r\n\t\t}\r\n\t\t\r\n\t\tjrbeanArrayDataSourceTablaAmortiDetalle=new JRBeanArrayDataSource(TablaAmortiDetalleJInternalFrame.TraerTablaAmortiDetalleBeans(tablaamortidetallesParaReportes,classes).toArray());\r\n\t\t\r\n\t\tjasperPrint = JasperFillManager.fillReport(jasperReport,parameters,jrbeanArrayDataSourceTablaAmortiDetalle);\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathDest=Constantes.SUNIDAD_ARCHIVOS+\":/\"+Constantes.SCONTEXTSERVER+\"/\"+TablaAmortiDetalleConstantesFunciones.SCHEMA+\"/reportes\";\r\n\t\t\r\n\t\tFile filePathDest = new File(sPathDest);\r\n\t\t\r\n\t\tif(!filePathDest.exists()) {\r\n\t\t\tfilePathDest.mkdirs();\t\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tString sDestFileName=sPathDest+\"/\"+TablaAmortiDetalleConstantesFunciones.CLASSNAME;\r\n\t\t\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"VISUALIZAR\") {\r\n\t\t\tJasperViewer jasperViewer = new JasperViewer(jasperPrint,false) ;\r\n\t\t\tjasperViewer.setVisible(true) ; \r\n\r\n\t\t} else if(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\") {\t\r\n\t\t\t//JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(),parameters, new JRBeanArrayDataSource(TablaAmortiDetalleBean.TraerTablaAmortiDetalleBeans(tablaamortidetallesParaReportes).toArray()));\r\n\t\t\t\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"HTML\") {\r\n\t\t\t\tsDestFileName+=\".html\";\r\n\t\t\t\tJasperExportManager.exportReportToHtmlFile(jasperPrint,sDestFileName);\r\n\t\t\t\t\t\r\n\t\t\t} else if(this.sTipoArchivoReporte==\"PDF\") {\r\n\t\t\t\tsDestFileName+=\".pdf\";\r\n\t\t\t\tJasperExportManager.exportReportToPdfFile(jasperPrint,sDestFileName);\r\n\t\t\t} else {\r\n\t\t\t\tsDestFileName+=\".xml\";\r\n\t\t\t\tJasperExportManager.exportReportToXmlFile(jasperPrint,sDestFileName, false);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\r\n\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"WORD\") {\r\n\t\t\t\tsDestFileName+=\".rtf\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRRtfExporter exporter = new JRRtfExporter();\r\n\t\t\r\n\t\t\t\texporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\r\n\t\t\t\texporter.exportReport();\r\n\t\t\t\t\r\n\t\t\t} else\t{\r\n\t\t\t\tsDestFileName+=\".xls\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRXlsExporter exporterXls = new JRXlsExporter();\r\n\t\t\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\t\texporterXls.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);\r\n\t\t\r\n\t\t\t\texporterXls.exportReport();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"EXCEL2\"||this.sTipoArchivoReporte==\"EXCEL2_2\") {\r\n\t\t\t//sDestFileName+=\".xlsx\";\r\n\t\t\t\r\n\t\t\tif(this.sTipoReporte.equals(\"NORMAL\")) {\r\n\t\t\t\tthis.generarExcelReporteTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"FORMULARIO\")){\r\n\t\t\t\tthis.generarExcelReporteVerticalTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,false);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"DINAMICO\")){\r\n\t\t\t\t\r\n\t\t\t\tif(this.sTipoReporteDinamico.equals(\"NORMAL\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.jButtonGenerarExcelReporteDinamicoTablaAmortiDetalleActionPerformed(null);\r\n\t\t\t\t\t//this.generarExcelReporteTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"FORMULARIO\")){\r\n\t\t\t\t\tthis.generarExcelReporteVerticalTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,true);\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"RELACIONES\")){\r\n\t\t\t\t\tthis.generarExcelReporteRelacionesTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"RELACIONES\")){\r\n\t\t\t\tthis.generarExcelReporteRelacionesTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\"||this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\t\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(this,\"REPORTE \"+sDestFileName+\" GENERADO SATISFACTORIAMENTE\",\"REPORTES \",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "public static JasperReportBuilder generateReport(ExportData metaData,HttpServletRequest request){\n session = request.getSession(false);\n report = report(); // Creer le rapport\n \n //Logo\n// logoImg = cmp.image(inImg).setStyle(DynamicReports.stl.style().setHorizontalAlignment(HorizontalAlignment.LEFT)); \n //logoImg.setDimension(80,80); \n \n //Definit le style des colonnes d'entàte\n report.setColumnTitleStyle(getHeaderStyle(metaData));\n \n \n \n LinkedHashMap <String,String> criteria = metaData.getCriteria(); \n //Ajout la date d'àdition au critere d'impression\n String valDateProperty = getDateTxt(metaData.getLang()) ;\n String keyDateProperty = \"\" ;\n if ( session.getAttribute(\"activedLocale\").equals(\"fr\") ) {\n keyDateProperty = \"Edité le \" ;\n }\n else {\n keyDateProperty = \"Printed on \" ;\n }\n criteria.put(keyDateProperty,valDateProperty);\n \n StyleBuilder titleStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0)).setHorizontalAlignment(HorizontalAlignment.RIGHT).setRightIndent(20);\n ComponentBuilder<?, ?> logoComponent = cmp.horizontalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 50).setStyle(stl.style().setLeftIndent(20)),\n cmp.verticalList(\n cmp.text(metaData.getTitle()).setStyle(titleStyle)\n )\n ).newRow()\n .add(cmp.horizontalList().add(cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()))\n .newRow(); \n \n report.noData(logoComponent, cmp.text(\"Aucun enregistrement trouvà\").setStyle(stl.style().setHorizontalAlignment(HorizontalAlignment.CENTER).setTopPadding(30)));\n\n \n \n lblStyle = stl.style(Templates.columnStyle).setForegroundColor(new Color(60, 91, 31)); // Couleur du text \n colStyle = stl.style(Templates.columnStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);\n \n groupStyle = stl.style().setForegroundColor(new Color(60, 91, 31)) \n .setBold(Boolean.TRUE)\n .setPadding(5)\n .setFontSize(13)\n .setHorizontalAlignment(HorizontalAlignment.CENTER); \n \n\n \n if(metaData.getTitle().equals(ITitle.PARCEL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PARCEL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ATTACK_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BUDGET)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }\n \n \n drColumns = new HashMap<String, TextColumnBuilder>(); \n groups = new ArrayList<String>();\n subtotals = new ArrayList<String>();\n \n //Definit la liste des colonnes du rapport\n ExportGenerator.getColumns(metaData); \n //Definit la liste des sous-totaux du rapport\n ExportGenerator.getSubTotals(metaData);\n \n \n //Genration des sous totaux\n for (String group : groups) {\n ColumnGroupBuilder group2 = grp.group(drColumns.get(group));\n report.groupBy(group2);\n for (String subtotal : subtotals) {\n report.subtotalsAtGroupFooter(group2,sbt.sum(drColumns.get(subtotal)));\n }\n }\n\n for (String subtotal : subtotals) {\n report.subtotalsAtSummary(sbt.sum(drColumns.get(subtotal))); \n }\n \n /*if(ExportGenerator.getColumnByNameField(\"plantingName\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"plantingName\"), Calculation.NOTHING));\n }*//*else if(ExportGenerator.getColumnByNameField(\"invoiceCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"invoiceCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"planterCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL\"), ExportGenerator.getColumnByNameField(\"planterCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"transportTicket\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"transportTicket\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"deliveryDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"deliveryDate\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"planterNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"planterNumber\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"startPaymentDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"startPaymentDate\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"sectorCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"sectorCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"month\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"month\"), Calculation.NOTHING));\n }*/\n \n\n \n \n //Genere la source de donnàes du rapport\n report.setDataSource(metaData.getData());\n \n report.highlightDetailEvenRows(); \n \n \n // Definition de l'entete : valable uniquement pour la 1ere page\n HorizontalListBuilder hlb= null;\n \n hlb = cmp.horizontalList().add(\n cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()\n );\n\n \n report.title(\n createCustomTitleComponent(metaData.getTitle()), // Titre\n hlb,// Liste Horizontal des Critàres \n cmp.verticalGap(12) // Marge de 12 px entre chaque critàre\n ); \n \n \n \n report.setPageMargin(DynamicReports.margin().setLeft(15).setTop(30).setRight(15).setBottom(30));\n report.setPageFormat(PageType.A3, PageOrientation.LANDSCAPE);\n report.pageFooter(DynamicReports.cmp.pageXslashY());\n return report;\n \n }", "private void createRenderables()\n {\n this.gridElements = new ArrayList<GridElement>();\n\n ArrayList<Position> positions = new ArrayList<Position>();\n double step = sector.getDeltaLatDegrees() / this.divisions;\n\n // Generate meridians with labels\n double lon = sector.getMinLongitude().degrees + (this.level == 0 ? 0 : step);\n while (lon < sector.getMaxLongitude().degrees - step / 2)\n {\n Angle longitude = Angle.fromDegrees(lon);\n // Meridian\n positions.clear();\n positions.add(new Position(this.sector.getMinLatitude(), longitude, 0));\n positions.add(new Position(this.sector.getMaxLatitude(), longitude, 0));\n\n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n this.sector.getMinLatitude().degrees, this.sector.getMaxLatitude().degrees, lon, lon);\n String lineType = lon == this.sector.getMinLongitude().degrees ?\n GridElement.TYPE_LINE_WEST : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lon;\n this.gridElements.add(ge);\n\n // Increase longitude\n lon += step;\n }\n\n // Generate parallels\n double lat = this.sector.getMinLatitude().degrees + (this.level == 0 ? 0 : step);\n while (lat < this.sector.getMaxLatitude().degrees - step / 2)\n {\n Angle latitude = Angle.fromDegrees(lat);\n positions.clear();\n positions.add(new Position(latitude, this.sector.getMinLongitude(), 0));\n positions.add(new Position(latitude, this.sector.getMaxLongitude(), 0));\n \n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n lat, lat, this.sector.getMinLongitude().degrees, this.sector.getMaxLongitude().degrees);\n String lineType = lat == this.sector.getMinLatitude().degrees ?\n GridElement.TYPE_LINE_SOUTH : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lat;\n this.gridElements.add(ge);\n\n // Increase latitude\n lat += step;\n }\n }", "private JPanel getPageSheet() {\r\n\t\tif (pageSheet == null) {\r\n\t\t\trecordNumInit = new JLabel();\r\n\t\t\trecordNumInit.setBounds(new java.awt.Rectangle(497,0,70,20));\r\n\t\t\trecordNumInit.setText(\"\");\r\n\t\t\trecordNumInit.setBackground(new Color(255, 204, 204));\r\n\t\t\tfieldIdInit = new JLabel();\r\n\t\t\tfieldIdInit.setBounds(new Rectangle(83, 20, 87, 20));\r\n\t\t\tfieldIdInit.setText(\"JLabel\");\r\n\t\t\tpageSheet = new JPanel();\r\n\t\t\tpageSheet.setBounds(new Rectangle(10, 135, 770, 340));\r\n\t\t\tpageSheet.setLayout(null);\r\n\t\t\tpageSheet.add(fieldIdInit, null);\r\n\t\t\t\r\n\t\t\timageButton = new CustomerImage(\"\");\r\n\t\t\timageButton.setVerticalAlignment(SwingConstants.CENTER);\r\n\t\t\timageButton.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\timageButton.setBounds(new Rectangle(480, 0, 207, 60));\r\n\t\t\tpageSheet.add(imageButton);\r\n\t\t\tpageSheet.add(recordNumInit, null);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tcheckInit = new JCheckBox(\"\");\r\n\t\t\tcheckInit.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tcheckInit.setBounds(3, 20, 70, 20);\r\n\t\t\tpageSheet.add(checkInit);\r\n\t\t\t\r\n\t\t\tfiledNameInit = new JLabel();\r\n\t\t\tfiledNameInit.setText(\"JLabel\");\r\n\t\t\tfiledNameInit.setBounds(new Rectangle(83, 20, 87, 20));\r\n\t\t\tfiledNameInit.setBounds(180, 20, 140, 20);\r\n\t\t\tpageSheet.add(filedNameInit);\r\n\t\t\t\r\n\t\t\tfieldTypeInit = new JLabel();\r\n\t\t\tfieldTypeInit.setText(\"JLabel\");\r\n\t\t\tfieldTypeInit.setBounds(new Rectangle(83, 20, 87, 20));\r\n\t\t\tfieldTypeInit.setBounds(348, 20, 100, 20);\r\n\t\t\tpageSheet.add(fieldTypeInit);\r\n\t\t}\r\n\t\treturn pageSheet;\r\n\t}", "@Test\n public void testFillInDataToTemplate() throws IOException {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n\n List<String> communeStrs = Arrays.asList(\"Aclens\", \"Allaman\", \"Aubonne\", \"Apples\", \"Bière\", \"Bremblens\",\n \"Bougy-Villars\", \"Berolle\", \"Chevilly\");\n List<String> typeStrs = Arrays.asList(\"Résidence Secondaire\", \"Location\", \"Hotel\", \"Chambre\", \"Camping\",\n \"Institut\");\n\n for (int i = 0; i < 25; i++) {\n List<Object> row = new ArrayList<Object>();\n row.add(new Long(900000L + i));\n row.add(i + 1);\n row.add(communeStrs.get(i % communeStrs.size()));\n row.add(typeStrs.get(i % typeStrs.size()));\n row.add(new Long(25000L * i));\n row.add(BooleanUtils.toBoolean(i % 2));\n row.add(new Date());\n row.add(DateUtils.addDays(new Date(), i + 1));\n row.add(String.format(\"%d piéces ou moins\", i + 1));\n row.add(i + 1);\n row.add((i % 7 == 0 ? i : null));\n row.add((i % 7 == 1 ? i : null));\n row.add((i % 7 == 2 ? i : null));\n row.add((i % 7 == 3 ? i : null));\n row.add((i % 7 == 4 ? i : null));\n row.add((i % 7 == 5 ? i : null));\n row.add((i % 7 == 6 ? i : null));\n row.add(10 * i);\n row.add(200 * i);\n row.add(25 * i);\n row.add(i % 5 + 1);\n row.add(i % 6 + 1);\n row.add(BigDecimal.ZERO);\n row.add(1500 * (i + 1));\n row.add(null);\n\n rows.add(row);\n }\n\n SheetDataDto sheet1 = ExcelExportingUtil.convert2DListToSheetDto(rows, false);\n sheet1.setName(\"Data\");\n sheet1.setOverriden(true);\n // re-assign the index of the rows in the sheet to fill in the template: ignore the first two rows\n for (int i = 2; i < 2 + sheet1.getRows().size(); i++) {\n RowDataDto row = sheet1.getRows().get(i - 2);\n row.setRowNum(i);\n for (int j = 0; j < row.getCells().size(); j++) {\n CellDataDto cell = row.getCells().get(j);\n cell.setCellNum(j);\n }\n }\n\n // specify the format for col 7 and 8 (0-based)\n for (int i = 0; i < sheet1.getRows().size(); i++) {\n switch (i) {\n case 7:\n CellFormatter formatter = new CellFormatter(\"dd-MMM-yyyy\");\n formatter.setAlignment(CellStyle.ALIGN_CENTER);\n sheet1.getFormatters().add(formatter);\n break;\n\n case 8:\n CellFormatter formatter1 = new CellFormatter();\n formatter1.setWrapText(false);\n sheet1.getFormatters().add(formatter1);\n break;\n\n default:\n sheet1.getFormatters().add(null);\n break;\n }\n }\n\n InputStream input = getClass().getResourceAsStream(\"/exportData/Statistics_v0.1.xls\");\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n excelExportingService.exportToExcel(input, out, Arrays.asList(sheet1), ExcelFormatTypeEnum.XLS);\n\n FileUtils.writeByteArrayToFile(new File(\"output-template.xls\"), out.toByteArray());\n }", "@Override\r\n\tpublic void exportExcel(SapDataCollection sapDataCollection,\r\n\t\t\tJSONObject json, HttpServletResponse response) throws IOException,\r\n\t\t\tSecurityException, NoSuchMethodException, IllegalArgumentException,\r\n\t\t\tIllegalAccessException, InvocationTargetException,\r\n\t\t\tURISyntaxException {\n\t\tString path = \"\";\r\n\t\tList<RuntimeColumnInfo> kna1cols = runtime_ColumnInfo_Service.findAllActiveData(sapDataCollection, SjlxTypeName.TYPE_CUSTOMER_KNA1);\r\n\t\tList<RuntimeColumnInfo> knb1cols = runtime_ColumnInfo_Service.findAllActiveData(sapDataCollection, SjlxTypeName.TYPE_CUSTOMER_KNB1);\r\n\t\tList<RuntimeColumnInfo> knvvcols = runtime_ColumnInfo_Service.findAllActiveData(sapDataCollection, SjlxTypeName.TYPE_CUSTOMER_KNVV);\r\n\t\tlong kna1totalNum = commonService.findTotalNum(sapDataCollection,\"Kna1\", json);\r\n\t\tlong knb1totalNum = commonService.findTotalNum(sapDataCollection,\"Knb1\", json);\r\n\t\tlong knvvtotalNum = commonService.findTotalNum(sapDataCollection,\"Knvv\", json);\r\n\t\tString[] kna1titles = new String[kna1cols.size()],kna1fields=new String[kna1cols.size()];\r\n\t\tString[] knb1titles = new String[kna1cols.size()],knb1fields=new String[knb1cols.size()];\r\n\t\tString[] knvvtitles = new String[kna1cols.size()],knvvfields=new String[knvvcols.size()];\r\n\t\tint k=0;\r\n\t\tfor(RuntimeColumnInfo col : kna1cols){\r\n\t\t\tkna1titles[k]=col.getTargetColumnName()+\"(\"+col.getTargetColumn()+\")\";\r\n\t\t\tkna1fields[k]=col.getTargetColumn();\r\n\t\t\tk++;\r\n\t\t}\r\n\t\tk=0;\r\n\t\tfor(RuntimeColumnInfo col : knb1cols){\r\n\t\t\tknb1titles[k]=col.getTargetColumnName()+\"(\"+col.getTargetColumn()+\")\";\r\n\t\t\tknb1fields[k]=col.getTargetColumn();\r\n\t\t\tk++;\r\n\t\t}\r\n\t\tk=0;\r\n\t\tfor(RuntimeColumnInfo col : knvvcols){\r\n\t\t\tknvvtitles[k]=col.getTargetColumnName()+\"(\"+col.getTargetColumn()+\")\";\r\n\t\t\tknvvfields[k]=col.getTargetColumn();\r\n\t\t\tk++;\r\n\t\t}\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tSimpleDateFormat sf = new SimpleDateFormat(\"yyyyMMdd\");\r\n\t\tString today = sf.format(c.getTime());\r\n\t\tString frefixOfFileName = \"customer_\"+today;\r\n\t\tif(kna1totalNum>0){\r\n\t\t\tlong pages = kna1totalNum%PERSIZE==0?kna1totalNum/PERSIZE:kna1totalNum/PERSIZE+1;\r\n\t\t\tif(pages>1){\r\n\t\t\t\tfor(int i=1;i<=pages;i++){\r\n\t\t\t\t\tList<Kna1> datas = commonService.findByPage(sapDataCollection,\"Kna1\", json, PERSIZE, i,null,null);\r\n\t\t\t\t\tString filename = frefixOfFileName+\"_kna1_\"+i;\r\n\t\t\t\t\tpath = excelService.generateExcel(kna1titles,kna1fields, datas,Kna1.class, sapDataCollection, SjlxTypeName.TYPE_CUSTOMER, filename);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tString filename = frefixOfFileName+\"_kna1\";\r\n\t\t\t\tList<Kna1> datas = commonService.findByPage(sapDataCollection,\"Kna1\", json, PERSIZE, 1,null,null);\r\n\t\t\t\tpath = excelService.generateExcel(kna1titles,kna1fields, datas,Kna1.class, sapDataCollection, SjlxTypeName.TYPE_CUSTOMER, filename);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(knb1totalNum>0){\r\n\t\t\tlong pages = knb1totalNum%PERSIZE==0?knb1totalNum/PERSIZE:knb1totalNum/PERSIZE+1;\r\n\t\t\tif(pages>1){\r\n\t\t\t\tfor(int i=1;i<=pages;i++){\r\n\t\t\t\t\tList<Knb1> datas = commonService.findByPage(sapDataCollection,\"Knb1\", json, PERSIZE, i,null,null);\r\n\t\t\t\t\tString filename = frefixOfFileName+\"_knb1_\"+i;\r\n\t\t\t\t\tpath = excelService.generateExcel(knb1titles,knb1fields, datas,Knb1.class, sapDataCollection, SjlxTypeName.TYPE_CUSTOMER, filename);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tString filename = frefixOfFileName+\"_knb1\";\r\n\t\t\t\tList<Knb1> datas = commonService.findByPage(sapDataCollection,\"Knb1\", json, PERSIZE, 1,null,null);\r\n\t\t\t\tpath = excelService.generateExcel(knb1titles,knb1fields, datas,Knb1.class, sapDataCollection, SjlxTypeName.TYPE_CUSTOMER, filename);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(knvvtotalNum>0){\r\n\t\t\tlong pages = knvvtotalNum%PERSIZE==0?knvvtotalNum/PERSIZE:knvvtotalNum/PERSIZE+1;\r\n\t\t\tif(pages>1){\r\n\t\t\t\tfor(int i=1;i<=pages;i++){\r\n\t\t\t\t\tList<Knvv> datas = commonService.findByPage(sapDataCollection,\"Knvv\", json, PERSIZE, i,null,null);\r\n\t\t\t\t\tString filename = frefixOfFileName+\"_knvv_\"+i;\r\n\t\t\t\t\tpath = excelService.generateExcel(knvvtitles,knvvfields, datas,Knvv.class, sapDataCollection, SjlxTypeName.TYPE_CUSTOMER, filename);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tString filename = frefixOfFileName+\"_knvv\";\r\n\t\t\t\tList<Knvv> datas = commonService.findByPage(sapDataCollection,\"Knvv\", json, PERSIZE, 1,null,null);\r\n\t\t\t\tpath = excelService.generateExcel(knvvtitles,knvvfields, datas,Knvv.class, sapDataCollection, SjlxTypeName.TYPE_CUSTOMER, filename);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString zipname = frefixOfFileName;\r\n\t\texcelService.downloadZip(path, zipname, response);\r\n\t\texcelService.deleteByFilePath(path);\r\n\t}", "public byte[] runPdfExport() throws DocumentException, IOException, JRException, TalentStudioException {\n\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n if (isResultSetEmpty(jasperPrint.getPages())) {\n document = new Document(PageSize.A4);\n writer = PdfWriter.getInstance(document, outputStream);\n document.open();\n final Paragraph noResult = new Paragraph(getHeading(getMessage(\"no.results\")));\n noResult.setAlignment(Rectangle.ALIGN_CENTER);\n document.add(noResult);\n document.add(new Paragraph(\"\\n\"));\n\n } else {\n createDocument(jasperPrint.getPages());\n writer = PdfWriter.getInstance(document, outputStream);\n document.open();\n //below three lines force to be zoom at 100 and focus page 1\n document.newPage();\n PdfDestination destination = new PdfDestination(PdfDestination.XYZ, 0, -1, 1);\n writer.setOpenAction(PdfAction.gotoLocalPage(1, destination, writer));\n\n\n List<JRPrintPage> pages = jasperPrint.getPages();\n\n\n addPageHeader(document);\n\n for (JRPrintPage page : pages) {\n\n JRExporterGridCell[][] grid = getGrid(page);\n\n PdfPTable table = getTable(1);\n table.getDefaultCell().setBorder(Rectangle.BOX);\n int emptyRowCount = 0;\n for (int i = 0; i < grid.length; i++) {\n JRExporterGridCell[] jrExporterGridCells = grid[i];\n if (!isNullRow(jrExporterGridCells)) {\n\n\n int oddEvenNo = i - emptyRowCount;\n Color rowColor = null;\n if (oddEvenNo > 0) {\n\n if (oddEvenNo % 2 == 0) {\n rowColor = getDataBackgroundEvenColor();\n } else {\n rowColor = getDataBackgroundOddColor();\n }\n\n }\n\n PdfPTable subTable = getTable(jrExporterGridCells.length);\n subTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n subTable.getDefaultCell().setPadding(0);\n\n for (int j = 0; j < jrExporterGridCells.length; j++) {\n JRExporterGridCell jrExporterGridCell = jrExporterGridCells[j];\n\n final JRPrintElement jrPrintElement = jrExporterGridCell.getElement();\n\n\n if (jrPrintElement instanceof JRPrintText) {\n final JRPrintText element = (JRPrintText) jrExporterGridCell.getElement();\n\n String style = element.getStyle() != null ? element.getStyle().getName() : \"\";\n\n final String text = element.getText();\n\n if (TEMPLATE_HEADER.equalsIgnoreCase(style)) {\n final Paragraph paragraph = getHeading(text);\n final PdfPCell pCell = new PdfPCell(paragraph);\n pCell.setBackgroundColor(getHeaderBackgroundColor());\n subTable.addCell(pCell);\n } else if (TEMPLATE_GROUP.equalsIgnoreCase(style)) {\n if (StringUtils.hasText(text)) {\n Paragraph paragraph = getGroupHeading(text);\n PdfPCell groupHeader = new PdfPCell(paragraph);\n groupHeader.setColspan(jrExporterGridCells.length);\n groupHeader.setBackgroundColor(getHeaderGroupBackgroundColor());\n\n subTable.addCell(groupHeader);\n } else {\n //empty header\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n }\n\n } else {\n\n if (!isAddImageColumn(j, text, subTable, rowColor)) {\n final Paragraph paragraph = getText(text);\n final PdfPCell pdfPCell = new PdfPCell(paragraph);\n pdfPCell.setBackgroundColor(rowColor);\n subTable.addCell(pdfPCell);\n }\n }\n\n\n } else if (jrPrintElement instanceof JRTemplatePrintRectangle) {\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n\n } else if (jrPrintElement instanceof JRBasePrintElement) {\n\n } else {\n\n\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n }\n }\n\n table.getDefaultCell().setPadding(0);\n subTable.completeRow();\n\n clearEmptyRows(subTable);\n\n table.addCell(subTable);\n\n synchronizeTableMemory(table, i);\n\n } else {\n emptyRowCount++;\n }\n }\n document.add(table);\n }\n }\n document.close();\n\n return outputStream.toByteArray();\n }", "@RequestMapping(value = \"/exportExcelAllSchoolOrder\", method = RequestMethod.POST)\r\n public ModelAndView exportExcelAllSchoolOrder(Model model, HttpServletRequest request) {\n \tString companyId = request.getParameter(\"companyId\");\r\n \tMap<String,Object>map = new HashMap<String,Object>();\r\n \tPayOrder payOrder = new PayOrder();\r\n \t//if(!\"0\".equals(isArea)){\r\n \t\tmap.put(\"companyId\",companyId);\r\n \t//}\r\n \tmap.put(\"orderNum\",request.getParameter(\"orderNum\"));\r\n \tmap.put(\"inpstart\",request.getParameter(\"inpstart\"));\r\n \tmap.put(\"inpend\",request.getParameter(\"inpend\"));\r\n \tmap.put(\"payMethod\",request.getParameter(\"payMethod\"));\r\n \tmap.put(\"firstPrice\",request.getParameter(\"firstPrice\"));\r\n \tmap.put(\"secondPrice\",request.getParameter(\"secondPrice\"));\r\n \tmap.put(\"pageSize\",1000000);\r\n \tmap.put(\"page\",payOrder.getFirstIndex());\r\n \t\r\n \t//2018-1-29 新增 支付方式\r\n \tmap.put(\"payStates\",request.getParameter(\"payStates\"));\r\n \t// 查询 订单 集合\r\n \tList<PayOrder> cpoList = this.payOrderServiceImpl.findPayOrderByParams(map);\r\n \tString tittle = \"订单编号:orderNum,课程名:commodityName,金额(元):payPrice,姓名:stuName,电话:discountNo,下单时间:orderTime,付款时间:payTime,订单状态:payStatus\";\r\n \tExcelSheetEntity entity = ExcelSheetEntity.newInstance(\r\n \t\t\ttittle,\r\n \t\t\tcpoList);\r\n \tMap<String,Object>map01 = new HashMap<String,Object>();\r\n \tmap01.put(\"entity\", entity);\r\n \tmap01.put(\"fileName\", \"订单.xls\");\r\n \tViewFiles excel = new ViewFiles();\r\n \treturn new ModelAndView(excel, map01);\r\n }", "public void generarReporteLibroContables(String sAccionBusqueda,List<LibroContable> librocontablesParaReportes) throws Exception {\n\t\tLong iIdUsuarioSesion=0L;\t\r\n\t\t\r\n\t\t\r\n\t\tif(usuarioActual==null) {\r\n\t\t\tthis.usuarioActual=new Usuario();\r\n\t\t}\r\n\t\t\r\n\t\tiIdUsuarioSesion=usuarioActual.getId();\r\n\t\t\r\n\t\tString sPathReportes=\"\";\r\n\t\t\r\n\t\tInputStream reportFile=null;\r\n\t\tInputStream imageFile=null;\r\n\t\t\t\r\n\t\timageFile=AuxiliarImagenes.class.getResourceAsStream(\"LogoReporte.jpg\");\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathReporteFinal=\"\";\r\n\t\t\r\n\t\tif(!esReporteAccionProceso) {\r\n\t\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\t\tif(!this.esReporteDinamico) {\r\n\t\t\t\t\tsPathReporteFinal=\"LibroContable\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsPathReporteFinal=this.sPathReporteDinamico;\r\n\t\t\t\t\treportFile = new FileInputStream(sPathReporteFinal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"LibroContableMasterRelaciones\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\r\n\t\t\t\t//sPathReportes=reportFile.getPath().replace(\"LibroContableMasterRelacionesDesign.jasper\", \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"LibroContable\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t}\r\n\t\t\r\n\t\tif(reportFile==null) {\r\n\t\t\tthrow new JRRuntimeException(sPathReporteFinal+\" no existe\");\r\n\t\t}\r\n\t\t\r\n\t\tString sUsuario=\"\";\r\n\t\t\r\n\t\tif(usuarioActual!=null) {\r\n\t\t\tsUsuario=usuarioActual.getuser_name();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"usuario\", sUsuario);\r\n\t\t\r\n\t\tparameters.put(\"titulo\", Funciones.GetTituloSistemaReporte(this.parametroGeneralSg,this.moduloActual,this.usuarioActual));\r\n\t\tparameters.put(\"subtitulo\", \"Reporte De Libro Contables\");\t\t\r\n\t\tparameters.put(\"busquedapor\", LibroContableConstantesFunciones.getNombreIndice(sAccionBusqueda)+sDetalleReporte);\r\n\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\tparameters.put(\"SUBREPORT_DIR\", sPathReportes);\r\n\t\t}\r\n\t\t\r\n\t\tparameters.put(\"con_grafico\", this.conGraficoReporte);\r\n\t\t\r\n\t\tJasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);\r\n\t\t\t\t\r\n\t\tthis.cargarDatosCliente();\r\n\t\t\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\t\r\n\t\t\tclasses.add(new Classe(ParametroFactuPrincipal.class));\r\n\t\t\tclasses.add(new Classe(Definicion.class));\r\n\t\t\t\r\n\t\t\t//ARCHITECTURE\r\n\t\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\t\t\r\n\t\t\t\ttry\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tLibroContableLogic librocontableLogicAuxiliar=new LibroContableLogic();\r\n\t\t\t\t\tlibrocontableLogicAuxiliar.setDatosCliente(librocontableLogic.getDatosCliente());\t\t\t\t\r\n\t\t\t\t\tlibrocontableLogicAuxiliar.setLibroContables(librocontablesParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\tlibrocontableLogicAuxiliar.cargarRelacionesLoteForeignKeyLibroContableWithConnection(); //deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes, \"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tlibrocontablesParaReportes=librocontableLogicAuxiliar.getLibroContables();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//librocontableLogic.getNewConnexionToDeep();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//for (LibroContable librocontable:librocontablesParaReportes) {\r\n\t\t\t\t\t//\tlibrocontableLogic.deepLoad(librocontable, false, DeepLoadType.INCLUDE, classes);\r\n\t\t\t\t\t//}\t\t\t\t\t\t\r\n\t\t\t\t\t//librocontableLogic.commitNewConnexionToDeep();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t\t\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t//librocontableLogic.closeNewConnexionToDeep();\r\n\t\t\t\t}\r\n\t\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t\t}\r\n\t\t\t//ARCHITECTURE\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\tInputStream reportFileParametroFactuPrincipal = AuxiliarReportes.class.getResourceAsStream(\"ParametroFactuPrincipalDetalleRelacionesDesign.jasper\");\r\n\t\t\tparameters.put(\"subreport_parametrofactuprincipal\", reportFileParametroFactuPrincipal);\r\n\r\n\t\t\tInputStream reportFileDefinicion = AuxiliarReportes.class.getResourceAsStream(\"DefinicionDetalleRelacionesDesign.jasper\");\r\n\t\t\tparameters.put(\"subreport_definicion\", reportFileDefinicion);\r\n\t\t} else {\r\n\t\t\t//FK DEBERIA TRAERSE DE ANTEMANO\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t//CLASSES PARA REPORTES OBJETOS RELACIONADOS\r\n\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\tclasses=new ArrayList<Classe>();\r\n\t\t}\r\n\t\t\r\n\t\tJRBeanArrayDataSource jrbeanArrayDataSourceLibroContable=null;\r\n\t\t\r\n\t\tif(this.sTipoReporteExtra!=null && !this.sTipoReporteExtra.equals(\"\")) {\r\n\t\t\tLibroContableConstantesFunciones.S_TIPOREPORTE_EXTRA=this.sTipoReporteExtra;\r\n\t\t} else {\r\n\t\t\tLibroContableConstantesFunciones.S_TIPOREPORTE_EXTRA=\"\";\r\n\t\t}\r\n\t\t\r\n\t\tjrbeanArrayDataSourceLibroContable=new JRBeanArrayDataSource(LibroContableJInternalFrame.TraerLibroContableBeans(librocontablesParaReportes,classes).toArray());\r\n\t\t\r\n\t\tjasperPrint = JasperFillManager.fillReport(jasperReport,parameters,jrbeanArrayDataSourceLibroContable);\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathDest=Constantes.SUNIDAD_ARCHIVOS+\":/\"+Constantes.SCONTEXTSERVER+\"/\"+LibroContableConstantesFunciones.SCHEMA+\"/reportes\";\r\n\t\t\r\n\t\tFile filePathDest = new File(sPathDest);\r\n\t\t\r\n\t\tif(!filePathDest.exists()) {\r\n\t\t\tfilePathDest.mkdirs();\t\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tString sDestFileName=sPathDest+\"/\"+LibroContableConstantesFunciones.CLASSNAME;\r\n\t\t\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"VISUALIZAR\") {\r\n\t\t\tJasperViewer jasperViewer = new JasperViewer(jasperPrint,false) ;\r\n\t\t\tjasperViewer.setVisible(true) ; \r\n\r\n\t\t} else if(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\") {\t\r\n\t\t\t//JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(),parameters, new JRBeanArrayDataSource(LibroContableBean.TraerLibroContableBeans(librocontablesParaReportes).toArray()));\r\n\t\t\t\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"HTML\") {\r\n\t\t\t\tsDestFileName+=\".html\";\r\n\t\t\t\tJasperExportManager.exportReportToHtmlFile(jasperPrint,sDestFileName);\r\n\t\t\t\t\t\r\n\t\t\t} else if(this.sTipoArchivoReporte==\"PDF\") {\r\n\t\t\t\tsDestFileName+=\".pdf\";\r\n\t\t\t\tJasperExportManager.exportReportToPdfFile(jasperPrint,sDestFileName);\r\n\t\t\t} else {\r\n\t\t\t\tsDestFileName+=\".xml\";\r\n\t\t\t\tJasperExportManager.exportReportToXmlFile(jasperPrint,sDestFileName, false);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\r\n\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"WORD\") {\r\n\t\t\t\tsDestFileName+=\".rtf\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRRtfExporter exporter = new JRRtfExporter();\r\n\t\t\r\n\t\t\t\texporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\r\n\t\t\t\texporter.exportReport();\r\n\t\t\t\t\r\n\t\t\t} else\t{\r\n\t\t\t\tsDestFileName+=\".xls\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRXlsExporter exporterXls = new JRXlsExporter();\r\n\t\t\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\t\texporterXls.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);\r\n\t\t\r\n\t\t\t\texporterXls.exportReport();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"EXCEL2\"||this.sTipoArchivoReporte==\"EXCEL2_2\") {\r\n\t\t\t//sDestFileName+=\".xlsx\";\r\n\t\t\t\r\n\t\t\tif(this.sTipoReporte.equals(\"NORMAL\")) {\r\n\t\t\t\tthis.generarExcelReporteLibroContables(sAccionBusqueda,sTipoArchivoReporte,librocontablesParaReportes);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"FORMULARIO\")){\r\n\t\t\t\tthis.generarExcelReporteVerticalLibroContables(sAccionBusqueda,sTipoArchivoReporte,librocontablesParaReportes,false);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"DINAMICO\")){\r\n\t\t\t\t\r\n\t\t\t\tif(this.sTipoReporteDinamico.equals(\"NORMAL\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.jButtonGenerarExcelReporteDinamicoLibroContableActionPerformed(null);\r\n\t\t\t\t\t//this.generarExcelReporteLibroContables(sAccionBusqueda,sTipoArchivoReporte,librocontablesParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"FORMULARIO\")){\r\n\t\t\t\t\tthis.generarExcelReporteVerticalLibroContables(sAccionBusqueda,sTipoArchivoReporte,librocontablesParaReportes,true);\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"RELACIONES\")){\r\n\t\t\t\t\tthis.generarExcelReporteRelacionesLibroContables(sAccionBusqueda,sTipoArchivoReporte,librocontablesParaReportes,true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"RELACIONES\")){\r\n\t\t\t\tthis.generarExcelReporteRelacionesLibroContables(sAccionBusqueda,sTipoArchivoReporte,librocontablesParaReportes,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\"||this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\t\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(this,\"REPORTE \"+sDestFileName+\" GENERADO SATISFACTORIAMENTE\",\"REPORTES \",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "public void generateShipmentList(String fileName){\n Shipment sh;\n ShipmentValidation shValid = new ShipmentValidation();\n Template rf = new Template();\n rf.setTemplateFileName(fileName);\n rf.generateListExcel();\n ArrayList<Shipment> arrTemp = new ArrayList<>();\n\n for (Object item: rf.getArrList()\n ) {\n sh = new Shipment(((HashMap<Integer, String>) item).get(0),((HashMap<Integer, String>) item).get(1),((HashMap<Integer, String>) item).get(2),((HashMap<Integer, String>) item).get(3),((HashMap<Integer, String>) item).get(4)\n ,((HashMap<Integer, String>) item).get(5),((HashMap<Integer, String>) item).get(6),((HashMap<Integer, String>) item).get(7),((HashMap<Integer, String>) item).get(8),((HashMap<Integer, String>) item).get(9)\n ,((HashMap<Integer, String>) item).get(10),((HashMap<Integer, String>) item).get(11),((HashMap<Integer, String>) item).get(12),((HashMap<Integer, String>) item).get(13),((HashMap<Integer, String>) item).get(14)\n ,((HashMap<Integer, String>) item).get(15),((HashMap<Integer, String>) item).get(16),((HashMap<Integer, String>) item).get(17),((HashMap<Integer, String>) item).get(18),((HashMap<Integer, String>) item).get(19)\n ,((HashMap<Integer, String>) item).get(20),((HashMap<Integer, String>) item).get(21),((HashMap<Integer, String>) item).get(22),((HashMap<Integer, String>) item).get(23),((HashMap<Integer, String>) item).get(24)\n ,((HashMap<Integer, String>) item).get(25),((HashMap<Integer, String>) item).get(26),((HashMap<Integer, String>) item).get(27),((HashMap<Integer, String>) item).get(28),((HashMap<Integer, String>) item).get(29)\n ,((HashMap<Integer, String>) item).get(30),((HashMap<Integer, String>) item).get(31),((HashMap<Integer, String>) item).get(32),((HashMap<Integer, String>) item).get(33),((HashMap<Integer, String>) item).get(34)\n ,((HashMap<Integer, String>) item).get(35),((HashMap<Integer, String>) item).get(36),((HashMap<Integer, String>) item).get(37),((HashMap<Integer, String>) item).get(38),((HashMap<Integer, String>) item).get(39)\n ,((HashMap<Integer, String>) item).get(40),((HashMap<Integer, String>) item).get(41),((HashMap<Integer, String>) item).get(42),((HashMap<Integer, String>) item).get(43),((HashMap<Integer, String>) item).get(44)\n ,((HashMap<Integer, String>) item).get(45),((HashMap<Integer, String>) item).get(46),((HashMap<Integer, String>) item).get(47),((HashMap<Integer, String>) item).get(48),((HashMap<Integer, String>) item).get(49)\n ,((HashMap<Integer, String>) item).get(50),((HashMap<Integer, String>) item).get(51),((HashMap<Integer, String>) item).get(52),((HashMap<Integer, String>) item).get(53),((HashMap<Integer, String>) item).get(54)\n ,((HashMap<Integer, String>) item).get(55),((HashMap<Integer, String>) item).get(56),((HashMap<Integer, String>) item).get(57),((HashMap<Integer, String>) item).get(58),((HashMap<Integer, String>) item).get(59)\n ,((HashMap<Integer, String>) item).get(60),((HashMap<Integer, String>) item).get(61),((HashMap<Integer, String>) item).get(62),((HashMap<Integer, String>) item).get(63));\n sh.setErrorMsg(shValid.FindError(sh));\n\n arrTemp.add(sh);\n }\n\n this.setShipmentList(arrTemp);\n }", "@Override\n\tpublic String exportMyPaperList(HttpServletRequest request, HttpServletResponse response,Personmanagemarticle record) {\n\t\tList<String> selected = record.getIds();\n\t\tList<String> list1 = new ArrayList<String>();\n\t\tif (selected != null) {\n\t\t\tfor (String media : selected) {\n\t\t\t\tmedia = media.replace(\"\\\"\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n\t\t\t\t//list1.add(media.replace(\"lyy\", \"=\"));\n\t\t\t\tlist1.add(media);\n\t\t\t}\n\t\t}\n\t\tList<SubjectArticle> list = subjectArticleServiceImpl.getAllOPinion(list1);\n\n\n\t\tXWPFDocument doc = new XWPFDocument();\n\n\t\t// 创建tablehttp://blog.csdn.net/zwx19921215/article/details/34439851\n\n\t\tint i = 0;\n\t\t//SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t// 设置段落居中\n\t\tXWPFParagraph paragraph = doc.createParagraph();\n\t\tparagraph.setAlignment(ParagraphAlignment.CENTER);\n\t\tparagraph.setVerticalAlignment(TextAlignment.CENTER);\n\t\tXWPFRun run1 = paragraph.createRun();\n\t\trun1.setBold(true); // 加粗\n\t\trun1.setText(\"我的报纸详情列表\");\n\t\t// run = para.createRun();\n\t\trun1.setFontFamily(\"楷体\");\n\t\trun1.setFontSize(20);\n\t\trun1.setColor(\"FF0000\");\n\t\tfor (SubjectArticle sub : list) {\n\t\t\ti++;\n\t\t\tXWPFParagraph para = doc.createParagraph();\n\t\t\t// 一个XWPFRun代表具有相同属性的一个区域。\n\t\t\tXWPFRun run = para.createRun();\n\t\t\trun.setColor(\"0070c0\");\n\t\t\trun.setBold(true); // 加粗\n\t\t\trun.setText(i + \".\" + \"标题:\" + sub.getTittle());\n\t\t\t// run = para.createRun();\n\t\t\trun.setFontFamily(\"黑体\");\n\t\t\trun.setFontSize(14);\n\t\t\tXWPFTable tableOne = doc.createTable();\n\t\t\tsetTableWidth(tableOne, \"8200\");\n\t\t\tXWPFTableRow tableOneRowOne = tableOne.getRow(0);\n\t\t\tXWPFParagraph p1 = tableOneRowOne.getCell(0).getParagraphs().get(0);\n\t\t\tXWPFRun r1 = p1.createRun();\n\t\t\tr1.setColor(\"ffc000\");\n\t\t\tr1.setFontSize(12);\n\t\t r1.setText(\"来源:\" + sub.getDataSource() + \" \" + \"发布时间:\" + sub.getPubdate());\n\t\t\t\n\n\t\t\t// tableOneRowOne.getCell(0).setText(\"来源:\"+sub.getDataSource()+\"\n\t\t\t// \"+\"发布时间:\"+time);\n\t\t\tString emotion = \"\";\n\t\t\tif (AppConstant.emotionNumber.POSITIVE.equals(sub.getEmotion())) {\n\t\t\t\temotion = AppConstant.emotionNumber.POSITIVE;\n\t\t\t}\n\t\t\tif (AppConstant.emotionType.NEGATIVE.equals(sub.getEmotion())) {\n\t\t\t\temotion = AppConstant.emotionNumber.NEGATIVE;\n\t\t\t}\n\t\t\tif (AppConstant.emotionType.NEUTRAL.equals(sub.getEmotion())) {\n\t\t\t\temotion = AppConstant.emotionNumber.NEUTRAL;\n\t\t\t}\n\t\t\t\n\t\t\tXWPFTableRow tableOneRowF = tableOne.createRow();\n\t\t\tXWPFParagraph paraf = tableOneRowF.getCell(0).getParagraphs().get(0);\n\t\t\tXWPFRun runf = paraf.createRun();\n\t\t\tXWPFRun runb = paraf.createRun();\n\t\t\trunf.setColor(\"00b050\");\n\t\t\trunf.setText(\"转发量:\");\n\t\t\trunf.setFontSize(12);\n\t\t\trunb.setColor(\"000000\");\n\t\t\trunb.setFontSize(12);\n\t\t\tif(sub.getRepeatcount() == null){\n\t\t\t\trunb.setText(0 + \" \");\n\t\t\t}\n\t\t\tif(sub.getRepeatcount() !=null && sub.getRepeatcount().equals(-1)){\n\t\t\t\trunb.setText(0 + \" \");\n\t\t\t}\n\t\t\tif(sub.getRepeatcount() !=null && !sub.getRepeatcount().equals(-1)){\n\t\t\t\trunb.setText(sub.getRepeatcount() + \" \");\n\t\t\t}\n\t\t\tXWPFRun runf1 = paraf.createRun();\n\t\t\tXWPFRun runb1 = paraf.createRun();\n\t\t\trunf1.setColor(\"00b050\");\n\t\t\trunb1.setColor(\"000000\");\n\t\t\trunf1.setFontSize(12);\n\t\t\trunb1.setFontSize(12);\n\t\t runf1.setText(\"回复量:\");\n\t\t if(sub.getCommtcount()==null){\n\t\t \trunb1.setText(0 + \" \");\n\t\t }\n\t\t if(sub.getCommtcount()!=null &&sub.getCommtcount().equals(-1)){\n\t\t \trunb1.setText(0 + \" \");\n\t\t }\n\t\t if(sub.getCommtcount()!=null &&!sub.getCommtcount().equals(-1)){\n\t\t\t \trunb1.setText(sub.getCommtcount() + \" \");\n\t\t }\n\t\t\t/*XWPFRun runf2 = paraf.createRun();\n\t\t\tXWPFRun runb2 = paraf.createRun();\n\t\t\trunf2.setColor(\"00b050\");\n\t\t\trunb2.setColor(\"000000\");\n\t\t\trunf2.setText(\"转发量:\");\n\t\t\tif(sub.getRepeatcount() == null){\n\t\t\t\trunb2.setText(0 + \" \");\n\t\t\t}else{\n\t\t\t\trunb2.setText(sub.getRepeatcount() + \" \");\n\t\t\t}\n\t\t\tif(sub.getRepeatcount() != null && sub.getRepeatcount().equals(-1) ){\n\t\t\t\trunb2.setText(0 + \" \");\n\t\t\t}else{\n\t\t\t\trunb2.setText(sub.getRepeatcount() + \" \");\n\t\t\t}*/\n\t\t\tXWPFRun runf3 = paraf.createRun();\n\t\t\tXWPFRun runb3 = paraf.createRun();\n\t\t\trunf3.setColor(\"00b050\");\n\t\t\trunb3.setColor(\"000000\");\n\t\t\trunf3.setFontSize(12);\n\t\t\trunb3.setFontSize(12);\n\t\t\trunf3.setText(\"倾向性:\");\n\t\t\trunb3.setText(emotion + \"\");\n\t\t\tXWPFRun runf4 = paraf.createRun();\n\t\t\tXWPFRun runb4 = paraf.createRun();\n\t\t\trunf4.setColor(\"00b050\");\n\t\t\trunb4.setColor(\"000000\");\n\t\t\trunf4.setFontSize(12);\n\t\t\trunb4.setFontSize(12);\n\t\t\trunf4.setText(\"媒体类型:\");\n\t\t\tString formats=\"\";\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.NEWS)){\n\t\t\t\tformats = AppConstant.mediaText.NEWS;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.LUNTAN)){\n\t\t\t\tformats = AppConstant.mediaText.LUNTAN;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.BLOG)){\n\t\t\t\tformats = AppConstant.mediaText.BLOG;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.WEIBO)){\n\t\t\t\tformats = AppConstant.mediaText.WEIBO;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.PRINT_MEDIA)){\n\t\t\t\tformats = AppConstant.mediaText.PRINT_MEDIA;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.WEIXIN)){\n\t\t\t\tformats = AppConstant.mediaText.WEIXIN;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.VIDEO)){\n\t\t\t\tformats = AppConstant.mediaText.VIDEO;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.APP)){\n\t\t\t\tformats = AppConstant.mediaText.APP;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.COMMENT)){\n\t\t\t\tformats = AppConstant.mediaText.COMMENT;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.OTHER)){\n\t\t\t\tformats = AppConstant.mediaText.OTHER;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.TIEBA)){\n\t\t\t\tformats = AppConstant.mediaText.TIEBA;\n\t\t\t}\n\t\t\tif(sub.getFormats().equals(AppConstant.mediaType.ABROAD)){\n\t\t\t\tformats = AppConstant.mediaType.ABROAD;\n\t\t\t}\n\t\t\trunb4.setText(formats + \"\");\n\t\t\t/* tableOneRowTy.getCell(0).setParagraph(paraf); */\n\t\t\tXWPFParagraph paraf1 = tableOneRowF.getCell(0).addParagraph();\n\t\t\tXWPFRun runv = paraf1.createRun();\n\t\t\trunv.setColor(\"00b050\");\n\t\t\trunv.setText(\"网址:\");\n\t\t\trunv.setFontSize(12);\n\t\t\tXWPFRun rund = paraf1.createRun();\n\t\t\trund.setColor(\"3333ff\");\n\t\t\trund.setFontSize(12);\n\t\t\tappendExternalHyperlink(sub.getUrl(), \"【点击访问原文】\", paraf1);\n\n\t\t\tXWPFTableRow tableOneRowT = tableOne.createRow();\n\t\t\tXWPFParagraph parafe = tableOneRowT.getCell(0).getParagraphs().get(0);\n\t\t\tXWPFRun rune = parafe.createRun();\n\t\t\trune.setFontSize(11);\n\t\t\trune.setText(\"内容:\" + sub.getContent());\n\t\t\t/* tableOneRowT.getCell(0).setText(\"内容:\"+sub.getContent()); */\n\t\t}\n\n\t\t// BASE64Decoder decoder = new BASE64Decoder();\n\n\t\tString filename1 = new SimpleDateFormat(\"yyyyMMddhhmmss\").format(new Date()) + \".docx\";\n\n\t\tString url = request.getContextPath() + \"/upload/\";\n\t\tSystem.out.println(url);\n\t\tString path = request.getSession().getServletContext().getRealPath(\"/upload\");\n\t\tFile targetFile = new File(path, filename1);\n\t\tif (!targetFile.getParentFile().exists()) {\n\t\t\ttargetFile.getParentFile().mkdirs();\n\t\t}\n\t\tif (!targetFile.exists()) {\n\t\t\ttry {\n\t\t\t\ttargetFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//System.out.println(e.getMessage());\n\t\t\t\tLog.info(e.getMessage());\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t \n\t\t\t}\n\n\t\t\t// response.sendRedirect(\"/app-opinion-web/system/system.html?url=\"+imgaddress);\n\t\t}\n\t\tString filename = path + \"/\" + filename1;\n\t\tOutputStream os;\n\t\ttry {\n\t\t\tos = new FileOutputStream(filename);\n\t\t\ttry {\n\t\t\t\tdoc.write(os);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.info(e.getMessage());\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tos.flush();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.info(e1.getMessage());\n\t\t\t\tLog.error(e1.getMessage(),e1);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tos.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.info(e.getMessage());\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t\t}\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n\t\treturn \"upload/\" + filename1;\n\t}", "public void AllWeekLessonReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass l = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if lesson exists, and isnt a parent appointment\r\n if (l != null && l.subject != subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + l.time + \"pm | \" + l.room + \" |\");\r\n System.out.println(l.toReport());\r\n }\r\n }\r\n }\r\n }\r\n }", "public HSSFWorkbook process(){\r\n\t\tHSSFSheet sheet = templateWorkbook.getSheetAt(0);\r\n\r\n\t\t//write product infmration\r\n\t\torder.putSetToList();\r\n\t\tList<InventoryOrderProduct> orderProducts = order.getProduct_List();\r\n\t\tint totalDataRow = orderProducts.size();\r\n\t\tfor (int i = 0; i < totalDataRow; i++){\r\n\r\n\t\t\tInventoryOrderProduct orderProduct = orderProducts.get(i);\r\n\t\t\tRow row = sheet.createRow(data_row + i);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tProduct product = orderProduct.getProductBarcode().getProduct();\r\n\t\t\trow.createCell(barcode_column).setCellValue(orderProduct.getProductBarcode().getBarcode());\r\n\t\t\t\r\n\t\t\tColor color = orderProduct.getProductBarcode().getColor();\r\n\t\t\tif (color == null)\r\n\t\t\t\trow.createCell(productCode_column).setCellValue(product.getProductCode());\r\n\t\t\telse \r\n\t\t\t\trow.createCell(productCode_column).setCellValue(product.getProductCode() + color.getName());\r\n\t\t\t\r\n\t\t\trow.createCell(unit_column).setCellValue(product.getUnit());\r\n\t\t\tint q = orderProduct.getQuantity();\r\n\t\t\t\r\n\t\t\trow.createCell(quantity_column).setCellValue(orderProduct.getQuantity());\r\n\t\t\trow.createCell(salePrice_column).setCellValue(orderProduct.getSalesPrice());\r\n\t\t\t\r\n\t\t\tString year = product.getYear().getYear();\r\n\t\t\tString quarter = product.getQuarter().getQuarter_Name();\r\n\t\t\tString brandName = product.getBrand().getBrand_Name();\r\n\t\t\t\r\n\t\t\tString productComment = year +\"年\" + brandName + quarter + \"装\";\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\trow.createCell(productComment_column).setCellValue(productComment);\r\n\t\t}\r\n\r\n\t\treturn templateWorkbook;\r\n\t}", "public static String[][] writeXL(String fPathe, String fSheet) throws Exception{\n\t\n\t\tFile outFile = new File(fPath);\n\t\tHSSFWorkbook WB = new HSSFWorkbook();\n\t\tHSSFSheet osSheet = WB.createSheet(fSheet);\n\t\tint xR_TS = xData.length;\n\t\tint xC_TS = xData[0].length;\n\t\tfor (int myrow =0; myrow < xR_TS; myrow++) {\n\t\t\tHSSFRow row = osheet.createRow(myrow);\n\t\t}\n\t\t//System.out.println(\"Total Rows in Excel are \" + xRows);)\n}", "public void createMarksheet() {\n }", "public org.paradyne.lib.ireportV2.ReportGenerator getReport(org.paradyne.lib.ireportV2.ReportGenerator rg, TaxChallan bean){\r\n\t\ttry {\r\n\t\t\tint toYear=Integer.parseInt(bean.getYear().substring(2))+1;\r\n\t\t\tString toYearStr =\"\";\r\n\t\t\tif(toYear < 10){\r\n\t\t\t\ttoYearStr = \"0\"+toYear;\r\n\t\t\t}else {\r\n\t\t\t\ttoYearStr =\"\"+toYear;\r\n\t\t\t}\r\n\t\t\tString assesmentYear = bean.getYear()+ \"-\"+ toYearStr;\r\n\t\t\tTableDataSet subtitleName = new TableDataSet();\r\n\t\t\tObject obj[][] = new Object[1][3];\r\n\t\t\t\r\n\t\t\tobj[0][0] = \"* Important : Please see notes \\noverleaf before filling up the challan\";\r\n\t\t\tobj[0][1] = \"T.D.S./TCS TAX CHALLAN\";\r\n\t\t\tobj[0][2] = \"Single Copy (to be sent to the ZAO)\";\r\n\t\t\tsubtitleName.setData(obj);\r\n\t\t\tsubtitleName.setCellAlignment(new int[] { 0, 1, 0 });\r\n\t\t\tsubtitleName.setCellWidth(new int[] { 30, 40, 30 });\r\n\t\t\tsubtitleName.setBorderDetail(3);\r\n\t\t\tsubtitleName.setHeaderTable(true);\r\n\t\t\trg.addTableToDoc(subtitleName);\r\n\t\t\t\r\n\t\t\tTableDataSet heading1 = new TableDataSet();\r\n\t\t\theading1.setData(new Object[][] { {\r\n\t\t\t\t\t\t\t\"CHALLAN NO./ \\nITNS \\n281\\n\\n\"+bean.getChallanNo(),\r\n\t\t\t\t\t\t\t\"Tax Applicable (Tick One)*\\nTAX DEDUCTED/COLLECTED AT SOURCE FROM\\n\\n(0020) COMPANY [__] \\t\\t\\t\\t(0021) NON-COMPANY [__] \\n\\n DEDUCTEES \\t\\t\\t\\t\\t\\t\\t DEDUCTEES\",\r\n\t\t\t\t\t\t\t\"Assesment Year \\n\\n\"+assesmentYear }});\r\n\t\t\theading1.setCellAlignment(new int[] { 1, 1, 1 });\r\n\t\t\theading1.setCellWidth(new int[] { 20, 60, 20 });\r\n\t\t\theading1.setBorderDetail(3);\r\n\t\t\trg.addTableToDoc(heading1);\r\n\t\t\t\r\n\t\t\tObject divAddress[][]=getSqlModel().getSingleResult(\"SELECT HRMS_DIVISION.DIV_NAME, NVL(HRMS_DIVISION.DIV_ADDRESS1,' '), NVL(HRMS_DIVISION.DIV_ADDRESS2,' '), NVL(HRMS_DIVISION.DIV_ADDRESS3,' '), NVL(HRMS_DIVISION.DIV_TANNO,' '), \"\r\n\t\t\t\t\t+\" HRMS_DIVISION.DIV_TELEPHONE, HRMS_DIVISION.DIV_PINCODE FROM HRMS_DIVISION WHERE HRMS_DIVISION.DIV_ID=\"+bean.getDivId());\r\n\t\t\t\r\n\t\t\tObject [][] empDataObj = new Object[4][1];\r\n \t\tempDataObj[0][0] = \"Tax Deduction Account No. (T.A.N.)\\n\"+divAddress[0][4];;\r\n \t\tempDataObj[1][0] = \"Full Name\\n\"+divAddress[0][0];\r\n \t\tempDataObj[2][0] = \"Complete Address with City & State\\n\"+divAddress[0][1]+\"\\n\"+\"\"+divAddress[0][2]+\"\\n\"+\"\"+divAddress[0][3];\r\n \t\tempDataObj[3][0] = \"Tel. No. : \"+checkNull(\"\"+divAddress[0][5])+\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" +\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\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t Pin : \"+checkNull(\"\"+divAddress[0][6]);\r\n \t\t\r\n \t\t\r\n \t\tTableDataSet empData = new TableDataSet();\r\n\t\t\tempData.setData(empDataObj);\r\n\t\t\tempData.setCellAlignment(new int[] { 0 });\r\n\t\t\tempData.setCellWidth(new int[] { 100 });\r\n\t\t\tempData.setBorderDetail(3);\r\n\t\t\trg.addTableToDoc(empData);\r\n \t\t\r\n \t\tTableDataSet table1 = new TableDataSet();\r\n \t\ttable1.setData(new Object[][] { { \"Type of Payment\", \"Code * \" } });\r\n \t\ttable1.setCellAlignment(new int[] { 0, 2});\r\n \t\ttable1.setCellWidth(new int[] { 50, 50 });\r\n \t\ttable1.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tTableDataSet table2 = new TableDataSet();\r\n\t\t\ttable2.setData(new Object[][] { {\"(Tick One)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" +\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\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(Please see overleaf)\" +\r\n\t\t\t\t\t\"\\n\\n\\n \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tTDS/TCS Payable by Taxpayer\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\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 (200)\" +\r\n\t\t\t\t\t\"\\n\\n\\n \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t TDS/TCS Regular Assessment (Raised by I.T. Deptt.)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(400)\\n\"}});\r\n\t\t\ttable2.setCellAlignment(new int[] {0});\r\n\t\t\ttable2.setCellWidth(new int[] { 100 });\r\n\t\t\ttable2.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map2 = rg.joinTableDataSet(table1, table2, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table3 = new TableDataSet();\r\n\t\t\ttable3.setData(new Object[][] { { \"DETAILS OF PAYMENTS\",\"Amount (in Rs. Only)\" }});\r\n\t\t\ttable3.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable3.setCellWidth(new int[] { 50, 50});\r\n\t\t\ttable3.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map3 = rg.joinTableDataSet(map2, table3, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table4 = new TableDataSet();\r\n\t\t\ttable4.setData(new Object[][] { {\"Income Tax\",bean.getTax()},\r\n\t\t\t\t\t{\"Surcharge\",bean.getSurcharge()},\r\n\t\t\t\t\t{\"Education Cess\",bean.getEduCess()},\r\n\t\t\t\t\t{\"Interest\",bean.getIntAmt()},\r\n\t\t\t\t\t{\"Penalty\",bean.getOthrAmt()},\r\n\t\t\t\t\t{\"Total\",bean.getTotalTax()},\r\n\t\t\t\t\t{\"Total (in words)\",\"\"}});\r\n\t\t\ttable4.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable4.setCellWidth(new int[] { 30, 70});\r\n\t\t\ttable4.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map4 = rg.joinTableDataSet(map3, table4, false, 100);\r\n\t\t\t\r\n\t\t\tString numberString [] = convert(Integer.parseInt(bean.getTotalTax().trim().replace(\".00\",\"\"))).split(\",\");\r\n\t\t\t\r\n\t\t\tObject totalInWord [][]= new Object [2][6];\r\n\t\t\ttotalInWord [0][0] = \"CRORE\";\r\n\t\t\ttotalInWord [0][1] = \"LACS\";\r\n\t\t\ttotalInWord [0][2] = \"THOUSAND\";\r\n\t\t\ttotalInWord [0][3] = \"HUNDRED\";\r\n\t\t\ttotalInWord [0][4] = \"TENS\";\r\n\t\t\ttotalInWord [0][5] = \"UNITS\";\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < numberString.length; i++) {\r\n\t\t\t\tif(numberString[i].equalsIgnoreCase(\"zero\")){\r\n\t\t\t\t\ttotalInWord [1][i] = \"Nil\";\r\n\t\t\t\t} else { \r\n\t\t\t\t\ttotalInWord [1][i] = numberString[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTableDataSet table5 = new TableDataSet();\r\n\t\t\ttable5.setData(totalInWord);\r\n\t\t\ttable5.setCellAlignment(new int[] { 1, 1, 1, 1, 1, 1});\r\n\t\t\ttable5.setCellWidth(new int[] { 15, 15, 15, 15, 15, 15});\r\n\t\t\ttable5.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map5 = rg.joinTableDataSet(map4, table5, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table6 = new TableDataSet();\r\n\t\t\ttable6.setData(new Object[][] { {\"Paid in Cash/Debit to A/c /Cheque No.\"+bean.getChequeNo(), \"\", \"Dated\", bean.getChequeDate() }});\r\n\t\t\ttable6.setCellAlignment(new int[] { 1, 1, 1, 1});\r\n\t\t\ttable6.setCellWidth(new int[] { 50, 15, 20, 15});\r\n\t\t\ttable6.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map6 = rg.joinTableDataSet(map5, table6, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table7 = new TableDataSet();\r\n\t\t\ttable7.setData(new Object[][] { {\"Drawn on\", bean.getBank()}});\r\n\t\t\ttable7.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable7.setCellWidth(new int[] { 50,50});\r\n\t\t\ttable7.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map7 = rg.joinTableDataSet(map6, table7, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table8 = new TableDataSet();\r\n\t\t\ttable8.setData(new Object[][] { {\"(Name of the Bank and Branch)\"}});\r\n\t\t\ttable8.setCellAlignment(new int[] { 2});\r\n\t\t\ttable8.setCellWidth(new int[] { 100 });\r\n\t\t\ttable8.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map8 = rg.joinTableDataSet(map7, table8, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table9 = new TableDataSet();\r\n\t\t\ttable9.setData(new Object[][] { {\"Date\", \"\"}});\r\n\t\t\ttable9.setCellAlignment(new int[] { 0, 0});\r\n\t\t\ttable9.setCellWidth(new int[] { 60, 40});\r\n\t\t\ttable9.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map9 = rg.joinTableDataSet(map8, table9, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table10 = new TableDataSet();\r\n\t\t\ttable10.setData(new Object[][] { {\"Signature of person making payment\"}});\r\n\t\t\ttable10.setCellAlignment(new int[] { 2 });\r\n\t\t\ttable10.setCellWidth(new int[] { 100});\r\n\t\t\ttable10.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map10 = rg.joinTableDataSet(map9, table10, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table11 = new TableDataSet();\r\n\t\t\ttable11.setData(new Object[][] { {\"Taxpayers Counterfoil (To be filled up by taxpayer)\"}});\r\n\t\t\ttable11.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable11.setCellWidth(new int[] { 100});\r\n\t\t\ttable11.setBodyFontDetails(Font.FontFamily.HELVETICA, 8, Font.BOLD, new BaseColor(0, 0, 0));\r\n\t\t\ttable11.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map11 = rg.joinTableDataSet(map10, table11, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table12 = new TableDataSet();\r\n\t\t\ttable12.setData(new Object[][] { {\"TAN \"+divAddress[0][4]+\"\\n\\nReceived from \"+divAddress[0][0]}});\r\n\t\t\ttable12.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable12.setCellWidth(new int[] { 100});\r\n\t\t\ttable12.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map12 = rg.joinTableDataSet(map11, table12, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table13 = new TableDataSet();\r\n\t\t\ttable13.setData(new Object[][] { {\"(Name)\"}});\r\n\t\t\ttable13.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable13.setCellWidth(new int[] { 100 });\r\n\t\t\ttable13.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map13 = rg.joinTableDataSet(map12, table13, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table14 = new TableDataSet();\r\n\t\t\ttable14.setData(new Object[][] { {\"Cash/ Debit to A/c /Cheque No. :\"+bean.getChequeNo()+\"For Rs.\"+bean.getTotalTax().replace(\".00\", \"\")+\"/-\"}});\r\n\t\t\ttable14.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable14.setCellWidth(new int[] { 100 });\r\n\t\t\ttable14.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map14 = rg.joinTableDataSet(map13, table14, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table15 = new TableDataSet();\r\n\t\t\ttable15.setData(new Object[][] { {\"Rs. (in words)\", Utility.convert(Integer.parseInt(bean.getTotalTax().trim().replace(\".00\", \"\")))}, {\"Drawn on\", bean.getBank()}});\r\n\t\t\ttable15.setCellAlignment(new int[] { 0, 1 });\r\n\t\t\ttable15.setCellWidth(new int[] { 30, 70 });\r\n\t\t\ttable15.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map15 = rg.joinTableDataSet(map14, table15, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table16 = new TableDataSet();\r\n\t\t\ttable16.setData(new Object[][] { {\"(Name of the Bank and Branch)\"}, \r\n\t\t\t\t\t{\"Company/Non-Company Deductees\"}, \r\n\t\t\t\t\t{\"on account of Tax Deducted at Source (TDS)/Tax Collected at Source (TCS) from____(Fill up Code)\"},\r\n\t\t\t\t\t{\"(Strike out whichever is not applicable)\"}});\r\n\t\t\ttable16.setCellAlignment(new int[] { 1 });\r\n\t\t\ttable16.setCellWidth(new int[] { 100 });\r\n\t\t\ttable16.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map16 = rg.joinTableDataSet(map15, table16, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table17 = new TableDataSet();\r\n\t\t\ttable17.setData(new Object[][] { {\"\\nfor the Assessment Year : \"+assesmentYear}});\r\n\t\t\ttable17.setCellAlignment(new int[] { 0});\r\n\t\t\ttable17.setCellWidth(new int[] { 100 });\r\n\t\t\ttable17.setBorderDetail(3);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map17 = rg.joinTableDataSet(map16, table17, false, 100);\r\n\t\t\t\r\n\t\t\tTableDataSet table18 = new TableDataSet();\r\n\t\t\ttable18.setData(new Object[][] { {\"\\n\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\tFOR USE IN RECEIVING BANK \\n\\n\\n\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tDebit to A/c/Cheque credited on\\n\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tDD-MM-YY\\n\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tSPACE FOR BANK SEAL\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nRs.\"}});\r\n\t\t\ttable18.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable18.setCellWidth(new int[] {100});\r\n\t\t\ttable18.setBorderDetail(3);\r\n\r\n\t\t\tTableDataSet table19 = new TableDataSet();\r\n\t\t\ttable19.setData(new Object[][] { {\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tSPACE FOR BANK SEAL\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nRs.\"}});\r\n\t\t\ttable19.setCellAlignment(new int[] { 0 });\r\n\t\t\ttable19.setCellWidth(new int[] {100});\r\n\t\t\ttable19.setBorderDetail(3);\r\n\t\t\t//rg.addTableToDoc(table11);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map18 = rg.joinTableDataSet(table18, table19, false, 100);\r\n\t\t\t\r\n\t\t\tHashMap<String ,Object> map19 = rg.joinTableDataSet(map17, map18, true, 70);\r\n\t\t\t\r\n\t\t\trg.addTableToDoc(map19);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rg;\r\n\t}", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "public static void menuGrouping(String countryName,String actURL,String displaytitle,String overriddentitle) throws IOException {\n\t\t\r\n\t\tSystem.out.println(\"latest_data :actURL \"+actURL);\r\n\t\tSystem.out.println(\"latest_data : displaytitle \"+displaytitle);\r\n\t\tSystem.out.println(\"latest_data : overriddentitle \"+overriddentitle);\r\n\t\tString []arrMenu;\r\n\r\n\t\tarrMenu = actURL.split(\"/\");\r\n\r\n\t\tswitch(arrMenu.length){\r\n\t\tcase 3:\r\n\t\t\tif(conuntryExist)\r\n\t\t\t{ \r\n\t\t\t\tSystem.out.println(\"latest_data : countryName \"+countryName);\r\n\t\t\t\tSystem.out.println(\"Menu: \" + arrMenu[2]);\r\n\t\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",countryName,arrMenu[2],\"\",\"\",displaytitle,overriddentitle,actURL);\r\n\t\t\t\t// writeExcel(rowCnt,arrMenu[2],\"\",\"\",actURL);\r\n\t\t\t\tconuntryExist=false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Menu: \" + arrMenu[2]);\r\n\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",\"\",arrMenu[2],\"\",\"\",displaytitle,overriddentitle,actURL);\r\n\t\t\t// writeExcel(rowCnt,arrMenu[2],\"\",\"\",actURL);\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"SubMenu: \" + arrMenu[3]);\r\n\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",\"\",\"\",arrMenu[3],\"\",displaytitle,overriddentitle,actURL);\r\n\t\t\t// writeExcel(rowCnt,\"\",arrMenu[3],\"\",actURL);\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"SubMenu_1: \" + arrMenu[4]);\r\n\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",\"\",\"\",\"\",arrMenu[4],displaytitle,overriddentitle,actURL);\r\n\t\t\t// writeExcel(rowCnt,\"\",\"\",arrMenu[4],actURL);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Basic Page!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\r\n\t}", "public void generarReportePagosAutorizadoss(String sAccionBusqueda,List<PagosAutorizados> pagosautorizadossParaReportes) throws Exception {\n\t\tLong iIdUsuarioSesion=0L;\t\r\n\t\t\r\n\t\t\r\n\t\tif(usuarioActual==null) {\r\n\t\t\tthis.usuarioActual=new Usuario();\r\n\t\t}\r\n\t\t\r\n\t\tiIdUsuarioSesion=usuarioActual.getId();\r\n\t\t\r\n\t\tString sPathReportes=\"\";\r\n\t\t\r\n\t\tInputStream reportFile=null;\r\n\t\tInputStream imageFile=null;\r\n\t\t\t\r\n\t\timageFile=AuxiliarImagenes.class.getResourceAsStream(\"LogoReporte.jpg\");\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathReporteFinal=\"\";\r\n\t\t\r\n\t\tif(!esReporteAccionProceso) {\r\n\t\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\t\tif(!this.esReporteDinamico) {\r\n\t\t\t\t\tsPathReporteFinal=\"PagosAutorizados\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsPathReporteFinal=this.sPathReporteDinamico;\r\n\t\t\t\t\treportFile = new FileInputStream(sPathReporteFinal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"PagosAutorizadosMasterRelaciones\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\r\n\t\t\t\t//sPathReportes=reportFile.getPath().replace(\"PagosAutorizadosMasterRelacionesDesign.jasper\", \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"PagosAutorizados\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t}\r\n\t\t\r\n\t\tif(reportFile==null) {\r\n\t\t\tthrow new JRRuntimeException(sPathReporteFinal+\" no existe\");\r\n\t\t}\r\n\t\t\r\n\t\tString sUsuario=\"\";\r\n\t\t\r\n\t\tif(usuarioActual!=null) {\r\n\t\t\tsUsuario=usuarioActual.getuser_name();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"usuario\", sUsuario);\r\n\t\t\r\n\t\tparameters.put(\"titulo\", Funciones.GetTituloSistemaReporte(this.parametroGeneralSg,this.moduloActual,this.usuarioActual));\r\n\t\tparameters.put(\"subtitulo\", \"Reporte De Pagos Autorizadoses\");\t\t\r\n\t\tparameters.put(\"busquedapor\", PagosAutorizadosConstantesFunciones.getNombreIndice(sAccionBusqueda)+sDetalleReporte);\r\n\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\tparameters.put(\"SUBREPORT_DIR\", sPathReportes);\r\n\t\t}\r\n\t\t\r\n\t\tparameters.put(\"con_grafico\", this.conGraficoReporte);\r\n\t\t\r\n\t\tJasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);\r\n\t\t\t\t\r\n\t\tthis.cargarDatosCliente();\r\n\t\t\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//FK DEBERIA TRAERSE DE ANTEMANO\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t//CLASSES PARA REPORTES OBJETOS RELACIONADOS\r\n\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\tclasses=new ArrayList<Classe>();\r\n\t\t}\r\n\t\t\r\n\t\tJRBeanArrayDataSource jrbeanArrayDataSourcePagosAutorizados=null;\r\n\t\t\r\n\t\tif(this.sTipoReporteExtra!=null && !this.sTipoReporteExtra.equals(\"\")) {\r\n\t\t\tPagosAutorizadosConstantesFunciones.S_TIPOREPORTE_EXTRA=this.sTipoReporteExtra;\r\n\t\t} else {\r\n\t\t\tPagosAutorizadosConstantesFunciones.S_TIPOREPORTE_EXTRA=\"\";\r\n\t\t}\r\n\t\t\r\n\t\tjrbeanArrayDataSourcePagosAutorizados=new JRBeanArrayDataSource(PagosAutorizadosJInternalFrame.TraerPagosAutorizadosBeans(pagosautorizadossParaReportes,classes).toArray());\r\n\t\t\r\n\t\tjasperPrint = JasperFillManager.fillReport(jasperReport,parameters,jrbeanArrayDataSourcePagosAutorizados);\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathDest=Constantes.SUNIDAD_ARCHIVOS+\":/\"+Constantes.SCONTEXTSERVER+\"/\"+PagosAutorizadosConstantesFunciones.SCHEMA+\"/reportes\";\r\n\t\t\r\n\t\tFile filePathDest = new File(sPathDest);\r\n\t\t\r\n\t\tif(!filePathDest.exists()) {\r\n\t\t\tfilePathDest.mkdirs();\t\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tString sDestFileName=sPathDest+\"/\"+PagosAutorizadosConstantesFunciones.CLASSNAME;\r\n\t\t\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"VISUALIZAR\") {\r\n\t\t\tJasperViewer jasperViewer = new JasperViewer(jasperPrint,false) ;\r\n\t\t\tjasperViewer.setVisible(true) ; \r\n\r\n\t\t} else if(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\") {\t\r\n\t\t\t//JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(),parameters, new JRBeanArrayDataSource(PagosAutorizadosBean.TraerPagosAutorizadosBeans(pagosautorizadossParaReportes).toArray()));\r\n\t\t\t\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"HTML\") {\r\n\t\t\t\tsDestFileName+=\".html\";\r\n\t\t\t\tJasperExportManager.exportReportToHtmlFile(jasperPrint,sDestFileName);\r\n\t\t\t\t\t\r\n\t\t\t} else if(this.sTipoArchivoReporte==\"PDF\") {\r\n\t\t\t\tsDestFileName+=\".pdf\";\r\n\t\t\t\tJasperExportManager.exportReportToPdfFile(jasperPrint,sDestFileName);\r\n\t\t\t} else {\r\n\t\t\t\tsDestFileName+=\".xml\";\r\n\t\t\t\tJasperExportManager.exportReportToXmlFile(jasperPrint,sDestFileName, false);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\r\n\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"WORD\") {\r\n\t\t\t\tsDestFileName+=\".rtf\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRRtfExporter exporter = new JRRtfExporter();\r\n\t\t\r\n\t\t\t\texporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\r\n\t\t\t\texporter.exportReport();\r\n\t\t\t\t\r\n\t\t\t} else\t{\r\n\t\t\t\tsDestFileName+=\".xls\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRXlsExporter exporterXls = new JRXlsExporter();\r\n\t\t\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\t\texporterXls.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);\r\n\t\t\r\n\t\t\t\texporterXls.exportReport();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"EXCEL2\"||this.sTipoArchivoReporte==\"EXCEL2_2\") {\r\n\t\t\t//sDestFileName+=\".xlsx\";\r\n\t\t\t\r\n\t\t\tif(this.sTipoReporte.equals(\"NORMAL\")) {\r\n\t\t\t\tthis.generarExcelReportePagosAutorizadoss(sAccionBusqueda,sTipoArchivoReporte,pagosautorizadossParaReportes);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"FORMULARIO\")){\r\n\t\t\t\tthis.generarExcelReporteVerticalPagosAutorizadoss(sAccionBusqueda,sTipoArchivoReporte,pagosautorizadossParaReportes,false);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"DINAMICO\")){\r\n\t\t\t\t\r\n\t\t\t\tif(this.sTipoReporteDinamico.equals(\"NORMAL\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.jButtonGenerarExcelReporteDinamicoPagosAutorizadosActionPerformed(null);\r\n\t\t\t\t\t//this.generarExcelReportePagosAutorizadoss(sAccionBusqueda,sTipoArchivoReporte,pagosautorizadossParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"FORMULARIO\")){\r\n\t\t\t\t\tthis.generarExcelReporteVerticalPagosAutorizadoss(sAccionBusqueda,sTipoArchivoReporte,pagosautorizadossParaReportes,true);\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"RELACIONES\")){\r\n\t\t\t\t\tthis.generarExcelReporteRelacionesPagosAutorizadoss(sAccionBusqueda,sTipoArchivoReporte,pagosautorizadossParaReportes,true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"RELACIONES\")){\r\n\t\t\t\tthis.generarExcelReporteRelacionesPagosAutorizadoss(sAccionBusqueda,sTipoArchivoReporte,pagosautorizadossParaReportes,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\"||this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\t\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(this,\"REPORTE \"+sDestFileName+\" GENERADO SATISFACTORIAMENTE\",\"REPORTES \",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "public void houseDetailing(PdfContentByte canvas, AstroBean astrobean,ColorElement mycolor, PdfWriter writer ,boolean houseDetail,boolean aspectChartWidoutHouse,boolean aspectScore) {\n\t float width1 = 220;\n float height1 = 110; //old110\n float xCoordinate1 = 80;\n float yCoordinate1 = 160; //old 160\n\t//\tlogger.info(\"aspectChartWidoutHouse>> \"+aspectChartWidoutHouse+\" houseDetail>> \"+houseDetail+\" aspectScore>> \"+aspectScore);\n\t\t try {\n\t\t\tLinkedHashMap<String,HouseDetailBean> signList = astrobean.getHouseSignDetailHashTable();\n\t\t\tLinkedHashMap<String,HouseDetailBean> starList = astrobean.getHouseStarDetailHashTable();\n\t\t\tLinkedHashMap<String,HouseDetailBean> subLordList = astrobean.getHouseSubLordHashTable();\n\t\t\tLinkedHashMap<String,HashSet<String>> aspectList = astrobean.getHouseAspectHashTable();\n\t\t\tLinkedHashMap<String, HashMap<String,HashSet<String>>> occAspList = astrobean.getHouseOccAspectHashTable();\n\t\t\tLinkedHashMap<String,ArrayList<HouseDetailBean>> occupantList = astrobean.getHouseOccupantHashTable();\n\t \t\tLinkedHashMap<String, HashMap<String,String>> cuspHouseAspectDetails= astrobean.getCuspHouseAspectDetails();\n\t\t\tLinkedHashMap<String, HashMap<String,String>> planetHouseAspectDetails= astrobean.getPlanetHouseAspectDetails();\n\t\t\t//By Bharti (version 4.4)\n\t\t\tHashMap<String, Integer> scoreMap = new HashMap<String, Integer>();\n\t\t\tif(aspectScore)\n\t\t\t\tfillAspectScoringMap(scoreMap);\n\t\t\t//ENDS(version 4.4)\n\t\t\tFont font2 = new Font();\n\t\t\tFont font1 = new Font();\n\t\t\tPdfPTable table=null;\n \tFont font=new Font();\n\t\t\tFont fontData=new Font();\n\t//\tfloat width[]=null;\n\t\t\tif(houseDetail || aspectChartWidoutHouse){\n\t\t \t\tthis.document.newPage();\n //bharti canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n //by bharti canvas.restoreState();\n\n canvas.setLineWidth(1f);\n\t\t\t//bharti\t canvas.saveState();\n\n // Font font1 = new Font();\n font1.setSize(getHeadingfont());\n\t\t\t\t\tfont1.setColor(mycolor.fillColor(this.getTableDataColor()));\n\n // Font font2 = new Font();\n font2.setSize(getTableHeadingfont());\n font2.setColor(mycolor.fillColor(getTableHeadingColor()));\n\t\t\t\t\tfont2.setSize(12);\n\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_LEFT,\n new Phrase(astrobean.getName().replaceAll(\"%20\",\" \" ).replaceAll(\"\\\"\",\"\"), font2), 35, 842 - 55, 0);\n\n ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,new Phrase(\"Aspects on Houses\", font1), 290, 842 - 90, 0);\n // PdfPTable table=new PdfPTable(13);\n table=new PdfPTable(13);\n // Font font=new Font();\n // Font fontData=new Font();\n float width[]={30,10,10,10,10,10,10,10,10,10,10,10,10};\n //width[]={30,10,10,10,10,10,10,10,10,10,10,10,10};\n table.setWidths(width);\n\t\tfont.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n\t\t table.addCell(new Phrase(new Chunk(\"Planets\",font)));\n\nfor(int i=1;i<=12;i++)\n{\n\ttable.addCell(new Phrase(new Chunk(\"\"+i,font)));\n}\nHashMap<String,String> cuspMap= null;\nfor(int j=0;j<planets.length;j++)\n{\n\tif(!planets[j].equals(\"Ketu\") && !planets[j].equals(\"Rahu\")){\n\t\ttable.addCell(new Phrase(new Chunk(planets[j],font)));\n\t\tfor(int count=1;count<=12;count++)\n\t\t{\n\t\t\tcuspMap=cuspHouseAspectDetails.get(count+\"\");\n\t\t\tif(cuspMap.get(planets[j])!=null){\n\t\t\t\tif(aspectScore){\n\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))!=null){\n\t\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))>0)\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(+\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\n\t\t\t}\n\t\t}\n\t}\n}\n//version 4.4\n\tint totalScore=0;\nif(aspectScore){\n\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\t\n\tfor(int count=1;count<=12;count++)\n \t{\n\t\tfor (Map.Entry<String, String> entry : cuspHouseAspectDetails.get(count+\"\").entrySet())\n\t\t{\n\t\t\tif(!entry.getKey().equalsIgnoreCase(\"Ketu\") && !entry.getKey().equalsIgnoreCase(\"Rahu\")) {\n\t\t\t\ttotalScore=totalScore+scoreMap.get(entry.getValue());\n\t\t\t}\n\t\t}\n\t\tif(totalScore>0)\n \t\ttable.addCell(new Phrase(new Chunk(\"+\"+totalScore,fontData)));\n \telse if(totalScore<0) \n \ttable.addCell(new Phrase(new Chunk(\"\"+totalScore,fontData)));\n\t\telse\n\t\t\ttable.addCell(new Phrase(new Chunk(\"N\",fontData)));\n\t\ttotalScore=0;\n\t}\n}\n//ENDS HERE\t\n\ttable.setTotalWidth(510);\n \ttable.writeSelectedRows(0, -1, 50, (842 - 100), writer.getDirectContent());\n\n\n\n\n\n\n\n table=new PdfPTable(10);\n float wi[]={30,10,10,10,10,10,10,10,10,10};\n table.setWidths(wi);\n font.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on planets\", font1), 290, 842 - 290, 0);\n table.addCell(new Phrase(new Chunk(\"Planets\",font)));\n \n\n \t\tString proPath = Constants.PROPERTIES_PATH;\n \t\tproPath = proPath + \"/kundliHttpserverNew.properties\";\n \t\tHashtable<String, String> properties = ReadPropertyFile.readPropery(proPath);\t\t\t\n\n \t\tFont fontFooter = new Font();\n \t\tfontFooter.setSize(10);\n \t\tfontFooter.setColor(mycolor.fillColor(getTableDataColor()));\n \t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\tnew Phrase(properties.getOrDefault(\"astro.link\", \"Observation\"), fontFooter), 300,\n \t\t\t\t842 - 790, 0);\n \t\t\n \t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\tnew Phrase(properties.getOrDefault(\"astro.observation\", \"Observation\"), fontFooter), 300,\n \t\t\t\t842 - 800, 0);\n\n\n \t\tfor(int i=0;i<planets.length;i++)\n {\n \t\t\ttable.addCell(new Phrase(new Chunk(planets[i],font)));\n\t\t}\n\t\tcuspMap= null;\n\t\tfor(int j=0;j<planets.length;j++)\n\t\t{\n\n\t\t\tif(!planets[j].equals(\"Ketu\") && !planets[j].equals(\"Rahu\")){\n\t\t\t\ttable.addCell(new Phrase(new Chunk(planets[j],font)));\n\t\t\t\tfor(int count=0;count<planets.length;count++)\n\t\t\t\t{\n\t\t\t\t\tcuspMap=planetHouseAspectDetails.get(planets[count]);\n\t\t\t\t\tif(cuspMap.get(planets[j])!=null){\n\t\t\t\t\t\tif(aspectScore){\n\t\t\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))!=null){\n \t \t\t\tif(scoreMap.get(cuspMap.get(planets[j]))>0)\n \t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(+\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n \t\t\t\t\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//version 4.4 \nif(aspectScore){\n\ttotalScore=0;\n table.addCell(new Phrase(new Chunk(\"\",fontData)));\n for(int count=0;count<planets.length;count++)\n {\n for (Map.Entry<String, String> entry : planetHouseAspectDetails.get(planets[count]).entrySet())\n {\n\t\t\tif(!entry.getKey().equalsIgnoreCase(\"Ketu\") && !entry.getKey().equalsIgnoreCase(\"Rahu\")) {\n \ttotalScore=totalScore+scoreMap.get(entry.getValue());\n\t\t\t}\n }\n\t\tif(totalScore>0)\n \ttable.addCell(new Phrase(new Chunk(\"+\"+totalScore,fontData)));\n \telse if(totalScore<0)\n \ttable.addCell(new Phrase(new Chunk(\"\"+totalScore,fontData)));\n\t\telse\n table.addCell(new Phrase(new Chunk(\"N\",fontData)));\n totalScore=0;\n }\n}\n//ENDS\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 300), writer.getDirectContent());\n\n\n//by bharti canvas.restoreState();\n}//end of aspect/house checking\n\n\t\tif(houseDetail){\n\t\tfor(int i=1;i<=12;i++)\n\t\t{\n \t\tthis.document.newPage();\n\t\t\t //by bharti\t canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n //by bharti canvas.restoreState();\n\n canvas.setLineWidth(1f);\n \n \t\t\tString proPath = Constants.PROPERTIES_PATH;\n \t\t\tproPath = proPath + \"/kundliHttpserverNew.properties\";\n \t\t\tHashtable<String, String> properties = ReadPropertyFile.readPropery(proPath);\t\t\t\n \t\t\t\n \t\t\tFont fontFooter = new Font();\n \t\t\tfontFooter.setSize(10);\n \t\t\tfontFooter.setColor(mycolor.fillColor(getTableDataColor()));\n \t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\t\tnew Phrase(properties.getOrDefault(\"astro.link\", \"Observation\"), fontFooter), 300,\n \t\t\t\t\t842 - 790, 0);\n \t\t\t\n \t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\t\tnew Phrase(properties.getOrDefault(\"astro.observation\", \"Observation\"), fontFooter), 300,\n \t\t\t\t\t842 - 800, 0);\n\n //bharti canvas.saveState();\n\n // font1 = new Font();\n // font1.setSize(getHeadingfont());\n\n // font2 = new Font();\n // font2.setSize(getTableHeadingfont());\n // font2.setColor(mycolor.fillColor(getTableHeadingColor()));\n ColumnText.showTextAligned(canvas, Element.ALIGN_LEFT,\n new Phrase(astrobean.getName().replaceAll(\"%20\",\" \" ).replaceAll(\"\\\"\",\"\"), font2), 35, 842 - 55, 0);\n\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase((i)+\" House Detailing\", font1), 290, 842 - 90, 0);\n\t\ttable=new PdfPTable(5);\n\t\t font=new Font();\n fontData=new Font();\n float wid[]={20,20,20,20,20};\n table.setWidths(wid);\n font.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n\n\n // table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"Sign\",font)));\n\n table.addCell(new Phrase(new Chunk(\"Sign Lord\",font)));\n table.addCell(new Phrase(new Chunk(\"NL\",font)));\n table.addCell(new Phrase(new Chunk(\"SL\",font)));\n table.addCell(new Phrase(new Chunk(\"NL(SL)\",font)));\n\n\t\t\ttable.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSignName(),fontData)));\n\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getNLSL(),fontData)));\n\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 100), writer.getDirectContent());\n\n\t\t\t\t\t\n\t\t\t table=new PdfPTable(5);\n\t\ttable.setWidths(wid);\n\n// table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"Star\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getNLSL(),fontData)));\n\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 130), writer.getDirectContent());\n\n\n table=new PdfPTable(5);\n table.setWidths(wid);\n\n// table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"SubLord\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getNLSL(),fontData)));\n\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 160), writer.getDirectContent());\n\n/*\n\t\t canvas.restoreState();\n\t\t this.document.newPage();\n canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n canvas.restoreState();\n\n canvas.setLineWidth(1f);\n canvas.saveState();\n\n*/\n\n// ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n // new Phrase(\"Aspects on House\", font1), 290, 842 - 200, 0);\n\n\t table=new PdfPTable(6);\n //table.setWidths(wid);\n\t table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n\n table.addCell(new Phrase(new Chunk(\"PLANET\",font)));\n table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n table.addCell(new Phrase(new Chunk(\"SIGN\",font)));\n table.addCell(new Phrase(new Chunk(\"DEGREE\",font)));\n table.addCell(new Phrase(new Chunk(\"ASPECT\",font)));\n\t\n\n\t table.addCell(new Phrase(new Chunk(\"\"+i,font)));\n \n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n\t\t\n\n\n\t\tboolean flg=true;\n\t\tIterator iter = aspectList.get(i+\"\").iterator();\n\t\tif(aspectList.get(i+\"\").size()>0)\n\t\t{\twhile(iter.hasNext())\n\t\t\t{\n\n\t\t\t\n\t\t\tString temp[]=((String)iter.next()).split(\"_\");\t\n\n\t\t\tif(flg)\n\t\t\t{\n\t\t\ttable.addCell(new Phrase(new Chunk(temp[0],font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\tflg=false;\n\t\t\t}\n\t\t\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\")){\n\t\t\t table.addCell(new Phrase(new Chunk(\"\",fontData)));\n\n table.addCell(new Phrase(new Chunk(temp[1],fontData)));\n table.addCell(new Phrase(new Chunk(temp[2],fontData)));\n table.addCell(new Phrase(new Chunk(temp[3],fontData)));\n table.addCell(new Phrase(new Chunk(temp[4],fontData)));\n table.addCell(new Phrase(new Chunk(temp[5],fontData)));\n\t\t\t}\n\n\t\t\t}\n\t\t\tflg=true;\n\t\t }\n else\n {\n table.addCell(new Phrase(new Chunk(\"NA\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\tflg=false;\n }\n\n\t\t\tif(flg){\n\t\t ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on House\", font1), 290, 842 - 210, 0);\n\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 220), writer.getDirectContent());\n\t\t\t}\n\t table=new PdfPTable(5);\n \t table.setWidths(wid);\n\t table.addCell(new Phrase(new Chunk(\"Occupant\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\titer = occupantList.get(i+\"\").iterator();\n\t\tflg=false;\n\tif(occupantList.get(i+\"\").size()>0)\n\t\t{\n while(iter.hasNext())\n {\n HouseDetailBean bean=(HouseDetailBean)iter.next();\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(bean.getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getNLSL(),fontData)));\n\t\t\t\n\n\n }\n\t\tflg=true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tflg=false;\n\t\t}\n\t\t\tif(flg)\n\t\t\t{\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 380), writer.getDirectContent());\n\t\t\t}\n\n\n\n\n\n\t\t\t table=new PdfPTable(6);\n table.addCell(new Phrase(new Chunk(\"OCUPANT\",font)));\n\n table.addCell(new Phrase(new Chunk(\"PLANET\",font)));\n table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n table.addCell(new Phrase(new Chunk(\"SIGN\",font)));\n table.addCell(new Phrase(new Chunk(\"DEGREE\",font)));\n table.addCell(new Phrase(new Chunk(\"ASPECT\",font)));\n\n\n\nint count=0;\n\tfor (Map.Entry<String, HashSet<String>> entry : occAspList.get(i+\"\").entrySet())\n {\n\t\t\n\t\t\t\n\t\t\ttable.addCell(new Phrase(new Chunk(entry.getKey(),fontData)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\n\n\t\t\tflg=true;\n\t\t\titer = (entry.getValue()).iterator();\n\t\t\t{\n\t\t\tif((entry.getValue()).size()>0)\n\t\t\t{\n\t\t\twhile(iter.hasNext())\n\t\t\t{\t\n \t String temp[]=((String)iter.next()).split(\"_\");\n\t\t\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\") ){\n\t\t\tif(flg)\n\t\t\t{\n\t\t\t\ttable.addCell(new Phrase(new Chunk(temp[0],font)));\n\t\t\t\tflg=false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\ttable.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\t}\n\t\t//\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\") ){\t\n table.addCell(new Phrase(new Chunk(temp[1],fontData)));\n\n table.addCell(new Phrase(new Chunk(temp[2],fontData)));\n table.addCell(new Phrase(new Chunk(temp[3],fontData)));\n table.addCell(new Phrase(new Chunk(temp[4],fontData)));\n //table.addCell(new Phrase(new Chunk(aspectList.get(i+\"\").get(j).getNLSL(),fontData)));\n table.addCell(new Phrase(new Chunk(temp[5],fontData)));\n\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n }\n\t\t \n else\n {\n\t/* table.addCell(new Phrase(new Chunk(\"NA\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n*/\n }\n\t\t}\n\t}\n\n\t\tif(count>0)\n\t\t{\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on Occupants\", font1), 290, 842 - 440, 0);\n\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 450), writer.getDirectContent());\n\t\t}\n\n\n\n\n\t//by bharti\t\tcanvas.restoreState();\n\t\t}\n\n}\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\t}", "Report createReport();", "@RequestMapping(\"/generateReport\")\n\tpublic String generateReportforLoc(){\n\t\tList<Object[]> data=service.getLocWiseCount();\n\t\tString path=context.getRealPath(\"/\");\n\t\tlocUtil.generatePieChart(path, data);\n\t\tlocUtil.generateBarChart(path, data);\n\t\treturn \"LocReport\";\n\t}", "private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }", "public void generateReport() {\n ReportGenerator rg = ui.getReportGenerator();\n if (rg == null || !rg.isVisible()) {\n ui.openReportGenerator();\n rg = ui.getReportGenerator();\n }\n Image img = getImage();\n if (img == null) {\n return;\n }\n rg.addImage(img, \"Plot\");\n }", "@RequestMapping(\"exportToExcel\")\n public void exportFundamentalsToExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n log.debug(\"Requested exporting data to excel.\");\n\n TradingAidCommand jshData = getJshData();\n\n // create a new file\n FileOutputStream outExcel = new FileOutputStream(\"workbook\");\n // create a new workbook\n HSSFWorkbook workbook = new HSSFWorkbook();\n // create a new sheet\n HSSFSheet sheet = workbook.createSheet();\n\n sheet.setDefaultColumnWidth(7);\n\n // create header row\n HSSFRow header = sheet.createRow(0);\n header.createCell(0).setCellValue(\"Horse\");\n header.createCell(1).setCellValue(\"9am\");\n header.createCell(2).setCellValue(\"MovAM\");\n header.createCell(3).setCellValue(\"60min\");\n header.createCell(4).setCellValue(\"Mov60\");\n header.createCell(5).setCellValue(\"30min\");\n header.createCell(6).setCellValue(\"Mov30\");\n header.createCell(7).setCellValue(\"15min\");\n header.createCell(8).setCellValue(\"Mov15\");\n header.createCell(9).setCellValue(\"5min\");\n header.createCell(10).setCellValue(\"Mov5\");\n header.createCell(11).setCellValue(\"3min\");\n header.createCell(12).setCellValue(\"Mov3\");\n header.createCell(13).setCellValue(\"2min\");\n header.createCell(14).setCellValue(\"Mov2\");\n header.createCell(15).setCellValue(\"1min\");\n header.createCell(16).setCellValue(\"Mov1\");\n header.createCell(17).setCellValue(\"Mean\");\n header.createCell(18).setCellValue(\"321\");\n header.createCell(19).setCellValue(\"Result\");\n header.createCell(20).setCellValue(\"CPR\");\n header.createCell(21).setCellValue(\"NPTips\");\n header.createCell(22).setCellValue(\"Naps\");\n header.createCell(23).setCellValue(\"Stars\");\n header.createCell(24).setCellValue(\"Jockey\");\n header.createCell(25).setCellValue(\"Wins\");\n header.createCell(26).setCellValue(\"R\");\n header.createCell(27).setCellValue(\"Rs\");\n header.createCell(28).setCellValue(\"Mov9-60\");\n header.createCell(29).setCellValue(\"FP\");\n header.createCell(30).setCellValue(\"C\");\n header.createCell(31).setCellValue(\"D\");\n header.createCell(32).setCellValue(\"CD\");\n header.createCell(33).setCellValue(\"HG\");\n header.createCell(34).setCellValue(\"Trainer\");\n header.createCell(35).setCellValue(\"Wins\");\n header.createCell(36).setCellValue(\"R\");\n header.createCell(37).setCellValue(\"Rs\");\n\n int rowIndex = 1;\n for (JSHRaceCommand race : jshData.getRaces()) {\n\n HSSFRow row = sheet.createRow(rowIndex);\n HSSFCell cell = row.createCell(0);\n cell.setCellValue(race.getGeneralInfo());\n sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, 37));\n\n rowIndex++;\n\n int runnerFavPos = 1;\n for (JSHRunnerCommand runner : race.getRunners()) {\n row = sheet.createRow(rowIndex);\n row.createCell(0).setCellValue(runner.getHorseName());\n row.createCell(1).setCellValue(runner.getPrice9());\n row.createCell(2).setCellValue(runner.getMov9to11());\n row.createCell(3).setCellValue(runner.getPrice60());\n row.createCell(4).setCellValue(runner.getMov60());\n row.createCell(5).setCellValue(runner.getPrice30());\n row.createCell(6).setCellValue(runner.getMov30());\n row.createCell(7).setCellValue(runner.getPrice15());\n row.createCell(8).setCellValue(runner.getMov15());\n row.createCell(9).setCellValue(runner.getPrice5());\n row.createCell(10).setCellValue(runner.getMov5());\n row.createCell(11).setCellValue(runner.getPrice3());\n row.createCell(12).setCellValue(runner.getMov3());\n row.createCell(13).setCellValue(runner.getPrice2());\n row.createCell(14).setCellValue(runner.getMov2());\n row.createCell(15).setCellValue(runner.getPrice1());\n row.createCell(16).setCellValue(runner.getMov1());\n row.createCell(17).setCellValue(runner.getMean());\n row.createCell(18).setCellValue(runner.getMov3to1());\n row.createCell(19).setCellValue(runner.getResult());\n row.createCell(20).setCellValue(runner.getCpr());\n row.createCell(21).setCellValue(runner.getNptips());\n row.createCell(22).setCellValue(runner.getNaps());\n row.createCell(23).setCellValue(runner.getStars());\n row.createCell(24).setCellValue(runner.getJockey());\n row.createCell(25).setCellValue(runner.getJockeyWins());\n row.createCell(26).setCellValue(runner.getJockeyRideNo());\n row.createCell(27).setCellValue(runner.getJockeyRides());\n row.createCell(28).setCellValue(runner.getMov9to60());\n row.createCell(29).setCellValue(runnerFavPos++);\n row.createCell(30).setCellValue(runner.getCourse());\n row.createCell(31).setCellValue(runner.getDistance());\n row.createCell(32).setCellValue(runner.getDistanceAndCourse());\n row.createCell(33).setCellValue(runner.getHeadGear());\n row.createCell(34).setCellValue(runner.getTrainer());\n row.createCell(35).setCellValue(runner.getTrainerWins());\n row.createCell(36).setCellValue(runner.getTrainerRunnerNo());\n row.createCell(37).setCellValue(runner.getTrainerRunners());\n\n rowIndex++;\n }\n\n }\n\n for (int i = 0; i < 37; i++) {\n sheet.autoSizeColumn(i);\n }\n\n // Movement formatting\n HSSFSheetConditionalFormatting conditionalFormattingLayer = sheet.getSheetConditionalFormatting();\n HSSFConditionalFormattingRule blueRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.GT, \"5\");\n HSSFConditionalFormattingRule greenRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"2.5\", \"5\");\n HSSFConditionalFormattingRule yellowRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"0.01\", \"2.5\");\n HSSFConditionalFormattingRule orangeRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"-2.5\", \"-0.01\");\n HSSFConditionalFormattingRule pinkRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"-2.5\");\n\n HSSFPatternFormatting blueFormatting = blueRule.createPatternFormatting();\n blueFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.BLUE.getIndex());\n\n HSSFPatternFormatting greenFormatting = greenRule.createPatternFormatting();\n greenFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.GREEN.getIndex());\n\n HSSFPatternFormatting yellowFormatting = yellowRule.createPatternFormatting();\n yellowFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.YELLOW.getIndex());\n\n HSSFPatternFormatting orangeFormatting = orangeRule.createPatternFormatting();\n orangeFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.ORANGE.getIndex());\n\n HSSFPatternFormatting pinkFormatting = pinkRule.createPatternFormatting();\n pinkFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.PINK.getIndex());\n\n HSSFPalette palette = workbook.getCustomPalette();\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.BLUE.getIndex(), (byte) 153, (byte) 204, (byte) 255);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.GREEN.getIndex(), (byte) 204, (byte) 255, (byte) 204);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.YELLOW.getIndex(), (byte) 255, (byte) 255, (byte) 153);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.ORANGE.getIndex(), (byte) 255, (byte) 204, (byte) 153);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.PINK.getIndex(), (byte) 255, (byte) 153, (byte) 204);\n\n int lastRowNum = sheet.getLastRowNum();\n\n CellRangeAddress[] basicMovementCellRangeAddresses = {\n\n // 9-11 Movement\n new CellRangeAddress(1, lastRowNum, 2, 2),\n // 60 min Movement\n new CellRangeAddress(1, lastRowNum, 4, 4),\n // 30 min Movement\n new CellRangeAddress(1, lastRowNum, 6, 6),\n // 15 min Movement\n new CellRangeAddress(1, lastRowNum, 8, 8),\n // 5 min Movement\n new CellRangeAddress(1, lastRowNum, 10, 10),\n // 3 min Movement\n new CellRangeAddress(1, lastRowNum, 12, 12),\n // 2 min Movement\n new CellRangeAddress(1, lastRowNum, 14, 14),\n // 1 min Movement\n new CellRangeAddress(1, lastRowNum, 16, 16),\n // Mean\n new CellRangeAddress(1, lastRowNum, 17, 17),\n // 3-1 Movement\n new CellRangeAddress(1, lastRowNum, 18, 18),\n };\n\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, blueRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, greenRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, yellowRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, orangeRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, pinkRule);\n\n\n // Movement 9 to 60 formatting\n HSSFConditionalFormattingRule mov9to60LessThanZeroRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"0\");\n HSSFFontFormatting mov9to60LessThanZeroFormatting = mov9to60LessThanZeroRule.createFontFormatting();\n mov9to60LessThanZeroFormatting.setFontColorIndex(HSSFColor.HSSFColorPredefined.RED.getIndex());\n CellRangeAddress[] mov9to60CellRange = {new CellRangeAddress(1, lastRowNum, 28, 28)};\n conditionalFormattingLayer.addConditionalFormatting(mov9to60CellRange, mov9to60LessThanZeroRule);\n\n // CPR Formatting\n HSSFConditionalFormattingRule cprRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"0\");\n HSSFFontFormatting cprFormatting = cprRule.createFontFormatting();\n cprFormatting.setFontColorIndex(HSSFColor.HSSFColorPredefined.RED.getIndex());\n CellRangeAddress[] cprCellRange = {new CellRangeAddress(1, lastRowNum, 20, 20)};\n conditionalFormattingLayer.addConditionalFormatting(cprCellRange, cprRule);\n\n // Result formatting\n HSSFConditionalFormattingRule winnerRule = conditionalFormattingLayer.createConditionalFormattingRule(\"EXACT($T1, \\\"Won\\\")\");\n HSSFConditionalFormattingRule placedRule = conditionalFormattingLayer.createConditionalFormattingRule(\"EXACT($T1, \\\"Placed\\\")\");\n\n HSSFPatternFormatting winnerFormatting = winnerRule.createPatternFormatting();\n winnerFormatting.setFillBackgroundColor(IndexedColors.BRIGHT_GREEN.getIndex());\n\n HSSFPatternFormatting placedFormatting = placedRule.createPatternFormatting();\n placedFormatting.setFillBackgroundColor(IndexedColors.LEMON_CHIFFON.getIndex());\n\n palette.setColorAtIndex(IndexedColors.BRIGHT_GREEN.getIndex(), (byte) 62, (byte) 213, (byte) 120);\n palette.setColorAtIndex(IndexedColors.LEMON_CHIFFON.getIndex(), (byte) 242, (byte) 218, (byte) 193);\n\n CellRangeAddress[] resultCellRange = {\n // Horse name\n new CellRangeAddress(1, lastRowNum, 0, 0),\n // Result\n new CellRangeAddress(1, lastRowNum, 19, 19),\n // Jockey\n new CellRangeAddress(1, lastRowNum, 24, 24),\n // Trainer\n new CellRangeAddress(1, lastRowNum, 34, 34)\n\n };\n\n conditionalFormattingLayer.addConditionalFormatting(resultCellRange, winnerRule);\n conditionalFormattingLayer.addConditionalFormatting(resultCellRange, placedRule);\n\n // Writing the file into Http response\n workbook.write(outExcel);\n\n response.setContentType(\"application/octet-stream\");\n DateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd\");\n Date today = new Date();\n response.setHeader(\"Content-disposition\", \"attachment; filename=\" + \"trading-aid-\" + dateFormat.format(today) + \".xls\");\n\n FileInputStream inputStream = new FileInputStream(new File(\"workbook\"));\n\n OutputStream outputStream = response.getOutputStream();\n\n byte[] buffer = new byte[1024];\n int bytesRead = -1;\n while ((bytesRead = inputStream.read(buffer)) != -1) { // write bytes read from the input stream into the output stream\n outputStream.write(buffer, 0, bytesRead);\n }\n\n outputStream.flush();\n\n log.debug(\"Data export to excel successful.\");\n\n }", "void genReport() {\n\n current_part.save_state(); \n\n JTextArea ta = text;\n\n ta.setText(\"\");\n\n if (!t_foil_name.equals(\"Test\"))\n ta.append(\"Hydrofoil: \" + t_foil_name);\n\n java.util.Date date = new java.util.Date();\n ta.append(\"\\n Date: \" + date);\n \n wing.print( \"Main Wing\", ta);\n stab.print( \"Stabilizer Wing\", ta);\n strut.print(\"Mast (a.k.a. Strut)\", ta);\n fuse.print( \"Fuselage\", ta);\n\n ta.append( \"\\n\\n\");\n // tail volume is LAElev * AreaElev / (MACWing * AreaWing)\n // LAElev : The elevator's Lever Arm measured at the wing's and elevator's quarter chord point\n double LAElev = stab.xpos + stab.chord_xoffs + 0.25*stab.chord - (wing.xpos + wing.chord_xoffs + 0.25*wing.chord);\n // MAC : The main wing's Mean Aerodynamic Chord\n // AreaWing : The main wing's area\n // AreaElev : The elevator's area\n \n ta.append( \"\\nTail Voulume: \" + LAElev*stab.span*stab.chord/(wing.chord*wing.chord*wing.span));\n \n\n ta.append( \"\\n\\n\");\n switch (planet) {\n case 0: { \n ta.append( \"\\n Standard Earth Atmosphere\" );\n break;\n }\n case 1: { \n ta.append( \"\\n Martian Atmosphere\" );\n break;\n }\n case 2: { \n ta.append( \"\\n Water\" );\n break;\n }\n case 3: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n case 4: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n }\n\n // ta.append( \"\\n Altitude = \" + filter0(alt_val) );\n // if (lunits == IMPERIAL) ta.append( \" ft ,\" );\n // else /*METRIC*/ ta.append( \" m ,\" );\n \n switch (lunits) {\n case 0: { /* English */\n ta.append( \"\\n Density = \" + filter5(rho_EN) );\n ta.append( \"slug/cu ft\" );\n ta.append( \"\\n Pressure = \" + filter3(ps0/144.) );\n ta.append( \"lb/sq in,\" );\n ta.append( \" Temperature = \" + filter0(ts0 - 460.) );\n ta.append( \"F,\" );\n break;\n }\n case 1: { /* Metric */\n ta.append( \" Density = \" + filter3(rho_EN*515.4) );\n ta.append( \"kg/cu m\" );\n ta.append( \"\\n Pressure = \" + filter3(101.3/14.7*ps0/144.) );\n ta.append( \"kPa,\" );\n ta.append( \" Temperature = \" + filter0(ts0*5.0/9.0 - 273.1) );\n ta.append( \"C,\" );\n break;\n }\n }\n\n ta.append( \"\\n Speed = \" + filter1(velocity * (lunits==IMPERIAL? 0.868976 : 0.539957 )) + \"Kts, or\" );\n ta.append( \" \" + filter1(velocity) );\n if (lunits == IMPERIAL) ta.append( \" mph ,\" );\n else /*METRIC*/ ta.append( \" km/hr ,\" );\n\n // if (out_aux_idx == 1)\n // ta.append( \"\\n Lift Coefficient = \" + filter3(current_part.cl) );\n // if (out_aux_idx == 0) {\n // if (Math.abs(lift) <= 10.0) ta.append( \"\\n Lift = \" + filter3(lift) );\n // if (Math.abs(lift) > 10.0) ta.append( \"\\n Lift = \" + filter0(lift) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n // if ( polarOut == 1)\n // ta.append( \"\\n Drag Coefficient = \" + filter3(current_part.cd) );\n // if (out_aux_idx == 0) {\n // ta.append( \"\\n Drag = \" + filter0(drag) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n\n ta.append( \"\\n Lift = \" + dash.outTotalLift.getText());\n ta.append( \"\\n Drag = \" + dash.outTotalDrag.getText());\n\n if (min_takeoff_speed_info != null) \n ta.append( \"\\n\\n\" + min_takeoff_speed_info);\n\n if (cruising_info != null) \n ta.append( \"\\n\\n\" + cruising_info);\n\n if (max_speed_info != null) \n ta.append( \"\\n\\n\" + max_speed_info);\n\n // ensure end ta.setCaretPosition(ta.getText().length());\n // ensure start\n ta.setCaretPosition(0);\n }", "@Override\r\n\tpublic String getGridText()\r\n\t{\r\n\t\t// TODO Auto-generated method stub\\\r\n\t\tString sheet = \"\";\r\n\t\tfor(int i = 0; i <= 20; i++) { //20 rows\r\n\t\t\tfor(char j = 'A'; j <= 'L';j++) { //A through L\r\n\t\t\t\tif(i == 0) { //Creates row headers\r\n\t\t\t\t\tif(j == 'A') { // Creates letter headers\r\n\t\t\t\t\t\tsheet += \" |\"; //pads for headers\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsheet += String.format(\"%-10c|\",j);\r\n\t\t\t\t} else{\r\n\t\t\t\t\tif(j == 'A') {\r\n\t\t\t\t\t\tsheet += String.format(\"%-3d|\", i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsheet += cells[i-1][j-'A'].abbreviatedCellText() + \"|\"; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//enters new row\r\n\t\t\tsheet += \"\\n\";\r\n\t\t}\r\n\t\t//prints sheet\r\n\t\treturn sheet;\r\n\t}", "@SuppressWarnings({ \"deprecation\", \"static-access\" })\n\tpublic void crearExcel(String nombreFichero,java.sql.Connection connection) throws SQLException {\n \tint contador=0;\n \t\n // Se crea el libro\n HSSFWorkbook libro = new HSSFWorkbook();\n\n // Se crea una hoja dentro del libro\n HSSFSheet hoja = libro.createSheet();\n\n // Se crea una fila dentro de la hoja\n HSSFRow fila = hoja.createRow(contador);\n\n // Se crea una celda dentro de la fila\n HSSFCell celda = fila.createCell((short) 0);\n // Se crea una celda dentro de la fila\n HSSFCell celda2 = fila.createCell((short) 1 );\n // Se crea una celda dentro de la fila\n HSSFCell celda3 = fila.createCell((short) 2 );\n // Se crea una celda dentro de la fila\n HSSFCell celda4 = fila.createCell((short) 3 );\n \n // Se crea el contenido de la celda y se mete en ella.\n HSSFRichTextString texto = new HSSFRichTextString(\"Área\");\n celda.setCellValue(texto);\n\n HSSFRichTextString texto2 = new HSSFRichTextString(\"Dimensión\");\n celda2.setCellValue(texto2);\n \n HSSFRichTextString texto3 = new HSSFRichTextString(\"Lema\");\n celda3.setCellValue(texto3);\n \n HSSFRichTextString texto4 = new HSSFRichTextString(\"Rasgos de Contenido\");\n celda4.setCellValue(texto4);\n \n ArrayList<idPalabra> misAreasAux=new ArrayList<idPalabra>();\n\t\t String areaAct=\"\";\n\t\t area misAreas=new area();\n\t\t misAreasAux=misAreas.devolverAreas(connection);\n\t\t Integer lemAct;\n\t\t \n //SE RECORREN TODAS LAS AREAS\n\t\t for(int i=0; i<misAreasAux.size();i++){\n\t\t\t\n\t\t\t //SE OBTIENE EL AREA ACTUAL\n\t\t\t areaAct=misAreasAux.get(i).getPalabra();\t\n\t\t\t ArrayList<idPalabra> misCategorias= new ArrayList<idPalabra>();\n\t\t\t categoria micategoria = new categoria();\n\t\t\t misCategorias=micategoria.consultarCategoriasConArea(areaAct, connection);\n\t\t\t //Si es 0 es que no hay categorias\n\t\t\t if(misCategorias.size()==0){\n\t\t\t\t contador=contador+1;\n\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\n\t\t\t } \n\t\t\t else{\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t//esto es que si tengo categorias\n\t\t\t\tfor(int j=0; j<misCategorias.size();j++){\n\t\t\t\t\t\n\t\t\t\t\t String catAct=misCategorias.get(j).getPalabra();\t\n\t\t\t\t\t//para cada categoria tengo que ver si tiene lemas\n\t\t\t\t\tArrayList<Integer> lemasAct=new ArrayList<Integer>();\n\t\t\t\t\tcategoriasLemas misLemas=new categoriasLemas();\n\t\t\t\t\tlemasAct=misLemas.consultarLemasdeunaCategoria(misCategorias.get(j).getId(),connection);\n\t\t\t\t\t//Si es 0 es que no tengo lemas asociados a dicha categoria\n\t\t\t\t\tif(lemasAct.size()==0){\n\t\t\t\t\t\t contador=contador+1;\n\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//SI TIENE VARIOS LEMAS ASOCIADOS\n\t\t\t\t\t\tfor(int x=0; x<lemasAct.size();x++){\n\t\t\t\t\t\t\tlema miLema =new lema();\n\t\t\t\t\t\t\t lemAct=lemasAct.get(x);\t\n\t\t\t\t\t\t\tlemaRasgo misLemaRasgo= new lemaRasgo();\n\t\t\t\t\t\t\tArrayList<Integer> rasgos=new ArrayList<Integer>();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\trasgos= misLemaRasgo.devolverRasgosDeLema(lemasAct.get(x),connection);\n\t\t\t\t\t\t\t//NO TIENE RASGOS\n\t\t\t\t\t\t\tif(rasgos.size()==0){\n\t\t\t\t\t\t\t\tcontador=contador+1;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//SI TIENE RASGOS\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tcontador++;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\tcelda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t int cont=3;\n\t\t\t\t\t\t\t\tfor(int k=0; k<rasgos.size();k++){\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trasgocontenido mirasgo =new rasgocontenido();\n\t\t\t\t\t\t\t\t\tcelda = fila.createCell((short) cont);\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(mirasgo.consultarRasgoPorId(rasgos.get(k),connection));\n\t\t\t\t\t\t\t\t\tcont++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t}//if rasgos\n\t\t\t\t\t\t}//if lemas\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}//if categorias\n\t\t\t\t\t\t\n\n \n\t\t\t }\n\t\t }\n \n // Se salva el libro.\n try {\n FileOutputStream elFichero = new FileOutputStream(nombreFichero);\n libro.write(elFichero);\n elFichero.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public HSSFWorkbook generateExcel(String inicio, String fin, String empleado, String cargo, String nomdep, Vector<String> dias) {\r\n\r\n // Initialize rowIndex\r\n rowIndex = 0;\r\n\r\n // New Workbook\r\n workbook = new HSSFWorkbook();\r\n\r\n // Generate fonts\r\n headerFont = createFont(HSSFColor.WHITE.index, (short) 12, true);\r\n headerFont1 = createFont(HSSFColor.WHITE.index, (short) 17, true);\r\n headerFont2 = createFont(HSSFColor.WHITE.index, (short) 12, true);\r\n contentFont = createFont(HSSFColor.BLACK.index, (short) 11, false);\r\n contentFont2 = createFont(HSSFColor.BLACK.index, (short) 11, false);\r\n\r\n // Generate styles\r\n headerStyle1 = createStyle(headerFont1, HSSFCellStyle.ALIGN_CENTER, HSSFColor.BLUE.index, false, HSSFColor.BLACK.index);\r\n headerStyle2 = createStyle(headerFont2, HSSFCellStyle.ALIGN_CENTER, HSSFColor.BLUE.index, false, HSSFColor.BLACK.index);\r\n contentStyle2 = createStyle(contentFont2, HSSFCellStyle.ALIGN_LEFT, HSSFColor.WHITE.index, false, HSSFColor.BLACK.index);\r\n headerStyle = createStyle(headerFont, HSSFCellStyle.ALIGN_CENTER, HSSFColor.LIGHT_BLUE.index, false, HSSFColor.DARK_BLUE.index);\r\n oddRowStyle = createStyle(contentFont, HSSFCellStyle.ALIGN_LEFT, HSSFColor.WHITE.index, false, HSSFColor.WHITE.index);\r\n evenRowStyle = createStyle(contentFont, HSSFCellStyle.ALIGN_LEFT, HSSFColor.LIGHT_TURQUOISE.index, false, HSSFColor.GREY_25_PERCENT.index);\r\n\r\n // New sheet\r\n HSSFSheet sheet = workbook.createSheet(\"PERCEPCIONES Y DEDUCCIONES\");\r\n HSSFRow headerRow1 = sheet.createRow(rowIndex++);\r\n \r\n HSSFCell headerCell1 = null;\r\n\r\n if (nomdep.contains(\"-SELECCIONE UNA OPCION-\")) {\r\n headerCell1 = headerRow1.createCell(0);\r\n headerCell1.setCellStyle(headerStyle1);\r\n headerCell1.setCellValue(\"PERCEPCIONES Y DEDUCCIONES \" + inicio + \"/\" + fin);\r\n } else {\r\n headerCell1 = headerRow1.createCell(0);\r\n headerCell1.setCellStyle(headerStyle1);\r\n headerCell1.setCellValue(\"PERCEPCIONES Y DEDUCCIONES \" + inicio + \"/\" + fin + \" \" + nomdep);\r\n }\r\n\r\n CellRangeAddress re = new CellRangeAddress(0, 0, 0, 3);\r\n sheet.addMergedRegion(re);\r\n\r\n \r\n\r\n // Table content\r\n HSSFRow contentRow = null;\r\n HSSFCell contentCell = null;\r\n\r\n // Obtain table content values\r\n List<List<String>> contentRowValues = PercepcionesReport.getContentnombres(nomdep, dias);\r\n for (List<String> rowValues : contentRowValues) {\r\n // Table header\r\n HSSFRow headerRow = sheet.createRow(rowIndex++);\r\n List<String> headerValues = PercepcionesReport.getHeadersnom();\r\n\r\n HSSFCell headerCell = null;\r\n for (int i = 0; i < headerValues.size(); i++) {\r\n headerCell = headerRow.createCell(i);\r\n headerCell.setCellStyle(headerStyle2);\r\n headerCell.setCellValue(headerValues.get(i));\r\n }\r\n // At each row creation, rowIndex must grow one unit\r\n contentRow = sheet.createRow(rowIndex++);\r\n for (int i = 0; i < rowValues.size(); i++) {\r\n contentCell = contentRow.createCell(i);\r\n contentCell.setCellValue(rowValues.get(i));\r\n // Style depends on if row is odd or even\r\n contentCell.setCellStyle(contentStyle2);\r\n }\r\n HSSFRow headerRow4 = sheet.createRow(rowIndex++);\r\n List<String> headerValues4 = PercepcionesReport.getHeaders();\r\n\r\n HSSFCell headerCell4 = null;\r\n for (int i = 0; i < headerValues4.size(); i++) {\r\n headerCell4 = headerRow4.createCell(i);\r\n headerCell4.setCellStyle(headerStyle);\r\n headerCell4.setCellValue(headerValues4.get(i));\r\n }\r\n // Autosize columns\r\n for (int i = 0; i < headerValues4.size(); sheet.autoSizeColumn(i++));\r\n \r\n String idemp=rowValues.get(0);\r\n for (int dia = 0; dia < dias.size(); dia++) {\r\n String fecha=dias.elementAt(dia);\r\n List<List<String>> contentRowValues2 = PercepcionesReport.getContent(idemp, fecha);\r\n for (List<String> rowValues2 : contentRowValues2) {\r\n // At each row creation, rowIndex must grow one unit\r\n contentRow = sheet.createRow(rowIndex++);\r\n for (int i = 0; i < rowValues2.size(); i++) {\r\n contentCell = contentRow.createCell(i);\r\n contentCell.setCellValue(rowValues2.get(i));\r\n // Style depends on if row is odd or even\r\n contentCell.setCellStyle(rowIndex % 2 == 0 ? oddRowStyle : evenRowStyle);\r\n }\r\n }\r\n }\r\n// Autosize columns\r\n for (int i = 0; i < headerValues.size(); sheet.autoSizeColumn(i++));\r\n }\r\n HSSFRow headerRow00 = sheet.createRow(rowIndex++);\r\n String datos = empleado + \" \" + cargo;\r\n String da[] = new String[5];\r\n da[1] = \"Realizado por\";\r\n da[2] = \"Fecha y Hora\";\r\n da[3] = datos;\r\n da[4] = fecha();\r\n\r\n HSSFCell headerCell00 = null;\r\n for (int i = 1; i < 3; i++) {\r\n headerCell00 = headerRow00.createCell(i);\r\n headerCell00.setCellStyle(headerStyle);\r\n headerCell00.setCellValue(da[i]);\r\n }\r\n HSSFRow headerRow000 = sheet.createRow(rowIndex++);\r\n HSSFCell headerCell000 = null;\r\n for (int i = 1; i < 3; i++) {\r\n\r\n headerCell000 = headerRow000.createCell(i);\r\n headerCell000.setCellStyle(oddRowStyle);\r\n headerCell000.setCellValue(da[i + 2]);\r\n }\r\n \r\n\r\n return workbook;\r\n }", "private void generateReports() {\r\n\t\tLOGGER.debug(\"Report generation trigerred\");\r\n\t\tgenerateIncomingReport();\r\n\t\tgenerateOutgoingReport();\r\n\t\tgenerateIncomingRankingReport();\r\n\t\tgenerateOutgoingRankingReport();\r\n\t\tLOGGER.debug(\"Report generation completed\");\r\n\t}", "@GetMapping(value = \"/xls\", produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<String> generateXLSReport() {\n LOGGER.info(\"Generating Fund XLS report.\");\n\n boolean success =false;\n if(configFilter().getJasperPrint() != null) {\n xlsExporter.setJasperPrint(configFilter().getJasperPrint());\n success = xlsExporter.exportToXlsx(\"fundReport.xlsx\", \"Fund Data\");\n }\n if (success) {\n return new ResponseEntity<>(\"XLS Report is successfully generated \", HttpStatus.OK);\n } else {\n return new ResponseEntity<>(\"XLS Report cannot be generated \", HttpStatus.OK);\n }\n }", "ISheet getSheet(int index);", "@AutoGenerated\r\n\tprivate TabSheet buildTabSheet_1() {\n\t\ttabSheet_1 = new TabSheet();\r\n\t\ttabSheet_1.setWidth(\"100.0%\");\r\n\t\ttabSheet_1.setHeight(\"100.0%\");\r\n\t\ttabSheet_1.setImmediate(true);\r\n\t\t\r\n\t\t// generalPanel\r\n\t\tgeneralPanel = buildGeneralPanel();\r\n\t\ttabSheet_1.addTab(generalPanel, \"General settings\", null);\r\n\t\t\r\n\t\t// videoPanel\r\n\t\tvideoPanel = buildVideoPanel();\r\n\t\ttabSheet_1.addTab(videoPanel, \"Video settings\", null);\r\n\t\t\r\n\t\t// audioPanel\r\n\t\taudioPanel = buildAudioPanel();\r\n\t\ttabSheet_1.addTab(audioPanel, \"Audio settings\", null);\r\n\t\t\r\n\t\treturn tabSheet_1;\r\n\t}", "public static Scene GenerateReport(Stage stage) // Samuel\n {\n \tstage.setTitle(\"Generate Report Page\");\n \t\n \tGridPane grid = new GridPane(); // Setup the grid background\n grid.setAlignment(Pos.TOP_LEFT);\n grid.setHgap(30);\n grid.setVgap(10);\n grid.setPadding(new Insets(25, 25, 25, 25));\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(25, 25, 25, 25));\n vbox.setSpacing(10);\n\n Text title = new Text(\"Generate Report by:\");\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 20));\n vbox.getChildren().add(title);\n \n Hyperlink option[] = new Hyperlink[] \n {\n new Hyperlink(\"Bugs Reported\"), // [User Story #75]\n new Hyperlink(\"Bugs Resolved\"), // [User Story #76]\n new Hyperlink(\"Performance Report\"), // [User Story #77]\n };\n\n // Increment the i < 4 accordingly with the number of Hyperlinks\n for (int i=0; i<3; i++) \n {\n VBox.setMargin(option[i], new Insets(0, 0, 0, 8));\n vbox.getChildren().add(option[i]);\n\n if (option[i].onMouseClickedProperty() != null && option[i].getText() == \"Bugs Reported\")\n {// [User Story #75]\n option[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {// Deploy Monthly Bugs Reported UI [Boundary Class]\n stage.setScene(MonthlyBugReportUI.create(stage));\n }\n });\n }\n else if (option[i].onMouseClickedProperty() != null && option[i].getText() == \"Bugs Resolved\")\n {// [User Story #76]\n option[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {// Deploy Weekly Bugs Resolved UI [Boundary Class]\n \tstage.setScene(WeeklyBugReportUI.create(stage));\n } \n });\n }\n else if (option[i].onMouseClickedProperty() != null && option[i].getText() == \"Performance Report\")\n {// [User Story #77]\n option[i].setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent t) \n {// Deploy Performance Report UI [Boundary Class]\n \tstage.setScene(PerformanceReportUI.create(stage));\n } \n });\n }\n }\n \n Button backBtn = new Button(\"Back\"); // Back Button\n backBtn.setOnAction(new EventHandler<ActionEvent>() \n {// Handles what actions happend when the button is clicked. \n @Override\n public void handle(ActionEvent event) \n {\n if(userRole == 1) {stage.setScene(ReporterPage(stage));}\n else if(userRole == 2) {stage.setScene(DeveloperPage(stage));}\n else if(userRole == 3) {stage.setScene(ReviewerPage(stage));}\n else if(userRole == 4) {stage.setScene(TriagerPage(stage));} \n }\n });\n \n grid.add(vbox, 0, 0);\n grid.add(backBtn, 0, 1);\n \n BackgroundFill background_fill = new BackgroundFill(Color.ALICEBLUE, CornerRadii.EMPTY, Insets.EMPTY);\n Background background = new Background(background_fill);\n grid.setBackground(background);\n\n Scene scene= new Scene(grid, 450, 400);\n return scene;\n }", "private void populateStationaryReport() {\n\t\tLRNumberRangeDTO[] stationaryReportDTO = null;\n\t\tint len = 0;\n\t\tint value = 0;\n\t\ttry {\n\t\t\ttblStationaryReport.removeAll();\n\t\t\tstationaryReportDTO = handler.getStationaryReport();\n\n\t\t\tif (stationaryReportDTO != null) {\n\t\t\t\tlen = stationaryReportDTO.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tTableItem item = new TableItem(tblStationaryReport,\n\t\t\t\t\t\t\tSWT.NONE);\n\n\t\t\t\t\titem.setText(0, String.valueOf(i + 1));\n\t\t\t\t\titem.setText(1, stationaryReportDTO[i].getStationCode());\n\t\t\t\t\tvalue = stationaryReportDTO[i].getTopay();\n\t\t\t\t\tif (value == 1) {\n\t\t\t\t\t\titem.setText(2, \"Assign\");\n\t\t\t\t\t\titem.setForeground(2, Display.getCurrent()\n\t\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t\t} else {\n\t\t\t\t\t\titem.setText(2, EMPTY_STRING);\n\t\t\t\t\t}\n\t\t\t\t\tvalue = stationaryReportDTO[i].getPaid();\n\t\t\t\t\tif (value == 1) {\n\t\t\t\t\t\titem.setText(3, \"Assign\");\n\t\t\t\t\t\titem.setForeground(3, Display.getCurrent()\n\t\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t\t} else {\n\t\t\t\t\t\titem.setText(3, EMPTY_STRING);\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = stationaryReportDTO[i].getBilling();\n\t\t\t\t\tif (value == 1) {\n\t\t\t\t\t\titem.setText(4, \"Assign\");\n\t\t\t\t\t\titem.setForeground(4, Display.getCurrent()\n\t\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t\t} else {\n\t\t\t\t\t\titem.setText(4, EMPTY_STRING);\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = stationaryReportDTO[i].getCr();\n\t\t\t\t\tif (value == 1) {\n\t\t\t\t\t\titem.setText(5, \"Assign\");\n\t\t\t\t\t\titem.setForeground(5, Display.getCurrent()\n\t\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t\t} else {\n\t\t\t\t\t\titem.setText(5, EMPTY_STRING);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\n\t}", "public static void writeDtaToSdf(PrintWriter writer, List<StructureDetailsTabDTO> structureDetailsTabDTOList, List<ReferenceTabDTO> referenceTabDTOList, List<AssayTabDTO> assayTabDTOList, List<ActivityTabDTO> activityTabDTOList) {\n\n try {\n Mail mail = new Mail();\n //molecule create\n Molecule molecule = new Molecule();\n\n MolExporter molExporter = null;\n\n StringBuffer stringBuffer = new StringBuffer();\n\n String s1 = \"\";\n\n for (StructureDetailsTabDTO structureTabDataReturn : structureDetailsTabDTOList) {\n chemaxon.util.MolHandler mol = new chemaxon.util.MolHandler(structureTabDataReturn.getSubSmiles());\n System.out.println(\"inside the for loop of the for the check the subsmiles\");\n mol.aromatize();\n molecule = mol.getMolecule();\n\n s1 = molExporter.exportToFormat(molecule, \"mol\");\n\n stringBuffer.append(s1);\n stringBuffer.append(\"> <\" + \"SUB_SMILES\" + \">\" + \"\\n\");\n stringBuffer.append(structureTabDataReturn.getSubSmiles() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"GVK_ID\" + \">\" + \"\\n\");\n stringBuffer.append(structureTabDataReturn.getGvkId() + \"\\n\\n\");\n\n for (ReferenceTabDTO referenceTabDTO : referenceTabDTOList) {\n stringBuffer.append(\"> <\" + \"journal_patent_name\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getJournalPatentName() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"year\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getYear() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"volume\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getVolume() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"issue\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getIssue() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"start_page\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getStartPage() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"end_page\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getEndPage() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"reference\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getReference() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"pubmed_id\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getPubmedId() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"issn_no\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getIssnNo() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"title\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getTitle() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"company_name\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getCompanyNames() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"company_address\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getCompanyAddresses() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"authors\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getAuthors() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"ref_type\" + \">\" + \"\\n\");\n stringBuffer.append(referenceTabDTO.getRefType() + \"\\n\\n\");\n System.out.println(\"test the of the reference tab data\" + stringBuffer.toString());\n\n }\n for (AssayTabDTO assayTabDTO : assayTabDTOList) {\n stringBuffer.append(\"> <\" + \"wild_type\" + \">\" + \"\\n\");\n stringBuffer.append(assayTabDTO.getWildType() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"mutant\" + \">\" + \"\\n\");\n stringBuffer.append(assayTabDTO.getMutant() + \"\\n\\n\");\n System.out.println(\"test the of the Assay tab data\" + stringBuffer.toString());\n\n }\n\n for (ActivityTabDTO activityTabDTO : activityTabDTOList) {\n stringBuffer.append(\"> <\" + \"common_name\" + \">\" + \"\\n\");\n stringBuffer.append(activityTabDTO.getCommonName() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"source\" + \">\" + \"\\n\");\n stringBuffer.append(activityTabDTO.getSource() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"std_activity_type\" + \">\" + \"\\n\");\n stringBuffer.append(activityTabDTO.getStdActivityType() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"standard_uom\" + \">\" + \"\\n\");\n stringBuffer.append(activityTabDTO.getStandardUom() + \"\\n\\n\");\n stringBuffer.append(\"> <\" + \"std_act_prefix\" + \">\" + \"\\n\");\n stringBuffer.append(activityTabDTO.getStdActPrefix() + \"\\n\\n\");\n System.out.println(\"test the of the Activity tab data\" + stringBuffer.toString());\n\n }\n stringBuffer.append(\"$$$$\\n\");\n\n }\n writer.write(stringBuffer.toString());\n mail.sendMail(emailList, emailListcc, \"test mail from gostardbNext For Download notification \", \"gostarNext is an online application , data export notification for completion will implements soon... Just an emial test\");\n System.out.println(\"Sucessfully Sent mail to All Users\");\n\n } catch (MolFormatException ex) {\n System.out.println(\"Exception occure while writing the conetnet into the sdf file\" + ex.getMessage());\n\n } catch (Exception e) {\n System.out.println(\"Exception occure while writing the conetnet into the sdf file\" + e.getMessage());\n }\n }", "public static void generateExcelFileByTemplate(String template, OutputStream os, String[][] data, int startRow, int startColumn) {\n\n InputStream in = ExcelUtil.class.getResourceAsStream(template);\n\n try {\n Workbook wb = new HSSFWorkbook(in);\n Sheet sheet = wb.getSheetAt(0);\n for (int i = startRow, rowCursor = 0; i < data.length; i++, rowCursor++) {\n Row row = sheet.createRow(i);\n for (int j = startColumn, colCursor = 0; j < data[i].length; j++, colCursor++) {\n Cell cell = row.createCell(j);\n cell.setCellValue(data[rowCursor][colCursor]);\n }\n }\n wb.write(os);\n wb.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "AreaResource panelArea();", "List<ChartBean> returnXYResearchPaperByDepartmentInstituteCenter();", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }", "@Override\n\tpublic String exportMyPaper(HttpServletRequest request, HttpServletResponse response) {\n\t\tString line = request.getParameter(\"line\");\n\t\tString zhuzhuangtu = request.getParameter(\"pie\");\n\t\tString bingtu = request.getParameter(\"bar\");\n\t\tString listpb= request.getParameter(\"ids\");\n\t\tString pos= request.getParameter(\"pos\");\n\t\tString neg= request.getParameter(\"neg\");\n\t\tString[] netinfo = listpb.split(\",\");\n\t\tString[] poslist = pos.split(\",\");\n\t\tString[] neglist = neg.split(\",\");\n\t\tString name = request.getParameter(\"name\");\n\t\tString[] url1 = line.split(\",\");\n\t\tString u1 = url1[1];\n\t\tSystem.out.println(u1 + \"u1\");\n\t\tString[] url2 = zhuzhuangtu.split(\",\");\n\t\tString u2 = url2[1];\n\t\tString[] url3 = bingtu.split(\",\");\n\t\tString u3 = url3[1];\n\t\tbyte[] b1 = null;\n\t\ttry {\n\t\t\tb1 = new BASE64Decoder().decodeBuffer(u1);\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n\t\tbyte[] b2 = null;\n\t\ttry {\n\t\t\tb2 = new BASE64Decoder().decodeBuffer(u2);\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n\t\tbyte[] b3 = null;\n\t\ttry {\n\t\t\tb3 = new BASE64Decoder().decodeBuffer(u3);\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e1.getMessage());\n\t\t\tLog.info(e1.getMessage());\n\t\t\tLog.error(e1.getMessage(),e1);\n\t\t}\n XWPFParagraph paragraph = null; \n XWPFTable table1 = null; \n User user = (User)request.getSession().getAttribute(\"user\");\n \n CustomXWPFDocument doc = new CustomXWPFDocument(); \n \n paragraph = doc.createParagraph();\n XWPFRun run = paragraph.createRun();\n if(name!=null&&!name.equals(\"\")){\n \t run.setText(name+\"的报纸\");\n }else{\n \t run.setText(\"我的报纸\");\n }\n run.setFontFamily(\"楷体\");\n \t\t run.setFontSize(20);\n \t\t run.setColor(\"FF0000\");\n paragraph.setAlignment(ParagraphAlignment.CENTER);\n //今日概况\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"今日概况:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n XWPFTable tab = doc.createTable(3, 11);\n setTableWidth(tab, \"8200\");\n\t\t//\ttab.setCellMargins(50, 45, 50, 450);// top, left, bottom, right\n\t\t\ttab.getRow(0).getCell(0).setText(\"媒体类型\");\n\t\t\ttab.getRow(0).getCell(1).setText(\"新闻\");\n\t\t\ttab.getRow(0).getCell(2).setText(\"论坛\");\n\t\t\ttab.getRow(0).getCell(3).setText(\"贴吧\");\n\t\t\ttab.getRow(0).getCell(4).setText(\"微博\");\n\t\t\ttab.getRow(0).getCell(5).setText(\"微信\");\n\t\t\ttab.getRow(0).getCell(6).setText(\"视频\");\n\t\t\ttab.getRow(0).getCell(7).setText(\"博客\");\n\t\t\ttab.getRow(0).getCell(8).setText(\"平媒\");\n\t\t\ttab.getRow(0).getCell(9).setText(\"APP\");\n\t\t\ttab.getRow(0).getCell(10).setText(\"其他\");\n\t\t\ttab.getRow(1).getCell(0).setText(\"正面\");\n\t\t\tfor(int i=0;i<poslist.length;i++){\n\t\t\t\t \n\t\t\t\t\t tab.getRow(1).getCell(i+1).setText(poslist[i]);\n\t\t\t\t \n\t\t\t\t\n\t\t\t}\n\t\t\t/*tab.getRow(0).getCell(0).setText(poslist[0]);\n\t\t\ttab.getRow(0).getCell(1).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(2).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(3).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(4).setText(\"字段二:\");\n\t\t\ttab.getRow(0).getCell(5).setText(\"字段二:\");*/\n\t\t\ttab.getRow(2).getCell(0).setText(\"负面\");\n\t\t\tfor(int i=0;i<neglist.length;i++){\n\t\t\t\t\n\t\t\t\ttab.getRow(2).getCell(i+1).setText(neglist[i]);\n\t\t\t}\n\t\t\t\n\t\t\t/*tab.getRow(1).getCell(1).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(2).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(3).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(4).setText(\"字段四:\");\n\t\t\ttab.getRow(1).getCell(5).setText(\"字段四:\");\n */\n \n \n //全网动态列表\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"全网动态:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n \t\t XWPFTable tableOne = doc.createTable(7,4);\n \t\t setTableWidth(tableOne, \"8200\");\n \t\t // tableOne.setCellMargins(50, 45, 50, 1000);\n \t\t XWPFTableRow tableOneRowOne = tableOne.getRow(0);\n \t\t \n \t\t tableOneRowOne.getCell(0).setText(\"文章标题\");\n \t\t \n \t\t tableOneRowOne.getCell(1).setText(\"文章来源\");\n \t\t tableOneRowOne.getCell(2).setText(\"发布时间\");\n \t\t tableOneRowOne.getCell(3).setText(\"是否关注\");\n \t\t \n for(int i=0;i<netinfo.length;i++){\n \t Personmanagemarticle pm = new Personmanagemarticle();\n \t pm = this.selectPersonMInfo(netinfo[i]);\n \t PersonmanagemarticleBo pb = new PersonmanagemarticleBo();\n \t if(pm!=null){\n \t\t BeanUtils.copyProperties(pm, pb);\n \t\t\t\t Date date = pm.getPubdate();\n \t\t\t\t SimpleDateFormat df=new SimpleDateFormat(\"yyyy-MM-dd\");\n \t\t\t\t String d = df.format(date);\n \t\t\t\t Date dat=new Date();\n \t\t\t\t String current = df.format(new Date());\n \t\t\t\t if(d.equals(current)){\n \t\t\t\t\t pb.setUpdatetime(DateFormatUtil.timeString(pm.getPubdate()));\n \t\t\t\t }else{\n \t\t\t\t\t pb.setUpdatetime(d);\n \t\t\t\t }\n \t\t\t\t String attention = \"\";\n \t if(pb!=null){\n \t \t if(pb.getAttention()){\n \t \t attention = \"取消关注\";\n \t }else{\n \t \t attention = \"关注\";\n \t }\n \t \t System.out.println(i);\n \t XWPFTableRow tableOneRow = tableOne.getRow(i+1);\n \t tableOne.getRow(i+1).getCell(0).setText(pb.getTitle());\n \t tableOne.getRow(i+1).getCell(1).setText(pb.getSource());\n \t tableOne.getRow(i+1).getCell(2).setText(pb.getUpdatetime());\n \ttableOne.getRow(i+1).getCell(3).setText(attention);\n \t }\n \t }\n \t\t\t \n }\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"趋势分析:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n //\n paragraph = doc.createParagraph(); \n try {\n\t\t\tdoc.addPictureData(b3,XWPFDocument.PICTURE_TYPE_PNG);\n\t\t } catch (InvalidFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t }\n doc.createPicture(paragraph,doc.getAllPictures().size()-1, 650,230,\"\");\n //table表格\n \n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"媒体top:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n \t\t \n \t paragraph = doc.createParagraph();\n paragraph = doc.createParagraph();\n try {\n\t\t\t doc.addPictureData(b2,XWPFDocument.PICTURE_TYPE_PNG);\n\t\t } catch (InvalidFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(e.getMessage());\n\t\t\tLog.info(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t }\n doc.createPicture(paragraph,doc.getAllPictures().size()-1, 650,300,\"\");\n paragraph = doc.createParagraph();\n run = paragraph.createRun();\n run.setText(\"媒体分布:\");\n run.setFontFamily(\"黑体\");\n \t\t run.setFontSize(14);\n paragraph = doc.createParagraph();\n try {\n\t\t\tdoc.addPictureData(b1,XWPFDocument.PICTURE_TYPE_PNG);\n\t\t } catch (InvalidFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t\tSystem.out.println(e.getMessage());\n\t\t }\n doc.createPicture(paragraph,doc.getAllPictures().size()-1, 650,300,\"\");\n String filename1 = new SimpleDateFormat(\"yyyyMMddhhmmss\").format(new Date()) + \".docx\";\n \t\t String url = request.getContextPath() + \"/upload/\";\n \t\t System.out.println(url);\n \t\t String path = request.getSession().getServletContext().getRealPath(\"/upload\");\n \t\t File targetFile = new File(path, filename1);\n \t\t if (!targetFile.getParentFile().exists()) {\n \t\t\ttargetFile.getParentFile().mkdirs();\n \t\t }\n \t\t if (!targetFile.exists()) {\n \t\t\ttry {\n\t\t\t\ttargetFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\tLog.error(e.getMessage(),e);\n\t\t\t}\n \t\t }\n \t\t String filename = path + \"/\" + filename1;\n \t\t OutputStream os = null;\n\t\ttry {\n\t\t\tos = new FileOutputStream(filename);\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\t//System.out.println(e.getMessage());\n\t\t\tLog.info(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t} \n\t\ttry {\n\t\t\tdoc.write(os);\n\t\t\tif(null!=os){\n\t\t\t\tos.flush();\n\t\t os.close();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//System.out.println(e.getMessage());\n\t\t\tLog.info(e.getMessage());\n\t\t\tLog.error(e.getMessage(),e);\n\t\t}\n \t\t System.out.println(filename);\n String addurl = \"upload/\" + filename1;\n\t\treturn addurl;\n\t}", "@Override\n\tprotected void buildExcelDocument(Map<String, Object> model,\n\t\t\tHSSFWorkbook workbook, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tDate date = new Date();\n\t\tString filename = Tools.date2Str(date, \"yyyyMMddHHmmss\");\n\t\tHSSFSheet sheet;\n\t\tHSSFCell cell;\n\t\tresponse.setContentType(\"application/octet-stream\");\n\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\"+filename+\".xls\");\n\t\tsheet = workbook.createSheet(\"sheet1\");\n\t\t\n\t\t//第一行表头\n\t\tPageData pdHead = (PageData) model.get(\"pdHead\");\n\t\t//第二行标题\n\t\tList<String> titles = (List<String>) model.get(\"titles\");\n\t\tint row = 0;\n\t\t\n\t\tif(StringUtil.isNotEmpty(pdHead)) {\n\t\t\tHSSFCellStyle headerStyle = workbook.createCellStyle(); //标题样式\n\t\t\theaderStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\t\theaderStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\n\t\t\tHSSFFont headerFont = workbook.createFont();\t//标题字体\n\t\t\theaderFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t\t\theaderFont.setFontHeightInPoints((short)11);\n\t\t\theaderStyle.setFont(headerFont);\n\t\t\t\n\t\t\tCellRangeAddress region = new CellRangeAddress(row, row, (short) 0, (short) titles.size()); \n\t\t\t\n\t\t\tString title = pdHead.getString(\"name\");\n\t\t\tcell = getCell(sheet, row, 0);\n\t\t\tcell.setCellStyle(headerStyle);\n\t\t\tsetText(cell,title);\n\t\t\tshort height=25*18*2;\n\t\t\tsheet.getRow(row).setHeight(height);\n\t\t\tsheet.addMergedRegion(region);\n\t\t\t\n\t\t\trow = 1;\n\t\t}\n\t\t\n\t\t\n\t\tint len = titles.size();\n\t\tHSSFCellStyle headerStyle = workbook.createCellStyle(); //标题样式\n\t\theaderStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\theaderStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\n\t\tHSSFFont headerFont = workbook.createFont();\t//标题字体\n\t\theaderFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t\theaderFont.setFontHeightInPoints((short)11);\n\t\theaderStyle.setFont(headerFont);\n\t\tshort width = 20,height=25*20;\n\t\tsheet.setDefaultColumnWidth(width);\n\t\tfor(int i=0; i<len; i++){ //设置标题\n\t\t\tString title = titles.get(i);\n\t\t\tcell = getCell(sheet, row, i);\n\t\t\tcell.setCellStyle(headerStyle);\n\t\t\tsetText(cell,title);\n\t\t}\n\t\t\n\t\tsheet.getRow(row).setHeight(height);\n\t\t\n\t\tHSSFCellStyle contentStyle = workbook.createCellStyle(); //内容样式\n\t\tcontentStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\tList<PageData> varList = (List<PageData>) model.get(\"varList\");\n\t\tint varCount = varList.size();\n\t\tfor(int i=0; i<varCount; i++){\n\t\t\trow++;\n\t\t\tPageData vpd = varList.get(i);\n\t\t\tfor(int j=0;j<len;j++){\n\t\t\t\tString varstr = vpd.get(\"var\"+(j+1)).toString() != null ? vpd.get(\"var\"+(j+1)).toString() : \"\";\n\n\n\t\t\t\tcell = getCell(sheet, row, j);\n\t\t\t\tcell.setCellStyle(contentStyle);\n\t\t\t\tsetText(cell,varstr);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void addNotDefinedCells()\r\n {\r\n if (getCrosstabElement() == null) return;\r\n\r\n // First of all we have to calc what cells we have and in what position they are...\r\n int cellGridWidth = getCrosstabElement().getColumnGroups().size();\r\n int cellGridHeight = getCrosstabElement().getRowGroups().size();\r\n\r\n // We assume that cell D/D (detail/detail) is defined.\r\n // Cell x,y is the cell with totalColumnGroup = colums(x) and totalRowGroup the rows(y)\r\n\r\n for (int y = cellGridHeight; y >= 0; --y)\r\n {\r\n\r\n\r\n for (int x = cellGridWidth; x >= 0; --x)\r\n {\r\n\r\n String totalRowGroupName = \"\";\r\n if (y < cellGridHeight) totalRowGroupName = ((CrosstabGroup)getCrosstabElement().getRowGroups().get(y)).getName();\r\n\r\n String totalColumnGroupName = \"\";\r\n if (x < cellGridWidth) totalColumnGroupName = ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(x)).getName();\r\n\r\n CrosstabCell cell = findCell( totalRowGroupName,\r\n totalColumnGroupName);\r\n\r\n if (cell == null)\r\n {\r\n // we have to find a cell on the same row that matchs the width to inherit by...\r\n int cellHeight = getRowHeight( totalRowGroupName );\r\n int cellWidth = getColumnWidth( totalColumnGroupName );\r\n\r\n\r\n // look for a good row cell with the same width on the same row...\r\n CrosstabCell templateCell = null;\r\n for (int k=x+1; k < cellGridWidth; ++k)\r\n {\r\n templateCell = findCell( totalRowGroupName,\r\n ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(k)).getName());\r\n if (templateCell == null)\r\n {\r\n continue;\r\n }\r\n\r\n if (templateCell.getWidth() == cellWidth)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( totalRowGroupName, \"\");\r\n if (templateCell != null && templateCell.getWidth() != cellWidth) templateCell = null;\r\n }\r\n\r\n if (templateCell == null) // Look on the same column...\r\n {\r\n for (int k=y+1; k < cellGridHeight; ++k)\r\n {\r\n templateCell = findCell( ((CrosstabGroup)getCrosstabElement().getRowGroups().get(k)).getName(),\r\n totalColumnGroupName);\r\n\r\n if (templateCell.getHeight() == cellHeight)\r\n {\r\n // FOUND IT!\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( \"\", totalColumnGroupName);\r\n if (templateCell != null && templateCell.getHeight() != cellHeight) templateCell = null;\r\n }\r\n }\r\n\r\n if (templateCell == null)\r\n {\r\n // Default not found!!!! Our cell will be void!\r\n cell = new CrosstabCell();\r\n cell.setParent( this.getCrosstabElement());\r\n cell.setWidth(cellWidth);\r\n cell.setHeight(cellHeight);\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n }\r\n else\r\n {\r\n cell = templateCell.cloneMe();\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n cell.setParent( this.getCrosstabElement());\r\n\r\n // Duplicate all elements of this cell, and reassign parent cell...\r\n int currentElements = getCrosstabElement().getElements().size();\r\n for (int i=0; i<currentElements; ++i)\r\n {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n // WARNING this copy does not support container and group elements!!!\r\n if (re.getCell() == templateCell)\r\n {\r\n re = re.cloneMe();\r\n cell.setColumnTotalGroup(totalColumnGroupName );\r\n cell.setRowTotalGroup(totalRowGroupName );\r\n re.setCell( cell );\r\n getCrosstabElement().getElements().add(re);\r\n }\r\n }\r\n }\r\n\r\n getCrosstabElement().getCells().add( cell );\r\n }\r\n }\r\n }\r\n\r\n }", "int getSheetCount();", "public interface ExcelExport {\n\n //void buildSheet(XSSFWorkbook xssfWorkbook, String sheetName, String headerTitle, Map<String, String> commonExcelData, List<Map<String, String>> data);\n\n /**\n * 构建xlsx\n *\n * @param xssfWorkbook\n * @param config\n * @param result 数据\n */\n void buildXlsx(XSSFWorkbook xssfWorkbook, XlsxConfig config, JSONObject result);\n\n XlsxConfig getXlsxConfig(String path) throws IOException;\n}", "public static ByteArrayInputStream toexcelAFReport(List<USAFReportEntity> afreportlist) {\r\n\r\n\t\ttry (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {\r\n\t\t\tSheet sheet = workbook.createSheet(CommonConstants.SHEET);\r\n\r\n\t\t\t// Header\r\n\t\t\tRow headerRow = sheet.createRow(0);\r\n\r\n\t\t\tfor (int col = 0; col < CommonConstants.AF_REPORT_HEADER.length; col++) {\r\n\t\t\t\tCell cell = headerRow.createCell(col);\r\n\t\t\t\tcell.setCellValue(CommonConstants.AF_REPORT_HEADER[col]);\r\n\t\t\t}\r\n\r\n\t\t\tint rowIdx = 1;\r\n\t\t\tlogger.info(afreportlist);\r\n\t\t\tfor (USAFReportEntity excel : afreportlist) {\r\n\t\t\t\tRow row = sheet.createRow(rowIdx++);\r\n\t\t\t\tlogger.info(excel.getAppCompletedDate());\r\n\r\n\t\t\t\tif (excel.getRefId() != null)\r\n\t\t\t\t\trow.createCell(0).setCellValue(excel.getRefId());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(0).setCellValue(\" \");\r\n\t\t\t\tif (excel.getMiddlename() != null)\r\n\t\t\t\t\trow.createCell(1).setCellValue(\r\n\t\t\t\t\t\t\texcel.getFirstname() + \" \" + excel.getMiddlename() + \" \" + excel.getLastname());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(1).setCellValue(excel.getFirstname() + \" \" + excel.getLastname());\r\n\t\t\t\tif (excel.getEmailid() != null)\r\n\t\t\t\t\trow.createCell(2).setCellValue(excel.getEmailid());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(2).setCellValue(\" \");\r\n\t\t\t\tif (excel.getContactno() != null)\r\n\t\t\t\t\trow.createCell(3).setCellValue(excel.getContactno());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(3).setCellValue(\" \");\r\n\t\t\t\tif (excel.getApartmentUnit() != null && excel.getStreetAddress() != null && excel.getState() != null\r\n\t\t\t\t\t\t&& excel.getZipCode() != null)\r\n\t\t\t\t\trow.createCell(4).setCellValue(excel.getApartmentUnit() + \", \" + excel.getStreetAddress() + \", \"\r\n\t\t\t\t\t\t\t+ excel.getState() + \" - \" + excel.getZipCode());\r\n\t\t\t\telse if (excel.getApartmentUnit() != null && excel.getStreetAddress() != null\r\n\t\t\t\t\t\t&& excel.getState() != null)\r\n\t\t\t\t\trow.createCell(4).setCellValue(\r\n\t\t\t\t\t\t\texcel.getApartmentUnit() + \", \" + excel.getStreetAddress() + \", \" + excel.getState());\r\n\t\t\t\telse if (excel.getApartmentUnit() != null && excel.getStreetAddress() != null)\r\n\t\t\t\t\trow.createCell(4).setCellValue(excel.getApartmentUnit() + \", \" + excel.getStreetAddress());\r\n\t\t\t\telse if (excel.getApartmentUnit() != null)\r\n\t\t\t\t\trow.createCell(4).setCellValue(excel.getApartmentUnit());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(4).setCellValue(\" \");\r\n\t\t\t\tif (excel.getOfferEmpExtDemWorkUS() != null)\r\n\t\t\t\t\trow.createCell(5).setCellValue(excel.getOfferEmpExtDemWorkUS());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(5).setCellValue(\" \");\r\n\t\t\t\tif (excel.getReqSponsorship() != null)\r\n\t\t\t\t\trow.createCell(6).setCellValue(excel.getReqSponsorship());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(6).setCellValue(\" \");\r\n\t\t\t\tif (excel.getAppflagapp() == true)\r\n\t\t\t\t\trow.createCell(7).setCellValue(\"Completed\");\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(7).setCellValue(\"Not Completed\");\r\n\t\t\t\tif (excel.getResumeStatus() != null)\r\n\t\t\t\t\trow.createCell(8).setCellValue(excel.getResumeStatus());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(8).setCellValue(\" \");\r\n\t\t\t\tif (excel.getTechProf() != null)\r\n\t\t\t\t\trow.createCell(9).setCellValue(excel.getTechProf());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(9).setCellValue(\" \");\r\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\r\n\t\t\t\tString strRegDate = dateFormat.format(excel.getRegCompletedDate());\r\n\t\t\t\tif (strRegDate != null)\r\n\t\t\t\t\trow.createCell(10).setCellValue(strRegDate);\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(10).setCellValue(\" \");\r\n\t\t\t\tif (excel.getAppCompletedDate() != null) {\r\n\t\t\t\t\tString strAppDate = dateFormat.format(excel.getAppCompletedDate());\r\n\t\t\t\t\trow.createCell(11).setCellValue(strAppDate);\r\n\t\t\t\t} else\r\n\t\t\t\t\trow.createCell(11).setCellValue(\" \");\r\n\t\t\t\tif (excel.getCurrentWorkLocation() != null)\r\n\t\t\t\t\trow.createCell(12).setCellValue(excel.getCurrentWorkLocation());\r\n\t\t\t\telse\r\n\t\t\t\t\trow.createCell(12).setCellValue(\" \");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tworkbook.write(out);\r\n\t\t\treturn new ByteArrayInputStream(out.toByteArray());\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());\r\n\t\t}\r\n\t}", "boolean generateReport();", "void generateMgiCrisprAlleleReport();", "public void toExcelFromRequest(HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n \n String tituloReporte = request.getParameter(\"tituloReporte\");\n String tipoReporte = request.getParameter(\"tipoReporte\");\n String nombreReporte = request.getParameter(\"nombreReporte\");\n String nombreRuta = request.getParameter(\"nombreRuta\");\n String idRuta = request.getParameter(\"idRuta\");\n String fechaInicio = request.getParameter(\"fechaInicio\");\n String fechaFinal = request.getParameter(\"fechaFinal\");\n String meta = request.getParameter(\"meta\");\n String metaReal = request.getParameter(\"metaReal\");\n String listaVehPlaca = request.getParameter(\"listaVehiculosPlaca\");\n \n ParametrosReporte pr = new ParametrosReporte();\n \n if (pr != null) {\n pr.setTituloReporte(tituloReporte);\n pr.setTipoReporte(Restriction.getNumber(tipoReporte));\n pr.setNombreReporte(nombreReporte);\n pr.setNombreRuta(nombreRuta);\n pr.setIdRuta(Restriction.getNumber(idRuta));\n pr.setFechaInicioStr(fechaInicio);\n pr.setFechaFinalStr(fechaFinal);\n pr.setMeta(Restriction.getNumber(meta));\n pr.setMeta_real(Restriction.getRealNumber(metaReal));\n pr.setListaVehiculosPlaca(listaVehPlaca);\n \n PrintOutExcel poe = new PrintOutExcel();\n poe.print(request, response, pr);\n }\n \n /*\n HttpSession session = request.getSession();\n ParametrosReporte pr = (ParametrosReporte) session.getAttribute(\"parametrosReporte\");\n \n if (pr != null) {\n \n // Reporte editable XLS \n ReporteUtilExcel rue = new ReporteUtilExcel(); \n pr.setTipoReporte(Restriction.getNumber(tipoReporte));\n pr.setNombreReporte(nombreReporte);\n \n MakeExcel rpte = rue.crearReporte(pr.getTipoReporte(), false, pr); \n String nombreArchivo = pr.getNombreReporte() + \".xls\"; \n\n //response.setContentType(\"application/vnd.ms-excel\");\n response.setContentType(\"application/ms-excel\"); \n response.setHeader(\"Content-Disposition\", \"attachment; filename=\"+nombreArchivo);\n\n HSSFWorkbook file = rpte.getExcelFile();\n file.write(response.getOutputStream()); \n response.flushBuffer();\n response.getOutputStream().close(); \n }\n */\n }", "private void getExcelData21ZV() throws Exception {\n\t\tlistHeader = new ArrayList<ExcelPromotionHeader>();\n\t\tlistDetail = new ArrayList<ExcelPromotionDetail>();\n\t\tlistUnit = new ArrayList<ExcelPromotionUnit>();\n\t\tmapHeader = new HashMap<String, ExcelPromotionHeader>();\n\t\tmapUnit = new HashMap<String, ExcelPromotionUnit>();\n\t\tmapErrorPromotion = new HashMap<String, String>();\n\t\tmapType = new HashMap<String, String>();\n\t\tmapPromotionMua = new HashMap<String, ListGroupMua>();\n\t\tmapPromotionKM = new HashMap<String, ListGroupKM>();\n\t\tmapMuaKM = new MapMuaKM();\n\t\tmapPromotionTypeCheck = new HashMap<String, String>();\n\t\tlstHeaderError = new ArrayList<CellBean>();\n\t\tlstDetailError = new ArrayList<CellBean>();\n\t\tlistUnitError = new ArrayList<CellBean>();\n\t\tMap<String, Integer> mapCheckHeaderDuplicate = new HashMap<String, Integer>();\n\t\tMap<String, String> mapCheckType = apParamMgr.getMapPromotionType();\n\t\tWorkbook myWorkBook = null;\n\t\tInputStream is = new FileInputStream(excelFile);\n\t\tint MAX_ARRAY = 10000;\n\t\tfinal int NUM_SHEETS = 2;\n\n\t\tif (!is.markSupported()) {\n\t\t\tis = new PushbackInputStream(is, 8);\n\t\t}\n\t\tif (POIFSFileSystem.hasPOIFSHeader(is)) {\n\t\t\tmyWorkBook = new HSSFWorkbook(is);\n\t\t} else if (POIXMLDocument.hasOOXMLHeader(is)) {\n\t\t\tmyWorkBook = new XSSFWorkbook(OPCPackage.open(is));\n\t\t}\n\t\tif (myWorkBook != null) {\n\t\t\tif (myWorkBook.getNumberOfSheets() < NUM_SHEETS) {\n\t\t\t\tthrow new Exception(ERR_NUM_SHEET);\n\t\t\t}\n\t\t\tSheet headerSheet = myWorkBook.getSheetAt(0);\n\t\t\tSheet detailSheet = myWorkBook.getSheetAt(1);\n\t\t\tSheet unitSheet = myWorkBook.getSheetAt(2);\n\t\t\tint iRun = 0;\n\t\t\ttotalItem = 0;\n\t\t\tint maxSizeSheet1 = 12;\n\t\t\tif (headerSheet != null) {\n\t\t\t\tIterator<?> rowIter = headerSheet.rowIterator();\n\t\t\t\twhile (rowIter.hasNext()) {\n\t\t\t\t\tRow myRow = (Row) rowIter.next();\n\t\t\t\t\tif (iRun == 0) {\n\t\t\t\t\t\tiRun++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean isContinue = true;\n\t\t\t\t\t//Kiem tra su hop le cua Row Import\n\t\t\t\t\tfor (int i = 0; i < maxSizeSheet1; i++) {\n\t\t\t\t\t\tif (myRow.getCell(i) != null && !StringUtil.isNullOrEmpty(getCellValueToString(myRow.getCell(i)))) {\n\t\t\t\t\t\t\tisContinue = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isContinue) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExcelPromotionHeader header = new ExcelPromotionHeader();\n\t\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\tString messageError = \"\";\n\t\t\t\t\ttotalItem++;\n\t\t\t\t\t//0\tget promotionCode\n\t\t\t\t\tString promotionCode = \"\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionCode = myRow.getCell(0);\n\t\t\t\t\t\tif (cellPromotionCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = cellPromotionCode.getStringCellValue();\n\t\t\t\t\t\t\t//\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = String.valueOf(cellPromotionCode.getNumericCellValue());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCode = getCellValueToString(cellPromotionCode);\n\t\t\t\t\t\t\tpromotionCode = promotionCode != null ? promotionCode.toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\theader.promotionCode = promotionCode;\n\t\t\t\t\t\t\terrRow.setContent1(promotionCode);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promotionCode)) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã CTKM\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmessageError += ValidateUtil.validateField(promotionCode, \"catalog.promotion.import.column.progcode\", 50, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_MAX_LENGTH, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_CODE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (mapCheckHeaderDuplicate.get(promotionCode) != null) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.product.import.duplicate\", mapCheckHeaderDuplicate.get(promotionCode));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmapCheckHeaderDuplicate.put(promotionCode, myRow.getRowNum());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tPromotionProgram existPromotion = promotionProgramMgr.getPromotionProgramByCode(promotionCode);\n\t\t\t\t\t\t\tif (existPromotion != null && !ActiveType.WAITING.equals(existPromotion.getStatus())) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.program.exists\");\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.get.promotion.error\", promotionCode);\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t//\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"ProgCode\");\n\t\t\t\t\t}\n\t\t\t\t\t//1\tget description\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellDescription = myRow.getCell(1);\n\t\t\t\t\t\tif (cellDescription != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString description = getCellValueToString(cellDescription);\n\t\t\t\t\t\t\theader.description = description;\n\t\t\t\t\t\t\terrRow.setContent2(description);\n\t\t\t\t\t\t\tmessageError += ValidateUtil.validateField(description, \"catalog.promotion.import.column.progpescr\", 100, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_MAX_LENGTH, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_NAME);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"ProgDescr\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//2\tget release\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (myRow.getCell(2) != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\terrRow.setContent3(getCellValueToString(myRow.getCell(2)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Release\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//3\tget promotion type\n\t\t\t\t\tString type = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionType = myRow.getCell(3);\n\t\t\t\t\t\tif (cellPromotionType != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\ttype = getCellValueToString(cellPromotionType);\n\t\t\t\t\t\t\ttype = type != null ? type.toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\theader.type = type;\n\t\t\t\t\t\t\terrRow.setContent4(type);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(type)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.type\"));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (mapCheckType.get(type) == null) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.exists.before\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.type\"));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmapType.put(header.promotionCode, type);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"ConditionTypeCode\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//4 get format\n\t\t\t\t\t//try {\n\t\t\t\t\t//\tCell cellFormat = myRow.getCell(4);\n\t\t\t\t\t//\tif (cellFormat != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t//\t\tString format = cellFormat.getStringCellValue();\n\t\t\t\t\t//\t\theader.format = format;\n\t\t\t\t\t//\t\terrRow.setContent5(format);\n\t\t\t\t\t//\t}\n\t\t\t\t\t//} catch (Exception e) {\n\t\t\t\t\t//\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"User1\");\n\t\t\t\t\t//}\n\t\t\t\t\t//4 get fromDate\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellFromDate = myRow.getCell(4);\n\t\t\t\t\t\tif (cellFromDate != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif (cellFromDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDate.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellFromDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellFromDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __fromDate = DateUtil.toDateString(cellFromDate.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\tDate fromDate = DateUtil.toDate(__fromDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\theader.fromDate = fromDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (cellFromDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDate.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellFromDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellFromDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __fromDate = DateUtil.toDateString(cellFromDate.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\tDate fromDate = DateUtil.toDate(__fromDate, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\theader.fromDate = fromDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\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\tif (!StringUtil.isNullOrEmpty(cellFromDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tString __fromDate = cellFromDate.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(__fromDate)) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tDate fromDate = DateUtil.toDate(__fromDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\theader.fromDate = fromDate;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\terrRow.setContent5(cellFromDate.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.required\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\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} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"FromDate\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//5 get toDate\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellToDate = myRow.getCell(5);\n\t\t\t\t\t\tif (cellToDate != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif (cellToDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDate.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellToDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellToDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __toDate = DateUtil.toDateString(cellToDate.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(__toDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\theader.toDate = toDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (cellToDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDate.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellToDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellToDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __toDate = DateUtil.toDateString(cellToDate.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(__toDate, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\theader.toDate = toDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellToDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tString __toDate = cellToDate.getStringCellValue();\n\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(__toDate)) {\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(__toDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.toDate = toDate;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\terrRow.setContent6(cellToDate.getStringCellValue());\n\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\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\tif (header.fromDate != null && header.toDate != null) {\n\t\t\t\t\t\t\tif (DateUtil.compareDateWithoutTime(header.fromDate, header.toDate) > 0) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.greater.todate\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"ToDate\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\n\t\t\t\t\t//6 Số thông báo CTKM\n\t\t\t\t\t/*\n\t\t\t\t\t * String description =\n\t\t\t\t\t * getCellValueToString(cellDescription); header.description\n\t\t\t\t\t * = description; errRow.setContent2(description);\n\t\t\t\t\t * messageError += ValidateUtil.validateField(description,\n\t\t\t\t\t * \"catalog.promotion.import.column.progpescr\", 100,\n\t\t\t\t\t * ConstantManager.ERR_REQUIRE,\n\t\t\t\t\t * ConstantManager.ERR_MAX_LENGTH,\n\t\t\t\t\t * ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_NAME);\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t/*errMsg = ValidateUtil.validateField(promotionName, \"catalog.promotion.name\", 500, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL, ConstantManager.ERR_MAX_LENGTH);\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(errMsg)) {\n\t\t\t\t\t\terrMsg = ValidateUtil.validateField(description, \"common.description\", null, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t// 6 Số thông báo\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellNoticeCode = myRow.getCell(6);\n\t\t\t\t\t\tif (cellNoticeCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString noticeCode = getCellValueToString(cellNoticeCode);\n\t\t\t\t\t\t\tif(noticeCode != null){\n\t\t\t\t\t\t\t\tnoticeCode = noticeCode.trim();\n\t\t\t\t\t\t\t\tnoticeCode = noticeCode.toUpperCase();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmessageError = ValidateUtil.validateField(noticeCode, \"catalog.promotion.noticecode\", 100, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t\t\t/*if(noticeCode.length() > 100){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.notice.code.over.length\")+\"\\n\";\n\t\t\t\t\t\t\t}else*/ \n\t\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(noticeCode)) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.notice.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t}else if(noticeCode != null && noticeCode.trim().length() > 100){\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"catalog.promotion.import.notice.code.incorrect.format\");\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"100\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số thông báo\");\n\t\t\t\t\t\t\t}else if(StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\theader.noticeCode = noticeCode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent7(noticeCode);\n\t\t\t\t\t\t}else if (cellNoticeCode == null) {\n\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.notice.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t} \n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.string\", iRun, \"NoticeCode\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 7 Nhóm/Tên SP hàng bán\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellDesProduct = myRow.getCell(7);\n\t\t\t\t\t\tif (cellDesProduct != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString descProduct = getCellValueToString(cellDesProduct);\n\t\t\t\t\t\t\tif(descProduct != null){\n\t\t\t\t\t\t\t\tdescProduct = descProduct.trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//descProduct = descProduct.trim();\n\t\t\t\t\t\t\tmessageError = ValidateUtil.validateField(descProduct, \"catalog.promotion.descriptionproduct\", 1000, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t\t\t/*if(descProduct.length() > 1000){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.desc.product.over.length\")+\"\\n\";\n\t\t\t\t\t\t\t}else*/ \n\t\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(descProduct)) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.description.product.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t}else if(descProduct.trim().length() > 1000){\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"catalog.promotion.import.description.product.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"1000\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Nhóm/Tên SP hàng bán\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\t\tdescProduct = descProduct.trim();\n\t\t\t\t\t\t\t\theader.decriptionProduct = descProduct;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terrRow.setContent8(descProduct);\n\t\t\t\t\t\t}else if(cellDesProduct == null) {\n\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.description.product.obligate\") + \"\\n\";\n\t\t\t\t\t\t} \n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.string\", iRun, \"DescProduct\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\n\t\t\t\t\t// 8 Mô tả chương trình\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellDescription = myRow.getCell(8);\n\t\t\t\t\t\tif (cellDescription != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString description = getCellValueToString(cellDescription);\n\t\t\t\t\t\t\tif(description != null){\n\t\t\t\t\t\t\t\tdescription = description.trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(description != null && description.trim().length() > 1000){\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"catalog.promotion.import.description.program.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"\", iRun, \"Description\");\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"1000\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Mô tả chương trình\");\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdescription = description.trim();\n\t\t\t\t\t\t\t\theader.descriptionProgram = description;\n\t\t\t\t\t\t\t\terrRow.setContent9(description);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*else if(cellDescription != null){\n\t\t\t\t\t\t\tString description = getCellValueToString(cellDescription);\n\t\t\t\t\t\t\terrRow.setContent9(description);\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.string\", iRun, \"Description\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//9 Bội số\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellMultiple = myRow.getCell(9);\n\t\t\t\t\t\theader.multiple = 0; \n\t\t\t\t\t\tif (cellMultiple != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString multiple = getCellValueToString(cellMultiple);\n\t\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_PROMO_ALLOW_MULTIPLE\", ApParamType.LIST_PROMO_ALLOW_MULTIPLE);\n\t\t\t\t\t\t\tString strListPromo = apParam != null?apParam.getValue() : \"ZV02,ZV03,ZV05,ZV06,ZV08,ZV09,ZV11,ZV12,ZV13,ZV14,ZV15,ZV16,ZV17,ZV18,ZV20,ZV21,ZV23,ZV24\";\n\t\t\t\t\t\t\tif ((Constant.IS_MULTIPLE.equals(multiple) || Constant.NON_MULTIPLE.equals(multiple)) \n\t\t\t\t\t\t\t\t\t&& strListPromo != null) {\n\t\t\t\t\t\t\t\tstrListPromo = strListPromo.replace(\" \", \"\");\n\t\t\t\t\t\t\t\tstrListPromo = strListPromo.toUpperCase();\n\t\t\t\t\t\t\t\tString[] ListPromoAllow = strListPromo.split(\",\");\n\t\t\t\t\t\t\t\tif (Constant.IS_MULTIPLE.equals(multiple) \n\t\t\t\t\t\t\t\t\t &&\t!Arrays.asList(ListPromoAllow).contains(header.type.toUpperCase())) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(header.type.toUpperCase());\n\t\t\t\t\t\t\t\t\tSystem.out.println(strListPromo);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.multiple.not.use\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\theader.multiple = Integer.parseInt(multiple.trim());\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\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.multiple.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent10(multiple);\n\t\t\t\t\t\t}/*else if(cellMultiple != null){\n\t\t\t\t\t\t\tString multiple = getCellValueToString(cellMultiple);\n\t\t\t\t\t\t\terrRow.setContent10(multiple);\n\t\t\t\t\t\t}*/\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Multiple\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 10 Tối ưu\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellRecursive = myRow.getCell(10);\n\t\t\t\t\t\theader.recursive = 0;\n\t\t\t\t\t\tif (cellRecursive != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString recursive = getCellValueToString(cellRecursive);\n\t\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_PROMO_ALLOW_RECURSIVE\", ApParamType.LIST_PROMO_ALLOW_RECURSIVE);\n\t\t\t\t\t\t\tString strListPromo = apParam == null? \"ZV02,ZV03,ZV05,ZV06,ZV08,ZV09,ZV11,ZV12,ZV13,ZV14,ZV15,ZV16,ZV17,ZV18,ZV20,ZV21,ZV23,ZV24\":apParam.getValue();\n\t\t\t\t\t\t\tif ((Constant.IS_RECURSIVE.equals(recursive) || Constant.NON_RECURSIVE.equals(recursive)) \n\t\t\t\t\t\t\t\t\t&& strListPromo != null) {\n\t\t\t\t\t\t\t\tstrListPromo = strListPromo.replace(\" \", \"\");\n\t\t\t\t\t\t\t\tString[] listPromoAllow = strListPromo.split(\",\");\n\t\t\t\t\t\t\t\tif (Constant.IS_RECURSIVE.equals(recursive)\t\t\t\n\t\t\t\t\t\t\t\t\t &&\t!Arrays.asList(listPromoAllow).contains(header.type.toUpperCase())) {\n\t\t\t\t\t\t\t\t/*\tSystem.out.println(header.type.toUpperCase());\n\t\t\t\t\t\t\t\t\tSystem.out.println(strListPromo);*/\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.recursive.not.use\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\theader.recursive = Integer.parseInt(recursive.trim());\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\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.recursive.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent11(recursive);\n\t\t\t\t\t\t}/*else if(cellRecursive != null){\n\t\t\t\t\t\t\tString recursive = getCellValueToString(cellRecursive);\n\t\t\t\t\t\t\terrRow.setContent11(recursive);\n\t\t\t\t\t\t}*/\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Recursive\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 9 Loại trả thưởng\n\t\t\t\t/*\ttry {\n\t\t\t\t\t\tCell cellRewardType = myRow.getCell(9);\n\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_ALLOW_REWARD_TYPE\", ApParamType.LIST_ALLOW_REWARD_TYPE);\n\t\t\t\t\t\tString strListAllowReward = apParam.getApParamName();\n\t\t\t\t\t\tstrListAllowReward = strListAllowReward.replace(\" \", \"\");\n\t\t\t\t\t\tString[] listAllowReward = strListAllowReward.split(\",\");\n\t\t\t\t\t\tif (cellRewardType != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\tif (strRewardType != null \n\t\t\t\t\t\t\t\t\t&& (Constant.DISCOUNT_MONEY.equals(strRewardType) || Constant.VOUCHER.equals(strRewardType)) \n\t\t\t\t\t\t\t\t\t&& Arrays.asList(listAllowReward).contains(header.type)) {\n\t\t\t\t\t\t\t\theader.rewardType = Integer.parseInt(strRewardType.trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent10(strRewardType);\n\t\t\t\t\t\t}else if(cellRewardType != null){\n\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\terrRow.setContent10(strRewardType);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.number\", iRun, \"RewardType\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 10 Từ ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellFromDateReward = myRow.getCell(10);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellFromDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t} else if (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = cellFromDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_fromDateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(cellFromDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(header.fromApplyDate != null && header.fromDate != null){\n\t\t\t\t\t\t\t\t\t\tint sub = DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate);\n\t\t\t\t\t\t\t\t\t\tif(DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate) > 0){\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.reward.greater.fromdate\")+\"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}else if(cellFromDateReward != null){\n\t\t\t\t\t\t\tString _fromDateReward = getCellValueToString(cellFromDateReward); \n\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"FromDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\n\t\t\t\t\t// 11 Đến ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellToDateReward = myRow.getCell(11);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellToDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_toDateReward);\n\t\t\t\t\t\t\t\t\t} else if (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_toDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _todateReward = cellToDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_todateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong \"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(_todateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDate;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(cellToDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (header.fromApplyDate != null && header.toApplyDate != null) {\n\t\t\t\t\t\t\t\t\t\tif (DateUtil.compareDateWithoutTime(header.fromApplyDate, header.toApplyDate) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.greater.todate.reward\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellToDateReward != null){\n\t\t\t\t\t\t\tString _todateReward = getCellValueToString(cellToDateReward); \n\t\t\t\t\t\t\terrRow.setContent12(_todateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"ToDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\t// 11 Loại trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\tCell cellRewardType = myRow.getCell(11);\n\t\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_ALLOW_REWARD_TYPE\", ApParamType.LIST_ALLOW_REWARD_TYPE);\n\t\t\t\t\t\t\tString strListAllowReward = apParam.getApParamName();\n\t\t\t\t\t\t\tstrListAllowReward = strListAllowReward.replace(\" \", \"\");\n\t\t\t\t\t\t\tString[] listAllowReward = strListAllowReward.split(\",\");\n\t\t\t\t\t\t\tif (cellRewardType != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\t\tif (strRewardType != null \n\t\t\t\t\t\t\t\t\t&& (Constant.DISCOUNT_MONEY.equals(strRewardType) || Constant.VOUCHER.equals(strRewardType)) \n\t\t\t\t\t\t\t\t\t&& Arrays.asList(listAllowReward).contains(header.type)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(Constant.DISCOUNT_MONEY.equals(strRewardType) || Constant.VOUCHER.equals(strRewardType)) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\theader.rewardType = Integer.parseInt(strRewardType.trim());\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\terrRow.setContent12(strRewardType);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\t\terrRow.setContent12(strRewardType);\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\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.number\", iRun, \"RewardType\");\n\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 12 Từ ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellFromDateReward = myRow.getCell(12);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellFromDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue()))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = cellFromDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_fromDateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(cellFromDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(header.fromApplyDate != null && header.fromDate != null){\n//\t\t\t\t\t\t\t\t\t\tint sub = DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate);\n\t\t\t\t\t\t\t\t\t\tif(DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate) > 0){\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.reward.greater.fromdate\")+\"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellFromDateReward != null){\n\t\t\t\t\t\t\tString _fromDateReward = getCellValueToString(cellFromDateReward); \n\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"FromDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 11 Đến ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellToDateReward = myRow.getCell(13);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellToDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_toDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_toDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _todateReward = cellToDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_todateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong \"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(_todateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDate;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(cellToDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (header.fromApplyDate != null && header.toApplyDate != null) {\n\t\t\t\t\t\t\t\t\t\tif (DateUtil.compareDateWithoutTime(header.fromApplyDate, header.toApplyDate) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.greater.todate.reward\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellToDateReward != null){\n\t\t\t\t\t\t\tString _todateReward = getCellValueToString(cellToDateReward); \n\t\t\t\t\t\t\terrRow.setContent14(_todateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"ToDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tlistHeader.add(header);\n\t\t\t\t\t\tmapHeader.put(header.promotionCode, header);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrRow.setErrMsg(messageError);\n\t\t\t\t\t\tlstHeaderError.add(errRow);\n\t\t\t\t\t\tif (mapErrorPromotion.get(header.promotionCode) == null) {\n\t\t\t\t\t\t\tmapErrorPromotion.put(header.promotionCode, messageError);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tiRun++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sheet Don vi tham gia\n\t\t\tif (unitSheet != null) {\n\t\t\t\tIterator<?> rowIter = unitSheet.rowIterator();\n\t\t\t\tiRun = 0;\n\t\t\t\tint maxSizeSheet3 = 5;\n\t\t\t\tList<Shop> listShopChild;\n\t\t\t\twhile (rowIter.hasNext()) {\n\t\t\t\t\tRow myRow = (Row) rowIter.next();\n\t\t\t\t\tif (iRun == 0) {\n\t\t\t\t\t\tiRun++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean isContinue = true;\n\t\t\t\t\tfor (int i = 0; i < maxSizeSheet3; i++) {\n\t\t\t\t\t\tif (myRow.getCell(i) != null) {\n\t\t\t\t\t\t\tisContinue = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isContinue) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExcelPromotionUnit unitPromo = new ExcelPromotionUnit();\n\t\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\tString messageError = \"\";\n\t\t\t\t\tBoolean isHasData = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString promotionCode = getCellValueToString(myRow.getCell(0));\n\t\t\t\t\t\tString shopCode = getCellValueToString(myRow.getCell(1));\n\t\t\t\t\t\tString quality = getCellValueToString(myRow.getCell(2));\n\t\t\t\t\t\tString totalAmount = getCellValueToString(myRow.getCell(3));\n\t\t\t\t\t\tString amount = getCellValueToString(myRow.getCell(4));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(promotionCode) || !StringUtil.isNullOrEmpty(shopCode) || !StringUtil.isNullOrEmpty(quality)\n\t\t\t\t\t\t\t\t|| !StringUtil.isNullOrEmpty(totalAmount) || !StringUtil.isNullOrEmpty(amount)) {\n\t\t\t\t\t\t\tisHasData = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 1 Mã CTKM\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionCode = myRow.getCell(0);\n\t\t\t\t\t\tif (cellPromotionCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif(isHasData){\n\t\t\t\t\t\t\t\tString promoCode = getCellValueToString(cellPromotionCode);\n\t\t\t\t\t\t\t\tPromotionProgram newPromotionProgram;\n\t\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promoCode)) {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.promotion.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewPromotionProgram = promotionProgramMgr.getPromotionProgramByCode(promoCode);\n\t\t\t\t\t\t\t\t\tif(newPromotionProgram == null \n\t\t\t\t\t\t\t\t\t\t\t&& mapHeader.get(promoCode) == null){\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.not.init\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tunitPromo.promotionCode = promoCode;\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\terrRow.setContent1(promoCode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Mã CTKM\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 2 Mã đơn vị\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellUnitCode = myRow.getCell(1);\n\t\t\t\t\t\tif (cellUnitCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif(isHasData){\n\t\t\t\t\t\t\t\tString unitCode = getCellValueToString(cellUnitCode);\n\t\t\t\t\t\t\t\t// Kiem tra ma don vi empty\n\t\t\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(unitCode)){\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.unit.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Kiem tra don vi ton tai trong he thong\n\t\t\t\t\t\t\t\t\tif(shopMgr.getShopByCode(unitCode) == null){\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.unit.code.not.permission\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t} else if (currentUser != null && currentUser.getShopRoot() != null){ // kiem tra don vi co thuoc quyen quan ly cua user\n\t\t\t\t\t\t\t\t\t\tlistShopChild = promotionProgramMgr.getListChildByShopId(currentUser.getShopRoot().getShopId());\n\t\t\t\t\t\t\t\t\t\t// Kiem tra shop co thuoc quen quan ly cua user dang nhap\n\t\t\t\t\t\t\t\t\t\tboolean isShopMapWithUser = false;\n\t\t\t\t\t\t\t\t\t\tfor(Shop shop: listShopChild){\n\t\t\t\t\t\t\t\t\t\t\t if(unitCode.toLowerCase().equals(shop.getShopCode().toLowerCase())){\n\t\t\t\t\t\t\t\t\t\t\t\t isShopMapWithUser = true;\n\t\t\t\t\t\t\t\t\t\t\t\t break;\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\tif(!isShopMapWithUser){\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.unit.code.not.permission.by.current.user\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tunitPromo.unitCode = unitCode;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\terrRow.setContent2(unitCode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Mã CTKM\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 3 Số suất \n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellQuantityMax = myRow.getCell(2);\n\t\t\t\t\t\tif (cellQuantityMax != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString quantityMax = getCellValueToString(cellQuantityMax);\n\t\t\t\t\t\t\tif(quantityMax != null){\n\t\t\t\t\t\t\t\tquantityMax = quantityMax.trim().replace(\",\", \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (quantityMax != null && quantityMax.trim().length() <= 9 \n\t\t\t\t\t\t\t\t\t&& StringUtil.isFloat(quantityMax) && Double.parseDouble(quantityMax.trim()) > 0\n\t\t\t\t\t\t\t\t\t&& quantityMax.contains(\".\") == false) {\n\t\t\t\t\t\t\t\tunitPromo.quantityMax = Integer.parseInt(quantityMax.trim().replace(\",\", \"\"));\n\t\t\t\t\t\t\t} else if(quantityMax != null && quantityMax.length() > 9 ){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"9\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số suất\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (StringUtil.isNullOrEmpty(quantityMax) == false) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.quantity.max.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent3(quantityMax);\n\t\t\t\t\t\t}else if(cellQuantityMax != null){\n\t\t\t\t\t\t\t// String quantityMax = getCellValueToString(cellQuantityMax);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Số suất\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 4 Số tiền amountMax\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellAmountMax = myRow.getCell(3);\n\t\t\t\t\t\tif (cellAmountMax != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString amountMax = getCellValueToString(cellAmountMax);\n\t\t\t\t\t\t\tif(amountMax != null){\n\t\t\t\t\t\t\t\tamountMax = amountMax.trim().replace(\",\", \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (amountMax != null && amountMax.length() <= 9 && StringUtil.isFloat(amountMax) \n\t\t\t\t\t\t\t\t\t&& Double.parseDouble(amountMax.trim()) > 0 && amountMax.contains(\".\") == false) {\n\t\t\t\t\t\t\t\tunitPromo.amountMax = new BigDecimal(amountMax.trim().replace(\",\", \"\"));\n\t\t\t\t\t\t\t} else if(amountMax != null && amountMax.length() > 9){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"9\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số tiền\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (StringUtil.isNullOrEmpty(amountMax) == false) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.amount.max.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent4(amountMax);\n\t\t\t\t\t\t}else if(cellAmountMax != null){\n\t\t\t\t\t\t\tString amountMax = getCellValueToString(cellAmountMax);\n\t\t\t\t\t\t\terrRow.setContent4(amountMax);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Số tiền\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 5 Số lượng numMax\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellNumMax = myRow.getCell(4);\n\t\t\t\t\t\tif (cellNumMax != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString numMax = getCellValueToString(cellNumMax);\n\t\t\t\t\t\t\tnumMax = numMax.trim().replace(\",\", \"\");\n\t\t\t\t\t\t\tif (numMax != null && numMax.length() <= 9 \n\t\t\t\t\t\t\t\t\t&& StringUtil.isFloat(numMax) \n\t\t\t\t\t\t\t\t\t&& Double.parseDouble(numMax.trim()) > 0\n\t\t\t\t\t\t\t\t\t&& numMax.contains(\".\") == false) {\n\t\t\t\t\t\t\t\tunitPromo.numMax = new BigDecimal(numMax.trim().replace(\",\", \"\"));\n\t\t\t\t\t\t\t} else if(numMax != null && numMax.length() > 9){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"9\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số lượng\");\n\t\t\t\t\t\t\t}else if (StringUtil.isNullOrEmpty(numMax) == false) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.num.max.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent5(numMax);\n\t\t\t\t\t\t}else if(cellNumMax != null){\n\t\t\t\t\t\t\tString numMax = getCellValueToString(cellNumMax);\n\t\t\t\t\t\t\terrRow.setContent5(numMax);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\",\n\t\t\t\t\t\t\t\tConfiguration.getResourceString(ConstantManager.VI_LANGUAGE, \"Số lượng\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tlistUnit.add(unitPromo);\n\t\t\t\t\t\tmapUnit.put(unitPromo.promotionCode, unitPromo);\n\t\t\t\t\t}else{\n\t\t\t\t\t\terrRow.setContent6(messageError);\n\t\t\t\t\t\tlistUnitError.add(errRow);\n//\t\t\t\t\t\tif(mapErrorUnit.get(unitPromo.promotionCode) == null){\n//\t\t\t\t\t\t\tmapErrorUnit.put(unitPromo.promotionCode, messageError);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*if (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tlistHeader.add(header);\n\t\t\t\t\t\tmapHeader.put(header.promotionCode, header);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrRow.setContent13(messageError);\n\t\t\t\t\t\tlstHeaderError.add(errRow);\n\t\t\t\t\t\tif (mapErrorPromotion.get(header.promotionCode) == null) {\n\t\t\t\t\t\t\tmapErrorPromotion.put(header.promotionCode, messageError);\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\n\t\t\t\t\tiRun++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Sheet Co cau KM\n\t\t\t/////\n\t\t\tif (detailSheet != null) {\t\n\t\t\t\tIterator<?> rowIter = detailSheet.rowIterator();\n\t\t\t\tString previousPromotionCode = null;\n\t\t\t\tint typeKM;\n\t\t\t\tMap<String, Integer> mapPromotionType = new HashMap<String, Integer>();\n\t\t\t\tiRun = 0;\n\t\t\t\tMap<String, String[]> mapArrayProduct = new HashMap<String, String[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArraySaleQuantity = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArraySaleAmount = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArrayDiscountAmount = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, Float[]> mapArrayDiscountPercent = new HashMap<String, Float[]>();\n\t\t\t\tMap<String, Integer[]> mapArrayQuantityUnit = new HashMap<String, Integer[]>();\n\t\t\t\tMap<String, String[]> mapArrayFreeProduct = new HashMap<String, String[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArrayFreeQuantity = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, Integer[]> mapArrayFreeQuantityUnit = new HashMap<String, Integer[]>();\n\t\t\t\tMap<String, Boolean[]> mapArrayAndOr = new HashMap<String, Boolean[]>();\n\t\t\t\tMap<String, String[]> mapPromoGroupCode = new HashMap<String, String[]>();\n\t\t\t\tMap<String, String[]> mapPromoGroupName = new HashMap<String, String[]>();\n\t\t\t\tMap<String, String[]> mapPromoLevelCode = new HashMap<String, String[]>();\n//\t\t\t\tMap<String, Integer[]> mapMultiple = new HashMap<String, Integer[]>();\n//\t\t\t\tMap<String, Integer[]> mapRecursive = new HashMap<String, Integer[]>();\n//\t\t\t\tMap<String, Integer[]> mapDkgh = new HashMap<String,Integer[]>();\n\t\t\t\t\n\t\t\t\tLinkedHashMap<String, Integer> lstProductPromo = new LinkedHashMap<String, Integer>();\n\t\t\t\tMap<String, List<Row>> lstRow = new HashMap<String, List<Row>>();\n\t\t\t\tint indexProductPromo = 0;\n\t\t\t\tint maxSizeSheet2 = 12;\n\t\t\t\tPromotionProgram existPromotion = null;\n\t\t\t\twhile (rowIter.hasNext()) {\n\t\t\t\t\tRow myRow = (Row) rowIter.next();\n\t\t\t\t\tif (iRun == 0) {\n\t\t\t\t\t\tiRun++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean isContinue = true;\n\t\t\t\t\t//Kiem tra su hop le cua Row Import\n\t\t\t\t\tfor (int i = 0; i < maxSizeSheet2; i++) {\n\t\t\t\t\t\tif (myRow.getCell(i) != null) {\n\t\t\t\t\t\t\tisContinue = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isContinue) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExcelPromotionDetail detail = new ExcelPromotionDetail();\n\t\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\tString messageError = \"\";\n\t\t\t\t\t//0 get promotionCode\n\t\t\t\t\tString promotionCode = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionCode = myRow.getCell(0);\n\t\t\t\t\t\tif (cellPromotionCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = cellPromotionCode.getStringCellValue();\n\t\t\t\t\t\t\t//\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = String.valueOf(cellPromotionCode.getNumericCellValue());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCode = getCellValueToString(cellPromotionCode);\n\t\t\t\t\t\t\tpromotionCode = promotionCode != null ? promotionCode.trim().toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promotionCode)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmessageError += ValidateUtil.validateField(promotionCode, \"catalog.promotion.import.column.progcode\", 50, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_MAX_LENGTH, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_CODE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texistPromotion = promotionProgramMgr.getPromotionProgramByCode(promotionCode);\n\t\t\t\t\t\t\tif (existPromotion == null && mapHeader.get(promotionCode) == null) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.not.init\") + \"\\n\";\n\t\t\t\t\t\t\t\t//messageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.program.not.exists\");\n\t\t\t\t\t\t\t\t//messageError += \"\\n\";\n\t\t\t\t\t\t\t\t//else if(existPromotion != null && mapHeader.get(promotionCode) == null){\n\t\t\t\t\t\t\t} else if(existPromotion != null && ActiveType.RUNNING.equals(existPromotion.getStatus())){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.program.exists\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdetail.promotionCode = promotionCode;\n\t\t\t\t\t\t\terrRow.setContent1(promotionCode);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promotionCode)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.code\"));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Mã CTKM\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//1 get type\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (myRow.getCell(1) != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tdetail.type = myRow.getCell(1).getStringCellValue();\n\t\t\t\t\t\t\t//\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tdetail.type = String.valueOf(myRow.getCell(1).getNumericCellValue());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdetail.type = getCellValueToString(myRow.getCell(1));\n\t\t\t\t\t\t\tdetail.type = detail.type != null ? detail.type.trim().toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(detail.type)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (mapCheckType.get(detail.type) == null) {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.exists.before\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.type\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t} else if (mapType.get(promotionCode) == null) {\n\t\t\t\t\t\t\t\t\tif (null != existPromotion && existPromotion.getType().equalsIgnoreCase(detail.type)) {\n\t\t\t\t\t\t\t\t\t\tmapType.put(detail.promotionCode, detail.type);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.type.is.not.same2\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (!mapType.get(promotionCode).equals(detail.type)) {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.type.is.not.same2\") + \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent2(getCellValueToString(myRow.getCell(1)));\n\t\t\t\t\t\t}else if(myRow.getCell(1) != null){\n\t\t\t\t\t\t\terrRow.setContent2(getCellValueToString(myRow.getCell(1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Loại CTKM\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//2 Mã nhóm\n\t\t\t\t\t/*try {\n\t\t\t\t\t\tCell cellGroupCode = myRow.getCell(2);\n\t\t\t\t\t\tString groupCode = null;\n\t\t\t\t\t\tif (cellGroupCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tgroupCode = getCellValueToString(cellGroupCode);\n\t\t\t\t\t\t\tmessageError = ValidateUtil.validateField(noticeCode, \"catalog.promotion.noticecode\", 100, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(groupCode)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoGroupCode = groupCode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent3(groupCode);\n\t\t\t\t\t\t}else if (cellGroupCode != null) {\n\t\t\t\t\t\t\tgroupCode = getCellValueToString(cellGroupCode);\n\t\t\t\t\t\t\terrRow.setContent3(groupCode);\n\t\t\t\t\t\t}else if (cellGroupCode == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Mã nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 3 Tên nhóm\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellGroupName = myRow.getCell(3);\n\t\t\t\t\t\tString groupName = null;\n\t\t\t\t\t\tif (cellGroupName != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tgroupName = getCellValueToString(cellGroupName);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(groupName)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.name.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoGroupName = groupName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent4(groupName);\n\t\t\t\t\t\t}else if (cellGroupName != null) {\n\t\t\t\t\t\t\tgroupName = getCellValueToString(cellGroupName);\n\t\t\t\t\t\t\terrRow.setContent4(groupName);\n\t\t\t\t\t\t}else if (cellGroupName == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.name.obligate\") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Tên nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 4 Mã mức\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellLevelCode = myRow.getCell(4);\n\t\t\t\t\t\tString levelCode = null;\n\t\t\t\t\t\tif (cellLevelCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tlevelCode = getCellValueToString(cellLevelCode);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(levelCode)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoLevelCode = levelCode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent5(levelCode);\n\t\t\t\t\t\t} else if (cellLevelCode != null) {\n\t\t\t\t\t\t\tlevelCode = getCellValueToString(cellLevelCode);\n\t\t\t\t\t\t\terrRow.setContent5(levelCode);\n\t\t\t\t\t\t}else if (cellLevelCode == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Tên nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\t//5 Tên mức\n\t\t\t\t\t/*try {\n\t\t\t\t\t\tCell cellLevelName = myRow.getCell(5);\n\t\t\t\t\t\tString levelName = null;\n\t\t\t\t\t\tif (cellLevelName != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tlevelName = getCellValueToString(cellLevelName);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(levelName)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.name.obligate \") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoLevelName = levelName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent6(levelName);\n\t\t\t\t\t\t} else if (cellLevelName == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.name.obligate \") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Tên nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\t//2 get productCode\n\t\t\t\t\tString productCode = \"\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 2) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellProductCode = myRow.getCell(2);\n\t\t\t\t\t\t\tif (cellProductCode != null) {\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tproductCode = cellProductCode.getStringCellValue();\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tproductCode = String.valueOf(cellProductCode.getNumericCellValue());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tLogUtility.logError(ex, ex.getMessage());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tproductCode = getCellValueToString(cellProductCode);\n\t\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(productCode)) {\n\t\t\t\t\t\t\t\t\tProduct product = productMgr.getProductByCode(productCode.trim());\n\t\t\t\t\t\t\t\t\tif (product == null) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.exist.in.db\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.buyproduct.code\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.productCode = productCode.toUpperCase().trim();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã Sản Phẩm Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã Sản Phẩm Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(2) != null) {\n\t\t\t\t\t\t\terrRow.setContent3(getCellValueToString(myRow.getCell(2)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.get.product.error\", productCode);\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//3 getQuantity\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 3) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellQuantity = myRow.getCell(3);\n\t\t\t\t\t\t\tif (cellQuantity != null && cellQuantity.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellQuantity.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal quantity = new BigDecimal(cellQuantity.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (quantity == null || quantity.compareTo(BigDecimal.ZERO) <= 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"SL Sản Phẩm Mua\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.saleQuantity = quantity;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"SL Sản Phẩm Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"SL Sản Phẩm Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(3) != null) {\n\t\t\t\t\t\t\terrRow.setContent4(getCellValueToString(myRow.getCell(3)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"SL Sản Phẩm Mua\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//4 get UOM\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 4) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellProductUnit = myRow.getCell(4);\n\t\t\t\t\t\t\tif (cellProductUnit != null && cellProductUnit.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellProductUnit.getCellType() == Cell.CELL_TYPE_STRING) {\n\t\t\t\t\t\t\t\t\tString unit = cellProductUnit.getStringCellValue();\n\t\t\t\t\t\t\t\t\tif (unit == null || StringUtil.isNullOrEmpty(unit)) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Đơn Vị Tính Cho SP Mua\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (unit.trim().toLowerCase().equals(\"LẺ\".toLowerCase())) {\n\t\t\t\t\t\t\t\t\t\tdetail.productUnit = 1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdetail.productUnit = 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Đơn Vị Tính Cho SP Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Đơn Vị Tính Cho SP Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(4) != null) {\n\t\t\t\t\t\t\terrRow.setContent5(getCellValueToString(myRow.getCell(4)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Đơn Vị Tính Cho SP Mua\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//5 getAmount\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 5) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellAmount = myRow.getCell(5);\n\t\t\t\t\t\t\tif (cellAmount != null && cellAmount.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellAmount.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal amount = BigDecimal.valueOf(cellAmount.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (amount == null || amount.compareTo(BigDecimal.ZERO) < 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Số Tiền SP Mua\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.saleAmount = amount;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Số Tiền SP Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Số Tiền SP Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(5) != null) {\n\t\t\t\t\t\t\terrRow.setContent6(getCellValueToString(myRow.getCell(5)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Số Tiền SP Mua\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//6 getDiscount Amount\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 6) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellDiscountAmount = myRow.getCell(6);\n\t\t\t\t\t\t\tif (cellDiscountAmount != null && cellDiscountAmount.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellDiscountAmount.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal discountAmount = BigDecimal.valueOf(cellDiscountAmount.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (discountAmount == null || discountAmount.compareTo(BigDecimal.ZERO) < 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Số Tiền SP KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.discountAmount = discountAmount;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Số Tiền SP KM\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Số Tiền SP KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(6) != null) {\n\t\t\t\t\t\t\terrRow.setContent7(getCellValueToString(myRow.getCell(6)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Số Tiền SP KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//7 get discount percent\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 7) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellDiscountPercent = myRow.getCell(7);\n\t\t\t\t\t\t\tif (cellDiscountPercent != null && cellDiscountPercent.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellDiscountPercent.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tFloat discountPercent = (float) cellDiscountPercent.getNumericCellValue();\n\t\t\t\t\t\t\t\t\tif (discountPercent == null || discountPercent < 0 || discountPercent > 100) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"% KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.discountPercent = discountPercent;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.column.invalid.format.float\", \"% KM\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"% KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(7) != null) {\n\t\t\t\t\t\t\terrRow.setContent8(getCellValueToString(myRow.getCell(7)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"DiscPer\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//8 get Free product code\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 8) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellFreeProductCode = myRow.getCell(8);\n\t\t\t\t\t\t\tif (cellFreeProductCode != null) {\n\t\t\t\t\t\t\t\tString freeProductCode = getCellValueToString(cellFreeProductCode);\n\t\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(freeProductCode)) {\n\t\t\t\t\t\t\t\t\tProduct freeProduct = productMgr.getProductByCode(freeProductCode.trim());\n\t\t\t\t\t\t\t\t\tif (freeProduct == null) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.exist.in.db\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.disproduct.code\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.freeProductCode = freeProductCode.toUpperCase().trim();\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã SP KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(8) != null) {\n\t\t\t\t\t\t\terrRow.setContent9(getCellValueToString(myRow.getCell(8)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Mã SP KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//9 get free Quantity\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 9) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellFreeQuantity = myRow.getCell(9);\n\t\t\t\t\t\t\tif (cellFreeQuantity != null && cellFreeQuantity.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellFreeQuantity.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal freeQuantity = new BigDecimal(cellFreeQuantity.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (freeQuantity == null || freeQuantity.compareTo(BigDecimal.ZERO) < 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Số Lượng KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.freeQuantity = freeQuantity;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Số Lượng KM\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Số Lượng KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(9) != null) {\n\t\t\t\t\t\t\terrRow.setContent10(getCellValueToString(myRow.getCell(9)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Số Lượng KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//10 get Free UOM\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 10) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellProductUnit = myRow.getCell(10);\n\t\t\t\t\t\t\tif (cellProductUnit != null && cellProductUnit.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellProductUnit.getCellType() == Cell.CELL_TYPE_STRING) {\n\t\t\t\t\t\t\t\t\tString unit = cellProductUnit.getStringCellValue();\n\t\t\t\t\t\t\t\t\tif (unit == null || StringUtil.isNullOrEmpty(unit)) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Đơn Vị Tính cho SP KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (unit.trim().toLowerCase().equals(\"LẺ\".toLowerCase())) {\n\t\t\t\t\t\t\t\t\t\tdetail.freeProductUnit = 1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdetail.freeProductUnit = 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Đơn Vị Tính cho SP KM\");\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\tif (myRow.getCell(10) != null) {\n\t\t\t\t\t\t\terrRow.setContent11(getCellValueToString(myRow.getCell(10)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Đơn Vị Tính cho SP KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//11 get And Or\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 11) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellAndOrCell = myRow.getCell(11);\n\t\t\t\t\t\t\tif (cellAndOrCell != null) {\n\t\t\t\t\t\t\t\tString value;\n\t\t\t\t\t\t\t\tif (cellAndOrCell.getCellType() != Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tvalue = cellAndOrCell.getStringCellValue();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvalue = String.valueOf((float) cellAndOrCell.getNumericCellValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (\"X\".equals(value.trim().toUpperCase())) {\n\t\t\t\t\t\t\t\t\tdetail.andOr = true;\n\t\t\t\t\t\t\t\t\terrRow.setContent12(value);\n\t\t\t\t\t\t\t\t} else if (\"\".equals(value.trim().toUpperCase())) {\n\t\t\t\t\t\t\t\t\tdetail.andOr = false;\n\t\t\t\t\t\t\t\t\terrRow.setContent12(value);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\terrRow.setContent13(value);\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.read.cell.format.invalid\", iRun, \"AllFreeItemcode\", \"['','X']\");\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\tdetail.andOr = false;\n\t\t\t\t\t\t\t\terrRow.setContent12(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.read.cell.format.invalid\", iRun, \"AllFreeItemcode\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 12 ĐKGH\n\t\t\t\t\t/*try{\n\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_ALLOW_DKGH\", ApParamType.LIST_ALLOW_DKGH);\n\t\t\t\t\t\tString strListPromo = apParam.getApParamName();\n\t\t\t\t\t\tCell cellDKGH = myRow.getCell(17);\n\t\t\t\t\t\tString[] ListAllow = strListPromo.split(\",\");\n\t\t\t\t\t\tif(Arrays.asList(ListAllow).contains(detail.type)){\n\t\t\t\t\t\t\tif(cellDKGH != null && StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\t\tString dkgh = getCellValueToString(cellDKGH);\n\t\t\t\t\t\t\t\tif(dkgh != null \n\t\t\t\t\t\t\t\t\t\t&& (Constant.HAVE_CONDITION.equals(dkgh) || (Constant.NON_CONDITION.equals(dkgh)))){\n\t\t\t\t\t\t\t\t\tdetail.dkgh = Integer.parseInt(dkgh.trim());\n\t\t\t\t\t\t\t\t}else if(dkgh != null){\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.dkgh.incorrect.format\")+\"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\terrRow.setContent18(dkgh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellDKGH != null){\n\t\t\t\t\t\t\tString dkgh = getCellValueToString(cellDKGH);\n\t\t\t\t\t\t\terrRow.setContent18(dkgh);\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"DKGH\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\tif (mapPromotionTypeCheck.get(detail.promotionCode) == null) {\n\t\t\t\t\t\tmapPromotionTypeCheck.put(detail.promotionCode, detail.type);\n\t\t\t\t\t}\n\t\t\t\t\tif (!promotionCode.equals(previousPromotionCode)) {\n\t\t\t\t\t\tif (mapPromotionType.get(detail.promotionCode) != null) {//da ton tai ctkm nay truoc do roi\n\t\t\t\t\t\t\t//typeKM = mapPromotionType.get(detail.promotionCode);//=> lay ra loai cua no thoi\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null\n\t\t\t\t\t\t\t\t\t&& detail.freeQuantity.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 1;//ZV03\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 2;//ZV02\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 3;//ZV01\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null\n\t\t\t\t\t\t\t\t\t&& detail.freeQuantity.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 4;\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 5;\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 6;\n\t\t\t\t\t\t\t} else if (detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null && detail.freeQuantity.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 7;\n\t\t\t\t\t\t\t} else if (detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 8;\n\t\t\t\t\t\t\t} else if (detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 9;\n\t\t\t\t\t\t\t} else if (detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null && detail.freeQuantity.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 10;//ZV24\n\t\t\t\t\t\t\t} else if (detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 11;//ZV23\n\t\t\t\t\t\t\t} else if (detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 12;//ZV22\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttypeKM = -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmapPromotionType.put(detail.promotionCode, typeKM);\n\t\t\t\t\t\t\tpreviousPromotionCode = detail.promotionCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//typeKM = mapPromotionType.get(detail.promotionCode);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tList<Row> lstR = lstRow.get(detail.promotionCode);\n\t\t\t\t\t\tif (lstR == null) {\n\t\t\t\t\t\t\tlstR = new ArrayList<Row>();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmessageError = checkDuplicate(mapType.get(detail.promotionCode), lstR, myRow);\n\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\tlistDetail.add(detail);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlstR.add(myRow);\n\t\t\t\t\t\tlstRow.put(detail.promotionCode, lstR);\n\t\t\t\t\t}\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tif (mapArrayProduct.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tString[] arrProduct = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrProduct[iRun] = detail.productCode;\n\t\t\t\t\t\t\tmapArrayProduct.put(detail.promotionCode, arrProduct);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrProduct[iRun] = detail.productCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArraySaleQuantity.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrSaleQuantity[iRun] = detail.saleQuantity;\n\t\t\t\t\t\t\tmapArraySaleQuantity.put(detail.promotionCode, arrSaleQuantity);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrSaleQuantity[iRun] = detail.saleQuantity;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayQuantityUnit.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tInteger[] arrUnit = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.productUnit;\n\t\t\t\t\t\t\tmapArrayQuantityUnit.put(detail.promotionCode, arrUnit);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tInteger[] arrUnit = mapArrayQuantityUnit.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.productUnit;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArraySaleAmount.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleAmount = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrSaleAmount[iRun] = detail.saleAmount;\n\t\t\t\t\t\t\tmapArraySaleAmount.put(detail.promotionCode, arrSaleAmount);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrSaleAmount[iRun] = detail.saleAmount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayFreeProduct.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tString[] arrFreeProduct = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrFreeProduct[iRun] = detail.freeProductCode;\n\t\t\t\t\t\t\tmapArrayFreeProduct.put(detail.promotionCode, arrFreeProduct);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrFreeProduct[iRun] = detail.freeProductCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayFreeQuantityUnit.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tInteger[] arrUnit = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.freeProductUnit;\n\t\t\t\t\t\t\tmapArrayFreeQuantityUnit.put(detail.promotionCode, arrUnit);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tInteger[] arrUnit = mapArrayFreeQuantityUnit.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.freeProductUnit;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayFreeQuantity.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrFreeQuantity[iRun] = detail.freeQuantity;\n\t\t\t\t\t\t\tmapArrayFreeQuantity.put(detail.promotionCode, arrFreeQuantity);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrFreeProduct = mapArrayFreeQuantity.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrFreeProduct[iRun] = detail.freeQuantity;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayDiscountAmount.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrDiscountAmount = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrDiscountAmount[iRun] = detail.discountAmount;\n\t\t\t\t\t\t\tmapArrayDiscountAmount.put(detail.promotionCode, arrDiscountAmount);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrDiscountAmount = mapArrayDiscountAmount.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrDiscountAmount[iRun] = detail.discountAmount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayDiscountPercent.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tFloat[] arrDiscountPercent = new Float[MAX_ARRAY];\n\t\t\t\t\t\t\tarrDiscountPercent[iRun] = detail.discountPercent;\n\t\t\t\t\t\t\tmapArrayDiscountPercent.put(detail.promotionCode, arrDiscountPercent);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tFloat[] arrDiscountPercent = mapArrayDiscountPercent.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrDiscountPercent[iRun] = detail.discountPercent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayAndOr.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBoolean[] arrAndOr = new Boolean[MAX_ARRAY];\n\t\t\t\t\t\t\tarrAndOr[iRun] = detail.andOr;\n\t\t\t\t\t\t\tmapArrayAndOr.put(detail.promotionCode, arrAndOr);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrAndOr[iRun] = detail.andOr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Ma nhom\n\t\t\t\t\t\tif(mapPromoGroupCode.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tString[] arrPromoGroupCode = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrPromoGroupCode[iRun] = detail.promoGroupCode;\n\t\t\t\t\t\t\tmapPromoGroupCode.put(detail.promotionCode, arrPromoGroupCode);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tString[] arrPromoGroupCode = mapPromoGroupCode.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrPromoGroupCode[iRun] = detail.promoGroupCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Ten nhom\n\t\t\t\t\t\tif(mapPromoGroupName.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tString[] arrPromoGroupName = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrPromoGroupName[iRun] = detail.promoGroupName;\n\t\t\t\t\t\t\tmapPromoGroupName.put(detail.promotionCode, arrPromoGroupName);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tString[] arrPromoGroupName = mapPromoGroupName.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrPromoGroupName[iRun] = detail.promoGroupName;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Ma muc\n\t\t\t\t\t\tif(mapPromoLevelCode.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tString[] arrayPromoLevelCode = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrayPromoLevelCode[iRun] = detail.promoLevelCode;\n\t\t\t\t\t\t\tmapPromoLevelCode.put(detail.promotionCode, arrayPromoLevelCode);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tString[] arrayPromoLevelCode = mapPromoLevelCode.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrayPromoLevelCode[iRun] = detail.promoLevelCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Bội số\n\t\t\t\t\t\t/*if(mapMultiple.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tInteger[] arrMultiple = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrMultiple[iRun] = detail.multiple;\n\t\t\t\t\t\t\tmapMultiple.put(detail.promotionCode, arrMultiple);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tInteger[] arrMultiple = mapMultiple.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrMultiple[iRun] = detail.multiple;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Tối ưu\n\t\t\t\t\t\tif(mapRecursive.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tInteger[] arrRecursive = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrRecursive[iRun] = detail.recursive;\n\t\t\t\t\t\t\tmapRecursive.put(detail.promotionCode, arrRecursive);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tInteger[] arrRecursive = mapRecursive.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrRecursive[iRun] = detail.recursive;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map ĐKGH\n\t\t\t\t\t\tif(mapDkgh.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tInteger[] arrDkgh = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrDkgh[iRun] = detail.dkgh;\n\t\t\t\t\t\t\tmapDkgh.put(detail.promotionCode, arrDkgh);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tInteger[] arrDkgh = mapDkgh.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrDkgh[iRun] = detail.dkgh;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(detail.productCode) && lstProductPromo.get(detail.promotionCode + \"-\" + detail.productCode) == null) {\n\t\t\t\t\t\t\tlstProductPromo.put(detail.promotionCode + \"-\" + detail.productCode, indexProductPromo++);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//error\n\t\t\t\t\t\terrRow.setContent13(messageError);\n\t\t\t\t\t\tlstDetailError.add(errRow);\n\t\t\t\t\t\tif (mapErrorPromotion.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tmapErrorPromotion.put(detail.promotionCode, messageError);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// totalItem++;\n\t\t\t\t\tiRun++;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * put vao group level\n\t\t\t\t */\n\t\t\t\tString messageError = \"\";\n\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\n\t\t\t\tfor (String promotionProgramCode : mapPromotionType.keySet()) {\n\t\t\t\t\tInteger unit = -1;\n\t\t\t\t\tString[] arrPromoGroupCode = mapPromoGroupCode.get(promotionProgramCode);\n\t\t\t\t\tString[] arrPromoGroupName = mapPromoGroupName.get(promotionProgramCode);\n\t\t\t\t/*\tString[] arrPromoLevelCode = mapPromoLevelCode.get(promotionProgramCode);\n\t\t\t\t\tInteger[] arrMultiple = mapMultiple.get(promotionProgramCode);\n\t\t\t\t\tInteger[] arrRecursive = mapRecursive.get(promotionProgramCode);\t\t*/\t\t\t\n//\t\t\t\t\tInteger[] arrDkgh = mapDkgh.get(promotionProgramCode);\n\t\t\t\t\t\n\t\t\t\t\tif (mapPromotionType.get(promotionProgramCode) == 1) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(1), B(1) dc km ... C(1), D(1)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantityProduct(arrProduct, arrProductUnit, arrSaleQuantity, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleQuantity[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupKM.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 2) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(1), B(1) dc km ... 10.000\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantityProduct(arrProduct, arrProductUnit, arrSaleQuantity, arrAndOr, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleQuantity[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 3) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(1), B(1) dc km ... 10%\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantityProduct(arrProduct, arrProductUnit, arrSaleQuantity, arrAndOr, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleQuantity[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n//\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 4) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(10.000), B(10.000) dc km ... C(1), D(1)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortAmountProduct(arrProduct, arrProductUnit, arrSaleAmount, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleAmount[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 5) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(10.000), B(10.000) dc km ... 10.000\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortAmountProduct(arrProduct, arrProductUnit, arrSaleAmount, arrAndOr, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleAmount[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 6) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(10.000), B(10.000) dc km ... 10%\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortAmountProduct(arrProduct, arrProductUnit, arrSaleAmount, arrAndOr, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleAmount[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 7) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua 10000 dc km ... C(1), D(1)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tsortAmount(arrSaleAmount, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\t\t\t\t\t\tfor (int i = 0; arrSaleAmount != null && i < arrSaleAmount.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleAmount[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 8) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua 10000 dc km ... 10.000\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\tsortAmount(arrSaleAmount, null, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrSaleAmount != null && i < arrSaleAmount.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleAmount[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 9) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua 10000 dc km ... 10%\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\tsortAmount(arrSaleAmount, null, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrSaleAmount != null && i < arrSaleAmount.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleAmount[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t/*\tgroupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 10) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * ZV24\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tsortQuantity(arrSaleQuantity, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\n\t\t\t\t\t\tfor (int i = 0; arrSaleQuantity != null && i < arrSaleQuantity.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleQuantity[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t/*\t\t\tgroupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], null, indexMua++, i, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 11) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * ZV23\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\tsortQuantity(arrSaleQuantity, null, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrSaleQuantity != null && i < arrSaleQuantity.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleQuantity[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t/*\tgroupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t/*\t\tgroupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 12) {\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\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantity(arrSaleQuantity, null, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrSaleQuantity != null && i < arrSaleQuantity.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleQuantity[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\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}\n\t\t\t\tif (!StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\terrRow.setContent14(messageError);\n\t\t\t\t\tlstDetailError.add(errRow);\n\t\t\t\t}\n\t\t\t\tfor (String promotionProgramCode : mapPromotionType.keySet()) {\n\t\t\t\t\tsplitGroup(mapPromotionMua.get(promotionProgramCode), mapPromotionKM.get(promotionProgramCode), mapMuaKM, promotionProgramCode, lstProductPromo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public final void testPrintAreaRemove() throws Exception {\n try (Workbook workbook = _testDataProvider.createWorkbook()) {\n workbook.createSheet(\"Test Print Area\");\n workbook.getSheetName(0);\n\n workbook.setPrintArea(0, 0, 1, 0, 0);\n\n String retrievedPrintArea = workbook.getPrintArea(0);\n\n assertNotNull(retrievedPrintArea, \"Print Area not defined for first sheet\");\n\n workbook.removePrintArea(0);\n assertNull(workbook.getPrintArea(0), \"PrintArea was not removed\");\n }\n }", "public void my_timesheet_report()\n {\n\t boolean timesheetreppresent =mytimesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\" My Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }" ]
[ "0.6023605", "0.58638006", "0.58476466", "0.58045673", "0.56728935", "0.5571959", "0.5564923", "0.5552492", "0.55499935", "0.55492043", "0.55367976", "0.5518488", "0.5508939", "0.55060536", "0.54989034", "0.5490495", "0.54612905", "0.54551303", "0.5428649", "0.54207486", "0.5380551", "0.53737336", "0.53645754", "0.532735", "0.5269516", "0.52551854", "0.52521974", "0.52166605", "0.5216026", "0.5205616", "0.5198979", "0.51924425", "0.5184295", "0.5166791", "0.51654416", "0.5159359", "0.51557076", "0.51510835", "0.5120599", "0.5110752", "0.51058286", "0.51009876", "0.5095103", "0.50824136", "0.50584704", "0.50567013", "0.5052209", "0.50287956", "0.5026033", "0.49841812", "0.49723426", "0.49694946", "0.4965633", "0.4964552", "0.4954078", "0.494207", "0.49339405", "0.4930145", "0.49264374", "0.4923143", "0.49208972", "0.491207", "0.4911654", "0.49088755", "0.49060413", "0.49054614", "0.4898314", "0.48961717", "0.4884447", "0.48796585", "0.4875041", "0.48742354", "0.4870922", "0.48694918", "0.48588952", "0.48547965", "0.48545095", "0.48540398", "0.48518884", "0.4845711", "0.4835713", "0.48328534", "0.48321155", "0.48320934", "0.48256814", "0.48253977", "0.48228896", "0.4821165", "0.48095435", "0.4806493", "0.4803656", "0.48028675", "0.48025763", "0.4802051", "0.47964016", "0.47914472", "0.47899812", "0.47881278", "0.47868583", "0.4781293" ]
0.7037707
0
TESTS OF CLASS PARTICIPATIONHISTORY Tested interaction with history and set Methods tested: Constructor() find where set getTotalPoints() TODO: getHistoryWithUnfinishedCompetitionFor() getHistoryFor() finish() getTotalTime() getTimeLeft()
@Before public void setUp() { start(fakeApplication(inMemoryDatabase(), fakeGlobal())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n void testTitForTatWithHistoryCooperate() {\r\n TitForTat testStrat = new TitForTat();\r\n AlwaysCooperate testStrat2 = new AlwaysCooperate();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 6, \"tit for tat not returning correctly \"\r\n + \"against cooperating opponent\"); \r\n }", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "@Test\r\n void testTitForTatWithHistoryDefect() {\r\n TitForTat testStrat = new TitForTat();\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 1, \"tit for tat not returning \"\r\n + \"correctly against defecting opponent\"); \r\n }", "@Test\r\n void testTitForTatNoHistory() {\r\n TitForTat testStrat = new TitForTat();\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 1, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 0, \"tit for tat not returning c when no history\");\r\n }", "public void testgetOfficerHistory() {\n \n Collection OfficerData = affOfficerBean.getOfficerHistory(AFF_PK);\n if (OfficerData == null) {\n fail(\"No officer history records found\");\n }\n else { \n System.out.println(\"Officer titles returned: \" + OfficerData.size());\n }\n \n }", "@Test\n public void testGetProgressOfQuestionnaireById(){\n Date dateKey = new Date();\n String userName = \"Regina for president\";\n\n\n User user = new User(userName);\n userDB.insertUser(user);\n\n //add questionnaires\n HADSDQuestionnaire q1 = new HADSDQuestionnaire(userName);\n q1.setCreationDate_PK(dateKey);\n q1.setLastQuestionEditedNr(4);\n q1.setProgressInPercent(99);\n new HADSDQuestionnaireManager(context).insertQuestionnaire(q1);\n\n DistressThermometerQuestionnaire q2 = new DistressThermometerQuestionnaire(userName);\n q2.setCreationDate_PK(dateKey);\n q2.setLastQuestionEditedNr(2);\n q2.setProgressInPercent(77);\n new DistressThermometerQuestionnaireManager(context).insertQuestionnaire(q2);\n\n QolQuestionnaire q3 = new QolQuestionnaire(userName);\n q3.setCreationDate_PK(dateKey);\n q3.setLastQuestionEditedNr(0);\n q3.setProgressInPercent(33);\n new QualityOfLifeManager(context).insertQuestionnaire(q3);\n\n // get selected questionnaire\n user = userDB.getUserByName(userName);\n\n int hadsProgress = new HADSDQuestionnaireManager(context).getHADSDQuestionnaireByDate_PK(user.getName(), dateKey).getProgressInPercent();\n int distressProgress = new DistressThermometerQuestionnaireManager(context).getDistressThermometerQuestionnaireByDate(user.getName(), dateKey).getProgressInPercent();\n int qualityProgress = new QualityOfLifeManager(context).getQolQuestionnaireByDate(user.getName(), dateKey).getProgressInPercent();\n\n assertEquals(99, hadsProgress);\n assertEquals(77, distressProgress);\n assertEquals(33, qualityProgress);\n }", "@Test\r\n\tpublic void testGetCondition35() {\n\r\n\t\tCancerHistory h1 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.FATHER, \"\", true, (short) 50, false, false,\r\n\t\t\t\t(short) -1, false, (short) -1, \"\");\r\n\r\n\t\tCancerHistory[] td1 = { h1 };\r\n\t\tmanager.setHistories(td1);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 1) \", false,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\r\n\t\t// run 2.\r\n\t\t// father with CC, diagnosed at 49 ==> true\r\n\r\n\t\tCancerHistory h2 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.FATHER, \"\", true, (short) 49, false, false,\r\n\t\t\t\t(short) -1, false, (short) -1, \"\");\r\n\r\n\t\tCancerHistory[] td2 = { h2 };\r\n\t\tmanager.setHistories(td2);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 2) \", true,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\t\t// risk category is 2, because condition 35 has been removed.\r\n\t\tassertEquals(\" run 2\",\r\n\t\t\t\t2 , riskCalculator.calculateRisk());\r\n\r\n\t\t// run 3.\r\n\t\t// grandfather with CC, diagnosed at 49 ==> false, because\r\n\t\t// it is a secondary relative\r\n\r\n\t\tCancerHistory h3 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.PAT_GRANDFATHER, \"\", true, (short) 49, false,\r\n\t\t\t\tfalse, (short) -1, false, (short) -1, \"\");\r\n\r\n\t\tCancerHistory[] td3 = { h3 };\r\n\t\tmanager.setHistories(td3);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 3) \", false,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\r\n\t\t\r\n\t\t// run 4.\r\n\t\t// father and grandfather with CC, diagnosed at 49 ==> true\r\n\r\n\t\tCancerHistory h4 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.PAT_GRANDFATHER, \"\", true, (short) 49, false,\r\n\t\t\t\tfalse, (short) -1, false, (short) -1, \"\");\r\n\t\tCancerHistory h5 = new CancerHistory(\"NHI123\", \"eref1\",\r\n\t\t\t\t(short) Util.FATHER, \"\", true, (short) 49, false,\r\n\t\t\t\tfalse, (short) -1, false, (short) -1, \"\");\r\n\r\n\t\t\r\n\t\tCancerHistory[] td4 = { h4, h5 };\r\n\t\tmanager.setHistories(td4);\r\n\r\n\t\tassertEquals(\"# condition 3-5 (run 4) \", true,\r\n\t\t\t\triskCalculator.getCondition35());\r\n\t\tassertEquals(\" run 4 \",\r\n\t\t\t\t3 , riskCalculator.calculateRisk());\r\n\t}", "private ArrayList<Progress> generateFakeProgressHistory() {\n ArrayList<Progress> history = new ArrayList<>();\n\n Progress progress;\n\n int prevDay = -1;\n\n for (int i = 0; i < 5; i++) {\n progress = new Progress();\n progress.setUsername(Util.getUsername());\n progress.setDate(Util.getPrevDate(prevDay));\n progress.setSteps(\"1467\");\n progress.setMilestones_day(\"3\");\n history.add(progress);\n prevDay--;\n }\n\n return history;\n }", "@Before\r\n\tpublic void setUp() throws Exception {\n\t\tpartidaEmpate = new Partida();\r\n\t\tResultadoPartida resultadoPartidaEmpate = new ResultadoPartida();\r\n\t\tresultadoPartidaEmpate.setGolsHTMandante(0);\r\n\t\tresultadoPartidaEmpate.setGolsFTMandante(1);\r\n\t\tresultadoPartidaEmpate.setGolsHTVisitante(0);\r\n\t\tresultadoPartidaEmpate.setGolsFTVisitante(1);\r\n\t\tpartidaEmpate.setResultado(resultadoPartidaEmpate);\r\n\t\t\r\n\t\t\r\n\t\t//Resultado 3 x 1\r\n\t\tpartidaMandanteVence = new Partida();\r\n\t\tResultadoPartida resultadoPartidaMandanteVenceu = new ResultadoPartida();\r\n\t\tresultadoPartidaMandanteVenceu.setGolsHTMandante(2);\r\n\t\tresultadoPartidaMandanteVenceu.setGolsFTMandante(1);\r\n\t\tresultadoPartidaMandanteVenceu.setGolsHTVisitante(0);\r\n\t\tresultadoPartidaMandanteVenceu.setGolsFTVisitante(1);\r\n\t\tpartidaMandanteVence.setResultado(resultadoPartidaMandanteVenceu);\r\n\t\t\r\n\r\n\t\t//Resultado 0 x 2\r\n\t\tpartidaVisitanteVence = new Partida();\r\n\t\tResultadoPartida resultadoPartidaVisitante = new ResultadoPartida();\r\n\t\tresultadoPartidaVisitante.setGolsHTMandante(0);\r\n\t\tresultadoPartidaVisitante.setGolsFTMandante(0);\r\n\t\tresultadoPartidaVisitante.setGolsHTVisitante(0);\r\n\t\tresultadoPartidaVisitante.setGolsFTVisitante(2);\r\n\t\tpartidaVisitanteVence.setResultado(resultadoPartidaVisitante);\r\n\r\n\t\t\r\n\t\t\r\n\t\tanalisaSeCravou.proximaAnalise(analisaSeAcertouGolsDoVencedor);\r\n\t\tanalisaSeAcertouGolsDoVencedor.proximaAnalise(analisaSeAcertouSaldo);\r\n\t\tanalisaSeAcertouSaldo.proximaAnalise(analisaResultadoSimples);\r\n\t\tanalisaResultadoSimples.proximaAnalise(analisaEmpateGarantido);\r\n\t\t\t\r\n\t}", "@Override\n public ArrayList<PepDetailsHistory> getPepHistoryDetails(String orinNo) throws PEPPersistencyException{\n LOGGER.info(\"inside getPepHistoryDetails()\");\n List<PepDetailsHistory> pepList = new ArrayList<PepDetailsHistory>();\n Session session = this.sessionFactory.openSession();\n Query query = null;\n Transaction tx = session.beginTransaction();\n query = session.createSQLQuery(xqueryConstants.getPepHistoryDetails());\n query.setParameter(\"orinNo\", orinNo); \n query.setFetchSize(100);\n List<Object[]> rows = query.list();\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZZZ\");\n Date date = null;\n Date date1 = null;\n String createdOn = \"\";\n String updatedDate = \"\";\n \n \n try{\n \tProperties prop =PropertyLoader.getPropertyLoader(ImageConstants.LOAD_IMAGE_PROPERTY_FILE);\n for(Object[] row: rows){\n LOGGER.info(\"iterating pep history\");\n PepDetailsHistory pepHist = new PepDetailsHistory();\n pepHist.setPepOrinNumber(row[0]!=null?row[0].toString():null);\n \n \n \n if(null != row[6]){\n \tif(\"01\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Initiated\");\n \t}\n \tif(\"02\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Completed\");\n \t}\n\t\t\t\tif(\"03\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Approved\");\n\t\t\t\t}\n\t\t\t\tif(\"04\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Failed RRD Check\");\n\t\t\t\t}\n\t\t\t\tif(\"05\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Deactivated\");\n\t\t\t\t}\n\t\t\t\tif(\"06\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Closed\");\n\t\t\t\t}\n\t\t\t\tif(\"07\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Rejected By DCA\");\n\t\t\t\t}\n\t\t\t\tif(\"08\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Ready For Review\");\n\t\t\t\t}\n \t\n }else{\n \tpepHist.setHistoryStatus(\"\");\n }\n \n \n pepHist.setPepUpdatedBy(row[5]!=null?row[5].toString():null);\n \n if(row[2]!=null){\n \t\n \tdate = formatter.parse(row[2].toString());\n \tcreatedOn = formatter1.format(date);\n \tpepHist.setCreatedOn(createdOn!=null?createdOn.toString():null);\n \t\n \t\n }\n if(row[4]!=null){\n \tdate1 = formatter.parse(row[4].toString());\n \tupdatedDate = formatter1.format(date1);\n \tpepHist.setUpdateDate(updatedDate!=null?updatedDate.toString():null);\n }\n \n pepHist.setCreatedBy(row[1]!=null?row[1].toString():null);\n \n if(null != row[3]){\n \tString imageStateCode=row[3] == null? \"\" : row[3].toString();\n String imageStateDesc = prop.getProperty(\"Image\"+imageStateCode);\n \n String imageState = imageStateDesc == null ? \"\": imageStateDesc.toString();\n pepHist.setUpdatedStatus(imageState);\n }else{\n \tpepHist.setUpdatedStatus(\"\");\n }\n \n \n pepList.add(pepHist);\n \n }\n }catch(Exception e){\n \t\n }\n tx.commit();\n session.close();\n \n return (ArrayList<PepDetailsHistory>) pepList; \n }", "@Test\n\tpublic void testCalculateCalories() \n\t{\n\t\tParticipant participant = new Participant(\"Daniel\", 155, Participant.GENDER.MALE, 1);\n\t\tparticipant.setCurrentBeers(2);\n\t\tparticipant.setCurrentWine(2);\n\t\tparticipant.setCurrentCocktails(2);\n\t\tparticipant.setCurrentShots(3);\n\t\t\n\t\tassertEquals(1228, HealthCalculator.caluclateCalories(participant));\n\t}", "@Test\n public void testGetQuizzes()\n {\n \n final int numberOfAc31007Quizzes = 5;\n final int numberOfAc31007LiveQuizzes = 2;\n \n LoggedIn staff = new LoggedIn();\n staff.setUsername(\"AGILE MASTER\");\n staff.setUserType(\"Staff\");\n LoggedIn student = new LoggedIn();\n student.setUsername(\"Carsten Cheyne\");\n student.setUserType(\"Student\");\n \n Quiz quizJava = new Quiz();\n quizJava.setId(2);\n quizJava.setName(\"An Agile Approach\");\n quizJava.setDescription(\"A quiz about Agile methods in programming\");\n quizJava.setUserId(\"140001337\");\n quizJava.setModuleId(\"AC31007\");\n quizJava.makeAvailable();\n\n \n try {\n List<Quiz> allQuizzes = QuizModel.getQuizzes(\"AC31007\", staff);\n assertEquals(\"There should be 3 quizzes retrieved for staff.\",\n numberOfAc31007Quizzes, allQuizzes.size());\n Quiz quizDb = allQuizzes.get(0);\n assertEquals(\"Quiz has not been correctly fetched\", quizJava, quizDb);\n \n List<Quiz> liveQuizzes = QuizModel.getQuizzes(\"AC31007\", student);\n assertEquals(\"There should be 2 quizzes retrieved for student.\",\n numberOfAc31007LiveQuizzes, liveQuizzes.size());\n }\n catch (SQLException | ClassNotFoundException | InstantiationException |\n IllegalAccessException exception) {\n fail(exception.getMessage());\n }\n }", "@Test\r\n\tpublic void testAddObstetricsRecord() {\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.add(Calendar.MONTH, -1);\r\n\t\tString lmp = dateFormat.format(c.getTime());\t\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\t\r\n\t\toic.setMultiplicity(\"1\");\r\n\t\tAssert.assertTrue(oic.getMultiplicity().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setWeightGain(\"1\");\r\n\t\tAssert.assertTrue(oic.getWeightGain().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"1\");\r\n\t\tAssert.assertTrue(oic.getNumHoursInLabor().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\tAssert.assertTrue(oic.getNumWeeksPregnant().equals(\"39\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\tAssert.assertTrue(oic.getYearOfConception().equals(\"2005\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\t\r\n\t\toic.setYearOfConception(null);\r\n\t\toic.setNumWeeksPregnant(null);\r\n\t\toic.setNumHoursInLabor(null);\r\n\t\toic.setWeightGain(null);\r\n\t\toic.setMultiplicity(null);\r\n\t\toic.setLmp(\"\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t\t\r\n\t\toic.setLmp(null);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp() == null);\r\n\t\t\r\n\t\toic.setLmp(\"a\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"a\"));\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t}", "@Test\r\n void testVaryingMajorityWithNotEnoughHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 1, \"varyingMajority not returning correctly with insufficient history\");\r\n }", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "@Test\n public void testNewJobHistoryProcessing()\n {\n Job job = jobFakery.makeFakeJob();\n JobHistory newJobHistory = jobHistoryTx.newJobHistoryProcessing(job, START_TIME);\n\n verify(mockJobHistoryDAO).persist(newJobHistory);\n assertEquals(newJobHistory.getStatus(), JobStatus.PROCESSING);\n assertNull(newJobHistory.getEndTime());\n }", "public void testStatistics(){\n Profile profile = new Profile(\"id1\");\n GeoLocation uni_loc = new GeoLocation(0.0, 0.0);\n ArrayList<Trial> trials = new ArrayList<>();\n\n for (int i=1; i<101; i++){\n TrialIntCount trial = new TrialIntCount(\"\"+i, uni_loc, profile, 0);\n if (i<40 && i%2==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if (i>= 40 && i<80 && i%3==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if ( i >= 80 && i%5==0) {\n trial.setCount(i);\n TrialIntCount trial2 = new TrialIntCount(\"1\"+i, uni_loc, profile, 0);\n trial2.setCount(i);\n\n trials.add(trial);\n trials.add(trial2);\n }\n }\n\n this.exp = new Experiment(\"foo\");\n this.exp.addTrials(trials);\n\n assertEquals(\"removeDupes does not work\", 37, this.exp.removeDupes().length);\n assertEquals(\"frequencies does not work\", 15, exp.frequencies().length);\n assertEquals(\"median does not work\", \"46.5\", exp.getMedian());\n assertEquals(\"Q1 does not work\", \"23.00\", exp.getQ1());\n assertEquals(\"Q3 does not work\", \"76.50\", exp.getQ3());\n assertEquals(\"std does not work\", \"30.39\", exp.getStd());\n assertEquals(\"mean does not work\", \"49.05\", exp.getMean());\n\n }", "@Override\n public ArrayList<PepDetailsHistory> getGroupingHistoryDetails(String groupingId) throws PEPPersistencyException{\n LOGGER.info(\"inside getGroupingHistoryDetails()\");\n List<PepDetailsHistory> pepList = new ArrayList<PepDetailsHistory>();\n Session session = this.sessionFactory.openSession();\n Query query = null; \n query = session.createSQLQuery(xqueryConstants.getGroupingHistoryDetails());\n query.setParameter(0,groupingId); \n query.setFetchSize(100);\n List<Object[]> rows = query.list();\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZZZ\");\n Date date = null;\n Date date1 = null;\n String createdOn = \"\";\n String updatedDate = \"\"; \n try{\n \tProperties prop =PropertyLoader.getPropertyLoader(ImageConstants.LOAD_IMAGE_PROPERTY_FILE);\n for(Object[] row: rows){ \n PepDetailsHistory pepHist = new PepDetailsHistory();\n pepHist.setPepOrinNumber(row[0]!=null?row[0].toString():null); \n if(null != row[6]){\n \tif(\"01\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Initiated\");\n \t}\n \tif(\"02\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Completed\");\n \t}\n\t\t\t\tif(\"03\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Approved\");\n\t\t\t\t}\n\t\t\t\tif(\"04\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Failed RRD Check\");\n\t\t\t\t}\n\t\t\t\tif(\"05\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Deactivated\");\n\t\t\t\t}\n\t\t\t\tif(\"06\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Closed\");\n\t\t\t\t}\n\t\t\t\tif(\"07\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Rejected By DCA\");\n\t\t\t\t}\n\t\t\t\tif(\"08\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Ready For Review\");\n\t\t\t\t}\n \t\n }else{\n \tpepHist.setHistoryStatus(\"\");\n }\n pepHist.setPepUpdatedBy(row[5]!=null?row[5].toString():null); \n if(row[2]!=null){ \t\n \tdate = formatter.parse(row[2].toString());\n \tcreatedOn = formatter1.format(date);\n \tpepHist.setCreatedOn(createdOn!=null?createdOn.toString():null);\n }\n if(row[4]!=null){\n \tdate1 = formatter.parse(row[4].toString());\n \tupdatedDate = formatter1.format(date1);\n \tpepHist.setUpdateDate(updatedDate!=null?updatedDate.toString():null);\n } \n pepHist.setCreatedBy(row[1]!=null?row[1].toString():null); \n if(null != row[3]){\n \tString imageStateCode=row[3] == null? \"\" : row[3].toString();\n String imageStateDesc = prop.getProperty(\"Image\"+imageStateCode);\n \n String imageState = imageStateDesc == null ? \"\": imageStateDesc.toString();\n pepHist.setUpdatedStatus(imageState);\n }else{\n \tpepHist.setUpdatedStatus(\"\");\n }\n pepList.add(pepHist); \n }\n }catch(Exception e){\n \tLOGGER.error(\"inside getGroupingHistoryDetails \",e);\n }finally{ \n session.close();\n } \n return (ArrayList<PepDetailsHistory>) pepList; \n }", "@Test\r\n void testVaryingMajorityWithTooMuchHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 5, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 4, \"varyingMajority not returning correctly with too much history\");\r\n }", "public ReservationhistoryExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "@Test\r\n void testVaryingMajorityNoHistory() {\r\n VaryingMajority testStrat = new VaryingMajority(3);\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 1, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 0, \"varyingMajority not returning c when no history\");\r\n }", "@Test\n\tpublic void testMainScenario() {\n\t\tProject project = this.db.project().create(\"Test project\", 200, \"13-05-2014\", null);\n\n//Test #1\t\t\n\t\tassertEquals(project.getActivities().size(), 0);\n\t\tassertEquals(project.getEstPercentageCompletion(), 0);\n\t\tassertEquals(project.getEstHoursRemaining(), 200);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 0);\n\t\tassertEquals(project.getHoursRegistered(), 0);\n\t\t\n\t\tActivity activity1 = this.db.activity().createProjectActivity(project.getId(), \"activity1\", 10, this.stringDateTimeToLong(\"01-05-2013 01:00\"), this.stringDateTimeToLong(\"01-05-2014 01:00\"));\n\t\tActivity activity2 = this.db.activity().createProjectActivity(project.getId(), \"activity2\", 10, this.stringDateTimeToLong(\"01-05-2013 01:00\"), this.stringDateTimeToLong(\"01-05-2014 01:00\"));\n\n//Test #2\t\t\n\t\tassertEquals(project.getActivities().size(), 2);\n\t\tassertEquals(project.getEstPercentageCompletion(), 0);\n\t\tassertEquals(project.getEstHoursRemaining(), 200);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 20);\n\t\tassertEquals(project.getHoursRegistered(), 0);\n\t\t\n\t\tDeveloper developer = this.db.developer().readByInitials(\"JL\").get(0);\n\t\tDeveloper developer2 = this.db.developer().readByInitials(\"PM\").get(0);\n\t\tDeveloper developer3 = this.db.developer().readByInitials(\"GH\").get(0);\n\t\tDeveloper developer4 = this.db.developer().readByInitials(\"RS\").get(0);\n\t\tactivity1.addDeveloper(developer);\n\t\tactivity1.addDeveloper(developer2);\n\t\tactivity1.addDeveloper(developer3);\n\t\tactivity1.addDeveloper(developer4);\n\n//Test #3\n\t\t//Tests that the initials of all developers are stored correctly\t\t\n\t\tassertEquals(activity1.getAllDevsInitials(),\"JL,PM,GH,RS\");\n\t\tassertEquals(activity1.getAllDevsInitials() == \"The Beatles\", false); //Please fail!\n\t\t\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"11-05-2013 06:30\"), this.stringDateTimeToLong(\"11-05-2013 09:30\"), developer.getId(), activity1.getId(), false);\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"11-05-2013 06:30\"), this.stringDateTimeToLong(\"11-05-2013 09:30\"), developer2.getId(), activity1.getId(), false);\n\t\t\n\t\t//Showed in the project maintainance view, and is relevant to the report\n\t\tassertEquals(activity1.getHoursRegistered(),6);\n\t\t\n//Test #4\n\t\t//Tests normal registration\t\t\n\t\tassertEquals(project.getEstPercentageCompletion(), 3);\n\t\tassertEquals(project.getEstHoursRemaining(), 194);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 20);\n\t\tassertEquals(project.getHoursRegistered(), 6);\n\t\t\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"12-05-2013 06:30\"), this.stringDateTimeToLong(\"12-05-2013 09:30\"), developer3.getId(), activity2.getId(), true);\n\t\tthis.db.registerTime().create(this.stringDateTimeToLong(\"12-05-2013 06:30\"), this.stringDateTimeToLong(\"12-05-2013 09:30\"), developer4.getId(), activity2.getId(), true);\n\n//Test #5\n\t\t//Tests that assits also count\t\t\n\t\tassertEquals(project.getEstPercentageCompletion(), 6);\n\t\tassertEquals(project.getEstHoursRemaining(), 188);\n\t\tassertEquals(project.getHourBudget(), 200);\n\t\tassertEquals(project.getHoursAllocatedToActivities(), 20);\n\t\tassertEquals(project.getHoursRegistered(), 12);\n\t}", "public RecordSet loadExpHistoryInfo(Record inputRecord);", "@Test\n\t\tpublic void testGetTradeHistory()\n\t\t{\n\t\t\t// all the previous trades for the dummy stock \n\t\t\tList<TickEvent<Trade>> completedTrades = exchange.getTradeHistory(stock);\n\t\t\t\n\t\t\t// check they are in the correct order\n\t\t\tfor(int i = 0; i < completedTrades.size()-1; i++)\n\t\t\t{\n\t\t\t\tassertTrue(completedTrades.get(i).compareTo(completedTrades.get(i+1)) < 0);\n\t\t\t}\n\t\t\t\n\t\t}", "@Test\r\n void testHardTitForTat() {\r\n HardTitForTat testStrat = new HardTitForTat();\r\n PeriodicCD testStrat2 = new PeriodicCD();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n ArrayList<Character> expected = new ArrayList<>(Arrays.asList('c', 'c', 'd'));\r\n Game game = new Game(testStrat, testStrat2, 3, payoffs);\r\n game.playGame();\r\n assertEquals(game.historyStrategy1, expected, \r\n \"HardTitForTat strategy not functioning correctly\");\r\n }", "public static void main(String[] args) {\n Course AbstractAdvancedJavaSuperClass = new AdvancedJavaCourse(\"AdvancedJava\", \"-003\");\r\n Course AbstractJavaSuperClass = new IntroJavaCourse(\"IntroJava\", \"-002\");\r\n Course AbstractProgramClass = new IntroToProgrammingCourse(\"Intro\", \"-001\");\r\n\r\n AbstractAdvancedJavaSuperClass.setCredits(4);\r\n AbstractJavaSuperClass.setCredits(4.0);\r\n AbstractProgramClass.setCredits(4.0);\r\n \r\n //this is a test\r\n \r\n AbstractAdvancedJavaSuperClass.setPrerequisites(AbstractJavaSuperClass.getCourseNumber());\r\n AbstractJavaSuperClass.setPrerequisites(AbstractProgramClass.getCourseNumber());\r\n \r\n System.out.println(AbstractProgramClass.getCapitalizedCourseName()\r\n + \" \" + AbstractProgramClass.getCourseNumber() );\r\n \r\n System.out.println(AbstractJavaSuperClass.getCourseName()\r\n + \" \" + AbstractJavaSuperClass.getCourseNumber() \r\n + \" \" + AbstractJavaSuperClass.getPrerequisites());\r\n \r\n System.out.println(AbstractAdvancedJavaSuperClass.getCourseName()\r\n + \" \" + AbstractAdvancedJavaSuperClass.getCourseNumber() \r\n + AbstractAdvancedJavaSuperClass.getPrerequisites() );\r\n}", "private void computePartnersHistory(int roundNumber) {\n\t\tthis.partnerHistory = new HashMap<>();\n\t\tfor (String playerKey : this.presentPlayerKeys) {\n\t\t\tList<String> newPartnerList = new ArrayList<>();\n\t\t\tthis.partnerHistory.put(playerKey, newPartnerList);\n\t\t}\n\n\t\t// iterate over rounds and collect the data\n\t\tfor (int i = 1; i < roundNumber; i++) {\n\t\t\tfor (ChesspairingGame game : getRound(i).getGames()) {\n\t\t\t\tif (game.getResult() != ChesspairingResult.BYE) {\n\t\t\t\t\tString whiteKey = game.getWhitePlayer().getPlayerKey();\n\t\t\t\t\tString blackKey = game.getBlackPlayer().getPlayerKey();\n\t\t\t\t\tutilAddPartnerToHistory(whiteKey, blackKey);\n\t\t\t\t\tutilAddPartnerToHistory(blackKey, whiteKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Before\n public void setup() {\n MockitoAnnotations.initMocks(this);\n\n historyList = Lists.newArrayList(new History(\"WWW1234\",\n \"Kuantan\",\n Long.valueOf(\"1542022506879\"),\n \"-sdsad\",\n 0.45,\n 1));\n\n historyPresenter = new HistoryPresenter(historyView, remoteDataSource,\n sharedPreferenceService);\n }", "@Test\n public void mainFlowTest() {\n type.insert();\n engineer.insert();\n\n Equipment equipment1 = new Equipment(\"equipment1\", type.getId(), model, location, installTime1);\n Equipment equipment2 = new Equipment(\"equipment2\", type.getId(), model, location, installTime2);\n equipment1.insert();\n equipment2.insert();\n\n Plan plan1 = new Plan(\"plan1\", type.getId(), 30, \"large\", \"checking\");\n Plan plan2 = new Plan(\"plan2\", type.getId(), 60, \"small\", \"repairing\");\n plan1.insert();\n plan2.insert();\n\n Record record1 = new Record(\"r1\", plan1.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 1).getTime(), 2, \"换过滤网\");\n Record record2 = new Record(\"r2\", plan2.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 31).getTime(), 1, \"发动机清理\");\n Record record3 = new Record(\"r3\", plan1.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 5).getTime(), 3, \"cleaning\");\n Record record4 = new Record(\"r4\", plan2.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2016, 0, 4).getTime(), 2, \"tiny repairing\");\n record1.insert();\n record2.insert();\n record3.insert();\n record4.insert();\n\n // test the correctness of 10 days tasks\n List<Task> tenDayTasks = MaintenanceOperation.getTenDaysTask(DateUtils.getCalendar(2015, 11, 30).getTime());\n assertEquals(\"wrong with 10 days' tasks\", 2, tenDayTasks.size());\n\n // test the total maintenance time\n int time1 = MaintenanceOperation.getTotalMaintenanceTime(equipment1.getId());\n assertEquals(\"wrong with total time of equipment 1\", 3, time1);\n int time2 = MaintenanceOperation.getTotalMaintenanceTime(equipment2.getId());\n assertEquals(\"wrong with total time of equipment 2\", 5, time2);\n\n // test the total maintenance time of certain type\n int time3 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time3);\n int time4 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 1, time4);\n int time5 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 3, time5);\n int time6 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time6);\n }", "@Test\n\tpublic void testPrimeActionnairePrincipal(){\n\t\tassertEquals(2000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 2));\n\t\tassertEquals(3000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 3));\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 4));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 5));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 6));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 8));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 10));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 11));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 15));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 20));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 21));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 22));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 30));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 31));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 33));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 40));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 41));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.SACKSON, 42));\n\n\t\t// cas categorie hotel = 2\n\t\tassertEquals(3000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 2));\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 3));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 4));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 5));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 6));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 8));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 10));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 11));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 15));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 20));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 21));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 22));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 30));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 31));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 33));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 40));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 41));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.HYDRA, 42));\n\n\t\t// cas categorie hotel = 3\n\t\tassertEquals(4000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 2));\n\t\tassertEquals(5000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 3));\n\t\tassertEquals(6000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 4));\n\t\tassertEquals(7000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 5));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 6));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 8));\n\t\tassertEquals(8000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 10));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 11));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 15));\n\t\tassertEquals(9000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 20));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 21));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 22));\n\t\tassertEquals(10000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 30));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 31));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 33));\n\t\tassertEquals(11000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 40));\n\t\tassertEquals(12000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 41));\n\t\tassertEquals(12000, TypeChaine.primeActionnairePrincipal(TypeChaine.PHOENIX, 42));\n\t}", "@Test\n public void testGetHistoriqRemb() {\n\n Beneficiaire instance = ben1;\n HistRemb expResult = hist;\n HistRemb result = instance.getHistoriqRemb();\n assertEquals(expResult, result);\n\n instance = ben3;\n expResult = hist;\n result = instance.getHistoriqRemb();\n assertEquals(expResult, result);\n\n expResult = new HistRemb(\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\");\n result = instance.getHistoriqRemb();\n assertFalse(expResult.equals(result));\n }", "@Test\n public void currentProgressTest() {\n\n smp.checkAndFillGaps();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n\n assertEquals(5, smp.getCurrentProgress());\n assertEquals(30, smp.getUnitsTotal() - smp.getCurrentProgress());\n assertEquals(Float.valueOf(30), smp.getEntriesCurrentPace().lastEntry().getValue());\n assertTrue(smp.getEntriesCurrentPace().size() > 0);\n assertFalse(smp.isFinished());\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY\", Locale.getDefault());\n\n for (Map.Entry<Date, Float> entry : smp.getEntriesCurrentPace().entrySet()) {\n System.out.println(dateFormat.format(entry.getKey()) + \" : \" + entry.getValue());\n }\n\n\n for (int i = 0; i < 30; i++) {\n smp.increaseCurrentProgress();\n }\n\n assertTrue(smp.isFinished());\n\n smp.increaseCurrentProgress();\n\n assertEquals(Float.valueOf(0), smp.getEntriesCurrentPace().lastEntry().getValue());\n\n }", "public void initAllHistory() {\n\t\t// firstly tell the view clear its history content.\n\t\tview.clearHistoryTableContent();\n\n\t\tArrayList<Integer> scores = selectedLesson.getTestResultScores();\n\t\tArrayList<String> times = selectedLesson.getTestResultTimes();\n\n\t\tint count = times.size();\n\t\tfor (int i = 0; i < count; ++i) {\n\t\t\tview.addHistory(times.get(i), scores.get(i));\n\t\t}\n\t}", "public void testAll() {\r\n // Test dao.add\r\n ExtraPart part = new ExtraPart();\r\n part.setAttachPoint(new Coordinate(\"312,94\"));\r\n part.setImage(new ImageInfo(\"images/parts/extrapart1.png\",320,240));\r\n\r\n assertEquals(-1, part.getId());\r\n assertTrue(dao.add(part));\r\n assertTrue(part.getId() >= 0);\r\n\r\n // Test dao.getAll\r\n ArrayList<ExtraPart> parts = dao.getAll();\r\n assertEquals(1, parts.size());\r\n ExtraPart copy = parts.iterator().next();\r\n assertEquals(part.getId(), copy.getId());\r\n assertEquals(part.getAttachPoint(), copy.getAttachPoint());\r\n assertEquals(part.getImage(), copy.getImage());\r\n }", "@Test\n void should_first_player_win_and_finish_the_game() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 1, 1, 2, 1, 1, 1); // 6-1\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertTrue(firstPlayer.isWinner());\n assertEquals(GameStatus.FINISHED, game.getGameStatus());\n }", "@ClassVersion(\"$Id: HistoryService.java 16670 2013-08-28 19:49:06Z colin $\")\r\npublic interface HistoryService {\r\n\r\n /**\r\n * Initializes the receiver with the given system resources.\r\n *\r\n * @param idFactory The ID factory to be used for report ID\r\n * generation.\r\n * @param reportSavedListener The listener notified after a report\r\n * has been saved (successfully or not). It may be null if no\r\n * notifications are needed.\r\n * @param dataSource the data source\r\n *\r\n * @throws PersistenceException if an error occurs during initialization\r\n */\r\n public void init(IDFactory idFactory,\r\n \t\tReportSavedListener reportSavedListener,\r\n \t\tComboPooledDataSource dataSource)\r\n throws PersistenceException;\r\n \r\n /**\r\n * Returns the actor ID associated with the report with given\r\n * order ID.\r\n *\r\n * @param orderID The order ID.\r\n *\r\n * @return The actor ID. If no report with the given order ID\r\n * exists, null is returned, and no exception is thrown.\r\n *\r\n * @throws PersistenceException if there were errors accessing the\r\n * report.\r\n */\r\n public UserID getActorID\r\n \t\t(final OrderID orderID)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Returns all the reports received after the supplied date-time\r\n * value, and which are visible to the given user.\r\n *\r\n * @param user the user making the query. Cannot be null.\r\n * @param data the date-time value. Cannot be null.\r\n *\r\n * @return the reports that were received after the date-time\r\n * value, and which are visible to the given user.\r\n *\r\n * @throws PersistenceException if there were persistence errors\r\n * fetching the reports.\r\n */\r\n public ReportBaseImpl[] getReportsSince\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;\r\n\r\n /**\r\n * Returns the open orders visible to the given user.\r\n *\r\n * @param user a <code>SimpleUser</code> value\r\n * @return a <code>List&lt;ReportBaseImpl</code> value\r\n * @throws PersistenceException if there were errors retrieving the data\r\n */\r\n public List<ReportBaseImpl> getOpenOrders(SimpleUser user)\r\n throws PersistenceException;\r\n \r\n /**\r\n * Returns the position of the instrument based on all reports\r\n * received for it before or on the supplied date, and which are visible\r\n * to the given user.\r\n *\r\n * @param user the user making the query. Cannot be null.\r\n * @param data the date to compare with all the reports. Only the reports\r\n * that were received prior to or on this date will be used in this calculation.\r\n * Cannot be null.\r\n * @param instrument the instrument whose position is desired. Cannot be null.\r\n *\r\n * @return the instrument position.\r\n *\r\n * @throws PersistenceException if there were errors retrieving the equity\r\n * position\r\n */\r\n public BigDecimal getPositionAsOf\r\n \t\t(SimpleUser user, Date data, Instrument instrument)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Returns the aggregate position of each (instrument,account,actor)\r\n * tuple based on all reports for given security type\r\n * received for each tuple on or before the supplied date, \r\n * and which are visible to the given user.\r\n *\r\n * @param user the user making the query. Cannot be null.\r\n * @param data the date to compare with all the reports. Only\r\n * the reports that were received on or prior to this date will be\r\n * used in this calculation. Cannot be null.\r\n * @param securityType the security type. Cannot be null.\r\n *\r\n * @return the position map.\r\n *\r\n * @throws PersistenceException if there were errors retrieving the\r\n * position map.\r\n */\r\n public Map<PositionKey, BigDecimal> getPositionsAsOf\r\n \t\t(SimpleUser user, Date data, SecurityType securityType)\r\n \t\tthrows PersistenceException;\r\n\r\n /**\r\n * Returns the aggregate position of each (instrument,account,actor)\r\n * tuple based on all reports received for each tuple on or before\r\n * the supplied date, and which are visible to the given user.\r\n *\r\n * @param user the user making the query. Cannot be null.\r\n * @param data the date to compare with all the reports. Only\r\n * the reports that were received on or prior to this date will be\r\n * used in this calculation. Cannot be null.\r\n *\r\n * @return the position map.\r\n *\r\n * @throws PersistenceException if there were errors retrieving the\r\n * position map.\r\n */\r\n public Map<PositionKey, BigDecimal> getAllPositionsAsOf\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Saves the supplied report to the database. Saving may be\r\n * immediate or delayed; in either case the report ID is set\r\n * before this method returns.\r\n *\r\n * @param report the report to be saved. Cannot be null.\r\n *\r\n * @throws PersistenceException if there were errors saving the report.\r\n */\r\n public void saveReport(ReportBase report)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Deletes the supplied report from the database.\r\n *\r\n * @param report a <code>ReportBase</code> value\r\n * @throws PersistenceException if there were errors deleting the report\r\n */\r\n public void deleteReport(ReportBase report)\r\n throws PersistenceException;\r\n \r\n /**\r\n * Returns the history quotes visible to the given dates.\r\n *\r\n * @param instrument The instrument of the request.\r\n * @param inPeriod The period of the quotes.\r\n * @param inFrom The date from which to start in UTC. Cannot be null.\r\n * @param inTo The date to which to stop in UTC. Cannot be null.\r\n * @return a <code>List&lt;Quote</code> value\r\n * @throws PersistenceException if there were errors retrieving the data\r\n */\r\n public List<Quote> getQuoteHistory(Instrument instrument, Period period, \r\n \t\tDate fromDate, Date toDate)\r\n throws PersistenceException;\r\n \r\n /**\r\n * Returns the available instruments supported by the Broker.\r\n *\r\n * @param brokerID a <code>BrokerID</code> value\r\n * @throws PersistenceException if there were errors retrieving the instruments\r\n */\r\n public Set<Instrument> getInstruments(BrokerID brokerID)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Gets the supplied instrument info to the database.\r\n *\r\n * @param brokerID a <code>BrokerID</code> value\r\n\t * @param instrument a <code>Instrument</code> value\r\n * @throws PersistenceException if there were errors retrieving the info\r\n */\r\n public InstrumentInfo getInstrumentInfo(BrokerID brokerID, Instrument instrument)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Saves/Replaces the supplied instrument info to the database.\r\n *\r\n * @param brokerID a <code>BrokerID</code> value\r\n\t * @param instrument a <code>Instrument</code> value\r\n * @param info a <code>InstrumentInfo</code> value\r\n * @throws PersistenceException if there were errors saving the info\r\n */\r\n public void setInstrumentInfo(BrokerID brokerID, Instrument instrument, InstrumentInfo info)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Deletes the instrument info from the database.\r\n *\r\n * @param brokerID a <code>BrokerID</code> value\r\n\t * @param instrument a <code>Instrument</code> value\r\n * @throws PersistenceException if there were errors deleting the info\r\n */\r\n public void deleteInstrumentInfo(BrokerID brokerID, Instrument instrument)\r\n \t\tthrows PersistenceException;\r\n\r\n /**\r\n * Gets the root order ID for the given order ID.\r\n *\r\n * @param inOrderID an <code>OrderID</code> value\r\n * @return an <code>OrderID</code> value or <code>null</code>\r\n */\r\n\tpublic OrderID getRootOrderID(OrderID inOrderID)\r\n\t\t\tthrows PersistenceException;\r\n\r\n /**\r\n * Saves the supplied quote to the database. Saving may be\r\n * immediate or delayed;\r\n *\r\n * @param quote the quote to be saved. Cannot be null.\r\n *\r\n * @throws PersistenceException if there were errors saving the quote.\r\n */\r\n public void saveQuote(QuoteEvent quote)\r\n \t\tthrows PersistenceException;\r\n \r\n /**\r\n * Deletes the supplied quote from the database.\r\n *\r\n * @param quote a <code>QuoteEvent</code> value\r\n * @throws PersistenceException if there were errors deleting the quote\r\n */\r\n\tpublic void deleteQuote(QuoteEvent quote)\r\n\t\t\tthrows PersistenceException;\r\n}", "public ResultatTest() {\n\t\tthis.nbTests = 0;\n\t\tthis.echecs = new ArrayList<TestExecute>();\n\t\tthis.erreurs = new ArrayList<TestExecute>();\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}", "@Test\n void should_first_player_win_set_and_game_still_in_progress_when_tie_break_activated() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1); // 6-6 and 1-0 for firstPlayer\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertEquals(GameStatus.IN_PROGRESS, game.getGameStatus());\n assertTrue(game.isTiebreakIsActivated());\n }", "public ArrayList<Integer> getPointsHistory() {\n return pointsHistory;\n }", "public History(History historyData) {\n\tthis.timestampMinute = historyData.getTimestampMinute();\n\tthis.status = historyData.getStatus();\n\tthis.plug = historyData.getPlug();\n }", "@Test\r\n void testAddPoints() {\r\n AlwaysDefect testStrat = new AlwaysDefect();\r\n testStrat.addPoints(2);\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 2, \"addPoints or getPoints not functioning correctly\");\r\n }", "public HistoryData(int sp, int inc) {\n\t\tspeed = sp;\n\t\tincline = inc;\n\t\tduration = 0.0;\n\t}", "@Override\n public double explorationTime(){\n return timespent;\n }", "private History() {}", "@Before\n public void antesDeTestear(){\n this.creditosHaberes = new Ingreso();\n this.creditosHaberes.setMonto(10000.0);\n this.creditosHaberes.setFecha(LocalDate.of(2020,9,25));\n\n this.donacion = new Ingreso();\n this.donacion.setMonto(500.0);\n this.donacion.setFecha(LocalDate.of(2020,9,26));\n\n\n this.compraUno = new Egreso();\n this.compraUno.setFecha(LocalDate.of(2020,9,26));\n this.compraUno.setMonto(1000.0);\n\n this.compraDos = new Egreso();\n this.compraDos.setFecha(LocalDate.of(2020,9,27));\n this.compraDos.setMonto(2500.0);\n\n this.compraTres = new Egreso();\n this.compraTres.setFecha(LocalDate.of(2020,9,23));\n this.compraTres.setMonto(10000.0);\n\n ingresos.add(donacion);\n ingresos.add(creditosHaberes);\n\n egresos.add(compraUno);\n egresos.add(compraDos);\n egresos.add(compraTres);\n\n /***************Creacion de condiciones*************/\n this.condicionEntreFechas = new CondicionEntreFechas();\n\n this.condicionValor = new CondicionValor();\n\n this.condicionSinIngresoAsociado = new CondicionSinIngresoAsociado();\n /***************Creacion criterio*******************/\n this.ordenValorPrimeroEgreso = new OrdenValorPrimeroEgreso();\n this.ordenValorPrimeroIngreso = new OrdenValorPrimeroIngreso();\n this.ordenFecha = new Fecha();\n this.mix = new Mix();\n\n\n /***************Creacion vinculador*****************/\n vinculador = Vinculador.instancia();\n vinculador.addCondiciones(this.condicionValor);\n vinculador.addCondiciones(this.condicionEntreFechas);\n vinculador.addCondiciones(this.condicionSinIngresoAsociado);\n }", "@Test\n public void testGetLrs() {\n System.out.println(\"getLrs\");\n Set<LineaDeReceta> aux = new HashSet();\n aux.add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Receta instance = new Receta();\n instance.getLrs().add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Set<LineaDeReceta> expResult = aux;\n Set<LineaDeReceta> result = instance.getLrs();\n assertEquals(expResult, result);\n }", "@Test\n void should_activate_tie_break_when_two_players_reach_set_6() {\n List<Integer> setPointOrderTab = Arrays.asList(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2); // 6-6\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertEquals(GameStatus.IN_PROGRESS, game.getGameStatus());\n assertTrue(game.isTiebreakIsActivated());\n }", "@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\n }", "@Test\r\n public void testPartido1() throws Exception {\r\n /* \r\n * En el estado EN_ESPERA\r\n */\r\n assertEquals( \"Ubicación: Camp Nou\" \r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en espera, aún no se han concretado los equipos\"\r\n , P1.datos());\r\n /* \r\n * En el estado NO_JUGADO\r\n */\r\n P1.fijarEquipos(\"Barça\",\"Depor\"); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido aún no se ha jugado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nEquipo visitante: Depor\" \r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado EN_JUEGO\r\n */\r\n P1.comenzar(); \r\n P1.tantoLocal();\r\n P1.tantoVisitante();\r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en juego\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado FINALIZADO\r\n */\r\n P1.terminar(); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido ha finalizado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n assertEquals(\"Empate\",P1.ganador());\r\n }", "private List<Map<StatusEnum, GraphPoint>> getTestsStat(List<Test> tests) {\n List<Map<StatusEnum, GraphPoint>> result = new ArrayList<>();\n Map<String, StatusEnum> testsResultMap = new HashMap<>();\n Date tmpEndTime = null;\n Calendar periodTime = new GregorianCalendar();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\");\n int testsSize = tests.size();\n int i = 0;\n for (Test test : tests) {\n i++;\n if (tmpEndTime == null) {\n tmpEndTime = test.getEndTime();\n periodTime.setTime(tmpEndTime);\n periodTime.add(Calendar.DAY_OF_YEAR, Config.GRAPH_ONE_PERIOD);\n }\n if (test.getFailReasonToTest() == null || !test.getFailReasonToTest().getFailReason().isStatsIgnored()) {\n if (test.getStatus() != null) {\n testsResultMap.put(test.getMethodName(), test.getStatus().getStatusEnum());\n } else {\n testsResultMap.put(test.getMethodName(), StatusEnum.UNFINISHED);\n }\n }\n if (testsSize == i || test.getEndTime().getTime() >= periodTime.getTimeInMillis()) {\n Map<StatusEnum, GraphPoint> onePeriodResult = new LinkedHashMap<>();\n Map<StatusEnum, Integer> stats = getStatsForResults(testsResultMap);\n String tmpXDate = dateFormat.format(periodTime.getTime());\n onePeriodResult.put(StatusEnum.TOTAL, new GraphPoint(tmpXDate, String.valueOf(stats.get(StatusEnum.TOTAL))));\n onePeriodResult.put(StatusEnum.PASSED, new GraphPoint(tmpXDate, String.valueOf(stats.get(StatusEnum.PASSED))));\n onePeriodResult.put(StatusEnum.FAILED, new GraphPoint(tmpXDate, String.valueOf(stats.get(StatusEnum.FAILED))));\n onePeriodResult.put(StatusEnum.SKIPPED, new GraphPoint(tmpXDate, String.valueOf(stats.get(StatusEnum.SKIPPED))));\n onePeriodResult.put(StatusEnum.UNFINISHED, new GraphPoint(tmpXDate, String.valueOf(stats.get(StatusEnum.UNFINISHED))));\n result.add(onePeriodResult);\n tmpEndTime = test.getEndTime();\n periodTime.add(Calendar.DAY_OF_YEAR, Config.GRAPH_ONE_PERIOD);\n testsResultMap.clear();\n }\n }\n return result;\n }", "List<OFPortMod> getHistory(DatapathId dpid, OFPort port, Date startTime, Date endTime) throws PortModException;", "@Override\n public CommandResult executePrimitive(Model model, CommandHistory history) throws CommandException {\n int oldXp = model.getXpValue();\n Level oldLevel = model.getLevel();\n\n String completedTasksOutput = completeTasks(model);\n\n // calculate change in xp to report to the user.\n int newXp = model.getXpValue();\n int changeInXp = newXp - oldXp;\n Level newLevel = model.getLevel();\n\n // Comparison with != operator is valid since Level is an enum.\n boolean hasChangeInLevel = newLevel != oldLevel;\n\n return createCommandResult(hasChangeInLevel, newLevel, changeInXp, completedTasksOutput);\n }", "@Test\n\tpublic void testPrimeActionnaireSecondaire(){\n\t\tassertEquals(1000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 2));\n\t\tassertEquals(1500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 3));\n\t\tassertEquals(2000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 4));\n\t\tassertEquals(2500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 5));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 6));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 8));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 10));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 11));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 15));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 20));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 21));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 22));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 30));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 31));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 33));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 40));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 41));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.SACKSON, 42));\n\n\t\t// cas categorie hotel = 2\n\t\tassertEquals(1500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 2));\n\t\tassertEquals(2000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 3));\n\t\tassertEquals(2500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 4));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 5));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 6));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 8));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 10));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 11));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 15));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 20));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 21));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 22));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 30));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 31));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 33));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 40));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 41));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.HYDRA, 42));\n\n\t\t// cas categorie hotel = 3\n\t\tassertEquals(2000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 2));\n\t\tassertEquals(2500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 3));\n\t\tassertEquals(3000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 4));\n\t\tassertEquals(3500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 5));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 6));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 8));\n\t\tassertEquals(4000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 10));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 11));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 15));\n\t\tassertEquals(4500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 20));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 21));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 22));\n\t\tassertEquals(5000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 30));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 31));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 33));\n\t\tassertEquals(5500, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 40));\n\t\tassertEquals(6000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 41));\n\t\tassertEquals(6000, TypeChaine.primeActionnaireSecondaire(TypeChaine.PHOENIX, 42));\n\t}", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }", "@UiThreadTest\r\n public void testDailyHistory() {\r\n Intent loginIntent = new Intent();\r\n PomoUser user = new PomoUser(\"9a36d2f9018aacde1430411867961\", \"test\", \"1\", false, true, 1, 1);\r\n loginIntent.putExtra(ExtraName.POMO_USER, user);\r\n mainActivity.onActivityResult(1, Activity.RESULT_OK, loginIntent);\r\n assertTrue(((TableLayout) mainActivity.findViewById(R.id.history)).getChildCount() > 0);\r\n }", "public RecordSet loadAllProcessDetailHistory(Record inputRecord);", "@Test\n public void testDetecterAnomalieNbrMinimalItem() {\n\n POJOCompteItem instance = genererInstanceTest();\n instance.setDate1(new DateTime(2013, 1, 1, 0, 1).toDate());\n instance.setDate2(new DateTime(2013, 1, 6, 0, 1).toDate());\n\n\n System.out.println(\"detecterAnomalieNbrMinimalItem-----\");\n \n try {\n instance.compte();\n } catch (Exception ex) {\n Logger.getLogger(POJOCompteItemTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n Map<Date, Integer> result = instance.detecterAnomalieNbrMinimalItem(0, 50);\n if (!result.isEmpty()) {\n fail(\"On ne devait pas avoir de résultats\");\n }\n\n\n result = instance.detecterAnomalieNbrMinimalItem(1, 3);\n if (!result.isEmpty()) {\n fail(\"On ne devait pas avoir de résultat il y en a \" + result.size());\n }\n\n\n result = instance.detecterAnomalieNbrMinimalItem(1, 1);\n if (result.isEmpty()) {\n for (Map.Entry<Date, Integer> entry : result.entrySet()) {\n Date date = entry.getKey();\n Integer integer = entry.getValue();\n System.out.println(\"Date \" + date + \" nbr : \" + integer);\n\n }\n fail(\"il devait y avoir des résultats. On en a \" + result.size());\n }\n\n Item it2 = new Item();\n it2.setDateRecup(new DateTime(2013, 1, 16, 0, 1).toDate());\n\n instance.getItems().add(it2);\n instance.setDate2(new DateTime(2013, 1, 16, 0, 1).toDate());\n try {\n instance.compte();\n } catch (Exception ex) {\n Logger.getLogger(POJOCompteItemTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n result = instance.detecterAnomalieNbrMinimalItem(1, 4);\n \n System.out.println(\"NBR : \" + result.size());\n if(result.size() != 9){\n fail(\"On revait avoir 12 résultats. on en a \" + result.size());\n }\n\n }", "@Test\n\tpublic void Dashlets_18590_Meetings_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\tDataSource meetingsDS = testData.get(testName);\n\n\t\t// Bugs record view and create meetings with status = Held, Scheduled, Canceled \n\t\tsugar().bugs.navToListView();\n\t\tsugar().bugs.listView.clickRecord(1);\n\t\tStandardSubpanel meetingSubpanel = sugar().bugs.recordView.subpanels.get(sugar().meetings.moduleNamePlural);\n\t\tVoodooControl name = sugar().meetings.createDrawer.getEditField(\"name\");\n\t\tVoodooSelect status = (VoodooSelect)sugar().meetings.createDrawer.getEditField(\"status\");\n\t\tfor (int i = 0; i < meetingsDS.size(); i++) {\n\t\t\tmeetingSubpanel.addRecord();\n\t\t\tname.set(meetingsDS.get(i).get(\"name\"));\n\t\t\tstatus.set(meetingsDS.get(i).get(\"status\"));\n\t\t\tsugar().meetings.createDrawer.save();\n\t\t\tsugar().alerts.getSuccess().closeAlert();\n\t\t}\n\n\t\t// TODO: VOOD-963\n\t\tVoodooControl dashboardTitle = sugar().bugs.dashboard.getControl(\"dashboard\");\t\t\t\n\t\tFieldSet customData = testData.get(testName+\"_custom\").get(0);\n\n\t\t// Select My Dashboard, if Help dashboard \n\t\tif(!dashboardTitle.queryContains(customData.get(\"my_dashboard\"), true))\n\t\t\tsugar().dashboard.chooseDashboard(customData.get(\"my_dashboard\"));\n\n\t\t// TODO: VOOD-1305\n\t\t// Verify only Scheduled meeting is in Planned Activity dashlet\n\t\tnew VoodooControl(\"a\", \"css\", \".dashlets li.row-fluid:nth-of-type(1) .tab-pane.active a:nth-of-type(2)\").assertEquals(meetingsDS.get(0).get(\"name\"), true);\n\t\tAssert.assertTrue(\"Meetings in Planned Activity dashlet not equal one\", new VoodooControl(\"li\", \"css\", \".dashlets li.row-fluid:nth-of-type(1) .tab-pane.active li\").count() == 1);\n\n\t\t// TODO: VOOD-814\n\t\t// No suitable control found on DOM, index position is the only way to assert values\n\t\t// Verify Held and Cancelled meetings in History dashlet\n\t\tVoodooControl historyDashlet = new VoodooControl(\"a\", \"css\", \"div[data-voodoo-name=history] .tab-pane.active ul\");\n\t\thistoryDashlet.assertContains(meetingsDS.get(2).get(\"name\"), true);\n\t\thistoryDashlet.assertContains(meetingsDS.get(1).get(\"name\"), true);\n\t\tAssert.assertTrue(\"Meetings in history dashlet not equal two\", new VoodooControl(\"a\", \"css\", \"div[data-voodoo-name=history] .tab-pane.active ul li\").count() == 2);\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "public House() {\n this.pointsHistory = new ArrayList<>();\n }", "Stream<DataPoint> getHistoryData(Symbol symbol, LocalDateTime startTime, LocalDateTime endTime, int numberOfPoints);", "@BeforeClass\r\n public static void setUpClass() throws Exception {\r\n P1 = new Partido(\"Camp Nou\",\"2010-04-28\");\r\n P2 = new Partido(\"Camp Nou\",\"2010-04-28\");\r\n P3 = new Partido(\"Camp Nou\",\"2010-04-28\"); \r\n PE = new Partido(\"Camp Nou\",\"2010-04-28\"); \r\n }", "@Test\n public void testCalculScoreAvecQueDesSpares(){\n Jeu leJeu = new Jeu(5,5);\n Jeu jeuBonus1 = new Jeu(5, null);\n Partie laPartie = new Partie(leJeu, jeuBonus1);\n //when : on calcul le score\n Integer score = laPartie.calculerScore();\n //then : on obtient un score de 150\n assertEquals(new Integer(150), score);\n }", "@Test\n public void testFindEntitiesSearch() {\n MouldingProcessSearch search = new MouldingProcessSearch();\n search.setSignedOffBy(\"John Malone\");\n DAO<MouldingProcess> mpDAO = new DAO<MouldingProcess>(MouldingProcess.class);\n\n SearchProcessSheetAction action = new SearchProcessSheetAction(mpDAO);\n\n try {\n List<MouldingProcess> result = action.search(search);\n assertNotNull(result);\n assertEquals(result.size(), 4);\n } catch (DAOException de) {\n de.printStackTrace();\n fail(\"DAOException thrown\");\n }\n\n search.setMachineNo(\"Fanuc 1\");\n\n try {\n List<MouldingProcess> result = action.search(search);\n assertNotNull(result);\n assertEquals(result.size(), 1);\n } catch (DAOException de) {\n de.printStackTrace();\n fail(\"DAOException thrown\");\n }\n\n // Reset Search\n search = new MouldingProcessSearch();\n search.setStartDate(java.sql.Date.valueOf(\"2013-05-11\"));\n try {\n List<MouldingProcess> result = action.search(search);\n assertNotNull(result);\n assertEquals(result.size(), 1);\n } catch (DAOException de) {\n de.printStackTrace();\n fail(\"DAOException thrown\");\n }\n\n search.setStartDate(java.sql.Date.valueOf(\"2000-01-01\"));\n search.setEndDate(java.sql.Date.valueOf(\"2014-01-01\"));\n try {\n List<MouldingProcess> result = action.search(search);\n assertNotNull(result);\n assertEquals(result.size(), 3);\n } catch (DAOException de) {\n de.printStackTrace();\n fail(\"DAOException thrown\");\n }\n\n search.setSignedOffBy(\"John Malone\");\n try {\n List<MouldingProcess> result = action.search(search);\n // assertNotNull(result);\n // assertEquals(result.size(), 3);\n } catch (DAOException de) {\n de.printStackTrace();\n fail(\"DAOException thrown\");\n }\n\n }", "public void testgetCommentHistoryForOfficerTitles() {\n \n Collection CommentData = affOfficerBean.getCommentHistoryForOfficerTitles(AFF_PK);\n if (CommentData == null) {\n fail(\"No comments found\");\n }\n else { \n System.out.println(CommentData);\n }\n \n }", "protected abstract void createHistoryEvents();", "@Test\n public void test11() {\n cashRegister.addPennies(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addDimes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addDimes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addFives(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addNickels(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addOnes(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addQuarters(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n cashRegister.addTens(0);\n assertEquals(\"\", cashRegister.getAuditLog());\n }", "@Test\n public void testHistory(){\n\n userService.insertHistory(\"kaaksd\",\"------sdas\");\n }", "private ArrayList<Object> getOrderedTestCollection() {\n\n if (cachedLabTest != null) {\n return cachedLabTest;\n }\n //loads cachedLabTest\n loadCachedLabTestCollection();\n\n String mapFlag = propertyUtil.getSRTFilterProperty(NEDSSConstants.LABTEST_PROGAREA_MAPPING);\n if(mapFlag != null && mapFlag.equalsIgnoreCase(NEDSSConstants.YES))\n {\n\n cachedProgAreaFacilityList = new HashMap<Object,Object>();\n cachedConditionCdFacilityList = new HashMap<Object,Object>();\n\n SRTOrderedTestDAOImpl dao = new SRTOrderedTestDAOImpl();\n\n String labId = null;\n String programArea = null;\n String conditionCd = null;\n Collection<Object> ltMap = (ArrayList<Object> ) dao.getLabTestProgAreaMapping();\n\n if (ltMap != null) {\n Iterator<Object> it = ltMap.iterator();\n int size = ltMap.size();\n SRTLabTestDT labDt = null;\n while (it.hasNext()) {\n\n TestResultTestFilterDT testResults = (TestResultTestFilterDT) it.next();\n labDt = convertToSRTLabTestDT(testResults);\n labId = testResults.getLaboratoryId();\n programArea = testResults.getProgAreaCd();\n conditionCd = testResults.getConditionCd();\n\n if (programArea != null && labId != null) {\n addToCachedProgAreaList(programArea, labId, labDt);\n }\n if (conditionCd != null && labId != null) {\n addToCachedConditionCdList(conditionCd, labId, labDt);\n }\n }\n }\n }\n\n return cachedLabTest;\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "@Test\r\n public void testAddAndGetPoints() {\r\n Player player = new Player();\r\n int expResult = 0;\r\n int result = player.getPoints();\r\n assertEquals(expResult, result);\r\n \r\n \r\n player.addPoints(10);\r\n int expResult2 = 10;\r\n int result2 = player.getPoints();\r\n assertEquals(expResult2, result2);\r\n\r\n }", "public static void main(String[] args) {\n ProductWarehouseWithHistory juice = new ProductWarehouseWithHistory(\"Juice\", 1000.0, 1000.0);\n juice.takeFromWarehouse(11.3);\n System.out.println(juice.getName()); // Juice\n juice.addToWarehouse(1.0);\n System.out.println(juice);\n\n System.out.println(juice.history());\n }", "@Before\n public void setUp() {\n this.scoreBoard = new ScoreBoard();\n\n\n // Add some record with complexity 3\n DataManager.INSTANCE.setCurrentUserName(\"@u1\");\n DataManager.INSTANCE.setCurrentGameName(\"CM\");\n DataManager.INSTANCE.startNewGame(5);\n DataManager.INSTANCE.setCurrentGameName(\"ST\");\n DataManager.INSTANCE.setBoardManager(new BoardManager(3));\n DataManager.INSTANCE.getBoardManager().addScoreBy(1);\n this.scoreBoard.addNewRecords(new Record());\n\n this.scoreBoard.addNewRecords(new Record(3, 10, \"@u2\", \"ST\"));\n this.scoreBoard.addNewRecords(new Record(3, 25, \"@u3\", \"ST\"));\n this.scoreBoard.addNewRecords(new Record(4, 5, \"@u1\", \"ST\"));\n this.scoreBoard.addNewRecords(new Record(3, 15, \"@u3\", \"ST\"));\n }", "@Test\n public void testPartieContinue(){\n Joueur NORD = new Joueur(\"NORD\");\n Joueur SUD = new Joueur(\"SUD\");\n assertTrue(Regles.partieContinue(NORD.clone(), SUD.clone(), 0,false));\n // avec des bases injouables\n NORD.setAscendant(61);\n NORD.setDescendant(0);\n SUD.setAscendant(61);\n SUD.setDescendant(0);\n assertFalse(Regles.partieContinue(NORD.clone(), SUD.clone(), 0, false));\n // avec un jeu vide\n NORD.jeu.clear();\n assertFalse(Regles.partieContinue(NORD.clone(), SUD.clone(), 0, false));\n\n SUD.jeu.clear();\n NORD.jeu.add(0,59);\n NORD.jeu.add(1,58);\n NORD.setAscendant(57);\n NORD.setDescendant(2);\n SUD.setAscendant(1);\n SUD.setDescendant(60);\n assertTrue(Regles.partieContinue(NORD.clone(), SUD.clone(), 0,false));\n NORD.setAscendant(58);\n assertFalse(Regles.partieContinue(NORD.clone(), SUD.clone(), 0,false));\n //cas spécifique\n NORD.setAscendant(49);\n NORD.setDescendant(2);\n SUD.setAscendant(53);\n SUD.setDescendant(9);\n SUD.jeu.add(0,34);\n SUD.jeu.add(1,44);\n SUD.jeu.add(2,38);\n SUD.jeu.add(3,6);\n SUD.jeu.add(4,41);\n SUD.jeu.add(5,39);\n assertTrue(Regles.partieContinue(SUD.clone(), NORD.clone(), 0, false));\n\n\n }", "public PurchaseHistory() {\n this.purchaseHistory = new HashMap<>();\n }", "public History(long exhibit_id, String name, String description, Long section_id, Long category_id, long count, String rfid, Long museum_id, double wert, Long outsourced_id, Timestamp startdate, \r\n long id, Timestamp deleted, Timestamp insert, Timestamp update)\r\n {\r\n super(id, deleted, insert, update);\r\n this.exhibit_id = exhibit_id;\r\n this.name = name;\r\n this.description = description;\r\n /** @author Christian Landel */\r\n if (section_id!=null && section_id.equals(0L))\r\n \tthis.section_id=null;\r\n else\r\n \tthis.section_id = section_id;\r\n /** @author Christian Landel */\r\n if (category_id!=null && category_id.equals(0L))\r\n \tcategory_id=null;\r\n else\r\n \tthis.category_id = category_id;\r\n this.count = count;\r\n this.rfid = rfid;\r\n this.museum_id = museum_id;\r\n this.startdate = startdate;\r\n this.wert = wert;\r\n \r\n this.outsourced_id = outsourced_id;\r\n }", "private History toHistory(Game game) {\n\n History history = new History();\n\n history.setDate(game.getDate());\n history.setPlayerNameUa(game.getUsers().get(0).getNameUa());//TODO improve\n history.setPlayerNameEn(game.getUsers().get(0).getNameEn());//TODO improve\n\n if (game.getUsers().size() > 1) { //TODO improve\n history.setOpponentNameUa(game.getUsers().get(1).getNameUa());\n history.setOpponentNameEn(game.getUsers().get(1).getNameEn());\n } else {\n //TODO correct for both languages\n history.setOpponentNameUa(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n history.setOpponentNameEn(ResourceBundleUtil.getBundleString(\"games.game.statistics.text.audience\"));\n }\n\n User firstPlayer = game.getUsers().get(0); //TODO correct\n long firstPlayerScores = game.getAnsweredQuestions()\n .stream()\n .filter(aq -> firstPlayer.equals(aq.getUserWhoGotPoint()))\n .count();\n\n long secondPlayerScores = (long) game.getAnsweredQuestions()\n .size() - firstPlayerScores;\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(firstPlayerScores);\n stringBuilder.append(DELIMITER);//TODO move \":\" to properties\n stringBuilder.append(secondPlayerScores);\n String scores = stringBuilder.toString();\n history.setScores(scores);\n //TODO correct for both languages\n game.getAppeals().stream()\n .forEach(appeal -> {\n if (appeal.getAppealStage().equals(AppealStage.CONSIDERED)) {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.CONSIDERED.name()));\n } else {\n history.setAppealStage(ResourceBundleUtil.getBundleStringForAppealStage(AppealStage.NOT_FILED.name()));\n }\n\n });\n// }\n return history;\n\n }", "public void readHistory()throws Exception {\n int currentline = 0;\n File myObj = new File(\"order_history.txt\");\n Scanner myReader = new Scanner(myObj);\n outputHistoryObj = new Order[1];\n while (myReader.hasNextLine()) {\n Pizza[] list = new Pizza[1];\n String[] commentparts = null; //This is superstitious, sorry\n String[] fullparts = myReader.nextLine().split(\" // \");\n String[] pizzaparts = fullparts[1].split(\" , \");\n for(int i=0; i<=pizzaparts.length-1; i++){\n if(pizzaparts[i].contains(\" & \")){\n commentparts = pizzaparts[i].split(\" & \");\n list[i] = new Pizza(Menu.list[Integer.parseInt(commentparts[0])-1].getName(), Menu.list[Integer.parseInt(commentparts[0])-1].getIngredients(), commentparts[1], Integer.parseInt(commentparts[0]), Menu.list[Integer.parseInt(commentparts[0])-1].getPrice());\n } else {\n list[i] = new Pizza(Menu.list[Integer.parseInt(pizzaparts[i])-1].getName(), Menu.list[Integer.parseInt(pizzaparts[i])-1].getIngredients(), \"\", Integer.parseInt(pizzaparts[i]), Menu.list[Integer.parseInt(pizzaparts[i])-1].getPrice());\n }\n list = Arrays.copyOf(list, list.length + 1); //Resize name array by one more\n }\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date parsed = format.parse(fullparts[3]);\n java.sql.Timestamp timestamp = new java.sql.Timestamp(parsed.getTime());\n outputHistoryObj[currentline] = new Order(fullparts[0], Integer.parseInt(fullparts[2]), timestamp, list);\n outputHistoryObj = Arrays.copyOf(outputHistoryObj, outputHistoryObj.length + 1); //Resize name array by one more\n currentline++;\n }\n myReader.close();\n }", "public void reporteHabitacionMasPopular(TablaModelo modelo){\n ArrayList<ControlVeces> control = new ArrayList<>();\n ControlVeces controlador;\n try {// pago de alojamiento en rango fchas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio, RESERVACION.Id_Habitacion FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Check_In=1;\");\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// pago de alojamiento en rango fchas\n String nombre = Integer.toString(resultado.getInt(6));\n int casilla = numeroObjeto(control,nombre);\n if(casilla>=0){// maneja el resultado// pago de alojamiento en rango fchas\n control.get(casilla).setVeces(control.get(casilla).getVeces()+1);\n }else{// maneja el resultado\n controlador = new ControlVeces(nombre);// pago de alojamiento en rango fchas\n control.add(controlador);\n }\n } // maneja el resultado \n ordenamiento(control);\n int numero = control.size()-1;// el de hasta arriba es el que mas elementos tiene \n String idHabitacionMasPopular = control.get(numero).getNombre();\n this.habitacionPopular= idHabitacionMasPopular;\n introducirDatosHabitacionMasPopular(modelo, idHabitacionMasPopular);\n } catch (SQLException ex) {\n ex.printStackTrace();\n } catch(Exception e){\n \n }\n }", "@Test\n public void testAnalisarPeriodo() throws Exception {\n System.out.println(\"analisarPeriodo\");\n int[][] dadosFicheiro = null;\n int lowerLimit = 0;\n int upperLimit = 0;\n int linhas = 0;\n int[] expResult = null;\n int[] result = ProjetoV1.analisarPeriodo(dadosFicheiro, lowerLimit, upperLimit, linhas);\n assertArrayEquals(expResult, result);\n\n }", "@Test\n public void testStoreAndRetrieve() throws Exception {\n PipelineDefinition actualPipelineDef = null;\n\n try {\n\n PipelineDefinition expectedPipelineDef = populateObjects();\n\n // clear the cache , detach the objects\n databaseService.closeCurrentSession();\n\n // Retrieve\n databaseService.beginTransaction();\n\n actualPipelineDef = pipelineDefinitionCrud.retrieveLatestVersionForName(TEST_PIPELINE_NAME_1);\n\n databaseService.commitTransaction();\n\n ReflectionEquals comparer = new ReflectionEquals();\n comparer.excludeField(\".*\\\\.lastChangedTime\");\n comparer.excludeField(\".*\\\\.lastChangedUser.created\");\n comparer.excludeField(\".*\\\\.uowProperties.instance\");\n comparer.assertEquals(\"PipelineDefinition\", expectedPipelineDef,\n actualPipelineDef);\n\n List<PipelineDefinition> latestVersions = pipelineDefinitionCrud.retrieveLatestVersions();\n assertEquals(\"latestVersions count\", 1, latestVersions.size());\n comparer.assertEquals(\"latest version\", expectedPipelineDef,\n latestVersions.get(0));\n\n assertEquals(\"PipelineDefinitionNode count\", 2, pipelineNodeCount());\n assertEquals(\"PipelineModuleDefinition count\", 3,\n pipelineModuleDefinitionCount());\n assertEquals(\"ParameterSet count\", 1, pipelineModuleParamSetCount());\n } finally {\n databaseService.rollbackTransactionIfActive();\n }\n }", "@Test\n void showStoreHistorySuccess() {\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(EconnID,storeID, productID1,5);\n tradingSystem.subscriberPurchase(EuserId, EconnID, \"123456\",\"4\",\"2022\",\"123\",\"123456\",\"Rager\",\"Beer Sheva\",\"Israel\",\"123\");\n List<DummyShoppingHistory> list = store.ShowStoreHistory();\n assertEquals(list.size(), 1);\n assertTrue(list.get(0).getProducts().get(0).getProductName().equals(\"computer\"));\n }", "@Test\n public void testPrestamosRealizados() {\n System.out.println(\"prestamosRealizados\");\n BibliotecarioController instance = new BibliotecarioController();\n Map<Usuario, List<Historico>> expResult = new HashMap<>();\n Usuario usuario = new UsuariosList().getUsuarios().get(0);\n List<Historico> prestamos = new ArrayList<>();\n prestamos.add(new HistoricosList().getHistoricos().get(0));\n expResult.put(usuario, prestamos);\n Map<Usuario, List<Historico>> result = instance.prestamosRealizados();\n assertEquals(expResult, result);\n\n }", "@Test\n\tvoid PriorityQueveList() {\n\t\t\n\t\tQueveWorkPrint myQueveWorkPrint = new QueveWorkPrint();\n\t\tassertEquals(0, myQueveWorkPrint.getSize());\n\n\t\tmyQueveWorkPrint.Enqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 9, \"25-10-2018\");\n\t\tQueveWorkPrint[] expectedvalue = new QueveWorkPrint[5];\n\t\tQueveWorkPrint[] actualvalue = new QueveWorkPrint[5];\n\t\texpectedvalue[0] = myQueveWorkPrint;\n\n\t\tPriorityQueve MyPriorityQueve = new PriorityQueve(null);\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 9, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getName(), actualvalue[0].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getState(), actualvalue[0].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getProprietor(), actualvalue[0].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getPort(), actualvalue[0].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getPages(), actualvalue[0].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getSize(), actualvalue[0].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getSend(), actualvalue[0].getLast().getDocument().getSend());\n\t\t\n\t\tmyQueveWorkPrint.Enqueve(\"Presupuesto contable.pdf\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 4, \"25-10-2018\");\n\t\texpectedvalue[0] = myQueveWorkPrint;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Presupuesto contable.pdf\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 4, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getName(), actualvalue[0].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getState(), actualvalue[0].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getProprietor(), actualvalue[0].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getPort(), actualvalue[0].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getPages(), actualvalue[0].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getSize(), actualvalue[0].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[0].getLast().getDocument().getSend(), actualvalue[0].getLast().getDocument().getSend());\n\t\t\n\t\t// Clasifico y encolo en la posucion 1 del vector tipo QueveWorkPrint\n\t\t\n\t\tQueveWorkPrint myQueveWorkPrint1 = new QueveWorkPrint();\n\t\tassertEquals(0, myQueveWorkPrint1.getSize());\n\n\t\tmyQueveWorkPrint1.Enqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 15, \"25-10-2018\");\n\t\texpectedvalue[1] = myQueveWorkPrint1;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 15, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getName(), actualvalue[1].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getState(), actualvalue[1].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getProprietor(), actualvalue[1].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getPort(), actualvalue[1].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getPages(), actualvalue[1].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getSize(), actualvalue[1].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getSend(), actualvalue[1].getLast().getDocument().getSend());\n\t\t\n\t\tmyQueveWorkPrint1.Enqueve(\"Presupuesto contable.pdf\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 18, \"25-10-2018\");\n\t\texpectedvalue[1] = myQueveWorkPrint1;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Presupuesto contable.pdf\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 18, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getName(), actualvalue[1].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getState(), actualvalue[1].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getProprietor(), actualvalue[1].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getPort(), actualvalue[1].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getPages(), actualvalue[1].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getSize(), actualvalue[1].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[1].getLast().getDocument().getSend(), actualvalue[1].getLast().getDocument().getSend());\n\t\t\n\t\t// Clasifico y encolo en la posucion 2 del vector tipo QueveWorkPrint\n\t\t\n\t\tQueveWorkPrint myQueveWorkPrint2 = new QueveWorkPrint();\n\t\tassertEquals(0, myQueveWorkPrint2.getSize());\n\n\t\tmyQueveWorkPrint2.Enqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 25, \"25-10-2018\");\n\t\texpectedvalue[2] = myQueveWorkPrint2;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 25, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getName(), actualvalue[2].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getState(), actualvalue[2].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getProprietor(), actualvalue[2].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getPort(), actualvalue[2].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getPages(), actualvalue[2].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getSize(), actualvalue[2].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[2].getLast().getDocument().getSend(), actualvalue[2].getLast().getDocument().getSend());\n\t\t\n\t\t// Clasifico y encolo en la posucion 3 del vector tipo QueveWorkPrint\n\t\t\n\t\tQueveWorkPrint myQueveWorkPrint3 = new QueveWorkPrint();\n\t\tassertEquals(0, myQueveWorkPrint3.getSize());\n\n\t\tmyQueveWorkPrint3.Enqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 32, \"25-10-2018\");\n\t\texpectedvalue[3] = myQueveWorkPrint3;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 32, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getName(), actualvalue[3].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getState(), actualvalue[3].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getProprietor(), actualvalue[3].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getPort(), actualvalue[3].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getPages(), actualvalue[3].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getSize(), actualvalue[3].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getSend(), actualvalue[3].getLast().getDocument().getSend());\n\t\t\t\t\t\t\n\t\tmyQueveWorkPrint3.Enqueve(\"Presupuesto contable.pdf\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 35, \"25-10-2018\");\n\t\texpectedvalue[3] = myQueveWorkPrint3;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Presupuesto contable.pdf\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 35, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getName(), actualvalue[3].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getState(), actualvalue[3].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getProprietor(), actualvalue[3].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getPort(), actualvalue[3].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getPages(), actualvalue[3].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getSize(), actualvalue[3].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[3].getLast().getDocument().getSend(), actualvalue[3].getLast().getDocument().getSend());\t\t\t\t\n\t\t\n\t\t\n\t\t// Clasifico y encolo en la posucion 4 del vector tipo QueveWorkPrint\n\t\t\n\t\tQueveWorkPrint myQueveWorkPrint4 = new QueveWorkPrint();\n\t\tassertEquals(0, myQueveWorkPrint4.getSize());\n\n\t\tmyQueveWorkPrint4.Enqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 42, \"25-10-2018\");\n\t\texpectedvalue[4] = myQueveWorkPrint4;\n\n\t\tactualvalue = MyPriorityQueve.ClassifyandEnqueve(\"Nomina personal.xls\", \"Enviado\", \"JairoDelgado\", \"USB001\", 3, 42, \"25-10-2018\");\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getName(), actualvalue[4].getLast().getDocument().getName());\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getState(), actualvalue[4].getLast().getDocument().getState());\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getProprietor(), actualvalue[4].getLast().getDocument().getProprietor());\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getPort(), actualvalue[4].getLast().getDocument().getPort());\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getPages(), actualvalue[4].getLast().getDocument().getPages());\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getSize(), actualvalue[4].getLast().getDocument().getSize());\n\t\tassertEquals(expectedvalue[4].getLast().getDocument().getSend(), actualvalue[4].getLast().getDocument().getSend());\n\t\t\n\t\tMyPriorityQueve.PriorityQueveList();\n\t\t\n\t}", "public PurchaseHistory(String provider, String points, String time) {\n\t\tsuper();\n\t\tthis.provider = provider;\n\t\tthis.points = points;\n\t\tthis.time = time;\n\t}", "@Override\n public CommandResult execute(Model model, CommandHistory history) {\n requireNonNull(model);\n model.updateFilteredPersonList(new\n TimeFilterPredicate(time));\n\n ObservableList<Person> targetList = model.getFilteredPersonList();\n // Returns the command result\n if (targetList.isEmpty()) {\n return new CommandResult(\"Cannot find \" + time.toString() + \" slot within the students list!\");\n }\n\n\n List<String> personNameList = new ArrayList<>();\n for (Person ppl : targetList) {\n personNameList.add(ppl.getName().fullName);\n }\n\n return new CommandResult(\"The person whose timeSlot is \"\n + time.toString() + \" : \" + personNameList.toString());\n }", "public List<PerfBenchmarkDetail> getRecentDetailList(int limit, String testName);", "@Test\n void should_first_player_win_and_finish_the_game_when_second_player_has_score_5() {\n List<Integer> setPointOrderTab = Arrays.asList(2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1); // 7-5\n\n //WHEN\n game.computePoint(setPointOrderTab, true);\n\n //THEN\n assertTrue(firstPlayer.isWinner());\n assertEquals(GameStatus.FINISHED, game.getGameStatus());\n }", "TimeSpent createTimeSpent();", "public interface Part\n{\n\t/**\n\t * Add a draw to the part; pool and count to draw from.\n\t * \n\t * @param pool\n\t * The pool to draw from.\n\t * @param numQuestions\n\t * The number of questions to draw.\n\t * @return the PoolDraw detail added.\n\t */\n\tPoolDraw addDrawDetail(Pool pool, Integer numQuestions);\n\n\t/**\n\t * Add a pick to the part; question.\n\t * \n\t * @param question\n\t * The question to add.\n\t * @return the QuestionPick detail added.\n\t */\n\tQuestionPick addPickDetail(Question question);\n\n\t/**\n\t * Access the back pointer to the assessment.\n\t * \n\t * @return The back pointer to the assessment.\n\t */\n\tAssessment getAssessment();\n\n\t/**\n\t * Access the part details, each a PoolDraw or QuestionPick.\n\t * \n\t * @return The List of part details.\n\t */\n\tList<PartDetail> getDetails();\n\n\t/**\n\t * Access the first question. The order will be in a random order (if enabled) based on the current user.\n\t * \n\t * @return The first question, or null if there are none.\n\t */\n\tQuestion getFirstQuestion();\n\n\t/**\n\t * Access the id.\n\t * \n\t * @return The id.\n\t */\n\tString getId();\n\n\t/**\n\t * Get a message describing what is wrong with the part.\n\t * \n\t * @return A localized message describing what is wrong with the part, or null if the part is valid.\n\t */\n\tString getInvalidMessage();\n\n\t/**\n\t * Check if the part is valid.\n\t * \n\t * @return TRUE if the part is valid, FALSE if not.\n\t */\n\tBoolean getIsValid();\n\n\t/**\n\t * Access the last question. The order will be in a random order (if enabled) based on the current user.\n\t * \n\t * @return The last question, or null if there are none.\n\t */\n\tQuestion getLastQuestion();\n\n\t/**\n\t * Access the count of questions.\n\t * \n\t * @return The count of questions.\n\t */\n\tInteger getNumQuestions();\n\n\t/**\n\t * Access the ordering information within the assessment.\n\t * \n\t * @return The ordering information within the assessment.\n\t */\n\tOrdering<Part> getOrdering();\n\n\t/**\n\t * Access the assessment's presentation; the rich text and attachments that describe the assessment.\n\t * \n\t * @return The assessment's presentation.\n\t */\n\tPresentation getPresentation();\n\n\t/**\n\t * Access one of the questions, by question id.\n\t * \n\t * @param questionId\n\t * The question id.\n\t * @return the question, or null if the question is not defined or not part of the Part.\n\t */\n\tQuestion getQuestion(String questionId);\n\n\t/**\n\t * Access one of the questions, by question id, if it is in the part in a draw (not pick).\n\t * \n\t * @param questionId\n\t * The question id.\n\t * @return the question, or null if the question is not defined or not part of the Part as a draw.\n\t */\n\tQuestion getQuestionInDraw(String questionId);\n\n\t/**\n\t * Access one of the questions, by question id, if it is in the part in a pick (not draw).\n\t * \n\t * @param questionId\n\t * The question id.\n\t * @return the question, or null if the question is not defined or not part of the Part as a pick.\n\t */\n\tQuestion getQuestionInPick(String questionId);\n\n\t/**\n\t * Access the questions in delivery order.\n\t * \n\t * @return The questions in delivery order.\n\t */\n\tList<Question> getQuestions();\n\n\t/**\n\t * Access the questions that have been used for this part in any submissions. <br />\n\t * Order by question description.\n\t * \n\t * @return The questions that have been used for this part in any submissions\n\t */\n\tList<Question> getQuestionsUsed();\n\n\t/**\n\t * Access the randomize flag.\n\t * \n\t * @return TRUE if questions should be randomized per submission, FALSE if they should be presented in authored order.\n\t */\n\tBoolean getRandomize();\n\n\t/**\n\t * @return a non empty string describing the part; either the title, or text based on the part position.\n\t */\n\tString getTag();\n\n\t/**\n\t * Access the title.\n\t * \n\t * @return The title.\n\t */\n\tString getTitle();\n\n\t/**\n\t * Access the sum of all possible points for all questions in the part.\n\t * \n\t * @return The sum of all possible points for all questions in the part.\n\t */\n\tFloat getTotalPoints();\n\n\t/**\n\t * Remove the detail with this detail id.\n\t * \n\t * @param id\n\t * The detail id.\n\t */\n\tvoid removeDetail(String id);\n\n\t/**\n\t * Remove any draw detail that is for this pool.\n\t * \n\t * @param pool\n\t * The pool to remove.\n\t */\n\tvoid removeDrawDetail(Pool pool);\n\n\t/**\n\t * Remove any pick detail that selects this question.\n\t * \n\t * @param question\n\t * The question to remove.\n\t */\n\tvoid removePickDetail(Question question);\n\n\t/**\n\t * Set the randomize flag.\n\t * \n\t * @param setting\n\t * TRUE if questions should be randomized per submission, FALSE if they should be presented in authored order.\n\t */\n\tvoid setRandomize(Boolean setting);\n\n\t/**\n\t * Set the title.\n\t * \n\t * @param title\n\t * The title.\n\t */\n\tvoid setTitle(String title);\n}", "public History() {\n }", "public List<HistoryVisit> extractHistory(Date startDate, Date endDate) throws HistoryMinerException {\r\n final String queryTemplate = \r\n \"SELECT visits.id, visits.visit_date, visits.visit_type, visits.session, places.id, places.url, places.title, \" +\r\n \"from_visits.id, from_places.url \" + \r\n \"FROM moz_historyvisits AS visits JOIN moz_places AS places ON visits.place_id = places.id \" +\r\n \"LEFT OUTER JOIN moz_historyvisits AS from_visits ON visits.from_visit = from_visits.id \" + \r\n \"LEFT OUTER JOIN moz_places AS from_places ON from_visits.place_id = from_places.id \" +\r\n \"WHERE visits.visit_date > %d \" + \r\n \"AND visits.visit_date < %d \" +\r\n \"ORDER BY visits.id\";\r\n\r\n List<HistoryVisit> results = new ArrayList<HistoryVisit>();\r\n \r\n try {\r\n Connection conn = null;\r\n Statement stmt = null;\r\n try {\r\n conn = DriverManager.getConnection(JDBC_SQLITE + this.getFirefoxHistoryDbPath());\r\n stmt = conn.createStatement();\r\n \r\n String query = String.format(queryTemplate, dateToPRTime(startDate), dateToPRTime(endDate));\r\n ResultSet rs = stmt.executeQuery(query);\r\n \r\n while (rs.next()) {\r\n long visitId = rs.getLong(1);\r\n Date visitDate = prTimeToDate(rs.getLong(2));\r\n int visitType = rs.getInt(3);\r\n long sessionId = rs.getLong(4);\r\n long locationId = rs.getLong(5);\r\n String url = rs.getString(6);\r\n String title = rs.getString(7);\r\n long fromVisitId = rs.getLong(8);\r\n String fromUrl = rs.getString(9);\r\n \r\n if (log.isTraceEnabled()) {\r\n StringBuilder logMsg = new StringBuilder();\r\n logMsg.append(DateFormat.getInstance().format(visitDate));\r\n logMsg.append('|');\r\n logMsg.append(Integer.toString(visitType));\r\n logMsg.append('|');\r\n logMsg.append(url == null ? NULL : url);\r\n logMsg.append('|');\r\n logMsg.append(title == null ? NULL : title);\r\n logMsg.append('|');\r\n logMsg.append(fromUrl == null ? NULL : fromUrl);\r\n logMsg.append(LINE_SEPARATOR);\r\n log.trace(logMsg.toString());\r\n }\r\n \r\n results.add(new HistoryVisit(visitId, visitDate, visitType, sessionId, locationId, url, title, fromVisitId, fromUrl));\r\n }\r\n } finally {\r\n if (stmt != null) { stmt.close(); }\r\n if (conn != null) { conn.close(); }\r\n }\r\n } catch (Exception e) {\r\n throw new HistoryMinerException(\r\n \"Error while processing SQLite output and generating file: \" + e, e);\r\n } \r\n return results;\r\n }", "@BeforeAll\n public static void setUp() {\n\n unsolvedCourseSchedule = new RoomSchedule();\n\n \n // fixed periods I'm defining\n \tRoomPeriods fixedRoomPeriod1=new RoomPeriods(1, 1);\n \tfixedRoomPeriod1.setSessionName(\"Session Fixed 1\");\n \t\n \tRoomPeriods fixedRoomPeriod2=new RoomPeriods(1, 2);\n \tfixedRoomPeriod2.setSessionName(\"Session Fixed 2\");\n \t\n // I'm adding fixed periods to schedule, these are known fixed schedule items\n \tunsolvedCourseSchedule.getLectureList().add(fixedRoomPeriod1);\n \tunsolvedCourseSchedule.getLectureList().add(fixedRoomPeriod2); \n \n /* I'm adding 10 more schedule items which are [null,null] , I'm expecting optoplanner assign period and room numbers. \n * [ THEY ARE LINKED with annotations, @PlanningVariable,\t@ValueRangeProvider(id = \"availablePeriods\", @ProblemFactCollectionProperty]\n */\n for(int i = 0; i < 10; i++){ \t \t\n unsolvedCourseSchedule.getLectureList().add(new RoomPeriods()); \n }\n \n // \n unsolvedCourseSchedule.getPeriodList().addAll(Arrays.asList(new Integer[] { 1, 2, 3 }));\n unsolvedCourseSchedule.getRoomList().addAll(Arrays.asList(new Integer[] { 1, 2 }));\n }", "@Test\n\tpublic void testBasicBookingOrder() throws Exception {\n\t\t\n\t\t// 1. initialize screen object\n\t\tScreen testScreen = new Screen(5,5);\n\t\tTicketBookingSystem ticketBookingSystemObj = new TicketBookingSystem(testScreen);\n\t\t\n\t\tticketBookingSystemObj.screenForTicketBooking = testScreen;\n\t\tMap<String, SeatAvailabilityPerRow> testHashMap = new HashMap<String, SeatAvailabilityPerRow>();\n\t\ttestHashMap = testScreen.getHashmapMaxConsecutiveSeatAvailablitity();\n\t\t\n\t\t//Test Case 1: to check whether the number of rows and columns is calculated as expected\n\t\tif(!testScreen.equals(getExpectedScreen(\"1\"))){\n\t\t\t\n\t\t\tthrow (new Exception(\"Test case 1 failed due to expected screen \"\n\t\t\t\t\t+ \"is : \\n\"\n\t\t\t\t\t+ getExpectedScreen(\"1\") + \"\\n the actual screen is : \"\n\t\t\t\t\t\t\t+ \"\\n\" + testScreen));\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tint numberOfSeatsRequested = 3;\n\t\tBookTickets b1 = new BookTickets(numberOfSeatsRequested,\"\");\n\t\tticketBookingSystemObj.findAndHoldSeatsForUser(numberOfSeatsRequested,b1,numberOfSeatsRequested);\n\t\t\t\n\t\t//Test Case 2: to check after booking 3 seats\n\t\t\n\t\tif(!testScreen.equals(getExpectedScreen(\"2\"))){\n\t\t\tthrow (new Exception(\"Test case 2 failed due to expected screen is: \"\n\t\t\t\t\t+ \"\\n\" + getExpectedScreen(\"2\") + \"\\n Actual is: \\n \" + testScreen));\n\t\t}\n\t\t\t\t\n\t\t//Test Case 3:\n\t\t//After booking 3 tickets trying to book 5 tickets\n\t\t\n\t\tnumberOfSeatsRequested = 5;\n\t\tb1 = new BookTickets(numberOfSeatsRequested,\"\");\n\t\tticketBookingSystemObj.findAndHoldSeatsForUser(numberOfSeatsRequested,b1,numberOfSeatsRequested);\n\t\t\n\t\tif(!testScreen.equals(getExpectedScreen(\"3\"))){\n\t\t\tthrow (new Exception(\"Test case 3 failed due to expected screen is: \"\n\t\t\t\t\t+ \"\\n\" + getExpectedScreen(\"3\") + \"\\n Actual is: \\n \" + testScreen));\n\t\t}\n\t\t\n\n\t\t//Test Case 4:\n\t\t//After booking 3 tickets, then 5 tickets, trying to book 8 tickets\n\n\t\tnumberOfSeatsRequested = 9;\n\t\tb1 = new BookTickets(numberOfSeatsRequested,\"\");\n\t\tticketBookingSystemObj.findAndHoldSeatsForUser(numberOfSeatsRequested,b1,numberOfSeatsRequested);\n\n\t\tif(!testScreen.equals(getExpectedScreen(\"4\"))){\n\t\t\tthrow (new Exception(\"Test case 4 failed due to expected screen is: \"\n\t\t\t\t\t+ \"\\n\" + getExpectedScreen(\"4\") + \"\\n Actual is: \\n \" + testScreen));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public List<TestPaper> showHistoryPaper() throws Exception {\n\t\tSession session = this.getSession();\n\t\tQuery query=session.createQuery(\"from TestPaper t where t.paperStatus='已考'\");\n\t\tList<TestPaper> testPaperList=(List<TestPaper>)query.list();\n\t\treturn testPaperList;\n\t}", "public void printAnalysis(){\n System.out.println(\"Product: \" + this.getName());\n System.out.println(\"History: \" + this.history());\n System.out.println(\"Largest amount of product: \" + this.inventoryHistory.maxValue());\n System.out.println(\"Smallest amount of product: \" + this.inventoryHistory.minValue());\n System.out.println(\"Average: \" + this.inventoryHistory.average());\n }", "public UnitTestData() throws Exception {\n String[] runsData = {\n \"1,1,A,1,No,No,4\", // 0 (a No before first yes Security Violation)\n \"2,1,A,1,No,No,2\", // 0 (a No before first yes Compilation Error)\n \"3,1,A,1,No,No,1\", // 20 (a No before first yes)\n \"4,1,A,3,Yes,No,0\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"5,1,A,5,No,No,1\", // zero -- after Yes\n \"6,1,A,7,Yes,No,0\", // zero -- after Yes\n \"7,1,A,9,No,No,1\", // zero -- after Yes\n \"8,1,B,11,No,No,1\", // zero -- not solved\n \"9,2,A,48,No,No,4\", // 0 (a No before first yes Security Violation)\n \"10,2,A,50,Yes,No,0\", // 50 (minute points; no Run points on first Yes)\n \"11,2,B,35,No,No,1\", // zero -- not solved\n \"12,2,B,40,No,No,1\", // zero -- not solved\n };\n\n // Assign half eams random team member names\n addTeamMembers(contest, getTeamAccounts(contest).length / 2, 5);\n\n assertEquals(\"Expectig team member names\", 5, getFirstAccount(contest, Type.TEAM).getMemberNames().length);\n\n assertEquals(\"team count\", 120, contest.getAccounts(Type.TEAM).size());\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem problem = contest.getProblems()[0];\n Account judge = getFirstAccount(contest, Type.JUDGE);\n generateClarifications(contest, 20, problem, judge.getClientId(), false, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, true);\n\n sampleContest.assignSampleGroups(contest, \"North Group\", \"South Group\");\n\n assertEquals(\"Runs\", 12, contest.getRuns().length);\n\n }", "private void CreatePublicSteps() throws isisicatclient.IcatException_Exception {\n List<EntityBaseBean> publicSteps = new ArrayList<>();\r\n\r\n String[] parameterBasedPublicSteps = new String[]{\"Investigation\", \"Dataset\", \"Datafile\", \"Sample\"};\r\n for (String table : parameterBasedPublicSteps) {\r\n PublicStep paramPublicStep = new PublicStep();\r\n paramPublicStep.origin = table;\r\n paramPublicStep.field = \"parameters\";\r\n publicSteps.add(paramPublicStep);\r\n }\r\n\r\n String[] publicStepsFromInvestigation = new String[]{\"samples\", \"publications\", \"shifts\", \"investigationUsers\", \"keywords\", \"investigationInstruments\"};\r\n for (String step : publicStepsFromInvestigation) {\r\n PublicStep invToSomething = new PublicStep();\r\n invToSomething.origin = \"Investigation\";\r\n invToSomething.field = step;\r\n publicSteps.add(invToSomething);\r\n }\r\n\r\n String[] publicStepsFromDataset = new String[]{\"sample\", \"datafiles\"};\r\n for (String step : publicStepsFromDataset) {\r\n PublicStep datasetToSomething = new PublicStep();\r\n datasetToSomething.origin = \"Dataset\";\r\n datasetToSomething.field = step;\r\n publicSteps.add(datasetToSomething);\r\n }\r\n\r\n //sample to sampleType \r\n PublicStep sampleToSampleType = new PublicStep();\r\n sampleToSampleType.origin = \"Sample\";\r\n sampleToSampleType.field = \"type\";\r\n publicSteps.add(sampleToSampleType);\r\n\r\n //User to user group\r\n PublicStep userToUserGroup = new PublicStep();\r\n userToUserGroup.origin = \"User\";\r\n userToUserGroup.field = \"userGroups\";\r\n publicSteps.add(userToUserGroup);\r\n\r\n //User group to grouping\r\n PublicStep userGroupToGrouping = new PublicStep();\r\n userGroupToGrouping.origin = \"UserGroup\";\r\n userGroupToGrouping.field = \"grouping\";\r\n publicSteps.add(userGroupToGrouping);\r\n\r\n port.createMany(sessionId, publicSteps);\r\n }", "private FXDealHistory() {}", "@Before\n public void setUp() {\n activity1 = new Activity(\"tester\", 100, new Date (2018-10-10), \"category\", \"description\");\n activity2 = new Activity(\"tester\", 100, new Date (2018-10-11), \"category2\", \"description\");\n }" ]
[ "0.6109846", "0.6007666", "0.59857196", "0.5942025", "0.56018424", "0.5528273", "0.5527146", "0.5506886", "0.54758483", "0.53866816", "0.53831947", "0.5362635", "0.53558564", "0.53548646", "0.53489953", "0.5347406", "0.5306092", "0.5293811", "0.5278225", "0.52727795", "0.52461207", "0.51811635", "0.51656073", "0.515195", "0.5147174", "0.51344717", "0.5122796", "0.5111682", "0.5109606", "0.5100333", "0.50873065", "0.5086571", "0.5073943", "0.5067406", "0.5051452", "0.5047003", "0.5032003", "0.5025315", "0.5024924", "0.50173664", "0.5004565", "0.4999094", "0.49989146", "0.4995259", "0.49881122", "0.4986473", "0.49859262", "0.4981045", "0.49642876", "0.4961455", "0.49518874", "0.49479213", "0.49477094", "0.49467978", "0.4945488", "0.49253133", "0.49231112", "0.4915419", "0.4913289", "0.4908892", "0.49029735", "0.49011028", "0.4897529", "0.488647", "0.48732668", "0.48670205", "0.48620725", "0.48615235", "0.48596472", "0.48514333", "0.48463374", "0.48358297", "0.48347798", "0.48317215", "0.4828874", "0.48273143", "0.48236972", "0.48216322", "0.4813725", "0.48127708", "0.48086813", "0.4803531", "0.48020095", "0.48002738", "0.48001546", "0.4797506", "0.47891277", "0.47883242", "0.47876447", "0.4787417", "0.47780964", "0.47739437", "0.47713983", "0.47702986", "0.47682762", "0.47629505", "0.47619683", "0.47591287", "0.47529036", "0.4751536", "0.47425812" ]
0.0
-1
Created by mphilpot on 7/21/14.
public interface ServerTokenExchangeProvider extends Provider, ServerTokenExchange { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\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}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void m50366E() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\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\tpublic void init() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void method_4270() {}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n\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\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 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\r\n\tpublic void init() {}", "public abstract void mo70713b();", "@Override\n public void init() {}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void m23075a() {\n }", "public void mo12628c() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo21877s() {\n }", "private void m50367F() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo21779D() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo6081a() {\n }", "public void mo12930a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}" ]
[ "0.60094285", "0.5909956", "0.5840409", "0.5832438", "0.5808945", "0.5796211", "0.57704246", "0.57704246", "0.57197636", "0.5692283", "0.56908214", "0.568661", "0.56833327", "0.56725127", "0.5659702", "0.565554", "0.56527144", "0.5651716", "0.56219494", "0.5607976", "0.5602568", "0.5602568", "0.5602568", "0.5602568", "0.5602568", "0.5600254", "0.55703914", "0.5559331", "0.55524933", "0.5549443", "0.5543328", "0.55385995", "0.5517902", "0.55127555", "0.55088395", "0.55063653", "0.55052406", "0.54981697", "0.54914474", "0.548215", "0.54659045", "0.5463917", "0.5461264", "0.5453509", "0.54444087", "0.54444087", "0.5440564", "0.5423535", "0.5423535", "0.5423535", "0.5416027", "0.5416027", "0.5416027", "0.5414091", "0.5414091", "0.5414091", "0.5414091", "0.5414091", "0.5414091", "0.5414091", "0.5410913", "0.540927", "0.5402205", "0.53970474", "0.53919405", "0.53919405", "0.53919405", "0.5390613", "0.5387251", "0.5384253", "0.53839606", "0.53839606", "0.5382918", "0.5378603", "0.5377114", "0.5369639", "0.5369171", "0.5365735", "0.536361", "0.5359888", "0.53425205", "0.533839", "0.53367394", "0.53236055", "0.53223455", "0.53182334", "0.53166646", "0.5315489", "0.5314403", "0.53125477", "0.5310211", "0.5310211", "0.5310211", "0.5310211", "0.5310211", "0.5310211", "0.5304778", "0.5303549", "0.53033555", "0.52999556", "0.52981704" ]
0.0
-1
check the number of land and save its position to the list
public static int find_land (int a [][], int x, int y){ int count_land = 0; for (int i = 0; i < x; i++){ for (int j = 0; j < y; j++){ if (a[i][j] > 0){ count_land ++; //x[i][j] = 0; check_island(i, j); } } } return count_land; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean land();", "void updateLandmarks() {\n\n\t\t\tregisterUpdateLandmarksTimer();\n\n\t\t\tint m = 2;\n\t\t\tfinal int expectedLandmarks = NumberOfLandmarks + m;\n\t\t\tIterator<Long> ier = pendingHSHLandmarks.keySet().iterator();\n\n\t\t\tSet<AddressIF> tmpList = new HashSet<AddressIF>(1);\n\t\t\tLong curRecord = null;\n\n\t\t\t// get a non-empty list of landmarks\n\t\t\twhile (ier.hasNext()) {\n\t\t\t\tLong nxt = ier.next();\n\t\t\t\tif (pendingHSHLandmarks.get(nxt).IndexOfLandmarks != null\n\t\t\t\t\t\t&& pendingHSHLandmarks.get(nxt).IndexOfLandmarks.size() > 0) {\n\t\t\t\t\ttmpList\n\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(nxt).IndexOfLandmarks);\n\t\t\t\t\tcurRecord = nxt;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if empty, we need to update landmarks immediately\n\t\t\tif (tmpList.size() == 0) {\n\t\t\t\t// remove the record\n\t\t\t\tif (curRecord != null) {\n\t\t\t\t\tpendingHSHLandmarks.get(curRecord).clear();\n\t\t\t\t\tpendingHSHLandmarks.remove(curRecord);\n\t\t\t\t} else {\n\t\t\t\t\t// null curRecord\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfinal Long Timer = curRecord;\n\t\t\t\t// ping landmarks, if several of them fails, p percentage p=0.2\n\t\t\t\t// , we remove the records, and restart the landmark process\n\t\t\t\t// =================================================================\n\t\t\t\tfinal List<AddressIF> aliveLandmarks = new ArrayList<AddressIF>(\n\t\t\t\t\t\t1);\n\n\t\t\t\tNNManager.collectRTTs(tmpList, new CB2<Set<NodesPair>, String>() {\n\t\t\t\t\tprotected void cb(CBResult ncResult, Set<NodesPair> nps,\n\t\t\t\t\t\t\tString errorString) {\n\t\t\t\t\t\t// send data request message to the core node\n\t\t\t\t\t\tlong timer=System.currentTimeMillis();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (nps != null && nps.size() > 0) {\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"\\n==================\\n Alive No. of landmarks: \"\n\t\t\t\t\t\t\t\t\t\t\t+ nps.size()\n\t\t\t\t\t\t\t\t\t\t\t+ \"\\n==================\\n\");\n\n\t\t\t\t\t\t\tIterator<NodesPair> NP = nps.iterator();\n\t\t\t\t\t\t\twhile (NP.hasNext()) {\n\t\t\t\t\t\t\t\tNodesPair tmp = NP.next();\n\t\t\t\t\t\t\t\tif (tmp != null && tmp.rtt >= 0) {\n\n\t\t\t\t\t\t\t\t\tAddressIF peer = (AddressIF)tmp.endNode;\n\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\tif (!ncManager.pendingLatency.containsKey(peer)) {\n\t\t\t\t\t\t\t\t\t\tncManager.pendingLatency.put(peer,\n\t\t\t\t\t\t\t\t\t\t\t\tnew RemoteState<AddressIF>(peer));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tncManager.pendingLatency.get(peer).addSample(tmp.rtt, timer);\n\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\tif (!pendingHSHLandmarks.containsKey(Timer)\n\t\t\t\t\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Timer).IndexOfLandmarks == null) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint index = pendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t\t.indexOf(peer);\n\n\t\t\t\t\t\t\t\t\tif (index < 0) {\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// found the element, and it is smaller\n\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t// rank, i.e., it is closer to the\n\t\t\t\t\t\t\t\t\t\t// target\n\t\t\t\t\t\t\t\t\t\taliveLandmarks.add(peer);\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// wrong measurements\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// empty\n\t\t\t\t\t\t\t// all nodes fail, so there are no alive nodes\n\t\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// some landmarks are offline, we clear records and\n\t\t\t\t\t\t// start\n\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\n\t\t\t\t\t\t\tif (aliveLandmarks.size() < 0.8 * expectedLandmarks) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// the landmarks are healthy, so we can sleep\n\t\t\t\t\t\t\t\t// awhile\n\t\t\t\t\t\t\t\t// TODO: remove dead landmarks, and resize the\n\t\t\t\t\t\t\t\t// landmarks\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.addAll(aliveLandmarks);\n\n\t\t\t\t\t\t\t\t// pendingHSHLandmarks.get(Timer).readyForUpdate=false;\n\t\t\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(\n\t\t\t\t\t\t\t\t\t\t1);\n\n\t\t\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Timer).IndexOfLandmarks);\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).readyForUpdate = true;\n\n\t\t\t\t\t\t\t\t//update the rtts\n\t\t\t\t\t\t\t\t updateRTTs(Timer.longValue(),nodes, new\n\t\t\t\t\t\t\t\t CB1<String>(){ protected void cb(CBResult\n\t\t\t\t\t\t\t\t ncResult, String errorString){ switch\n\t\t\t\t\t\t\t\t (ncResult.state) { case OK: {\n\t\t\t\t\t\t\t\t System.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t System.out.println();\n\t\t\t\t\t\t\t\t if(errorString.length()<=0){\n\t\t\t\t\t\t\t\t pendingHSHLandmarks\n\t\t\t\t\t\t\t\t .get(Timer).readyForUpdate=true; }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break; } case ERROR: case TIMEOUT: { break; }\n\t\t\t\t\t\t\t\t } nodes.clear(); } });\n\t\t\t\t\t\t\t\t \n\n\t\t\t\t\t\t\t\treturn;\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});\n\n\t\t\t}\n\n\t\t\t// ==================================================================\n\n\t\t\t// expected landmarks, K+m\n\n\t\t\tfinal Set<AddressIF> pendingNodes = new HashSet<AddressIF>(1);\n\n\t\t\tgetRandomNodes(pendingNodes, expectedLandmarks);\n\n\t\t\t// remove myself\n\t\t\tif (pendingNodes.contains(Ninaloader.me)) {\n\t\t\t\tpendingNodes.remove(Ninaloader.me);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"$: HSH: Total number of landmarks are: \"\n\t\t\t\t\t+ pendingNodes.size());\n\n\t\t\tif (pendingNodes.size() == 0) {\n\t\t\t\tString errorString = \"$: HSH no valid nodes\";\n\t\t\t\tSystem.out.println(errorString);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBarrier barrierUpdate = new Barrier(true);\n\t\t\tfinal StringBuffer errorBuffer = new StringBuffer();\n\n\t\t\tfinal long TimeStamp = System.currentTimeMillis();\n\n\t\t\tfor (AddressIF addr : pendingNodes) {\n\t\t\t\tseekLandmarks(TimeStamp, addr, barrierUpdate,\n\t\t\t\t\t\tpendingHSHLandmarks, errorBuffer);\n\t\t\t}\n\n\t\t\tEL.get().registerTimerCB(barrierUpdate, new CB0() {\n\t\t\t\tprotected void cb(CBResult result) {\n\t\t\t\t\tString errorString;\n\t\t\t\t\tif (errorBuffer.length() == 0) {\n\t\t\t\t\t\terrorString = new String(\"Success\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorString = new String(errorBuffer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// finish the landmark seeking process\n\n\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Long\n\t\t\t\t\t\t\t.valueOf(TimeStamp))\n\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks == null) {\n\t\t\t\t\t\tSystem.out.println(\"$: NULL elements! \");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks\n\t\t\t\t\t\t\t.size() < (0.7 * expectedLandmarks)) {\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp))\n\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\tpendingHSHLandmarks.remove(Long.valueOf(TimeStamp));\n\t\t\t\t\t\tSystem.out.println(\"$: not enough landmark nodes\");\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp)).readyForUpdate = true;\n\t\t\t\t\t\tSystem.out.println(\"$: enough landmark nodes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(1);\n\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks);\n\t\t\t\t\t\tupdateRTTs(Long.valueOf(TimeStamp), nodes, new CB1<String>() {\n\t\t\t\t\t\t\tprotected void cb(CBResult ncResult, String errorString) {\n\t\t\t\t\t\t\t\tswitch (ncResult.state) {\n\t\t\t\t\t\t\t\tcase OK: {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase ERROR:\n\t\t\t\t\t\t\t\tcase TIMEOUT: {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnodes.clear();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public int getLand();", "public void setLand(int value);", "@Override\n\tprotected void landAction(){\n\t\tdestIndex++;\n\t\tif(destIndex>=track.size())\n\t\t\tdestIndex=0;\n\t\tdestination=track.get(destIndex);\n\t\t\n\t}", "public int land (Land land)\r\n\t{\r\n\t\tluchthaven.setLand(land);\r\n\t\treturn land.getCode();\r\n\t}", "public boolean hasLandList() {\r\n return hasLandList;\r\n }", "static int findIslands(ArrayList<ArrayList<Integer>> a, int N, int M)\n {\n \n // Your code here\n int island_count = 0;\n for(int i=0;i<N;i++){\n for(int j=0;j<M;j++){\n if(a.get(i).get(j) == 1){\n island_count++;\n explore_island(a, i, j);\n }\n }\n }\n \n return island_count;\n \n }", "private void initializeLandmarks()\n\t{\n\t\t// Do nothing if not set\n\t\tif (startingMinionPerArea == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Check starting landmark for each area\n\t\tfor(Area area : board.getAreaList())\n\t\t{\n\t\t\tint number = area.getNumber();\n\t\t\tInteger minionCount = startingMinionPerArea.get(number);\n\t\t\tif (minionCount != null)\n\t\t\t{\n\t\t\t\tfor(int i = 0; i < minionCount; i++)\n\t\t\t\t{\n\t\t\t\t\tfor(Player player : playerList)\n\t\t\t\t\t{\n\t\t\t\t\t\tarea.addMinion(player.removeMinion());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void land() {\n Game currentGame = this.getGame();\n this.setHasBeenVisited(true);\n currentGame.setMode( Game.Mode.GAME_WON);\n\n }", "private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }", "public void getSample(List<T> landmarks){\n\t\tIterator<T> ier = landmarks.iterator();\n\t\twhile(ier.hasNext()){\n\t\t\tT tmp = ier.next();\n\t\t\tthis.getSample(tmp);\t\t\t\n\t\t}\n\t\t\n\t}", "public List<Integer> pacmanLocation(){\n\n pacmanLocay.add(0);\n pacmanLocay.add(0);\n\n return pacmanLocay;\n }", "@Override\n\tpublic List<Land> displayLand() {\n\t\treturn dao.displayLand();\n\t}", "public void findStreets() {\r\n\t\tpolygonMap.resetStreets();\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tfor (int i = 0; i < island.getRoads().length; i++) {\r\n\t\t\tif (buildStreetIsAllowed(island.getRoads()[i])\r\n\t\t\t\t\t&& !isWaterStreet(island.getRoads()[i])) {\r\n\t\t\t\tpolygonMap.addStreet(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private String land() {\r\n\t\tint[] temp=tile.getLand();\r\n\t\tString out=\"Tile Land: \\n\\n\";\r\n\t\tint square=(int)Math.sqrt(temp.length);\r\n\t\tif(square*square<temp.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<temp.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<temp.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%4s\", temp[i]));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public static List<Integer> getPondSizes(int[][] land) {\n List<Integer> pondSizes = new ArrayList<>();\n if (land == null || land.length == 0) {\n return pondSizes;\n }\n boolean[][] visited = new boolean[land.length][land[0].length];\n\n for (int row = 0; row < land.length; row++) {\n for (int column = 0; column < land[row].length; column++) {\n if (land[row][column] == 0 && !visited[row][column]) {\n int pondSize = computeSize(land, visited, row, column);\n pondSizes.add(pondSize);\n }\n }\n }\n return pondSizes;\n }", "public void showAllLandmarks(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n for(int i = 0; i<landmarkList.size(); i++){\n if(landmarkList.get(i).data.type == \"Landmark\")\n drawLandmarks(landmarkList.get(i));\n }\n }", "public void seekRooms () {\n\t\tint num = 0;//room number\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tfor (int j=0; j<l; j++) {\n\t\t\t\tif (visited[i][j] == 0) {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t\tnum++;//room number start from 1\n\t\t\t\t\tdfs(i,j,num);\n\t\t\t\t\n\t\t\t\t\t//update the number of rooms and max room size\t\t\t\n\t\t\t\t\tmax = Math.max(max, cnt); \n\t\t\t\t\ttotal = num;\n\t\t\t\t\tmap.put(num, cnt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tfindMaxComb();// find the max size after breaking a wall!!!\n\t\t\n\t}", "public void getFertileLands() {\n int land = 1;\n int i = 0;\n int j = 0;\n\n while (i < XLIM && j < YLIM) {\n\n if (queue.isEmpty()) {\n Integer node[] = {i, j};\n\n // If node[i][j] has not been visited add to queue\n // As the queue was empty, this is a new fertile land\n if (mColor[i][j] == 0) {\n land++;\n areasMap.put(land, 0);\n queue.add(node);\n }\n // Make sure we pass through all the Land\n if (i == (XLIM - 1)) {\n i = 0;\n j++;\n } else {\n i++;\n }\n }\n\n if (!queue.isEmpty()) {\n Integer node[] = queue.pop();\n\n int x = node[0];\n int y = node[1];\n\n if (mColor[x][y] == 0) {\n if (x > 0) {\n addQueue(x - 1, y);\n }\n if (x < (XLIM - 1)) {\n addQueue(x + 1, y);\n }\n if (y > 0) {\n addQueue(x, y - 1);\n }\n if (y < (YLIM - 1)) {\n addQueue(x, y + 1);\n }\n\n mColor[x][y] = land;\n areasMap.put(land, (areasMap.get(land) + 1));\n }\n }\n }\n\n }", "public void createList () {\n imageLocs = new ArrayList <Location> ();\n for (int i = xC; i < xLength * getPixelSize() + xC; i+=getPixelSize()) {\n for (int j = yC; j < yLength * getPixelSize() + yC; j+=getPixelSize()) {\n Location loc = new Location (i, j, LocationType.POWERUP, true);\n\n imageLocs.add (loc);\n getGridCache().add(loc);\n \n }\n }\n }", "int getNumberOfStonesLeftToPlace();", "private boolean checkCachedRegions(ArrayList<int[]> list) {\n int lastend=Integer.MIN_VALUE;\n for (int[] loc:list) {\n if (loc[0]>loc[1]) return false; // this will probably not happen\n if (loc[0]<=lastend) return false; // next segment prior to end of last (or overlapping even 1 pos)\n lastend=loc[1];\n }\n return true;\n }", "public String getLand()\r\n {\r\n return land;\r\n }", "int matchingLandmark(int x, int y) {\n System.out.println(\"matching lansg \" + x + \" \" + y);\n for (int i = 0; i < 50; i++) {\n if (landmarks[i][0] == x && landmarks[i][1] == y) {\n return i;\n }\n }\n return -1;\n }", "private static void documentxyAndAddToListe(HashSet<Point> activatedScreen, List<List<Integer>> blockxyIDList,\n\t\t\tString k) {\n\t\tList<Integer> xyID = new ArrayList<>();\n\t\tScanner kScan = new Scanner(k);\n\n\t\tkScan.next(); //get past letter\n\t\tint xcoord = kScan.nextInt()/16;\n\t\txyID.add(xcoord);\n\t\tint ycoord = kScan.nextInt()/16;\n\t\txyID.add(ycoord);\n\t\t//System.out.println(k);\n\t\tif(!visited.contains(new Point(xcoord, ycoord))) {\n\t\t\tvisited.add(new Point(xcoord, ycoord));\n\t\n\t\t\tint e = kScan.nextInt();\n\t\t\t\n\t\t\tif(e==29||e==4||e==3||e==50||e==52||e==51||e==68) { //cannon/shooter\n\t\t\t\txyID.add(6);\n\t\t\t}else if (e==5||e==56) { //appearing/disappearing\n\t\t\t\txyID.add(1);\n\t\t\t}else if (e==45||e==27) { //breakable\n\t\t\t\txyID.add(4);\t\t\t\t\n\t\t\t}else if (e==31||e==40||e==36||e==67||e==10||e==47||e==11||e==17) { //moving plat\n\t\t\t\txyID.add(5);\n\t\t\t}else if ((e>=177&&e<=194)||(e>=621&&e<=626)||e==16) {\n\t\t\t\t//System.out.println(k);\n\t\t\t\txyID.add(10); //water //177-194 or 621-626\n\t\t\t}else if (e==9||e==33||e==34) {\n\t\t\t\txyID.add(0);\n\t\t\t}\n\t\t\t\t\n\t\t\telse {\n\t\t\t\txyID.add(0);\n\t\t\t}\n\t\t\tint howManySquaresX = xcoord/16;\n\t\t\tint howManySquaresY = ycoord/14;\n\t\t\tint screenX = howManySquaresX*16;\n\t\t\tint screenY = howManySquaresY*14;\n\t\t\tactivatedScreen.add(new Point(screenX, screenY));\n\t\t\tif(xcoord>maxX) {\n\t\t\t\tmaxX = xcoord+1;\n\t\t\t}\n\t\t\tif(ycoord>maxY) {\n\t\t\t\tmaxY = ycoord+1;\n\t\t\t}\n\t\t\t//System.out.println(k);\n\t\t\t//System.out.println(l);\n\t\t\tkScan.close();\n\t\t\tblockxyIDList.add(xyID);\n\t\t\n\t\t}\t\t\n\t}", "private static void addActivePosition(List<Integer> position, int count){\n if (count == 3 && !positions.contains(position)){\n// System.out.println(\"changed to active\");\n// System.out.println(\"Position: \" + position + \" count: \" + count);\n newPositions.add(position);\n } else if ((count == 2 || count == 3) && positions.contains(position)){\n// System.out.println(\"Stayed active\");\n// System.out.println(\"Position: \" + position + \" count: \" + count);\n newPositions.add(position);\n }\n }", "public void checkMarkers(int num) {\n\t\t\n\t}", "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "public void setLand( final String land )\r\n {\r\n this.land = land;\r\n }", "public boolean land() {\n\t\treturn ( Math.random() > this.crashProb);\r\n\t}", "public void getLandmarksToBeDrawn(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n CostedPath path=shortestRouteDij(lm1,lm2); \n GraphNodeAL<MapPoint> prev=null;\n for(GraphNodeAL<?> n : path.pathList) { \n drawLandmarks((GraphNodeAL<MapPoint>) n);\n if(prev!=null) lineDraw(prev, (GraphNodeAL<MapPoint>) n);\n prev= (GraphNodeAL<MapPoint>) n;\n }\n }", "public boolean land() {\n\t\treturn (Math.random() > this.crashProb);\r\n\t}", "public void infection() {\n\r\n chance = r.nextInt(100); //Random Integer\r\n found = false; // Boolean Value\r\n for (int i = 0; i < storage.size(); i++) {\r\n if (chance == storage.get(i)) { //if random int is equal to any element in List\r\n found = true; // Set boolean value \r\n break;\r\n\r\n } else {\r\n found = false;\r\n numhealthy.setText(\"\" + (100 - count));\r\n numinfected.setText(\"\" + count);\r\n\r\n }\r\n }\r\n\r\n if (found == false) {\r\n storage.add(chance);\r\n pixellist.get(chance).setBackground(new Color(216, 19, 55));\r\n count++;\r\n numhealthy.setText(\"\" + (100 - count));\r\n numinfected.setText(\"\" + count);\r\n }\r\n\r\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "private void checkToList(ItemData itemMain) {\n int index = 0;\n for (ItemData i : itemDataList){\n int loc = Integer.parseInt(i.getscore().toString());\n int var = Integer.parseInt(itemMain.getscore().toString());\n if(var < 10 && loc == 0){\n itemMain.setimagePosition(i.getimagePosition());\n itemDataList.add(index,itemMain);\n /*\n Collections.sort(itemDataList, new Comparator<ItemData>() {\n @Override\n public int compare(ItemData t0, ItemData t1) {\n int loc = Integer.parseInt(t0.getscore().toString());\n int var = Integer.parseInt(t1.getscore().toString());\n return var - loc;\n }\n });\n */\n break;\n }\n index++;\n }\n\n }", "public List<Landmark> canConstruct() {\n List<Landmark> landmarks = new ArrayList<> ();\n for (int i = 0; i < Landmarks.size(); i++) {\n if (Landmarks.get(i).getConstructed() == false) {\n if (Landmarks.get(i).getCost() <= coins) {\n landmarks.add(Landmarks.get(i));\n }\n }\n }\n return landmarks;\n }", "void lowerNumberOfStonesLeftToPlace();", "private static void documentxyAndAddToListi(HashSet<Point> activatedScreen, List<List<Integer>> blockxyIDList, String k) {\n\t\tList<Integer> xyID = new ArrayList<>();\n\t\tScanner kScan = new Scanner(k);\n\t\tkScan.next(); //get past letter\n\t\tint xcoord = kScan.nextInt()/16;\n\t\txyID.add(xcoord);\n\t\tint ycoord = kScan.nextInt()/16;\n\t\txyID.add(ycoord);\n\t\tif(!visited.contains(new Point(xcoord, ycoord))&&kScan.hasNextInt()) {\n\t\t\t\n\t\t\tint itemID = kScan.nextInt();\n\t\t\tvisited.add(new Point(xcoord, ycoord));\n\t\n\t\t\t\n\t\t\tif(itemID==3) { //if ladder\n\t\t\t\txyID.add(2); //map to ladder\n\t\t\t}else if(itemID==2) { //if hazard\n\t\t\t\txyID.add(3); //map to hazard\n\t\t\t}\n\t\t\t\n\t\t\telse if(itemID==4) { //player\n\t\t\t\txyID.add(8); //json player\n\t\t\t}\n\t\t\telse if (itemID==8) {\n\t\t\t\txyID.add(0);\n\t\t\t}\n\t\t\telse { //solid block still 1\n\t\t\t\txyID.add(1);\n\t\t\t}\n\t\t\tint howManySquaresX = xcoord/16;\n\t\t\tint howManySquaresY = ycoord/14;\n\t\t\tint screenX = howManySquaresX*16;\n\t\t\tint screenY = howManySquaresY*14;\n\t\t\tactivatedScreen.add(new Point(screenX, screenY));\n\t\t\tif(xcoord>maxX) {\n\t\t\t\tmaxX = xcoord+1;\n\t\t\t}\n\t\t\tif(ycoord>maxY) {\n\t\t\t\tmaxY = ycoord+1;\n\t\t\t}\n\t\t\t//System.out.println(k);\n\t\t\t//System.out.println(l);\n\t\t\tkScan.close();\n\t\t\tblockxyIDList.add(xyID);\n\t\t\n\t\t}\n\t}", "public void backTrack (){\n LinkedList<Integer> v = new LinkedList<> (); //Lista de vecinos.\n boolean mover = false;\n int r = 0;\n while (!mover && v.size () < 4){\n r = rnd.nextInt (4);\n\t\t//Hay un vecino disponible.\n\t\t//Nos podemos mover.\n if (vecinoDisponible (r))\n\t\t mover = true;\n if (!v.contains (r))\n v.add (r);\n\t }\n\t if (mover){\n\t\t//Nos movemos a la siguiente dirección.\n\t\ttumbaMuros (r);\n\t\tmoverLaberinto (r);\n\t }else if (!p.empty ()){\n\t\t//Nos movemos a la celda previa\n\t\t//pues no hay vecnos a los que movernos\n\t\tCelda a = p.pop ();\n\t\tt.posY = a.celdaY;\n\t\tt.posX = a.celdaX; \n\t }\n \n terminado = p.isEmpty();\n\t}", "public void placeIslands(ObservableList<Node> root, int scale) {\n\t\tRandom rand = new Random();\n\t\tfor (int i=0; i<10; i++) {\n\t\t\tint x = rand.nextInt(dimensions) + 0;\n\t\t\tint y = rand.nextInt(dimensions) + 0;\n\t\t\twhile(oceanGrid[x][y] == 1) {\n\t\t\t\t//don't duplicate island position\n\t\t\t\tx = rand.nextInt(dimensions) + 0;\n\t\t\t}\n\t\t\tRectangle rect = new Rectangle(x*scale, y*scale, scale, scale);\n\t\t\trect.setStroke(Color.BLACK);\n\t\t\trect.setFill(Color.DARKCYAN);\n\t\t\troot.add(rect);\n\t\t\toceanGrid[x][y] = 1;\n\t\t}\n\t}", "void makeNborLists(){\n\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\tint ct = 0;\n\t\t\t\tint boundsCt = 0;\n\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\tint nborSite = nborList[i][j];\n\t\t\t\t\tif(nborSite>=1){\n\t\t\t\t\t\tif (aliveLattice[nborSite]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tboundsCt += 1;\n\t\t\t\t\t}\n\t\t\t\t\tint noDead = maxNbors - ct;\n\t\t\t\t\tfracDeadNbors[i] = (double)noDead/maxNbors;\n\t\t\t\t\tif(deadDissipation==true) noNborsForSite[i] = noNbors; \n\t\t\t\t\telse if (deadDissipation==false){\n\t\t\t\t\t\tif(boundaryConditions==\"Open\")\n\t\t\t\t\t\t\tnoNborsForSite[i]=ct+boundsCt;\n\t\t\t\t\t\telse if(boundaryConditions == \"Periodic\")\n\t\t\t\t\t\t\tnoNborsForSite[i]=ct;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(deadDissipation==true){\n\t\t\t\tfor (int i = 0; i < N; i++)\tnoNborsForSite[i] = noNbors; \n\t\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\t\tint ct = 0;\n\t\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\t\tif (aliveLattice[nborList[i][j]]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint noDead = maxNbors - ct;\n\t\t\t\t\t\tfracDeadNbors[i] = (double)noDead/maxNbors;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if (deadDissipation==false){\n\t\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\t\tint ct = 0;\n\t\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\t\tif (aliveLattice[nborList[i][j]]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint noDead = maxNbors - ct;\n\t\t\t\t\t\tfracDeadNbors[i] = (double)noDead/maxNbors;\n\t\t\t\t\t\tnoNborsForSite[i]=ct;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}", "private void restoreSelectedLandmark(List<HistoricLandmarkDistanceSelect> landmarks) {\n int position = mSelectedPositionId.position;\n if (position >= 0 && position < landmarks.size()) {\n HistoricLandmarkDistanceSelect landmarkDistanceSelect = landmarks.get(position);\n // Previously selected is still in the same position\n if (landmarkDistanceSelect.landmark.id == mSelectedPositionId.id) {\n landmarkDistanceSelect.isSelected = true;\n }\n // A different landmark is in the previously selected position\n else {\n mSelectedPositionId = PositionId.NO_POSITION_ID;\n }\n\n }\n // Previously selected position is now out of bounds\n else {\n mSelectedPositionId = PositionId.NO_POSITION_ID;\n }\n }", "private void plant(int l) {\n if (l >= empties.size()) {\n if (currentMines > bestMines) {\n copyField(current, best);\n bestMines = currentMines;\n }\n //geval 2: we zijn nog niet alle lege vakjes afgegaan, en we kunnen misschien nog beter doen dan de huidige oplossing\n } else if(currentMines + (empties.size() - l) > bestMines ) {\n //recursief verder uitwerken, met eerst de berekening van welk vakje we na (i,j) zullen behandelen\n int i = empties.get(l).getI();\n int j = empties.get(l).getJ();\n\n //probeer een mijn te leggen op positie i,j\n if (canPlace(i,j)) {\n placeMine(i, j);\n currentMines++;\n\n\n //recursie\n plant(l + 1);\n\n //hersteloperatie\n removeMine(i, j);\n currentMines--;\n\n }\n //recursief verder werken zonder mijn op positie i,j\n plant(l +1);\n }\n }", "public void trukstaEilutese(){\n\n for (int i=0; i<9; i++) { //skaito eilutes\n\n System.out.print(i+\" : \"); //skaito kiekviena skaiciu is eiles\n\n truksta_eilutese [i] = new ArrayList<Integer>();\n\n Langelis langelis = new Langelis();\n\n for (Integer x_skaicius=1; x_skaicius<10; x_skaicius++){ //ciklas sukti naujam nezinomajam x_skaicius duota reiksme1 maziau nei 10, ++ kad ima sekanti nezinomaji\n\n //System.out.print(java.util.Arrays.asList(sudoku_skaiciai[i]).indexOf(x_skaicius));\n\n langelis.nustatyti(x_skaicius);\n\n if (Arrays.asList(sudoku_skaiciai[i]).indexOf(langelis)== -1){ //????\n\n System.out.print(x_skaicius+\" \"); //israso nezinomas reiksmes\n\n truksta_eilutese[i].add(x_skaicius);\n }\n }\n System.out.println(); //???\n }\n }", "void placeToOutnumberEnemies(int numberOfArmies)\n\t{\n\tboolean[] outnumber = new boolean[countries.length];\n\tfor (int i = 0; i < countries.length; i++)\n\t\t{\toutnumber[i] = false;\t}\n\n\tfor (int i = 0; i < countries.length; i++)\n\t\t{\n\t\tif (countries[i].getOwner() != ID)\n\t\t\t{\n\t\t\t// find out if we outnumber this guy from somewhere\n\t\t\tCountry[] neigbors = countries[i].getAdjoiningList();\n\t\t\tfor (int n = 0; n < neigbors.length; n++)\n\t\t\t\t{\n\t\t\t\tif (neigbors[n].getOwner() == ID && neigbors[n].getArmies() > countries[i].getArmies())\n\t\t\t\t\t{\toutnumber[i] = true;\t}\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\t{\t// we own it, so just say we outnumber it\n\t\t\toutnumber[i] = true;\n\t\t\t}\n\t\t}\n\n\t// So now reenforce all the non-outnumbered countries that we can\n\tfor (int i = 0; i < countries.length && numberOfArmies > 0; i++)\n\t\t{\n\t\tif (! outnumber[i])\n\t\t\t{\n\t\t\t// Find our strongest country that borders it\n\t\t\tint armies = 0;\n\t\t\tCountry us = null;\n\t\t\tCountry[] neigbors = countries[i].getAdjoiningList();\n\t\t\tfor (int n = 0; n < neigbors.length; n++) \n\t\t\t\t{\n\t\t\t\tif (neigbors[n].getOwner() == ID && neigbors[n].getArmies() > armies)\n {\n\t\t\t\t\tus = neigbors[n];\n armies = neigbors[n].getArmies();\n System.out.println(\"EvilPixie running fixed code path\");\n }\n\t\t\t\t}\n\t\t\tif (us != null)\n\t\t\t\t{\n\t\t\t\tint numToPlace = countries[i].getArmies() - us.getArmies();\n\t\t\t\tnumToPlace = Math.max(numToPlace, 1);\n\t\t\t\tboard.placeArmies(numToPlace, us);\n\t\t\t\tnumberOfArmies -= numToPlace;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\tif (numberOfArmies > 0)\n\t\t{\n\t\tdebug(\"placeToOutnumberEnemies didn't use up all the armies: \"+numberOfArmies);\n\t\tplaceNearEnemies(numberOfArmies);\n\t\t}\n\t}", "public void landPiece() {\n\t\t// current rotation of piece\n\t\tint rot = currentPiece.getPieceRotation();\n\t\t\n\t\t// x coordinate of current piece's northwest corner\n\t\tint row = currentPieceGridPosition[0];\n\t\t\n\t\t// y coordinate of current piece's northwest corner\n\t\tint col = currentPieceGridPosition[1];\t\n\n\t\t// adds currentPiece's landing positions to be true in blockMatrix\n\t\tfor(int i = 0; i < 4; i++) { \n\t\t\tfor(int j = 0; j < 4; j++) { \n\t\t\t\tif(currentPiece.isFilled(rot, i, j)) {\n\t\t\t\t\tblockMatrix[i + row][j + col] = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//add up scores\n\t\tnumLines += numberOfFormedLines(); \n\t\tif(numberOfFormedLines() >= 4) {\n\t\t\tnumTetrises++; \n\t\t}\n\t\t\n\t\t//clear out full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) { \n\t\t\t\tremoveLine(i);\n\t\t\t\t//find rows with blocks filled above cleared line to drop those down\n\t\t\t\tfor(int m = i-1; m >= 0; m--) { \n\t\t\t\t\tfor(int n = 0; n < NUM_COLS; n++) {\n\t\t\t\t\t\t// fill in space below, clear out current row \n\t\t\t\t\t\tif(hasBlock(m, n)) { \n\t\t\t\t\t\t\tblockMatrix[m][n] = false;\n\t\t\t\t\t\t\tblockMatrix[m+1][n] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ready for next piece\n\t\taddNewPiece();\n\t}", "private void landOrTakeoff(String land_or_takeoff) {\n\t\ttry {\n\t\tthis.baggage = Integer.valueOf(land_or_takeoff);\n\t\tthis.isLanding = true;\n\t\t}catch(NumberFormatException e) {\n\t\t\tthis.isLanding = false;\n\t\t\tthis.destination = land_or_takeoff;\n\t\t}//catch\n\t}", "private int surroundingLandCheckCity(City city) {\n int numLandTilesSurrounding = 0;\n for (int i = city.getRow() - 1; i < city.getRow() + 2; i++) {\n for (int j = city.getCol() - 1; j < city.getCol() + 2; j++) {\n if (tileMap[i][j].getTerrain() instanceof Grass) {\n numLandTilesSurrounding++;\n }\n }\n }\n return numLandTilesSurrounding;\n }", "@Override\n\t\t\t\tpublic List<KinderGarten> chercherParZone(Double longi, Double lat,Double rayon) {\n\t\t\t\t\tList<KinderGarten> list = new ArrayList<>();\n\t\t\t\t\tList<KinderGarten> list2 =(List<KinderGarten>) kindergartenRepo.findAll();\n\t\t\t\t\tfor(int i=0;i<list2.size();i++)\n\t\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(calculDis(longi,lat,list2.get(i).getLongi(),list2.get(i).getLatitude()));\n\t\t\t\t\t\tif(calculDis(longi,lat,list2.get(i).getLongi(),list2.get(i).getLatitude()) <= rayon)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.add(list2.get(i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// long/lat/r\n\t\t\t\t\t//coord bd Ariana long:10.182733 lat: 36.900635 // long:10.804493 lat2 :36.460875\n\t\t\t\t\t\n\t\t\t\t\t//test 1 Ariana 10.1852049/36.8989212/1 \n\t\t\t\t\t\n\t\t\t\t\t//test 2 A GHANA 10.181863/36.806459/1 // long2:10.182039 lat2: 36.806021 \n\t\t\t\t\t//\n\t\t\t\t\treturn list;\n\t\t\t\t}", "private void createAccess(ArrayList<Room> rooms) {\n\n rooms.get(0).setNorth(rooms.get(1));\n\n rooms.get(1).setEast(rooms.get(2));\n rooms.get(1).setWest(rooms.get(4));\n rooms.get(1).setSouth(rooms.get(0));\n\n rooms.get(2).setWest(rooms.get(1));\n rooms.get(2).setNorth(rooms.get(10));\n rooms.get(2).setEast(rooms.get(3));\n\n rooms.get(3).setWest(rooms.get(2));\n\n rooms.get(4).setWest(rooms.get(5));\n rooms.get(4).setNorth(rooms.get(8));\n rooms.get(4).setEast(rooms.get(1));\n\n rooms.get(5).setNorth(rooms.get(7));\n rooms.get(5).setSouth(rooms.get(6));\n rooms.get(5).setEast(rooms.get(4));\n\n rooms.get(6).setNorth(rooms.get(5));\n\n rooms.get(7).setNorth(rooms.get(13));\n rooms.get(7).setSouth(rooms.get(5));\n\n rooms.get(8).setEast(rooms.get(9));\n rooms.get(8).setSouth(rooms.get(4));\n\n rooms.get(9).setWest(rooms.get(8));\n rooms.get(9).setNorth(rooms.get(15));\n rooms.get(9).setEast(rooms.get(10));\n\n rooms.get(10).setWest(rooms.get(9));\n rooms.get(10).setEast(rooms.get(11));\n rooms.get(10).setSouth(rooms.get(2));\n\n rooms.get(11).setWest(rooms.get(10));\n\n rooms.get(12).setEast(rooms.get(13));\n\n rooms.get(13).setWest(rooms.get(12));\n rooms.get(13).setEast(rooms.get(14));\n rooms.get(13).setSouth(rooms.get(7));\n\n rooms.get(14).setWest(rooms.get(13));\n rooms.get(14).setNorth(rooms.get(18));\n rooms.get(14).setEast(rooms.get(15));\n\n rooms.get(15).setWest(rooms.get(14));\n rooms.get(15).setNorth(rooms.get(19));\n rooms.get(15).setEast(rooms.get(16));\n rooms.get(15).setSouth(rooms.get(9));\n\n rooms.get(16).setWest(rooms.get(15));\n rooms.get(16).setEast(rooms.get(17));\n\n rooms.get(17).setWest(rooms.get(16));\n\n rooms.get(18).setSouth(rooms.get(14));\n\n rooms.get(19).setSouth(rooms.get(13));\n\n }", "private Vector<Integer> matchCheckPoint(List<Point> a) {\t\t\t\n\t\tVector<Integer> iDS= new Vector<>();\n\t\tfor(Point p :a) {\n\t\t\tif(!getAsphalt(p.x, p.y,this.trk).isIdDefalt()) {\n\t\t\t\tiDS.add(getAsphalt(p.x, p.y,this.trk).getId());\n\t\t\t}\n\t\t}\n\t\treturn iDS;\n\t}", "GARoute(){\n cityIndex = new ArrayList<Integer>();\n }", "public int[] bestLandingSpot(int fuelAvailable) {\n // DO NOT CHANGE THE METHOD SIGNATURE\n return new int[] { 0, 0 };\n }", "private int check(int tiles_per_cam_width) {\r\n\t\tif( left_map_scroll >= left_map_width) {\r\n\t\t\ttotal_maps++;\r\n\t\t\tmap[l()].dispose();\r\n\t\t\tleft_map = r();\r\n\t\t\tint random_map = (int)Math.round(2+Math.random()*14);\r\n\t\t\tif( left_map == 1 )\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\telse //for later\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\tint left_map_width_return = left_map_width;\r\n\t left_map_scroll -= left_map_width;\r\n\t\t\tleft_map_width = map[l()].\r\n\t\t\t\t\tgetProperties().get(\"width\", Integer.class);\r\n\t\t\tscrollCam( tiles_per_cam_width );\r\n\t\t\treturn left_map_width_return;\r\n\t\t}\r\n\t\tscrollCam( tiles_per_cam_width );\r\n\t\treturn 0;\r\n\t}", "public void setHotelList(File[] myList, int myNumber, File[] myFolders, int myFolderNumber, ArrayList<Entrance> hotelEntrances){\r\n\t\t\t\tsubfolders = myFolders;\r\n\t\t\t\tfolderNumber = myFolderNumber;\r\n\t\t\t\thotelNumber = myNumber;\r\n\t\t\t\thotelList = null;\r\n\t\t\t\thotelList = new File[hotelNumber];\r\n\t\t\t\thotelList = myList;\r\n\t\t\t\thotels.clear();\r\n\t\t\t\tArrayList<Entrance> thisHotelEntrances = new ArrayList<Entrance>();\r\n\t\t\t\tgameHotelItems.clear();\r\n\t\t\t\tgameHotels.removeAll();\r\n\t\t\t\tfor(int i=0; i<hotelNumber; i++){\r\n\t\t\t\t\tString str = hotelList[i].getName(); \r\n\t List<String> niceList = Arrays.asList(str.split(\"\\\\.\"));\r\n\t for(int j=0; j<hotelEntrances.size(); j++){\r\n\t \tif(((MovementSquare)help_square[hotelEntrances.get(j).getI()][hotelEntrances.get(j).getJ()]).getLeftNeighbour().equals(niceList.get(0))){\r\n\t \t\tthisHotelEntrances.add(hotelEntrances.get(j));\r\n\t \t\tcontinue;\r\n\t \t}\r\n\t \tif(((MovementSquare)help_square[hotelEntrances.get(j).getI()][hotelEntrances.get(j).getJ()]).getRightNeighbour().equals(niceList.get(0))){\r\n\t \t\tthisHotelEntrances.add(hotelEntrances.get(j));\r\n\t \t\tcontinue;\r\n\t \t}\r\n\t \tif(((MovementSquare)help_square[hotelEntrances.get(j).getI()][hotelEntrances.get(j).getJ()]).getUpNeighbour().equals(niceList.get(0))){\r\n\t \t\tthisHotelEntrances.add(hotelEntrances.get(j));\r\n\t \t\tcontinue;\r\n\t \t}\r\n\t \tif(((MovementSquare)help_square[hotelEntrances.get(j).getI()][hotelEntrances.get(j).getJ()]).getDownNeighbour().equals(niceList.get(0))){\r\n\t \t\tthisHotelEntrances.add(hotelEntrances.get(j));\r\n\t \t\tcontinue;\r\n\t \t}\r\n\t }\r\n\t int maxBuildingLevel = findMaxLevel(i);\r\n\t\t\t\t\tHotel newHotel = new Hotel(help_square, niceList.get(0), thisHotelEntrances, maxBuildingLevel);\r\n\t\t\t\t\thotels.add(newHotel);\r\n\t\t\t\t\tsetHotelsPopUp(i);\r\n\t\t\t\t\tthisHotelEntrances.clear();\r\n\t\t\t\t}\r\n\t\t\t}", "private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void setShips(int x, int y) {\n\t\t// Mausi innerhalb des 1. Spielfeldes?\n\t\tif (x > 450 && x < 750 && y > 90 && y < 390) {\n\t\t\t// Position auf dem Spielfeld ermitteln\n\t\t\tint posX = Math.floorDiv(x - 450, 30);\n\t\t\tint posY = Math.floorDiv(y - 90, 30);\n\t\t\t// Wie \"lang\" ist das Schiff\n\t\t\tint anzahl = ships[anzahlschiffe - 1];\n\t\t\t// kontrolle ob der Punkt wo das Schiff gesetzt wird\n\t\t\t// nicht bereits in Liste ist. Ansonsten funktion beeneden.\n\t\t\t// Einmal fuer die drehung (vertikal) und einmal ohne (horizontal)\n\t\t\tif (drehen) {\n\t\t\t\tif (posX + anzahl <= 10) {\n\t\t\t\t\tfor (int l = 0; l < anzahl; l++) {\n\t\t\t\t\t\t// kontrolle ob nicht bereits in Liste\n\t\t\t\t\t\tif (gesetzeSchiffe.contains(new Point(posX + l, posY)))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (posY + anzahl <= 10) {\n\t\t\t\t\tfor (int l = 0; l < anzahl; l++) {\n\t\t\t\t\t\t// kontrolle ob nicht bereits in Liste\n\t\t\t\t\t\tif (gesetzeSchiffe.contains(new Point(posX, posY + l)))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Wenn das Schiff gesetzt werden kann setze es.\n\t\t\tif (drehen) {\n\t\t\t\tif (posX + anzahl <= 10) {\n\t\t\t\t\tfor (int l = 0; l < anzahl; l++) {\n\t\t\t\t\t\tgesetzeSchiffe.add(new Point(posX + l, posY));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (posY + anzahl <= 10) {\n\t\t\t\t\tfor (int l = 0; l < anzahl; l++) {\n\t\t\t\t\t\tgesetzeSchiffe.add(new Point(posX, posY + l));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Gesetzte Schiffe reduzieren.\n\t\t\tanzahlschiffe--;\n\t\t\t// Wenn alle Schiffe gesetzt wurden dann \"beende\" das Schiffe\n\t\t\t// setzen.\n\t\t\tif (anzahlschiffe == 0) {\n\t\t\t\tstopPlaceingShips();\n\t\t\t\ttry {\n\t\t\t\t\t//Dem Server die Schiffe mitteilen\n\t\t\t\t\tserver.setShips(this.gesetzeSchiffe, this.spielerNummer);\n\t\t\t\t\tthis.setStatus(\"Bitte warten...\");\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Dannach neu malen damit der User die aenderungen gleich sieht!\n\t\t\tthis.repaint();\n\n\t\t}\n\t}", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "public void expLocation() {\n\t\tif (!death) {\t// Geht nicht wenn Tod!\n\t\t\t\n\t\t\t// Beschreibungen anzeigen und boolean explored auf wahr setzen, außer der Raum wurde bereits untersucht\n\t\t\tif (location[this.currentLocation].isExplored()) { Tuna.setMessage(\"Dieser Raum wurde bereits untersucht!\");\n\t\t\t} else {\n\t\t\t\tTuna.addText(location[this.currentLocation].getDescriptions().getExploreDescription());\n\t\t\t\tlocation[this.currentLocation].setExplored(true);\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle null im Item-Array des Standortes sichtbar machen\n\t\t\tif ((currentLocation > 0 && currentLocation < 7 && currentLocation != 2) || currentLocation == 20) {\n\t\t\t\tlocation[this.currentLocation].getItem(0).setVisible(true);\n\t\t\t\t/* Im Korridor (1) der Kaffeelöscherkasten\n\t\t\t\t * Im Konferenzraum (3) der Ventilationsschacht\n\t\t\t\t * In der Kammer der Leere (4) die Notiz\n\t\t\t\t * Im Ventilationsraum (5) die Notiz\n\t\t\t\t * In der Damentoilette (6) das Skillboook\n\t\t\t\t * Im Fahrstuhlschacht (20) die Kaffeetasse\n\t\t\t\t */\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle eins im Item-Array des Standortes sichtbar machen\n\t\t\tif (currentLocation == 9) {\n\t\t\t\tlocation[this.currentLocation].getItem(1).setVisible(true);\n\t\t\t}\n\t\t} else if (death) {\n\t\t\tTuna.setMessage(\"Du bist tot!\");\n\t\t}\n\t}", "private void makeRoom(int givenPosition) {\n int newIndex = givenPosition;\n int lastIndex = numberOfElements;\n\n// Move each entry to next higher index, starting at end of\n// list and continuing until the entry at newIndex is moved\n for (int index = lastIndex; index >= newIndex; index--)\n listArray[index + 1] = listArray[index];\n }", "public ArrayList<Cell> findPlacesToGiveBirth() {\r\n\r\n // Randomly choose the number of babies.\r\n int numOfBabyToBeBorn = new Random().nextInt(this.numOfBaby()) + 1;\r\n\r\n ArrayList<Cell> newEmpty = this.getNeighbours(1);\r\n Collections.shuffle(newEmpty);\r\n\r\n ArrayList<Cell> placeToBeBorn = new ArrayList<Cell>();\r\n\r\n int countEmptyCell = 0;\r\n\r\n for (int findEmpt = 0; findEmpt < newEmpty.size()\r\n && countEmptyCell < numOfBabyToBeBorn; findEmpt++, countEmptyCell++) {\r\n if (newEmpty.get(findEmpt).getInhabit() == null \r\n && isTerrainAccessiable(newEmpty.get(findEmpt))) {\r\n placeToBeBorn.add(newEmpty.get(findEmpt));\r\n }\r\n }\r\n return placeToBeBorn;\r\n }", "private void readLandmarks() {\n landmarks.readBathrooms();\n landmarks.readCampsTSV();\n landmarks.readFavoritesTSV();\n System.out.println();\n }", "public void levelBrain2(ArrayList<GameObject> gameobject) {\n if ((_win_Level == true)&&(_save_Progres == false))\r\n { _save_Progres = true;\r\n gameobject.get(_player_Found_Value).setPlayerState(Static.PLAYER_STATE_LEVEL_COMPLETE);\r\n }\r\n\r\n\r\n\r\n if(_flag == 0)\r\n {\r\n\r\n\r\n int objectstofind = 1;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n gameobject.get(i).setOffScreenProjectile(0, GamePanel.HEIGHT / (100 / 50), 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 45), 0, GamePanel.HEIGHT, GamePanel.WIDTH / (100 / 10), Color.GREEN);\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if((_lvl_2_Points == 1)&&(_flag == 1))\r\n {\r\n\r\n int objectstofind = 3;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(1, 0, 270, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(1, GamePanel.HEIGHT / (100 / 55), 270, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 2) {\r\n gameobject.get(i).setOffScreenProjectile(0, -(GamePanel.HEIGHT / (100 / 40)), 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(0, -(GamePanel.HEIGHT / (100 / 40)), GamePanel.HEIGHT/ (100 / 50), GamePanel.WIDTH, Color.RED);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 4)&&(_flag ==2)) {\r\n\r\n int objectstofind = 1;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if (_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(2, GamePanel.HEIGHT, 170, 40);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 20), (GamePanel.HEIGHT / (100 / 30)), GamePanel.HEIGHT/ (100 / 20), GamePanel.WIDTH /(100 / 20), Color.YELLOW);\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if (_objects_Found == objectstofind) {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n }\r\n //Ain't no smooth sailing from here, make sure their parting gift from level one is special.\r\n if((_lvl_2_Points == 5)&&(_flag == 3)) {\r\n int objectstofind = 3;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if (_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n if (_objects_Found == 0) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(0, GamePanel.HEIGHT / (100 / 30) + GamePanel.HEIGHT / (100 / 20), 0, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(0, (GamePanel.HEIGHT / (100 / 30))+ GamePanel.HEIGHT / (100 / 20), GamePanel.HEIGHT / (100 / 50), GamePanel.WIDTH, Color.RED);\r\n }\r\n if (_objects_Found == 1) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(3, GamePanel.WIDTH / (100 / 20) + GamePanel.WIDTH /(100 / 20), 90, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 40), (GamePanel.HEIGHT / (100 / 50)), GamePanel.HEIGHT , GamePanel.WIDTH / (100 / 20), Color.RED);\r\n }\r\n if (_objects_Found == 2) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(1, GamePanel.WIDTH / (100 / 20) + GamePanel.WIDTH /(100 / 15), 270, 500);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n\r\n _objects_Found++;\r\n }\r\n }\r\n } else if (_objects_Found == objectstofind) {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 8)&&(_flag == 4))\r\n {\r\n\r\n int objectstofind = 2;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n if (_objects_Found == 0) {\r\n gameobject.get(i).setOffScreenProjectile(2, 0, 180, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(2, -(GamePanel.HEIGHT / (100 / 40)), 180, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 10)&&(_flag == 5))\r\n {\r\n int objectstofind = 5;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n if (_objects_Found == 0) {\r\n gameobject.get(i).setOffScreenProjectile(2, 0, 195, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(2, -(GamePanel.HEIGHT / (100 / 40)), 160, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 2) {\r\n gameobject.get(i).setOffScreenProjectile(3, -(GamePanel.WIDTH/(100/1)) , 150, 200);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 3) {\r\n gameobject.get(i).setOffScreenProjectile(0, 0, 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 4) {\r\n gameobject.get(i).setOffScreenProjectile(1, -GamePanel.WIDTH/(100/20), 270, 90);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n //THE PLAYER WON! KICK THEM THE FUCK OUT!\r\n if(_lvl_2_Points >= 15)\r\n {\r\n _win_Level = true;\r\n }\r\n\r\n //Check for scored points\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if(gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getSpecialBooleanVar() == true) {\r\n _lvl_2_Points++;\r\n\r\n gameobject.get(i).setSpecialBooleanVar(false);\r\n _fx.play(_sound_ID, 1, 1, 0, 0, 1);\r\n\r\n }\r\n }\r\n }\r\n\r\n if(_save_Progres == true) {\r\n if(gameobject.get(_player_Found_Value).getObjectStatus() == Static.OBJECT_STATUS_INACTIVE)\r\n {\r\n //The player now has permission to go to level 2 but they won't make it much further.\r\n if (_readFile.returnProgress() < 3) {\r\n _readFile.saveLevelProgress(3);\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n }\r\n }", "private void addAllNeighbours(@NonNull final Location searchLoc) {\n for (int x = -1; x < 2; x++) {\n for (int y = -1; y < 2; y++) {\n if ((x == 0) && (y == 0)) {\n continue;\n }\n final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y,\n searchLoc.getScZ());\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }\n \n final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }", "public int stapelPosition(Farbe farbe);", "protected boolean laufEinfach(){ \r\n\r\n\t\tint groessteId=spieler.getFigur(0).getPosition().getId();\r\n\t\tint figurId=0; // Figur mit der gr��ten ID\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=1; i<4; i++)\r\n\t\t{ \r\n\t\t\tint neueId;\r\n\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\tif(spieler.getFigur(i).getPosition().getTyp() != FeldTyp.Startfeld && groessteId<spieler.getFigur(i).getPosition().getId()){\r\n\t\t\t\tgroessteId=spieler.getFigur(i).getPosition().getId();\r\n\t\t\t\tfigurId=i;\r\n\t\t\t}\r\n\t\t\tneueId = spiel.ueberlauf(neueId, i);\r\n\t\t\tif (spieler.getFigur(i).getPosition().getTyp() == FeldTyp.Endfeld) {\r\n\t\t\t\tif (!spiel.zugGueltigAufEndfeld(neueId, i)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\t\tif(spieler.getFigur(i).getPosition().getId() == spieler.getFigur(i).getFreiPosition()){\r\n\t\t\t\t\tif(!spiel.userIstDumm(neueId, i)){\r\n\t\t\t\t\t\tfigurId = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\t\t\t\tif(spieler.getFigur(j).getPosition().getId() == neueId){\r\n\t\t\t\t\t\t\t\tif(!spiel.userIstDumm(neueId+spiel.getBewegungsWert(), j)){\r\n\t\t\t\t\t\t\t\t\tfigurId = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tspiel.bewege(figurId);\r\n\t\treturn true;\r\n\t}", "ArrayList<ArrayList<Double>> initrandomTerrainHeights() {\n ArrayList<ArrayList<Double>> result = new ArrayList<ArrayList<Double>>();\n for (int i = 0; i < ForbiddenIslandWorld.ISLAND_SIZE + 1; i = i + 1) {\n ArrayList<Double> result2 = new ArrayList<Double>();\n for (int j = 0; j < ForbiddenIslandWorld.ISLAND_SIZE + 1; j = j + 1) {\n result2.add(0.0);\n }\n result.add(result2);\n }\n result.get(0).set(ForbiddenIslandWorld.ISLAND_SIZE / 2, 1.0);\n result.get(ForbiddenIslandWorld.ISLAND_SIZE / 2).set(0, 1.0);\n result.get(ForbiddenIslandWorld.ISLAND_SIZE / 2).set(ForbiddenIslandWorld.ISLAND_SIZE / 2,\n (double) (ForbiddenIslandWorld.ISLAND_SIZE / 2));\n result.get(ForbiddenIslandWorld.ISLAND_SIZE / 2).set(ForbiddenIslandWorld.ISLAND_SIZE, 1.0);\n result.get(ForbiddenIslandWorld.ISLAND_SIZE).set(ForbiddenIslandWorld.ISLAND_SIZE / 2, 1.0);\n return result;\n }", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "private void addAllAbove(@NonNull final Location searchLoc, final int limit) {\n int currX = searchLoc.getScX();\n int currY = searchLoc.getScY();\n int currZ = searchLoc.getScZ();\n \n while (currZ <= limit) {\n currX -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currY += MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currZ++;\n final long foundKey = Location.getKey(currX, currY, currZ);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }", "public abstract void createEmptyMap(Game game, boolean[][] landMap);", "public abstract void createEmptyMap(Game game, boolean[][] landMap);", "@Override\n\tpublic void canLand() {\n\t\tSystem.out.println(\"IF IM IN THE SKY, I CANT LAND. BY THE OMNISSIAH\");\n\t}", "@Override\n public void placeShips(Fleet fleet, Board board) {\n foundPosition = new boolean[sizeX][sizeY];\n for (int i = fleet.getNumberOfShips() - 1; i >= 0; i--) {\n Ship s = fleet.getShip(i);\n boolean vertical = rnd.nextBoolean();\n Position pos;\n if (vertical) {\n int x = rnd.nextInt(sizeX);\n int y = rnd.nextInt(sizeY - (s.size()));\n\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x = rnd.nextInt(sizeX);\n y = rnd.nextInt(sizeY - (s.size()));\n break;\n }\n }\n if (check == false) {\n break;\n }\n /* int counter = 0;\n if (counter > 1) {\n y = rnd.nextInt(sizeY - (s.size()));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x++;\n if (x >= sizeX) {\n x = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x][y + j] = true;\n }\n pos = new Position(x, y);\n } else {\n int x = rnd.nextInt(sizeX - (s.size()));\n int y = rnd.nextInt(sizeY);\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n x = rnd.nextInt(sizeX - (s.size()));\n y = rnd.nextInt(sizeY);\n }\n }\n if (check == false) {\n break;\n }\n /*int counter = 0;\n if (counter > 1) {\n x = rnd.nextInt(sizeX - (s.size() - 1));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n y++;\n if (y >= sizeX) {\n y = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x + j][y] = true;\n }\n pos = new Position(x, y);\n }\n board.placeShip(pos, s, vertical);\n }\n }", "private void setNumbers() {\n\t\tint w = worldWidth;\n\t\tint h = worldHeight;\n\t\tfor (int x = 0; x <= w - 1; x++) {\n\t\t\tfor (int y = 0; y <= h - 1; y++) {\n\t\t\t\tint numbers = 0;\n\n\t\t\t\tint right = x + 1;\n\t\t\t\tint left = x - 1;\n\t\t\t\tint up = y - 1;\n\t\t\t\tint down = y + 1;\n\n\t\t\t\tif (left < 0) {\n\t\t\t\t\tleft = 0;\n\t\t\t\t}\n\t\t\t\tif (up < 0) {\n\t\t\t\t\tup = 0;\n\t\t\t\t}\n\t\t\t\tif (down >= h) {\n\t\t\t\t\tdown = h - 1;\n\t\t\t\t}\n\t\t\t\tif (right >= w) {\n\t\t\t\t\tright = w - 1;\n\t\t\t\t}\n\n\t\t\t\tfor (int m = left; m <= right; m++) {\n\t\t\t\t\tfor (int n = up; n <= down; n++) {\n\t\t\t\t\t\tif (!(m == x && n == y)) {\n\t\t\t\t\t\t\tif (tileArr[m][n].hasBomb()) {\n\t\t\t\t\t\t\t\tnumbers++;\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}\n\t\t\t\ttileArr[x][y].setNeighbors(numbers);\n\t\t\t}\n\n\t\t}\n\n\t}", "private void addAllBelow(@NonNull final Location searchLoc, final int limit) {\n int currX = searchLoc.getScX();\n int currY = searchLoc.getScY();\n int currZ = searchLoc.getScZ();\n \n while (currZ >= limit) {\n currX += MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currY -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currZ--;\n final long foundKey = Location.getKey(currX, currY, currZ);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }", "public void updateFrontKnown() {\n\t\tfrontKnown = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < maxX; i++) {\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tif (coveredMap[i][j] != SIGN_UNKNOWN && coveredMap[i][j] != SIGN_MARK && findAdjacentUnknown(new int[]{i, j}).size() > 0) {\n\t\t\t\t\tfrontKnown.add(new int[]{i,j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean updateLand(Land land) {\n\t\treturn dao.updateLand(land);\n\t}", "void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }", "private static ArrayList<Map> checkAvailability(ArrayList<Map> res) {\n\t\tArrayList<Map> availableSlot = new ArrayList<Map>();\r\n\t\tfor (Map center : res) {\r\n\t\t\tint age = (int) center.get(\"min_age_limit\");\r\n\t\t\tif(age == AGE) {\r\n\t\t\t\tint dose1 = (int) center.get(\"available_capacity_dose1\");\r\n\t\t\t\tif(dose1>0) {\r\n\t\t\t\t\tSystem.out.println(\"available for 45+ :\" + center);\r\n\t\t\t\t\tavailableSlot.add(center);\r\n\t\t\t\t\t//END = true;\r\n\t\t\t\t}\r\n\t\t\t}else if( age == 18) {\r\n\t\t\t\tint dose1 = (int) center.get(\"available_capacity_dose1\");\r\n\t\t\t\tif(dose1>0) {\r\n\t\t\t\t\tSystem.out.println(\"available for 18+ :\" +center);\r\n\t\t\t\t\tavailableSlot.add(center);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn availableSlot;\r\n\t}", "static int numberAmazonTreasureTrucks(int rows, int column,\n\t\t\t\t\t\t\t\t List<List<Integer> > grid)\n {\n // WRITE YOUR CODE HERE\n int count = 0;\n for(int i=0;i<rows;i++) {\n for(int j=0;j<column;j++) {\n if(grid.get(i).get(j) == 1) {\n count++;\n markNeighbours(grid, i, j, rows, column);\n }\n }\n }\n return count;\n }", "private void PopulateCheckpointList()\n {\n checkpoints.add(FindNextCheckpoint(startTile, directions = FindNextDirection(startTile)));\n \n int counter = 0;\n boolean cont = true;\n while (cont)\n {\n int[] currentDirection = FindNextDirection(checkpoints.get(counter).getTile());\n \n // Check if a next direction/checkpoint exists and end after 20 chekpoints(arbitrary).\n if(currentDirection[0] == 2 || counter == 20)\n {\n cont = false;\n }\n else\n {\n checkpoints.add(FindNextCheckpoint(checkpoints.get(counter).getTile(),\n directions = FindNextDirection(checkpoints.get(counter).getTile())));\n }\n counter++;\n }\n }", "public void evaluaVisibilidad(int posX, int posY)\n {\n \n /** Contiene todas las posibles casillas visibles.\n * Si en el proceso una casilla tapa, pasa a modo 'oclusion, y ocluye las demás hasta que llega al punto final (Las quita del Array)\n */\n this.casillasVisibles=new TreeSet<>();\n \n //Realizar la interpolacion\n boolean visible=true;\n CoordCasilla origen=new CoordCasilla(posX , posY);\n CoordCasilla destino;\n List<CoordCasilla>camino;\n \n /* Cell cell = new Cell();\n cell.setTile(mapaActual.getTileSets().getTileSet(0).getTile(138));*/\n \n //Calcular las interpolaciones\n for(CoordCasilla cc:MATRIZ_INTERPOLACION)\n {\n visible=true;\n destino=new CoordCasilla(origen.x +cc.x,origen.y+cc.y);\n camino= Analizador.interpola(origen, destino);\n \n \n for(CoordCasilla casillaEstudio:camino)\n {\n //Si la celda está fuera de limites no tiene sentido realizar el analisis de las casillas siguientes\n if(casillaEstudio.x<0 || casillaEstudio.x>this.anchoMapa-1 || casillaEstudio.y<0 || casillaEstudio.y>this.altoMapa - 1)\n break;\n \n \n if(!visible ) //No hay visibilidad, quitamos la casilla si la hay del TreeSet\n {\n //posibleVisibilidad.remove(celdaEstudio);\n continue;\n }\n else if(visible && this.capaViibilidad.getCell(casillaEstudio.x,casillaEstudio.y)!=null) //La casilla es limite de visibilidad\n visible=false;\n \n //TEST: Marcamos esta casilla como visible\n //this.capaAux.setCell(celdaEstudio.x, celdaEstudio.y,cell);\n \n //Llegados a este punto, quitamos la niebla de guerra de la casilla\n quitaNieblaDeGuerra(casillaEstudio);\n \n this.casillasVisibles.add(casillaEstudio);\n }\n }\n }", "ArrayList<int[]> findValidMoves();", "private int countGrasses()//issues...see comment below in countTrees()\n {\n int grasses = 0;\n Field field = getField();\n Iterator<Location> it;\n List<Object> plantList = new List<>();\n while(it.hasNext()) {\n plantList.add(field.getObjectAt(currant));\n if(plant instanceof Grass) {\n grasses++;\n }\n }\n return grasses;\n }", "public List<Landmark> getLandmarks() {\n return Landmarks;\n }", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tshowProgress(false, null);\n\t\t\tboolean canRoute = false;\n\t\t\tfor (FloorInfo floorInfo : floorList) {\n\t\t\t\tArrayList<LocatorGeocodeResult> shelfList = floorInfo\n\t\t\t\t\t\t.getShelfList();\n\t\t\t\tif (shelfList.size() > 0) {\n\t\t\t\t\tStopGraphic points[] = new StopGraphic[shelfList.size()];\n\t\t\t\t\tint index = 1;\n\t\t\t\t\tfor (LocatorGeocodeResult result : shelfList) {\n\t\t\t\t\t\tString address = result.getAddress();\n\t\t\t\t\t\tif (index >= shelfList.size()\n\t\t\t\t\t\t\t\t&& !address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tPoint p = (Point) GeometryEngine.project(\n\t\t\t\t\t\t\t\tresult.getLocation(), wm, egs);\n\t\t\t\t\t\tif (address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tpoints[0] = new StopGraphic(p);\n\n\t\t\t\t\t\t\tSystem.out.println(\"起始点x:\" + p.getX() + \" y:\"\n\t\t\t\t\t\t\t\t\t+ p.getY());\n\n\t\t\t\t\t\t} else if (floorInfo.getEndPoint() != null\n\t\t\t\t\t\t\t\t&& address.equals(floorInfo.getEndPoint())) {\n\t\t\t\t\t\t\tpoints[shelfList.size() - 1] = new StopGraphic(p);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpoints[index++] = new StopGraphic(p);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif (points[0] != null && points.length >= 2) {\n\t\t\t\t\t\tcanRoute = true;\n\t\t\t\t\t\trouteCount++;\n\t\t\t\t\t}\n\t\t\t\t\tfloorInfo.setPoints(points);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclearAll();\n\t\t\tif (!canRoute) {\n\t\t\t\tToast.makeText(MapActivity.this, \"没有找到足够的点,无法导航\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t} else {\n\t\t\t\tQueryDirections();\n\t\t\t}\n\t\t}", "private int getNumberOfBoxesOfAllShips() {\r\n int count = 30;\r\n return count;\r\n }", "private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }", "int getLocationsCount();", "public ArrayList<Integer> createList(){\r\n \tArrayList<Integer> test = new ArrayList<>();\r\n \tstarLabels = new ArrayList<>();\r\n \tconstLabels = new ArrayList<>();\r\n \tplanetLabels = new ArrayList<>();\r\n \tmesrLabels = new ArrayList<>();\r\n \tmoonLabel = new ArrayList<>();\r\n \t\r\n \tint a = 0;\r\n \tint b = 1;\r\n \tint c = 2;\r\n \tint d = 3;\r\n \t\r\n \tint size;\r\n \t\r\n \t//Go through the spaceobjectlist\r\n \tfor(int i = 0; i < AlexxWork2.spaceObjList.size(); i++) {\r\n \t\t\r\n \t\t//If object is visible and object has positive altitude continue\r\n \t\tif(AlexxWork2.spaceObjList.get(i).getMagnitude() != null \r\n \t\t\t\t&& (Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()) <= 6.0) \r\n \t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 0.5) {\r\n\t \t\t\r\n \t\t\t\r\n \t\t\t//Calculate X and Y\r\n \t\t\tint x = getX(2250, 2250, 1000, \r\n \t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAzimuth(), \r\n \t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n \t\t\t\r\n\t\t\t\tint y = getY(2250, 2250, 1000, \r\n\t\t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAzimuth(), \r\n\t\t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\r\n\t\t\t\t//Load stars\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"STAR\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\") {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(AlexxWork2.starNamesCB \r\n\t\t\t\t\t\t\t&& Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()) <= 6.0) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t//Filter out number only star names\r\n\t\t\t\t\t\t\tint testInt = Integer.parseInt(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\t\t\t} catch (NumberFormatException | NullPointerException nfe) {\r\n\t\t\t\t\t\t\t\tstarLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\t\t\t\tstarLabels.add(String.valueOf(x));\r\n\t\t\t\t\t\t\t\tstarLabels.add(String.valueOf(y));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Load constellation data\r\n\t\t\t\t\tif(herculesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadHerculesLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ursaMinorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadUrsaMinorLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ursaMajorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadUrsaMajorLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(libraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadLibraLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(andromedaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAndromedaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aquariusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAquariusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aquilaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAquilaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ariesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAriesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aurigaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAurigaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(bootesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadBootesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cancerNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCancerLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(canisMajorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCanisMajorLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(canisMinorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCanisMinorLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(capricornusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCapricornusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cassiopeiaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCassiopeiaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(centaurusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCentaurusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cepheusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCepheusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cruxNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCruxLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cygnusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCygnusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(dracoNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadDracoLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(geminiNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadGeminiLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(hydraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadHydraLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(leoNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadLeoLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(lyraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadLyraLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(orionNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadOrionLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(pegasusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPegasusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(perseusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPerseusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(piscesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPiscesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(sagittariusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadSagittariusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(scorpioNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadScorpioLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(taurusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadTaurusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Add coordinates to list\r\n\t \t\ttest.add(a, x);\r\n\t \t\ttest.add(b, y);\r\n\t \t\t\r\n\t \t\t//Add moon information if visible\r\n\t \t\tif(AlexxWork2.spaceObjList.get(i).getProperName() == \"MOON\") {\r\n size = 22;\r\n String moonName = AlexxWork2.spaceObjList.get(i).getProperName() + \": \" + AlexxWork2.spaceObjList.get(i).getType();\r\n moonLabel.add(0, moonName);\r\n moonLabel.add(1, String.valueOf(x));\r\n moonLabel.add(2, String.valueOf(y));\r\n }\r\n\t \t\t\r\n\t \t\t//If object is planet, set the size\r\n\t \t\telse if(AlexxWork2.spaceObjList.get(i).getType() == \"PLAN\"){\r\n\t \t\t\tsize = 16;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else set size based on mag\r\n\t \t\telse{\r\n\t \t\t\tsize = getSize(Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()));\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Add size to list\r\n\t \t\ttest.add(c, size);\r\n\t \t\ttest.add(d, size);\r\n\t \t\ta = d + 1;\r\n\t \t\tb = a + 1;\r\n\t \t\tc = b + 1;\r\n\t \t\td = c + 1;\r\n \t\t}\r\n \t\t\r\n \t\t//Load constellation labels\r\n \t\tif(AlexxWork2.constellationsCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"CONST\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getConstName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getConstName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tconstLabels.add(AlexxWork2.spaceObjList.get(i).getConstName());\r\n\t\t\t\t\tconstLabels.add(String.valueOf(x));\r\n\t\t\t\t\tconstLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\r\n \t\t//Load planet labels\r\n \t\tif(AlexxWork2.planetsCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"PLAN\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tplanetLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\tplanetLabels.add(String.valueOf(x));\r\n\t\t\t\t\tplanetLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\r\n \t\t//Load messier labels\r\n \t\tif(AlexxWork2.messierCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"MESR\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tmesrLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\tmesrLabels.add(String.valueOf(x));\r\n\t\t\t\t\tmesrLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n \t\r\n \t//Return list \r\n \treturn test;\r\n }", "private void LoadingDatabaseGameLocation() {\n\n\t\tCursor cursor = helper.getDataAll(GamelocationTableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tGAME_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_GAME_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_GAME_LCOATION_COLUMN);\n\t\t\tString isGameVisited = cursor.getString(GAME_IS_VISITED_COLUMN);\n\n\t\t\tGAME_LIST.add(new gameLocation(ID, Description,\n\t\t\t\t\tisUsed(isGameVisited)));\n\t\t\t\n\t\t\tLog.d(TAG, \"game ID : \"+ ID);\n\t\t\t\n\t\t} // travel to database result\n\n\t}", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "protected ArrayList<String> reserveFreezerLocations(String strainType, Db db)\n\t{\n\t\tArrayList<String> locs = new ArrayList<String>();\n\t\tString backupBoxPrefix = getStrainBackupBoxPrefix(db);\n\t\tString boxPrefix = getStrainBoxPrefix(db);\n\t\tint currBoxNum = 0;\n\t\tint currPos = 0;\n\t\tString boxNum = \"0\";\n\t\tint pos = 0;\n\t\tString freezer = null;\n\t\tint numVials = 0;\n\t\tString padPos = null; // zero-padded position, e.g. '01'\n\t\tString loc = null;\n\t\t\n\t\tString sql = null;\n\t\tResultSet rs = null;\n\t\ttry\n\t\t{\n\t\t\t// we're going for robustness via brute force here\n\t\t\tsql = \"exec spMet_getCurrentBoxAndPosition '\" + strainType + \"', '\" + boxPrefix + \"'\";\n\t\t\trs = dbHelper.getResultSet(sql, db);\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcurrBoxNum \t\t= rs.getInt(1);\n\t\t\t\tcurrPos \t\t= rs.getInt(2); // may be zero, which is OK\n\t\t\t\tfreezer \t\t= rs.getString(3);\n\t\t\t\tnumVials\t\t= rs.getInt(4); // number of slots to reserve\n\t\t\t}// expecting only one\n\t\t\trs.close();\n\t\t\trs = null;\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tthrow new LinxSystemException(e.getMessage());\n\t\t}\n\t\t// at exit, know last filled pos in this box type\n\t\t\n\t\t// make regular archives (ME)\n\t\tif(currBoxNum == 0) // handle boundary (start-up) condition\n\t\t{\n\t\t\tcurrBoxNum = 1;\n\t\t}\n\t\t\n\t\tpos = currPos; // may be zero if new box\n\t\tfor(int vialIdx = 0; vialIdx < numVials; vialIdx++)\n\t\t{\n\t\t\tif(pos < 81) // todo: eliminate magic number\n\t\t\t{\n\t\t\t\t// there's room in this box\n\t\t\t\tpos = pos + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t// increment box\n\t\t\t\tcurrBoxNum = currBoxNum + 1;\n\t\t\t\tpos = 1;\n\t\t\t}\n\t\t\tboxNum = EMRETask.zeroPad(currBoxNum,2);\n\t\t\tpadPos = zeroPadPosition(pos);\n\t\t\tloc = freezer + \":\" \n\t\t\t + boxPrefix + boxNum + \":\"\n\t\t\t + padPos;\t\t\t\n\t\t\tlocs.add(loc);\n\t\t}// next archive\n\t\t//*************\n\t\t// at exit, locs has numVials lines in it, one per strain location\n\t\n\t\t// backup archive\n\t\ttry\n\t\t{\n\t\t\tsql = \"exec spMet_getCurrentBoxAndPosition '\" + strainType + \"', '\" + backupBoxPrefix + \"'\";\n\t\t\trs = dbHelper.getResultSet(sql, db);\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcurrBoxNum = rs.getInt(1);\n\t\t\t\tcurrPos = rs.getInt(2);\n\t\t\t\tfreezer \t= rs.getString(3);\n\t\t\t\tnumVials\t= rs.getInt(4); // number of archive boxes to make\n\t\t\t}// expecting only one\n\t\t\trs.close();\n\t\t\trs = null;\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tthrow new LinxSystemException(e.getMessage());\n\t\t}\n\t\t// at exit, know last filled pos in this box type\n\t\t\n\t\t// Backup archive(s)\n\t\tif(currBoxNum == 0) // handle boundary (start-up) condition\n\t\t{\n\t\t\tcurrBoxNum = 1;\n\t\t}\n\t\t\n\t\tpos = currPos; // may be zero if new box\n\t\tfor(int vialIdx = 0; vialIdx < numVials; vialIdx++)\n\t\t{\n\t\t\tif(pos < 81) // todo: eliminate magic number\n\t\t\t{\n\t\t\t\t// there's room in this box\n\t\t\t\tpos = pos + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t// increment box\n\t\t\t\tcurrBoxNum = currBoxNum + 1;\n\t\t\t\tpos = 1;\n\t\t\t}\n\t\t\tboxNum = EMRETask.zeroPad(currBoxNum,2);\n\t\t\tpadPos = zeroPadPosition(pos);\n\t\t\tloc = freezer + \":\" \n\t\t\t + backupBoxPrefix + boxNum + \":\"\n\t\t\t + padPos;\t\t\t\n\t\t\tlocs.add(loc);\n\t\t}// next archive\n\t\t//*************\n\t\t// at exit, locs has numVials lines in it, one per strain location\n\t\t\n\t\treturn locs;\n\t}", "protected int laatsteOngeplandeDoorgeschovenspeler(ArrayList<Speler> spelers, boolean[] gepland, int niveau) {\r\n for (int i = (gepland.length - 1); i > 0; --i) {\r\n if (!gepland[i] && spelers.get(i).getGroep() != niveau) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public void LandID(){\n int x = Integer.parseInt(AssetLandCount_txt.getText());\n \n String LandIDwillBe = String.valueOf(x+1);\n \n LandNumber_txt.setText(LandIDwillBe);\n }", "public boolean check_func(int [] land, int x, int y)\n\t{\n\t\tif ((land[0] < x && land[2] > x\n\t\t\t& (land[1] < y && land[3] > y)))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "@Test\n\tpublic void testIfKingIsCapturedBySandwich()\n\t{\n\t\tData d=new Data();\n\t\td.set(8,31);\n\t\td.set(6,28);\n\t\td.set(0,36);\n\t\td.set(24,35);\n\t\td.set(14,38);\n\t\td.set(14,37);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(37);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "public boolean isOnLand() {\r\n\t\treturn isOnLand;\r\n\t}" ]
[ "0.6004757", "0.59936935", "0.5867124", "0.5852231", "0.5817245", "0.5791753", "0.57073677", "0.5681514", "0.56463945", "0.55323267", "0.55078864", "0.5477868", "0.5475289", "0.5451235", "0.54403514", "0.54329705", "0.5423071", "0.54123527", "0.54065657", "0.53970534", "0.53886515", "0.5381311", "0.53658783", "0.53523666", "0.5347634", "0.5344553", "0.5335906", "0.53211427", "0.53195405", "0.53033304", "0.5275364", "0.5256304", "0.52509516", "0.52488697", "0.5243946", "0.5242156", "0.5238316", "0.5230652", "0.5224847", "0.52191645", "0.5200568", "0.5196506", "0.51700723", "0.5157694", "0.5154849", "0.5150322", "0.5144904", "0.5138866", "0.5100288", "0.5098498", "0.50718904", "0.5054922", "0.503302", "0.5028832", "0.50171274", "0.50160515", "0.50085115", "0.49964592", "0.4991103", "0.49898207", "0.49848607", "0.49820286", "0.49814165", "0.49692184", "0.49516046", "0.4945073", "0.49434438", "0.49380207", "0.49329868", "0.49242052", "0.49178866", "0.49178866", "0.4916287", "0.49133834", "0.49125051", "0.49119276", "0.49021018", "0.4901712", "0.49013883", "0.48998398", "0.48972455", "0.4890729", "0.48769236", "0.48742667", "0.48735163", "0.48713082", "0.48678127", "0.4867672", "0.4857054", "0.48533574", "0.48502073", "0.48487824", "0.4844564", "0.48430684", "0.4840023", "0.48399472", "0.4829332", "0.48214453", "0.4818468", "0.48160943" ]
0.5860463
3
Get cut image from local file
public TailoredImage getImageFile(String filepath) throws IOException { BufferedImage source = ImageIO.read(new File(filepath)); return doProcess(source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();", "java.lang.String getImage();", "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 }", "@Override public BufferedImage getSlice(int i) {\n\t\tBufferedImage slice = null;\n\t\ttry {\n\t\t\tslice = ImageIO.read(tiffs[i]);\n\t\t} catch (IOException e) {\n\t\t\treturn null;\n\t\t}\n\t\treturn slice;\n\t}", "String getImage();", "public BufferedImage open() {\n\t\tJFileChooser choose = new JFileChooser(); //Removed path from the chooser!\n\n\t\tif (choose.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)\n\t\t\treturn null;\n\t\tString file = choose.getSelectedFile().getAbsolutePath();\n\t\ttry {\n\t\t\tthis.x = 0;\n\t\t\tthis.y = 0;\n\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tString iden = \"\";\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\t\n\t\t\tif (iden.compareTo(\"PPL\") != 0)\treturn null;\n\t\t\tbyte by = ois.readByte();\n\t\t\tSystem.out.println(by);\n\t\t\t\n\t\t\tswitch (by) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.image = loadRGB(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.image = loadCMY(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.image = loadGS(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.image = loadBW(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.image = loadLT(ois);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tois.close();\n\t\t\t//int b = ois.readByte(); //lee 8 bits, lee -16, y no 240\n\t\t\t//si el bit mas significativo del byte antes de introducirse fue 1, el numero leido se interpreta como negativo\n\t\t\t//if(b < 0) b += 256; //para leer bytes sin signo\n\t\t\t//int i = ois.readInt(); //lee 32 bits, lee 3500\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\treturn image;\n\t}", "private List<Bitmap> cutImage(Bitmap picture) {\n List<Bitmap> newPieces = new ArrayList<Bitmap>();\n int w = picture.getWidth();\n int h = picture.getHeight();\n int boxWidth = w / Board.NUM_COLS;\n int boxHeight = h / Board.NUM_ROWS;\n for (int i = 0; i < Board.NUM_ROWS; i++) {\n for (int j = 0; j < Board.NUM_ROWS; j++) {\n Bitmap pictureFragment = Bitmap.createBitmap(picture, j * boxWidth, i * boxHeight, boxWidth, boxHeight);\n newPieces.add(pictureFragment);\n }\n }\n return newPieces;\n }", "private BufferedImage getImage(String f) {\n BufferedImage image = null;\n File file = new File(f);\n\n try {\n image = ImageIO.read(file);\n }\n catch (Exception ex) {\n JOptionPane.showMessageDialog(\n null,\n \"Image could not be read!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "private Bitmap decodeFileFromPath(String path) {\n Uri uri = getImageUri(path);\n InputStream in = null;\n try {\n in = getContentResolver().openInputStream(uri);\n\n //Decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n\n BitmapFactory.decodeStream(in, null, o);\n in.close();\n\n int scale = 1;\n int inSampleSize = 1024;\n if (o.outHeight > inSampleSize || o.outWidth > inSampleSize) {\n scale = (int) Math.pow(2, (int) Math.round(Math.log(inSampleSize / (double) Math.max(o.outHeight, o.outWidth)) / Math.log(0.5)));\n }\n\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize = scale;\n in = getContentResolver().openInputStream(uri);\n // Bitmap b = BitmapFactory.decodeStream(in, null, o2);\n int MAXCAP_SIZE = 512;\n Bitmap b = getResizedBitmap(BitmapFactory.decodeStream(in, null, o2), MAXCAP_SIZE);\n in.close();\n\n return b;\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "java.lang.String getImagePath();", "public static BufferedImage[] cutMapaImage(String name, int X, int Y) {\n BufferedImage[] sprites = null;\n try {\n BufferedImage imagen = ImageIO.read(new File(CanvasMap.class.getClassLoader().getResource(name).getFile()));\n final int filas = imagen.getHeight() / X;\n final int columnas = imagen.getWidth() / Y;\n sprites = new BufferedImage[filas * columnas];\n\n for (int i = 0; i < filas; i++) {\n for (int j = 0; j < columnas; j++) {\n sprites[(i * columnas) + j] = imagen.getSubimage(j * X, i * Y, X, Y);\n Image img = sprites[(i * columnas) + j].getScaledInstance(tamX, tamY, BufferedImage.SCALE_DEFAULT);\n sprites[(i * columnas) + j] = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n Graphics2D g = (Graphics2D) sprites[(i * columnas) + j].getGraphics();\n g.drawImage(img, 0, 0, null);\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(CanvasMap.class.getName()).log(Level.SEVERE, null, ex);\n }\n return sprites;\n }", "public BufferedImage readImage() throws IOException{\n\t\tFile read = new File(\"src/blue_plate.png\");\n\t\t//decodes a supplied File and returns a BufferedImage\n\t\tBufferedImage master = ImageIO.read(read);\n\t\treturn master;\n\t\t\n\t}", "public static BufferedImage readImageFromFile() {\r\n BufferedImage img = null;\r\n final JFileChooser fileChooser = new JFileChooser();\r\n File selectedFile = null;\r\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\r\n int result = fileChooser.showOpenDialog(null);\r\n if (result == JFileChooser.APPROVE_OPTION) {\r\n selectedFile = fileChooser.getSelectedFile();\r\n System.out.println(\"Selected file: \" + selectedFile.getAbsolutePath());\r\n }\r\n try {\r\n img = ImageIO.read(selectedFile);\r\n } catch (IOException e) {\r\n }\r\n return img;\r\n }", "private void readFile(){\n File file = new File(Environment.getExternalStorageDirectory()+\"/saved_images/profile.jpg\");\n myPictureForShow = BitmapFactory.decodeFile(file.getAbsolutePath());\n }", "public int getImage();", "private BufferedImage sacaFoto(String fo){\n File input = null;\n BufferedImage image = null;\n try{\n input = new File(fo);\n image = ImageIO.read(input);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la lectura de la imagen\");\n System.exit(1);\n }\n return image;\n }", "String getImagePath();", "String getImagePath();", "public File getFileForPicture() {\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG,\"Not ready when taking picture\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcurrentFile = new File(directory,getFileName());\r\n\t\treturn currentFile;\r\n\t}", "private void collectCloud() {\n\t\ttry { \n\t\t\tcloud = ImageIO.read(getClass().getResourceAsStream(\"/img/tempCloud.png\"));\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"The cloud file requested does not exist! Please fix this before contueing!\");\n\t\t}\n\t}", "public Image getTrebleClef();", "public Image getCrotchetRest();", "File resolveImage(Box box);", "public String getThumbnail();", "public BufferedImage crop(int x, int y, int width, int height){\n return sheet.getSubimage(x, y, width, height);\n }", "private void startCropImage() {\n }", "public Image getSharp();", "void selectImage(String path);", "public void test(String path){\n File file = new File(path);\n byte[] image = new byte[(int) file.length()];\n try {\n FileInputStream fis = new FileInputStream(file);\n fis.read(image); //read file into bytes[]\n\n fis.close();\n test(image);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public native MagickImage cropImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;", "public void run() {\n System.out.print(Thread.currentThread().getId() + \"\\n\");\n try {\n try {\n File outfile = new File(dataPath + imageFile.getName().replace(\"jpg\", \"txt\"));\n if (outfile.exists()) {\n return;\n }\n String ms = \"nada\";\n records.write(\"<\");\n records.write(imageFile.getName() + \">\\n\");\n BufferedImage bin = ImageHelpers.readAsBufferedImage(imageFile.getAbsolutePath());\n bin = ImageHelpers.scale(bin, maxHeight);\n orig = ImageHelpers.readAsBufferedImage(imageFile.getAbsolutePath());\n orig = ImageHelpers.scale(orig, maxHeight);\n BufferedImage stored = cloneImage(ImageHelpers.scale(orig, maxHeight));\n BufferedImage copy = ImageHelpers.readAsBufferedImage(imageFile.getAbsolutePath());\n copy = ImageHelpers.scale(copy, maxHeight);\n records.flush();\n System.out.println(imageFile.getName());\n PlanarImage threshedImage = JAI.create(\"fileload\", imageFile.getAbsolutePath());\n BufferedImage ok = threshedImage.getAsBufferedImage();\n bin = ImageHelpers.scale(ImageHelpers.binaryThreshold(ok, 4), maxHeight);\n for (int i = 0; i < bin.getWidth(); i++) {\n for (int j = 0; j < bin.getHeight(); j++) {\n orig.setRGB(i, j, -1);\n }\n }\n Boolean doBlobExtract = true;\n if (doBlobExtract) {\n for (int i = 0; i < bin.getWidth(); i++) {\n for (int j = 0; j < bin.getHeight(); j++) {\n orig.setRGB(i, j, -1);\n }\n }\n //ImageHelpers.writeImage(bin, \"/usr/web/broken/\" + imageFile.getName() + \"bin\" + \".jpg\");\n Vector<blob> blobs = new Vector<blob>();\n for (int i = 0; i < bin.getWidth(); i++) {\n for (int j = 0; j < bin.getHeight(); j++) {\n if (bin.getRGB(i, j) != -1) {\n blob thisOne = new blob(i, j);\n thisOne.copy = orig;\n if (blobs.size() % 3 == 0) {\n thisOne.color = 0xcc0000;\n }\n if (blobs.size() % 3 == 1) {\n thisOne.color = 0x000099;\n }\n if (blobs.size() % 3 == 2) {\n thisOne.color = 0x006600;\n }\n thisOne.count(bin, thisOne.getX(), thisOne.getY());\n if (thisOne.size > 5) {\n blobs.add(thisOne);\n if ((thisOne.getSize() - (thisOne.getSize() % 10)) != 5000 && (thisOne.getSize() - (thisOne.getSize() % 10)) != 0) {\n\n thisOne.calculateRelativeCoordinates();\n thisOne.drawBlob(orig, thisOne.color);\n\n }\n }\n }\n }\n }\n BufferedWriter blobWriter = new BufferedWriter(new FileWriter(outfile));\n\n int ctr = 1;\n for (int i = 0; i < blobs.size(); i++) {\n if ((blobs.get(i).size < 4000)) {\n try {\n blobs.get(i).id = ctr;\n ctr++;\n //blobs.get(i).color=0x000000;\n blobs.get(i).arrayVersion = blobs.get(i).pixels.toArray(new pixel[blobs.get(i).pixels.size()]);\n int maxX = 0;\n for (int k = 0; k < blobs.get(i).arrayVersion.length; k++) {\n if (blobs.get(i).arrayVersion[k].x > maxX) {\n maxX = blobs.get(i).arrayVersion[k].x;\n }\n }\n blobs.get(i).width = maxX;\n int maxY = 0;\n for (int k = 0; k < blobs.get(i).arrayVersion.length; k++) {\n if (blobs.get(i).arrayVersion[k].y > maxY) {\n maxY = blobs.get(i).arrayVersion[k].y;\n }\n }\n blobs.get(i).height = maxY;\n\n\n blobs.get(i).matrixVersion = new matrixBlob(blobs.get(i));\n } catch (Exception e) {\n e.printStackTrace();\n }\n // blob.writeBlob(blobWriter, blobs.get(i));\n blob.writeMatrixBlob(blobWriter, blobs.get(i));\n blobs.set(i, null);//.matrixVersion=null;\n //blobs.get(i).arrayVersion=null;\n // blob.writeBlob(blobWriter, blobs.get(i));\n //blob.drawBlob(orig, blobs.get(i).x, blobs.get(i).y, blobs.get(i), 0x000000);\n }\n }\n System.out.print(\"found \" + ctr + \" blobs\\n\");\n\n }\n\n try {\n\n\n if (!doBlobExtract) {\n orig = bin;\n }\n //ImageHelpers.writeImage(orig, \"/usr/web/broken/\" + imageFile.getName() + \"broken\" + \".jpg\");\n\n Vector<line> lines = new Vector();\n createViewableVerticalProfile(orig, imageFile.getName(), lines);\n //ImageHelpers.writeImage(ImageHelpers.createViewableVerticalProfile(orig, imageFile.getName(), lines), \"/usr/web/broken/profile\" + imageFile.getName() + \"broken\" + \".jpg\");\n FileWriter writer = null;\n //writer = new FileWriter(new File(\"/usr/web/queries/\" + imageFile.getName() + \"\"));\n orig = ImageHelpers.scale(orig, 1000);\n Detector d = new Detector(orig, orig);\n if (lines.size() > 3) {\n lines = new Vector();\n lines.add(new line());\n lines.get(0).setStartHorizontal(0);\n lines.get(0).setStartVertical(0);\n lines.get(0).setWidth(orig.getWidth());\n lines.get(0).setDistance(maxHeight);\n }\n //d.detect();\n for (int i = 0; i < lines.size(); i++) {\n line col = lines.get(i);\n BufferedImage storedBin = ImageHelpers.binaryThreshold(stored, 4);\n BufferedImage colOnly = storedBin.getSubimage(col.getStartHorizontal(), col.getStartVertical(), col.getWidth(), col.getDistance());\n d = new Detector(colOnly, colOnly);\n d.debugLabel = imageFile.getName();\n d.forceSingle = true;\n d.detect();\n System.out.print(\"total lines in col is \" + d.lines.size() + \"\\n\");\n for (int j = 0; j < d.lines.size(); j++) {\n line r = d.lines.get(j);\n r.setStartHorizontal(r.getStartHorizontal() + col.getStartHorizontal());\n r.setStartVertical(r.getStartVertical() + col.getStartVertical());\n //r.commitQuery(writer, imageFile.getName());\n if (j % 2 == 1) {\n int color = 0x0000ff;\n stored = highlightBlock(stored, r.getStartHorizontal(), r.getStartVertical() - r.getDistance(), r.getDistance(), r.getWidth(), color);\n } else {\n int color = 0xff0000;\n stored = highlightBlock(stored, r.getStartHorizontal(), r.getStartVertical() - r.getDistance(), r.getDistance(), r.getWidth(), color);\n }\n }\n }\n //ImageHelpers.writeImage(stored, \"\" + \"/usr/web/processed/\" + imageFile.getName());\n\n\n\n //writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n } catch (IOException ex) {\n System.out.print(ex.getMessage() + \"\\n\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return;\n }", "public native MagickImage trimImage() throws MagickException;", "public Vector<line> detectLines(Boolean doBlobExtract) {\n\n BufferedImage bin = cloneImage(untouchedImage);\n bin = ImageHelpers.scale(bin, maxHeight);\n orig = cloneImage(untouchedImage);\n orig = ImageHelpers.scale(orig, maxHeight);\n BufferedImage stored = cloneImage(ImageHelpers.scale(orig, 1000));\n BufferedImage copy = cloneImage(untouchedImage);\n copy = ImageHelpers.scale(copy, maxHeight);\n // PlanarImage threshedImage = JAI.create(\"fileload\", imageFile.getAbsolutePath());\n BufferedImage ok = cloneImage(untouchedImage);\n bin = ImageHelpers.scale(ImageHelpers.binaryThreshold(ok, 4), maxHeight);\n for (int i = 0; i < bin.getWidth(); i++) {\n for (int j = 0; j < bin.getHeight(); j++) {\n orig.setRGB(i, j, -1);\n }\n }\n\n if (doBlobExtract) {\n for (int i = 0; i < bin.getWidth(); i++) {\n for (int j = 0; j < bin.getHeight(); j++) {\n orig.setRGB(i, j, -1);\n }\n }\n Vector<blob> blobs = new Vector<blob>();\n for (int i = 0; i < bin.getWidth(); i++) {\n for (int j = 0; j < bin.getHeight(); j++) {\n if (bin.getRGB(i, j) != -1) {\n blob thisOne = new blob(i, j);\n thisOne.copy = orig;\n if (blobs.size() % 3 == 0) {\n thisOne.color = 0xcc0000;\n }\n if (blobs.size() % 3 == 1) {\n thisOne.color = 0x000099;\n }\n if (blobs.size() % 3 == 2) {\n thisOne.color = 0x006600;\n }\n thisOne.count(bin, thisOne.getX(), thisOne.getY());\n if (thisOne.size > 5) {\n blobs.add(thisOne);\n if ((thisOne.getSize() - (thisOne.getSize() % 10)) != 5000 && (thisOne.getSize() - (thisOne.getSize() % 10)) != 0) {\n\n thisOne.calculateRelativeCoordinates();\n thisOne.drawBlob(orig, thisOne.color);\n\n }\n }\n }\n }\n }\n\n for (int i = 0; i < blobs.size(); i++) {\n if ((blobs.get(i).size < 4000)) {\n blob.drawBlob(orig, blobs.get(i).x, blobs.get(i).y, blobs.get(i), 0x000000);\n }\n }\n\n }\n\n try {\n\n\n if (!doBlobExtract) {\n orig = bin;\n }\n\n\n Vector<line> lines = new Vector();\n createViewableVerticalProfile(orig, \"\", lines);\n FileWriter writer = null;\n\n orig = ImageHelpers.scale(orig, 1000);\n Detector d = new Detector(orig, orig);\n if (lines.size() > 3) {\n lines = new Vector();\n lines.add(new line());\n lines.get(0).setStartHorizontal(0);\n lines.get(0).setStartVertical(0);\n lines.get(0).setWidth(orig.getWidth());\n lines.get(0).setDistance(maxHeight);\n }\n //d.detect();\n Vector<line> allLines = new Vector();\n for (int i = 0; i < lines.size(); i++) {\n line col = lines.get(i);\n BufferedImage storedBin = ImageHelpers.binaryThreshold(stored, 4);\n BufferedImage colOnly = storedBin.getSubimage(col.getStartHorizontal(), col.getStartVertical(), col.getWidth(), col.getDistance());\n d = new Detector(colOnly, colOnly);\n //d.debugLabel = imageFile.getName();\n d.forceSingle = true;\n d.detect();\n System.out.print(\"total lines in col is \" + d.lines.size() + \"\\n\");\n for (int j = 0; j < d.lines.size(); j++) {\n line r = d.lines.get(j);\n allLines.add(r);\n r.setStartHorizontal(r.getStartHorizontal() + col.getStartHorizontal());\n r.setStartVertical(r.getStartVertical() + col.getStartVertical());\n// r.commitQuery(writer, imageFile.getName());\n if (j % 2 == 1) {\n int color = 0x0000ff;\n stored = highlightBlock(stored, r.getStartHorizontal(), r.getStartVertical() - r.getDistance(), r.getDistance(), r.getWidth(), color);\n } else {\n int color = 0xff0000;\n stored = highlightBlock(stored, r.getStartHorizontal(), r.getStartVertical() - r.getDistance(), r.getDistance(), r.getWidth(), color);\n }\n }\n }\n //ImageHelpers.writeImage(stored, \"\" + \"/usr/web/processed/\" + imageFile.getName());\n\n\n //ImageHelpers.writeImage(orig, \"/usr/web/broken/\" + imageFile.getName() + \"broken\" + \".jpg\");\n return allLines;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public static List<String> generate(String filePath, int row,int cel){\n File file = new File(filePath);\n //获取图片存放路径\n if (file.exists()) {\n List<String> list = cutImageToBase64(file,row,cel);\n return list;\n }\n return null;\n\n }", "void loadPhoto(String filename) throws IOException;", "public Image getFlat();", "private void openFile(File file)\n {\n String imagePath = file.toURI().toString();\n Image image = new Image(imagePath);\n if ( image == null || image.isError())\n {\n showInvalidFileFormatError();\n } else\n {\n bufferImage = image;\n changeAvatarCircle.setFill(new ImagePattern(image));\n imagePathLabel.setText(imagePath);\n }\n }", "String getFile();", "String getFile();", "String getFile();", "Object getComparefile();", "public Image getBassClef();", "public Bitmap LoadFromFile(String _fullFilename) {\n\t //if (bmp != null) { bmp.recycle(); }\n\t BitmapFactory.Options bo = new BitmapFactory.Options();\t\t\n\t\t\n\t if( bo == null ) return null;\n\t \n\t if( controls.GetDensityAssets() > 0 )\n\t bo.inDensity = controls.GetDensityAssets();\n\t \n\t return BitmapFactory.decodeFile(_fullFilename, bo);\n }", "public Bitmap loadImageFully(final String filename) throws IOException {\n\t\tBitmap myBitmap = BitmapFactory.decodeStream(this.getAssets().open(filename));\n\t\tif (myBitmap != null) return myBitmap;\n\t\tthrow new IOException(\"cannot load file: \" + filename);\n\t}", "private TaskItemFileInfo cut(String originalFile, String targetFile, float startTime, String assetFileNo) {\n\n List<String> arguments = new ArrayList<String>();\n arguments.add(ffmpeg.getShell());\n arguments.add(\"-ss\");\n arguments.add(Float.toString(startTime));\n arguments.add(\"-t\");\n arguments.add(Integer.toString(this.taskInfo.getTimeInterval()));\n arguments.add(\"-i\");\n arguments.add(originalFile);\n arguments.add(\"-y\");\n arguments.add(\"-r\");\n arguments.add(\"24\");\n arguments.add(this.taskInfo.getTaskNo() + \"\\\\\" + targetFile);\n CommandResult result = this.execCommand(arguments);\n TaskItemFileInfo taskItemFileInfo = new TaskItemFileInfo();\n taskItemFileInfo.setAssetFileNo(assetFileNo);\n taskItemFileInfo.setFileName(targetFile);\n taskItemFileInfo.setSuccess(result.isSuccess());\n\n return taskItemFileInfo;\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 }", "public Bitmap getLocalImage(String fileName){\n\t\t\tBitmap img = null;\n\t\t\ttry{\n\t\t\t\tFileInputStream fin = openFileInput(fileName);\n\t\t\t\tif(fin != null){\n\t\t\t\t\timg = BitmapFactory.decodeStream(fin);\n\t\t\t\t\tfin.close();\n\t\t\t\t}\n\t\t\t}catch (Exception je){\n\t\t\t\timg = null;\n\t\t\t\tLog.i(\"ZZ\", \"AppDelegate:getLocalImage: ERROR: \" + je.getMessage()); \n\t\t\t}\n \t\t//Log.i(\"ZZ\", \"AppDelegate:getLocalImage: \" + fileName); \n\t\t\treturn img;\n\t\t}", "private BugImage(File file, int image_r, int image_g, int image_b, double divider) throws IOException {\n super(file, image_r, image_g, image_b, divider);\n }", "private void extractCards() {\n String fileSeparator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"user.dir\");\n path = path + fileSeparator + \"Client\" + fileSeparator + \"src\" + fileSeparator + \"Images\" + fileSeparator;\n System.out.println(path);\n\n for (Picture p : cardlist) {\n BufferedImage image = null;\n try {\n image = javax.imageio.ImageIO.read(new ByteArrayInputStream(p.getStream()));\n File outputfile = new File(path + p.getName());\n ImageIO.write(image, \"png\", outputfile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public Decomposor(String imgfile)\n {\n File imageFile = new File(imgfile);\n try\n {\n this.image = ImageIO.read(imageFile);\n }\n catch(IOException e)\n {\n System.err.println(\"! Error: Failed to read \"+imgfile+\", error msg: \"+e);\n return;\n }\n this.img_filename=imgfile.substring(0, imgfile.lastIndexOf('.')); //remember the filename\n }", "private static Image fileToImage(File file) throws MalformedURLException {\r\n\r\n String localUrl = file.toURI().toURL().toString(); // Get URL of file\r\n Image image = new Image(localUrl); // Create new image\r\n return image;\r\n }", "public Image getOne();", "private Bitmap decodeFile(File f){\n try {\n //decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n FileInputStream stream1=new FileInputStream(f);\n BitmapFactory.decodeStream(stream1,null,o);\n stream1.close();\n \n //Find the correct scale value. It should be the power of 2.\n final int REQUIRED_SIZE=70;\n int width_tmp=o.outWidth, height_tmp=o.outHeight;\n int scale=1;\n while(true){\n if(width_tmp/2<REQUIRED_SIZE || height_tmp/2<REQUIRED_SIZE)\n break;\n width_tmp/=2;\n height_tmp/=2;\n scale*=2;\n }\n \n //decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize=scale;\n FileInputStream stream2=new FileInputStream(f);\n Bitmap bitmap=BitmapFactory.decodeStream(stream2, null, o2);\n stream2.close();\n return bitmap;\n } catch (FileNotFoundException e) {\n } \n catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public Image getMinimRest();", "public BufferedImage open(String id, int no)\n throws FormatException, IOException\n {\n if (!id.equals(currentId)) initFile(id);\n \n if (no < 0 || no >= getImageCount(id)) {\n throw new FormatException(\"Invalid image number: \" + no);\n }\n \n // First initialize:\n in.seek(offsets[no] + 12);\n byte[] toRead = new byte[4];\n in.read(toRead);\n int blockSize = batoi(toRead);\n toRead = new byte[1];\n in.read(toRead);\n // right now I'm gonna skip all the header info\n // check to see whether or not this is v2 data\n if (toRead[0] == 1) {\n in.skipBytes(128);\n }\n in.skipBytes(169);\n // read in the block of data\n toRead = new byte[blockSize];\n int read = 0;\n int left = blockSize;\n while (left > 0) {\n int i = in.read(toRead, read, left);\n read += i;\n left -= i;\n }\n byte[] pixelData = new byte[blockSize];\n int pixPos = 0;\n \n Dimension dim;\n try { dim = pictReader.getDimensions(toRead); }\n catch (Exception e) { dim = new Dimension(0, 0); }\n \n int length = toRead.length;\n int num, size, blockEnd;\n int totalBlocks = -1; // set to allow loop to start.\n int expectedBlock = 0;\n int pos = 0;\n int imagePos = 0;\n int imageSize = dim.width * dim.height;\n short[] flatSamples = new short[imageSize];\n byte[] temp;\n boolean skipflag;\n \n // read in deep grey pixel data into an array, and create a\n // BufferedImage out of it\n //\n // First, checks the existence of a deep gray block. If it doesn't exist,\n // assume it is PICT data, and attempt to read it.\n \n // check whether or not there is deep gray data\n while (expectedBlock != totalBlocks) {\n skipflag = false;\n while (pos + 7 < length &&\n (toRead[pos] != 73 || toRead[pos + 1] != 86 ||\n toRead[pos + 2] != 69 || toRead[pos + 3] != 65 ||\n toRead[pos + 4] != 100 || toRead[pos + 5] != 98 ||\n toRead[pos + 6] != 112 || toRead[pos + 7] != 113))\n {\n pos++;\n }\n if (pos + 32 > length) { // The header is 32 bytes long.\n if (expectedBlock == 0 && imageType[no] < 9) {\n // there has been no deep gray data, and it is supposed\n // to be a pict... *crosses fingers*\n try { return pictReader.openBytes(toRead); }\n catch (Exception e) {\n e.printStackTrace();\n throw new FormatException(\"No iPic comment block found\", e);\n }\n }\n else {\n throw new FormatException(\"Expected iPic comment block not found\");\n }\n }\n \n pos += 8; // skip the block type we just found\n \n // Read info from the iPic comment. This serves as a\n // starting point to read the rest.\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n num = batoi(temp);\n if (num != expectedBlock) {\n throw new FormatException(\"Expected iPic block not found\");\n }\n expectedBlock++;\n temp = new byte[] {\n toRead[pos+4], toRead[pos+5], toRead[pos+6], toRead[pos+7]\n };\n if (totalBlocks == -1) {\n totalBlocks = batoi(temp);\n }\n else {\n if (batoi(temp) != totalBlocks) {\n throw new FormatException(\"Unexpected totalBlocks numbein.read\");\n }\n }\n \n // skip to size\n pos += 16;\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n size = batoi(temp);\n pos += 8;\n blockEnd = pos + size;\n \n // copy into our data array.\n System.arraycopy(toRead, pos, pixelData, pixPos, size);\n pixPos += size;\n }\n int pixelValue = 0;\n pos = 0;\n \n // Now read the data and wrap it in a BufferedImage\n \n while (true) {\n if (pos + 1 < pixelData.length) {\n pixelValue = pixelData[pos] < 0 ? 256 + pixelData[pos] :\n (int) pixelData[pos] << 8;\n pixelValue += pixelData[pos + 1] < 0 ? 256 + pixelData[pos + 1] :\n (int) pixelData[pos + 1];\n }\n else throw new FormatException(\"Malformed LIFF data\");\n flatSamples[imagePos] = (short) pixelValue;\n imagePos++;\n if (imagePos == imageSize) { // done, return it\n return ImageTools.makeImage(flatSamples,\n dim.width, dim.height, 1, false);\n }\n }\n }", "public static BufferedImage autoCrop(BufferedImage source, float threshold) {\n\n int rgb;\n int backlo;\n int backhi;\n int width = source.getWidth();\n int height = source.getHeight();\n int startx = width;\n int starty = height;\n int destx = 0;\n int desty = 0;\n\n rgb = source.getRGB(source.getWidth() - 1, source.getHeight() - 1);\n backlo = ((rgb >> 16) & 255) + ((rgb >> 8) & 255) + ((rgb) & 255) / 3;\n backlo = (int) (backlo - (backlo * threshold));\n if (backlo < 0) {\n backlo = 0;\n }\n backhi = ((rgb >> 16) & 255) + ((rgb >> 8) & 255) + ((rgb) & 255) / 3;\n backhi = (int) (backhi + (backhi * threshold));\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n rgb = source.getRGB(x, y);\n int sum = ((rgb >> 16) & 255) + ((rgb >> 8) & 255) + ((rgb) & 255) / 3;\n if (sum < backlo || sum > backhi) {\n if (y < starty) {\n starty = y;\n }\n if (x < startx) {\n startx = x;\n }\n if (y > desty) {\n desty = y;\n }\n if (x > destx) {\n destx = x;\n }\n }\n }\n }\n System.out.println(\"crop: [\"\n + startx + \", \" + starty + \", \"\n + destx + \", \" + desty + \"]\");\n\n BufferedImage result = new BufferedImage(\n destx - startx, desty - starty,\n source.getType());\n result.getGraphics().drawImage(\n Toolkit.getDefaultToolkit().createImage(\n new FilteredImageSource(source.getSource(),\n new CropImageFilter(startx, starty, destx, desty))),\n 0, 0, null);\n return result;\n }", "@Override\n\t\tprotected String doInBackground(String... arg0) {\n\t\t\tBitmap ret = takeScreenShot(0, 0 + mStatusBarHeight,\n\t\t\t\t\tmDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels\n\t\t\t\t\t\t\t- mStatusBarHeight);\n\n\t\t\t// CopyOfScreenShotActivity cc = new CopyOfScreenShotActivity(1);\n\t\t\t// Bitmap ret = cc.getScreenShot(cc.getDevice());\n\t\t\tif (ret != null) {\n\t\t\t\tif (cropRect != null) {// rectangle\n\t\t\t\t\tret = cropImage(ret, cropRect);\n\t\t\t\t\tif (mIsOval)\n\t\t\t\t\t\tret = Utils.getOval(ret);\n\t\t\t\t}\n\t\t\t\tcutSuccess = makeFile(ret);\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public BufferedImage trim(BufferedImage img) {\n\t\t// point zero is upper left corner\n\t\tint xMin = getXmin(img); // the left border of the symbol\n\t\tint xMax = getXmax(img); // the right border of the symbol\n\t\tint yMin = getYmin(img); // the upper border of the symbol\n\t\tint yMax = getYmax(img); // the lower border of the symbol\n\n\t\tBufferedImage newImg = new BufferedImage(xMax - xMin + 10, yMax - yMin + 10, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics g = newImg.createGraphics();\n\t\tg.drawImage(img, -xMin + 5, -yMin + 5, null);\n\t\timg = newImg;\n\t\treturn img;\n\t}", "public abstract String getFotoPath();", "public static String getStunnedResource() {\r\n String imageResource = \"/bloodbowl/resources/stunned.gif\";\r\n\r\n return imageResource;\r\n }", "public File captureWebElement(WebElement element, WebDriver driver) {\n Point start = element.getLocation();\n Dimension size = element.getSize();\n if (!\"FF\".equals(Configuration.getBrowser())) {\n Object[] rect = getBoundingClientRect(element, driver);\n start = (Point) rect[0];\n size = (Dimension) rect[1];\n }\n\n File image = imageEditor.cropImage(start, size, capturePage(driver));\n PageObjectLogging.logImage(\"Shooter\", image, true);\n return image;\n }", "public static void clickrun2() {\n JFileChooser file = new JFileChooser();\n file.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"*.images\", \"jpg\", \"png\");\n file.addChoosableFileFilter(filter);\n int result = file.showSaveDialog(null);\n if (result == JFileChooser.APPROVE_OPTION) {\n File selectedFile = file.getSelectedFile();\n String path = selectedFile.getAbsolutePath();\n lblAnhsanphamsua.setIcon(ResizeImage2(path, null));\n ImagePast2 = path;\n System.out.println(ImagePast2);\n } else {\n\n }\n }", "public static Image getImage(String filename) \r\n \t{\r\n \r\n \t\tInputStream is = cl.getResourceAsStream(AA_RESOURCE_FILE_PATH + filename);\r\n \t\t\r\n \t\tif(is == null){\r\n \t\t\tSystem.out.println(\"Input stream is null\");\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\treturn (ImageIO.read(is));\r\n \t\t} catch (Exception e) {\r\n \t\t\tlog.error(\"An exception occurred while reading the file: \"+filename);\r\n \t\t\tlog.error(e.getMessage());\r\n \t\t\te.printStackTrace();\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "public static Card dohvatiPozadinu(){\r\n\t\tFile dir = new File(\"images\");\r\n\t\tFile[] lista = dir.listFiles();\r\n\t\tCard kartaPozadine = null;\r\n\t\tfor (File file : lista){\r\n\t\t\tif (file.isFile()){\r\n\t\t\t\tif (file.toString().contains(\"pozadina_0.gif\")){\r\n\t\t\t\t\tString[] niz = file.getName().toString().split(\"\\\\.\");\r\n\t\t\t\t\tkartaPozadine =new Card(new ImageIcon(file.toString()),0);\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\treturn kartaPozadine;\r\n\t}", "public File getImageFile() throws IOException {\n String timeStamp=new SimpleDateFormat(\"yyyymmdd_HHmmss\").format(new Date());\n String imageName=timeStamp;\n File storageDir=getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File imageFile=File.createTempFile(imageName,\".jpg\",storageDir);\n currentImagePath=imageFile.getAbsolutePath();\n imguri.setText(currentImagePath);\n return imageFile;\n }", "List<Bitmap> getRecipeImgSmall();", "@Override\n\tpublic String getImagePathBig() {\n\t\treturn null;\n\t}", "void cut(int cardPosition);", "public ModelImage readImage(boolean one) throws IOException {\r\n // The data types are Sun, hence the byte order is big-endian.\r\n int i;\r\n int num; //image number within file\r\n\r\n boolean endianess = LITTLE_ENDIAN;\r\n\r\n try {\r\n file = new File(fileDir + fileName);\r\n raFile = new RandomAccessFile(file, \"r\");\r\n progressBar = new ViewJProgressBar(ViewUserInterface.getReference().getProgressBarPrefix() + fileName,\r\n ViewUserInterface.getReference().getProgressBarPrefix() + \"BioRad image(s) ...\", 0, 100,\r\n false, null, null);\r\n xDim = getSignedShort(endianess); // 0\r\n yDim = getSignedShort(endianess); // 2\r\n zDim = getSignedShort(endianess); // 4\r\n ramp1Min = (short)getSignedShort(endianess); // 6\r\n ramp1Max = (short)getSignedShort(endianess); // 8\r\n notes = getInt(endianess); // 10\r\n byteFormat = (short)getSignedShort(endianess); // 14\r\n num = (short)getSignedShort(endianess); // 16\r\n\r\n setProgressBarVisible(!one);\r\n\r\n for (i = 0; i < 32; i++) {\r\n name[i] = 0;\r\n }\r\n readAgain = true;\r\n i = 0;\r\n while(readAgain) {\r\n name[i++] = raFile.readByte(); // 18\r\n if (name[i-1] == 0) {\r\n readAgain = false;\r\n }\r\n }\r\n fName = new String(name,0,i-1);\r\n raFile.seek(50);\r\n merged = (short)getSignedShort(endianess); // 50\r\n color1 = getUnsignedShort(endianess); // 52\r\n fileID = getUnsignedShort(endianess); // 54\r\n if (fileID != 12345) {\r\n throw new IOException(\"fileID is an illegal \" + fileID);\r\n }\r\n ramp2Min = (short)getSignedShort(endianess); // 56\r\n ramp2Max = (short)getSignedShort(endianess); // 58\r\n color2 = getUnsignedShort(endianess); // 60\r\n edited = (short)getSignedShort(endianess); // 62\r\n lens = (short)getSignedShort(endianess); // 64\r\n magFactor = getFloat(endianess); // 66\r\n // Position to the start of the image data\r\n raFile.seek(76);\r\n\r\n fileInfo = new FileInfoBioRad(fileName, fileDir, FileBase.BIORAD); // dummy fileInfo\r\n fileInfo.setEndianess(endianess);\r\n if (zDim > 1) {\r\n imgExtents = new int [3];\r\n imgExtents[0] = xDim;\r\n imgExtents[1] = yDim;\r\n imgExtents[2] = zDim;\r\n }\r\n else {\r\n imgExtents = new int [2];\r\n imgExtents[0] = xDim;\r\n imgExtents[1] = yDim;\r\n }\r\n\r\n fileInfo.setExtents(imgExtents);\r\n if (byteFormat == 1) {\r\n dataType = ModelStorageBase.UBYTE;\r\n bufferSize = xDim*yDim;\r\n }\r\n else { // byteFormat == 0\r\n dataType = ModelStorageBase.SHORT;\r\n bufferSize = xDim*yDim;\r\n }\r\n /*else { // merged pseudocolor\r\n dataType = ModelStorageBase.ARGB;\r\n bufferSize = 4*xDim*yDim;\r\n }*/\r\n fileInfo.setDataType(dataType);\r\n\r\n if (one) {\r\n image = new ModelImage(dataType, new int[] {imgExtents[0], imgExtents[1]}, fileInfo.getFileName(), UI);\r\n zDim = 1;\r\n }\r\n else {\r\n image = new ModelImage(dataType, imgExtents, fileInfo.getFileName(), UI);\r\n }\r\n\r\n imgBuffer = new float[bufferSize];\r\n for (i = 0; i < zDim; i++){\r\n try {\r\n if (one && imgExtents.length > 2) {\r\n if (dataType == ModelStorageBase.UBYTE) {\r\n raFile.seek(imgExtents[2]/2*xDim*yDim);\r\n }\r\n else {\r\n raFile.seek(imgExtents[2]*xDim*yDim);\r\n }\r\n readBuffer(imgExtents[2]/2, imgBuffer);\r\n }\r\n else {\r\n readBuffer(i, imgBuffer); // Slice a time;\r\n }\r\n image.setFileInfo(fileInfo, i);\r\n }\r\n catch (IOException error){\r\n throw new IOException(\"FileTiff: read: \" + error);\r\n }\r\n image.importData(i*bufferSize, imgBuffer, false);\r\n } // for (i = 0; i < imageSlice; i++)\r\n\r\n raFile.close();\r\n progressBar.dispose();\r\n }\r\n catch (OutOfMemoryError error) {\r\n if (image != null) {\r\n image.disposeLocal();\r\n image = null;\r\n }\r\n byteBuffer = null;\r\n System.gc();\r\n throw error;\r\n }\r\n\r\n return image;\r\n }", "public BufferedImage crop(int row,int col){\n\t\treturn imageSheet.getSubimage((col*64)-64, (row*64)-64, 64, 64);\n\t}", "Image getScaledWebImage(Path imageFilePath, double percent);", "public native MagickImage chopImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;", "public static void downloadimage(String file) throws IOException {\r\n\t\t\r\n\t\t//work with the given url to split it into the host and path\r\n\t\tint from = file.indexOf(\"//\") + 2;\r\n\t\tint to = file.indexOf(\"/\", from);\r\n\t\tString temphost = file.substring(from, to);\r\n\t\tString path = file.substring(to);\r\n\r\n\t\t//make new socket and streams\r\n\t\tlistenSocket(temphost,port);\r\n\r\n\t\tint buffersize = 2048;\r\n\t\tbyte[] b = new byte[buffersize];\r\n\t\tint length=0;\r\n\t\tString[] tokens = file.split(\"\\\\/(?=[^\\\\/]+$)\");\r\n\t\t\r\n\t\t//get request\r\n\t\tout.println(\"GET \" + file + \" HTTP/1.1\\r\\nHost: \" + temphost + \"\\r\\n\");\r\n\t\t\r\n\t\t//sleep for one second\r\n\t\ttry{\r\n\t\t\tTimeUnit.SECONDS.sleep(1);\r\n\t\t}\r\n\t\tcatch (Exception e){\r\n\t\t\tSystem.out.println(\"failed to wait\");\r\n\t\t}\r\n\t\tOutputStream os = new FileOutputStream(tokens[1]);\r\n\t\tSystem.out.println(\"Image: \" + tokens[1] + \"\\n\");\r\n\t\t\r\n\t\tboolean tempboolean = true;\t\r\n\t\t\r\n\t\t//read the first interval of bytes\r\n\t\tlength = dis.read(b, 0, buffersize);\r\n\t\tint i=0;\r\n\r\n\t\t//search for the string \"\\r\\n\\r\\n\" and move the index to the postion after the string\r\n\t\twhile (true)\r\n\t\t{\t\r\n\t\t\tif (b[i]==13)\r\n\t\t\t{\r\n\t\t\t\tif (b[i+1] ==10)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (b[i+2] ==13)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (b[i+3] ==10)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbreak;\r\n\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\ti++;\r\n\t\t}\r\n\t\ti = i+4;\r\n\r\n\t\t//write the rest of the buffer after the found index to the file.\r\n\t\tos.write(b, i, buffersize-i);\r\n\t\tos.flush();\r\n\t\t\r\n\t\t//write the rest of the file to the buffer until done.\r\n\t\twhile (tempboolean) {\r\n\t\t\tlength = dis.read(b);\r\n\r\n\t\t\tos.write(b, 0, length);\r\n\t\t\tos.flush();\r\n\t\t\ttempboolean = (length >= buffersize);\r\n\t\t}\r\n\t\tos.close();\r\n\t}", "private Bitmap translateImgToBitmap(String filepath){\n File imgFile = new File(filepath);\n\n if (imgFile.exists()) {\n Bitmap bitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n\n float imgScale = (float) bitmap.getHeight() / 1620;\n bitmap = Bitmap.createScaledBitmap(bitmap,\n Math.round(bitmap.getWidth() / imgScale),\n Math.round(bitmap.getHeight() / imgScale), true);\n\n return bitmap;\n\n } else {\n Toast.makeText(getApplicationContext(), \"Die Datei wurde nicht gefunden.\", Toast.LENGTH_SHORT).show();\n return null;\n }\n }", "public ImageManip(String file) {\n\t\tthis.image = new Picture(file, false);\n\t\tthis.canvas = new Picture(this.image.getWidth(), this.image.getHeight(), false);\n\t\tthis.random = new Random();\n\t\tthis.rotateOffset = 0;\n\t}", "static BufferedImage loadImage(String filename){\r\n\t\t\r\n\t\tBufferedImage image = null;\r\n\t\ttry{\r\n\t\t\timage = ImageIO.read(View.class.getResource(filename));\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace(System.err);\r\n\t\t}\r\n\t\t\r\n\t\treturn image;\r\n\t}", "private static Image getTarget()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(tileDirectory + target));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}", "private BufferedImage getImage(String filename) {\n\t\ttry {\n\t\t\t// Grab the InputStream for the image.\n\t\t\tInputStream in = getClass().getResourceAsStream(filename);\n\t\t\t\n\t\t\t// Then read it in.\n\t\t\treturn ImageIO.read(in);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"The image was not loaded.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn null;\n\t}", "protected BufferedImage loadImage(String nameOfFile)\n {\n BufferedImage img;\n try{\n img= ImageIO.read(new File(\"\"+nameOfFile));\n return img;\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n return null;\n }", "FileObject getFile();", "FileObject getFile();", "private Bitmap decodeFile(File f)\n {\n try \n {\n //decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n BitmapFactory.decodeStream(new FileInputStream(f),null,o);\n \n //Find the correct scale value. It should be the power of 2.\n int width_tmp=o.outWidth, height_tmp=o.outHeight;\n int scale=1;\n while(true)\n {\n if(width_tmp/2<REQUIRED_WIDTH || height_tmp/2<REQUIRED_HEIGHT)\n break;\n width_tmp/=2;\n height_tmp/=2;\n scale++;\n }\n \n //decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize=scale;\n o2.inPreferredConfig = Bitmap.Config.RGB_565;\n o2.inDither = true;\n \n o2.inPurgeable=true; //Tell to gc that whether it needs free memory, the Bitmap can be cleared\n o2.inInputShareable=true; //Which kind of reference will be used to recover the Bitmap data after being clear, when it will be used in the future\n\n Bitmap bitmap = null;\n\t\t try\n\t\t {\n\t\t\t bitmap = BitmapFactory.decodeFileDescriptor(new FileInputStream(f).getFD(), null, o2);\n\t\t }\n\t\t catch (IOException e)\n\t\t {\n\t\t\t stopThread();\n\t\t\t photoLoaderThread.start();\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t catch (OutOfMemoryError e)\n\t\t {\n\t\t\t stopThread();\n\t\t\t photoLoaderThread.start();\n\t\t\t e.printStackTrace();\n\t\t }\n \n return bitmap;\n } \n catch (FileNotFoundException e) \n {\n \tstopThread();\n \tphotoLoaderThread.start();\n }\n catch(OutOfMemoryError e)\n {\n \tstopThread();\n \tphotoLoaderThread.start();\n }\n return null;\n }", "private static String cutHead(String image) throws CommonsException {\n return image.replace(formHead(HAIR, cutWhom(image), NECK), \"\");\n }", "public static Bitmap getBitmap(String imagePath, int w, int h) {\n\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(imagePath, bmOptions);\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.max(photoW/w, photoH/h);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n return BitmapFactory.decodeFile(imagePath, bmOptions);\n }", "public BufferedImage getRandomImage() {\n\n Random randomRow = new Random();\n int rowIndex = (randomRow.nextInt(16)) * 8;\n\n Random randomColumn = new Random();\n int columnIndex = (randomColumn.nextInt(16)) * 12;\n\n System.out.println(\"rowIndex = \" + rowIndex + \", columnIndex = \" + columnIndex);\n\n return input.getSubimage(rowIndex, columnIndex, subImageWidth, subImageHeight);\n }", "public static Bitmap getBitmap(String path) {\n Bitmap bitmap = null;\n try {\n Log.i(\"FileManager\", \"GetBitmap: \" + path);\n FileInputStream imgIS = new FileInputStream(new File(path));\n BufferedInputStream bufIS = new BufferedInputStream(imgIS);\n bitmap = BitmapFactory.decodeStream(bufIS);\n Log.i(\"FileManager\", \"GetBitmap Finished: \" + bitmap);\n } catch (FileNotFoundException e) { //catch fileinputstream exceptions\n e.printStackTrace();\n } //trying to get wallpaper from display cycle node\n return bitmap;\n }", "public BufferedImage getImage()\n\t{\n\t\tif (image == null)\n\t\t\tif (imagePath == null)\n\t\t\t\treturn null;\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedImage oimg = ImageIO.read(new File(imagePath));\n\t\t\t\t\timage = new BufferedImage(oimg.getWidth(), oimg.getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\t\t\t\timage.getGraphics().drawImage(oimg,0,0,null);\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\treturn image;\n\t}", "private Bitmap decodeSampledBitmapFromFile(String absolutePath, int i, int i1) {\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(absolutePath, options);\n\n // Calculate inSampleSize, Raw height and width of image\n final int height = options.outHeight;\n final int width = options.outWidth;\n Log.i(\"sqrl2\",\"\"+height+\" \"+width);\n options.inPreferredConfig = Bitmap.Config.RGB_565;\n int inSampleSize = 1;\n\n if (height > 800)\n {\n inSampleSize = Math.round((float)height / (float)800);\n }\n int expectedWidth = width / inSampleSize;\n\n if (expectedWidth > 800)\n {\n //if(Math.round((float)width / (float)reqWidth) > inSampleSize) // If bigger SampSize..\n inSampleSize = Math.round((float)width / (float)800);\n }\n\n options.inSampleSize = inSampleSize;\n\n // Decode bitmap with inSampleSize set\n options.inJustDecodeBounds = false;\n\n return BitmapFactory.decodeFile(absolutePath, options);\n }", "public BufferedImage crop(int row,int col,int width,int height){\n\t\treturn imageSheet.getSubimage((col*32)-32, (row*32)-32, width, height);\n\t}", "@Override\r\n \tpublic File getScratchArea(String subArea) {\n \t\treturn null;\r\n \t}", "public void makeImage(String path, int width, int height, int pt, int pb, int pl, int pr) {\n //BufferedImage \n img2 = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2 = img2.createGraphics();\n //int newWidth = bufImg(path).getWidth() - (pl - pr);\n //int newHeight = bufImg(path).getHeight() - (pt - pb);\n // bufImg(path).getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);\n //(img,0,0,width,height,sx1,sy1,sx2,sy2,null);\n //g2.drawImage(bufImg(path), pl, pt, pr, pb, 0, 0, newWidth,newHeight, null);\n saveImage(img2, path);\n }", "public static byte[] readImage(String ruta) throws IOException {\n\t\tFile f = new File(ruta);\n\t\tInputStream is = new FileInputStream(f);\n\t\tbyte[] buffer = null;\n\t\ttry {\t\t\n\t\t\tbuffer = new byte[(int) f.length()];\n\t\t\tis.read(buffer);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tis.close();\n\t\t}\n\t\treturn buffer;\n\t}", "public native MagickImage flopImage() throws MagickException;", "public static BufferedImage cropImage(BufferedImage img, Rectangle bounds)\n\t{\n\t\tBufferedImage dest = img.getSubimage(bounds.x, bounds.y, bounds.width, bounds.height);\n\t\treturn dest; \n\t}", "@SuppressWarnings(\"java:S1452\")\n @DontWrapResponse\n @ApiOperation(\"Get all cover image\")\n @GetMapping(\"/images/articles/cover/{fileName}\")\n ResponseEntity<?> getArticleCoverImage(@PathVariable String fileName);", "int img(String path) {\n //TODO: is this correct?\n return this.renderEngine.b(path);\n }", "private static Bitmap readImageWithSampling(String imagePath, int targetWidth, int targetHeight,\n Bitmap.Config bmConfig) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(imagePath, bmOptions);\n\n int photoWidth = bmOptions.outWidth;\n int photoHeight = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoWidth / targetWidth, photoHeight / targetHeight);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inPreferredConfig = bmConfig;\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bmOptions.inDither = false;\n\n Bitmap orgImage = BitmapFactory.decodeFile(imagePath, bmOptions);\n\n return orgImage;\n\n }", "IMG createIMG();", "private BufferedImage getClipImage(final Rectangle effectBounds) {\n if (_clipImage == null\n || _clipImage.getWidth() < effectBounds.width\n || _clipImage.getHeight() < effectBounds.height) {\n /* */\n int w = effectBounds.width;\n int h = effectBounds.height;\n if (_clipImage != null) {\n w = Math.max(_clipImage.getWidth(), w);\n h = Math.max(_clipImage.getHeight(), h);\n }\n _clipImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n }\n return _clipImage;\n }", "@GetMapping(value = \"/image/id/{id}\", produces={ \"image/jpeg\" })\n public @ResponseBody byte[] getImageById(@PathVariable(name=\"id\") Long id) throws IOException {\n InputStream in = getClass()\n .getResourceAsStream(\"/com/users/info/images/babu.jpg\");\n return IOUtils.toByteArray(in);\n }" ]
[ "0.6379781", "0.5596498", "0.5562935", "0.55412805", "0.5483578", "0.5433312", "0.5329985", "0.5276958", "0.52605134", "0.525721", "0.5245465", "0.52314603", "0.52284825", "0.52167326", "0.5200902", "0.5178925", "0.51678723", "0.51678723", "0.5118505", "0.5106294", "0.5105183", "0.5093487", "0.5086979", "0.50799686", "0.5065181", "0.5045909", "0.50318795", "0.50222206", "0.50218356", "0.5019682", "0.5018688", "0.501526", "0.49941376", "0.49574703", "0.49541685", "0.49316624", "0.49238855", "0.49086124", "0.49086124", "0.49086124", "0.49059477", "0.48956364", "0.48928696", "0.48875102", "0.48838037", "0.48831436", "0.48761645", "0.4852175", "0.48514432", "0.48503324", "0.48487547", "0.48463193", "0.48440215", "0.48407057", "0.4838899", "0.48378775", "0.48363838", "0.48263606", "0.48127216", "0.4809", "0.48019654", "0.47906992", "0.47885546", "0.47882968", "0.47731042", "0.47717348", "0.47610867", "0.4750643", "0.4746153", "0.4745202", "0.47375023", "0.47373387", "0.4737106", "0.47361767", "0.4734319", "0.4731306", "0.47299048", "0.4725171", "0.47248578", "0.472421", "0.472421", "0.47188285", "0.47187632", "0.47187293", "0.4710204", "0.47038296", "0.47027424", "0.46980086", "0.46929166", "0.4691284", "0.46892592", "0.4687817", "0.46831396", "0.46804243", "0.46759433", "0.46752927", "0.4675154", "0.467269", "0.46715802", "0.4669105" ]
0.46712983
99
Get cut image from URL
public TailoredImage getImageUrl(String url) throws IOException { return doProcess(ImageIO.read(new URL(url))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Image getImage(String url) {\r\n\t\ttry {\r\n\t\t\treturn ImageIO.read(new URL(url));\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private Bitmap getBitmap(String url){\n Bitmap result = null;\n try {\n InputStream in = new java.net.URL(url).openStream();\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n // Calculate inSampleSize\n options.inSampleSize = 4;\n options.inJustDecodeBounds = false;\n result = BitmapFactory.decodeStream(in, null, options);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "private Image getImage(String url) {\n\t\ttry {\n\t\t\treturn ImageIO.read(new URL(url));\n\t\t} catch(IOException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "java.lang.String getImage();", "public Bitmap getBitmapFromURL(String src){\n try{\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n return bitmap;\n }catch(IOException e){\n e.printStackTrace();\n return null;\n }\n }", "public String getBandImage(int x) {\n String link = \"https://www.last.fm\" + photosLinks[x];\n try {\n image = Jsoup.connect(link).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Elements elements = image.getElementsByClass(\"js-gallery-image\");\n return elements.attr(\"src\");\n }", "protected Bitmap getImage(URL url) {\n\n HttpURLConnection iconConn = null;\n try {\n iconConn = (HttpURLConnection) url.openConnection();\n iconConn.connect();\n int response = iconConn.getResponseCode();\n //if the reponse 200 the successfull\n if (response == 200) {\n return BitmapFactory.decodeStream(iconConn.getInputStream());\n } else {\n return null;\n }\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (iconConn != null) {\n iconConn.disconnect();\n }\n }\n }", "private Bitmap getCechaFromUrl(String url) {\n\t\treturn mLruCache.get(url);\r\n\t}", "private Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "private static Image findImageAt(String url, Settings settings) throws IOException {\n\n String html = new String(URLFetcher.fetchURLData(url, settings.getProxyHost(), settings.getProxyPort()), \"UTF-8\");\n\n List<String> images = new ArrayList<>();\n\n Matcher m = IMAGE_HTML_PATTERN.matcher(html);\n while (m.find()) {\n images.add(m.group(1));\n }\n\n html = new String(URLFetcher.fetchURLData(ROOTURL + images.get((int)(Math.random() * images.size())), settings.getProxyHost(), settings.getProxyPort()), \"UTF-8\");\n\n m = IMAGE_PATTERN.matcher(html);\n if (m.find()) {\n String imageUrl = URLDecoder.decode(m.group(1), \"UTF-8\");\n\n return new ImageIcon(URLFetcher.fetchURLData(imageUrl, settings.getProxyHost(), settings.getProxyPort())).getImage();\n }\n\n throw new IOException(\"Failed to find image\");\n }", "public Bitmap getBitmapFromURL(String src) {\n try {\n\n java.net.URL url = new java.net.URL(src);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "String getImage();", "private static Bitmap readImageUrl(String urlString) {\n\n // Create an empty bitmap image\n Bitmap image = null;\n\n try {\n // Create and open an inputStream on the urlString\n InputStream in = new java.net.URL(urlString).openStream();\n\n // Decode the inputStream and set that to the bitmap image\n image = BitmapFactory.decodeStream(in);\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error reading image url: \" + e);\n }\n\n // Return the image\n return image;\n }", "private static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.\n decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "public String getLargeCoverUrl() {\n return \"http://covers.openlibrary.org/b/olid/\" + openLibraryId + \"-L.jpg?default=false\";\n }", "public String getThumbnail();", "public String getThumbnailUrl();", "private String stripURL( String inputLine )\n\t{\n\t\tint fromIndex = inputLine.indexOf( \"<img \" ) + \"<img \".length();\n\t\tint beginIndex = inputLine.indexOf( \"src=\\\"\", fromIndex ) + \"src=\\\"\".length();\n\t\tint endIndex = inputLine.indexOf( \"\\\"\", beginIndex );\n\t\treturn inputLine.substring( beginIndex, endIndex );\n\t}", "@Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();", "Image getScaledWebImage(Path imageFilePath, double percent);", "private Bitmap loadImageFromUrl(final String url) {\n try {\n // Addresses bug in SDK :\n // http://groups.google.com/group/android-developers/browse_thread/thread/4ed17d7e48899b26/\n BufferedInputStream bis = new BufferedInputStream(new URL(url).openStream(), BUFFER_IO_SIZE);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n BufferedOutputStream bos = new BufferedOutputStream(baos, BUFFER_IO_SIZE);\n copy(bis, bos);\n bos.flush();\n return BitmapFactory.decodeByteArray(baos.toByteArray(), 0, baos.size());\n } \n catch (IOException e) {\n // handle it properly\n \treturn null;\n }\n }", "public Bitmap getBitmapFromURL(String strURL) {\n try {\n URL url = new URL(strURL);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "private Bitmap downloadImage(String url)\n \t {\n \n \t Bitmap bitmap = null;\n \t InputStream stream = null;\n \t BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n \t bmOptions.inSampleSize = 1;\n \n \t try\n \t {\n \t stream = getHttpConnection(url);\n \t bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n \t stream.close();\n \n \t return bitmap;\n \t }\n \t catch (IOException e1)\n \t {\n \t e1.printStackTrace();\n \t }\n \t return bitmap;\n \t }", "private Bitmap loadImageFromNetwork(String url) {\n try {\n InputStream is = new DefaultHttpClient().execute(new HttpGet(url))\n .getEntity().getContent();\n return BitmapFactory.decodeStream(is);\n } catch (Exception e) {\n return null;\n }\n }", "Bitmap ObtenerImagen(URL imageUrl){\n HttpURLConnection conn = null;\n Bitmap imagen=null;\n try {\n conn = (HttpURLConnection) imageUrl.openConnection();\n conn.connect();\n imagen = BitmapFactory.decodeStream(conn.getInputStream());\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n return imagen;\n }", "public static Bitmap getImage(String url){\n\t\tBitmap image = BitmapFactory.decodeStream(\n\t\t\t\topenStream(url));\n\t\tLog.i(\"IMAGE\",\"Cache hit on \"+hashURL(url));\n\t\treturn image;\n\t}", "public Bitmap getBitmapFromURL(String src) {\n try {\n Log.i(TAG,\"GetbitmapfromURL src \" + src);\n URL url = new URL(src);\n URLConnection connection = (URLConnection) url.openConnection();\n connection.connect();\n Log.i(TAG,\"bitmap returned\");\n return BitmapFactory.decodeStream(new BufferedInputStream(connection.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(TAG,\"exception thrown getting bitmap url\");\n return null;\n }\n }", "public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }", "public String getImageUrl();", "private Bitmap LoadImage(String URL, BitmapFactory.Options options) {\r\n Bitmap bitmap = null;\r\n InputStream in = null;\r\n try {\r\n in = OpenHttpConnection(URL);\r\n bitmap = BitmapFactory.decodeStream(in, null, options);\r\n in.close();\r\n } catch (IOException e1) {\r\n }\r\n return bitmap;\r\n }", "public String reSizeImage(String url){\n if (url.equals(\"\"))\n return url;\n String[] separated = url.split(\"=\");\n return separated[0] + \"=s500\";\n }", "private Bitmap loadImageFromNetwork(String url) {\n Bitmap bm = null;\n try {\n URL urln = new URL(url);\n Log.i(\"load\", url);\n Log.i(\"load\", \"loading Image...\");\n bm = BitmapFactory.decodeStream(urln.openConnection().getInputStream());\n Log.i(\"load\", \"done\");\n } catch (IOException e) {\n Log.e(\"HUE\",\"Error downloading the image from server : \" + e.getMessage().toString());\n } \n return bm;\n }", "private Bitmap getBitmap(String id, String url) \n {\n\n \tFile f=new File(id);\n \n Bitmap b = decodeFile(f);\n if(b!=null)\n return b;\n \n// //from web\n// try \n// {\n// Bitmap bitmap = null;\n// \n// InputStream is = null;\n// \n// is = new URL(url).openStream();\n// \n// if(is != null)\n// {\n// \tOutputStream os = new FileOutputStream(f);\n// BitmapUtils.CopyStream(is, os);\n// os.close();\n// \n// bitmap = decodeFile(f);\n// }\n// return bitmap;\n// } \n// catch (Exception ex)\n// {\n// \tstopThread();\n// \tphotoLoaderThread.start();\n// ex.printStackTrace();\n// return null;\n// }\n// catch(Throwable e)\n// {\n// \tstopThread();\n// \tphotoLoaderThread.start();\n \t return null;\n// }\n }", "public Image getImage(URL paramURL, String paramString) {\n/* */ try {\n/* 298 */ return getImage(new URL(paramURL, paramString));\n/* 299 */ } catch (MalformedURLException malformedURLException) {\n/* 300 */ return null;\n/* */ } \n/* */ }", "private static Bitmap downloadImageTask(String src) {\n try {\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n Log.i(LOG_TAG, \"won: \" + myBitmap);\n return myBitmap;\n } catch (IOException e) {\n Log.e(LOG_TAG, \"error while making book cover\", e);\n e.printStackTrace();\n return null;\n }\n }", "public Bitmap download(String url){\n \tSystem.out.println(url);\n \t//url = \"http://140.115.113.164:8080/wardrobe/wardrobedata/pic/15b0cfe6f85d45b9b09d6cc4f8d139b749f1c58c4c8e4ec6982d843116b70aca-R.PNG\";\n \tBitmap bitmap = null;\n \tbitmap = downloadBitmap(url);\n \tif(bitmap == null)\n \tSystem.out.print(\"bitmap is null!!\");\n \taddBitmapToCache(url, bitmap);\n \treturn bitmap;\n }", "private static Bitmap getBitmap(String imageURL){\n\t\tBitmap bmp = null;\n\n\t\ttry {\n\t\t\tbmp = BitmapFactory.decodeStream((InputStream) new URL(imageURL).getContent());\n\t\t} catch (MalformedURLException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\treturn bmp;\n\t}", "protected Bitmap doInBackground(String...urls){\n String urlOfImage = urls[0];\n Bitmap logo = null;\n try{\n InputStream is = new URL(urlOfImage).openStream();\n /*\n decodeStream(InputStream is)\n Decode an input stream into a bitmap.\n */\n logo = BitmapFactory.decodeStream(is);\n }catch(Exception e){ // Catch the download exception\n e.printStackTrace();\n }\n return logo;\n }", "public static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n\n InputStream stream = getHttpConnection(url);\n if(stream!=null) {\n bitmap = BitmapFactory.decodeStream(stream);\n try {\n stream.close();\n }catch (IOException e1) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadImage()\");\n e1.printStackTrace();\n }\n }\n\n return bitmap;\n }", "public String getPictureUrl()\n\t{\n\t\treturn \"http://cdn-0.nflximg.com/us/headshots/\" + id + \".jpg\";\n\t}", "@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }", "private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }", "public String getAlbumImage(int x) {\n albumLink = \"https://www.last.fm\" + albumsLinks[x];\n try {\n album = Jsoup.connect(albumLink).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Document tempA = null;\n Elements temp = album.getElementsByClass(\"cover-art\");\n String linkB = \"https://www.last.fm\" + temp.attr(\"href\");\n try {\n tempA = Jsoup.connect(linkB).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assert tempA != null;\n Elements elements = tempA.getElementsByClass(\"js-gallery-image\");\n return elements.attr(\"src\");\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "public static void main(String[] args) {\n\t\tString str = \"http://192.168.1.188/stw/images/20160814/33db29ec33d5.jpg\";\n\t\tSystem.out.println(str.substring(str.lastIndexOf(\"images\")+7,str.length()));\n\t\t\n\t}", "protected Bitmap doInBackground(String...urls){\n String urlOfImage = urls[0];\n Bitmap logo = null;\n try{\n InputStream is = new URL(urlOfImage).openStream();\n /*\n decodeStream(InputStream is)\n Decode an input stream into a bitmap.\n */\n logo = BitmapFactory.decodeStream(is);\n\n }catch(Exception e){ // Catch the download exception\n e.printStackTrace();\n }\n return logo;\n }", "public Bitmap getBitmapfromUrl(String imageUrl) {\r\n try {\r\n URL url = new URL(imageUrl);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setDoInput(true);\r\n connection.connect();\r\n InputStream input = connection.getInputStream();\r\n Bitmap bitmap = BitmapFactory.decodeStream(input);\r\n return bitmap;\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }", "abstract public String imageUrl ();", "private static ByteString readImageBytes(URL url) throws IOException {\n ByteString imageBytes;\n\n try (InputStream imageInputStream = url.openStream()) {\n imageBytes = ByteString.readFrom(imageInputStream);\n }\n\n return imageBytes;\n }", "java.lang.String getPackageImageURL();", "@Override\n\t\t\tprotected Drawable doInBackground(ImageView... params) {\n\t\t\t\timageview = params[0];\n\t\t\t\tDrawable drawable = null;\n\t\t\t\tFile downloadPath = createDownloadsPath(activity, url.split(\"/\"));\n\t\t\t\tdo {\n\t\t\t\t\tdrawable = Utils.LoadImageFromWebOperations(url,\n\t\t\t\t\t\t\tdownloadPath);\n\t\t\t\t\tattempts--;\n\t\t\t\t} while (attempts > 0 && drawable == null);\n\t\t\t\treturn drawable;\n\t\t\t}", "public static Drawable LoadImageFromWebOperations(String url, File cacheDir) {\n\t\ttry {\n\t\t\tDrawable d = null;\n\t\t\tString[] urlDir = url.split(\"/\");\n\t\t\tint sizeMax=600;\n\t\t\ttry {\n\t\t\t\t// File cacheDir = new File(ruta+File.separator+ urlDir[8]);\n\t\t\t\tif (!cacheDir.exists()) {\n\t\t\t\t\tcacheDir.mkdirs();\n\n\t\t\t\t}\n\t\t\t\tFile cacheDirName = new File(cacheDir + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\n\t\t\t\tif (!cacheDirName.exists() || cacheDirName.length() == 0) {\n\t\t\t\t\tcacheDirName.createNewFile();\n\t\t\t\t\tInputStream is = (InputStream) new URL(url).getContent();\n\t\t\t\t\tBitmap bit = BitmapFactory.decodeStream(is);\n\t\t\t\t\t//Alto\n\t\t\t\t\tBitmap bit2=null;\n\t\t\t\t\tFileOutputStream fo = new FileOutputStream(cacheDirName);\n\t\t\t\t\t// Drawable d = Drawable.createFromStream(is, \"src name\");\n\t\t\t\t\tif(bit.getHeight()>sizeMax){\n\t\t\t\t\t\tbit2=Bitmap.createScaledBitmap(bit,(sizeMax*bit.getWidth()/bit.getHeight()), sizeMax, false);\n\t\t\t\t\t\tbit2.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}else if(bit.getWidth()>sizeMax){\n\t\t\t\t\t\tbit2=Bitmap.createScaledBitmap(bit,sizeMax, (sizeMax* bit.getHeight()/bit.getWidth()), false);\n\t\t\t\t\t\tbit2.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbit.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Url: \"+cacheDir + File.separator\n\t\t\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Ancho y alto: \"+(bit.getWidth()+\" \"+bit.getHeight()));\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Size1: \"+(bit.getRowBytes()*bit.getHeight()));\n\t\t\t\t\tbit.recycle();\n\t\t\t\t\tif(bit2!=null){\n\t\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Size2: \"+(bit2.getRowBytes()*bit2.getHeight()));\n\t\t\t\t\t\tbit2.recycle();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.gc();\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t\td = Drawable.createFromPath(cacheDirName.getPath());\n\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\tSystem.gc();\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t}\n\t\t\t//\n\n\t\t\treturn d;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private static Bitmap readBitmapFromNetwork(URL url)\n {\n InputStream is = null;\n BufferedInputStream bis = null;\n Bitmap bmp = null;\n try\n {\n URLConnection conn = url.openConnection();\n conn.connect();\n is = conn.getInputStream();\n bis = new BufferedInputStream(is);\n bmp = BitmapFactory.decodeStream(bis);\n }\n catch (MalformedURLException e)\n {\n Log.e(TAG, \"Bad ad URL\", e);\n }\n catch (IOException e)\n {\n Log.e(TAG, \"Could not get remote image\", e);\n }\n finally\n {\n try\n {\n if (is != null) is.close();\n if (bis != null) bis.close();\n }\n catch (IOException e)\n {\n Log.w(TAG, \"Error closing stream.\");\n }\n }\n return bmp;\n }", "public Image getCrotchetRest();", "public String getLargeCoverUrl() {\n /*\n By appending ?default=false to the URL, the API will return a 404 message if the book cover\n is not found. This actually works to our benefit because we will be supplying our own image\n in place of missing book covers.\n */\n return \"http://covers.openlibrary.org/b/olid/\" + openLibraryId + \"-L.jpg?default=false\";\n }", "@Override\n\tpublic String imageDownLoad(String url, String name) {\n\t\treturn HttpUtil.httpDownLoad(url, name);\n\t}", "public Image getSharp();", "public int getImage();", "static Image forUrl(String imageType, String url) {\n\t\treturn () -> {\n\t\t\ttry {\n\t\t\t\tURLConnection urlConnection = new URL(url).openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\");\n\t\t\t\tInputStream stream = urlConnection.getInputStream();\n\t\t\t\treturn forStream(imageType, stream).getData();\n\t\t\t} catch (IOException e) {\n\t\t\t\tDiscord4J.LOGGER.error(LogMarkers.UTIL, \"Discord4J Internal Exception\", e);\n\t\t\t}\n\t\t\treturn defaultAvatar().getData();\n\t\t};\n\t}", "public Bitmap downloadImage(String theUrl){ \n\t \t//Log.i(\"ZZ\", \"AppDelegate downloadImage: \" + theUrl); \n\t \tdownloadInProgress = 1;\n\t InputStream in = null; \n\t \tBitmap bitmap = null;\n\t try{\n\t \tin = Obj_Downloader.OpenHttpConnection(theUrl);\n\t\t bitmap = BitmapFactory.decodeStream(in);\n\t }catch (Exception e) {\n \tLog.i(\"ZZ\", \"AppDelegate:downloadImage: ERROR: \" + e.getMessage()); \n\t //return null;\n\t }\n\t downloadInProgress = 0;\n\t return bitmap; \n\t }", "private ImageIcon ridimensionaImageIcon(URL url, int nuovaW, int nuovaH){\n ImageIcon image = new ImageIcon(url);\n Image immagineScalata = image.getImage().getScaledInstance(nuovaW, nuovaH, Image.SCALE_DEFAULT);\n return new ImageIcon(immagineScalata);\n }", "java.lang.String getPictureUri();", "public String getSrc(String index) {\n String src = null;\n try {\n Document doc = Jsoup.connect(index).get();\n Element comic_body = doc.select(\"div#comic\").get(0);\n src = \"http://www.sandraandwoo.com\" + comic_body.select(\"img\").get(0).attr(\"src\");\n } catch (Exception ex) {ex.printStackTrace();}\n return src;\n }", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "String getItemImage();", "java.lang.String getImagePath();", "@Override\n\t\t\tpublic Bitmap getBitmap(String url) {\n\t\t\t\treturn cache.get(url);\n\t\t\t}", "public byte[] getImage(String imageUrl) {\n\t\treturn restTemplate.getForObject(imageUrl, byte[].class);\n\t}", "public Bitmap loadImage(String coverUrl) {\r\n\t\tBitmap img = null;\r\n\t\t//File file = new File(filePath);\r\n\t\ttry {\r\n\t\t\t// set the download URL, a url that points to a file on the internet\r\n\t\t\t// this is the file to be downloaded\r\n\t\t\tURL url = new URL(coverUrl);\r\n\r\n\t\t\t// create the new connection\r\n\t\t\tHttpURLConnection urlConnection = (HttpURLConnection) url\r\n\t\t\t\t\t.openConnection();\r\n\r\n\t\t\t// set up some things on the connection\r\n\t\t\turlConnection.setRequestMethod(\"GET\");\r\n\t\t\turlConnection.setDoOutput(true);\r\n\r\n\t\t\t// and connect!\r\n\t\t\turlConnection.connect();\r\n\r\n\t\t\t// this will be used in reading the data from the internet\r\n\t\t\tInputStream inputStream = urlConnection.getInputStream();\r\n\t\t\timg = BitmapFactory.decodeStream(inputStream);\r\n\t inputStream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\r\n\t\t}\r\n\t\treturn img;\r\n\t}", "public static String getMissedImage(String title) {\n try {\n return newsdetailHttpService.getMissedImage(\"resultjsonavatarnew\", \"utf-8\", title, 0, 1).execute().body().getUrl();\n } catch (IOException e) {\n Log.e(NewsException.GET_IMAGE_ERROR, String.format(NewsException.GET_IMAGE_MESSAGE, title));\n return \"\";\n }\n }", "java.lang.String getProductImageUrl();", "public static Bitmap getBitmapFromUrl(String imageUrl) {\n\n try {\n\n URL url = new URL(imageUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n return BitmapFactory.decodeStream(input);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public Image getOne();", "public static BufferedImage getBufferedImage(String name) {\n try {\n URL url = getURL(name);\n marg.util.Log.GlobalLogger.info(\"Loaded image from \"+ url);\n return ImageIO.read(url);\n } catch (Exception e) {\n e.printStackTrace();\n return new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB);\n }\n }", "public Drawable fetchDrawable(String urlString) {\n\t\t\t\ttry {\n\t\t\t\t\tInputStream is = fetch(urlString);\n\t\t\t\t\tDrawable drawable = Drawable.createFromStream(is, \"src\");\n\t\t\t\t\tdrawable.setBounds(0, 0, 25 + drawable.getIntrinsicWidth(), 25\n\t\t\t\t\t\t\t+ drawable.getIntrinsicHeight());\n\t\t\t\t\treturn drawable;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}", "@Override\n \t public URL getTileUrl(int x, int y, int zoom) {\n \t String s = String.format(\"http://my.image.server/images/%d/%d/%d.png\",\n \t zoom, x, y);\n\n \t if (!checkTileExists(x, y, zoom)) {\n \t return null;\n \t }\n\n \t try {\n \t return new URL(s);\n \t } catch (MalformedURLException e) {\n \t throw new AssertionError(e);\n \t }\n \t }", "private Bitmap getBitmap(String url) {\n File file = diskCache.getData(url);\n Bitmap bitmap = decode(file);\n if (bitmap == null) {\n // If no then load it\n bitmap = loadAndCacheBitmap(file, url);\n } else {\n Log.d(\"HIHO\", \"bitmap from memory\");\n }\n\n return bitmap;\n }", "public String getCoverUrl() {\n return \"http://covers.openlibrary.org/b/olid/\" + openLibraryId + \"-M.jpg?default=false\";\n }", "public static Bitmap GetURLBitmap(URL url)\n\t{\n\t\tInputStream isCover = null;\n\t\ttry{\n\t\t\t//改成呼叫一個判斷方法\n\t\t\treleaseMemGc();\n\n\t\t\tURLConnection conn = url.openConnection();\n\t\t\tconn.connect();\n\t\t\tisCover = conn.getInputStream();\n\t\t\t//mantis.0010232: 專輯封面未能正常顯示,這邊看起來會發生問題是因為 streamClosed ,但是還有地方再存取或是 open 這塊 Stream,\n\t\t\t//所以在 decodeStream 那塊 stream 的時候就出現問題,因此想說在這邊先檢查該 stream 是不是已經被處理掉了如果是的話就不要 decodeStream\n\t\t\tif(isCover!=null){\n\t\t\t\treturn BitmapFactory.decodeStream(isCover);\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}catch(IOException ex){\n\t\t\treturn null;\n\t\t}catch(Exception e){\n\t\t\treturn null;\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tif(isCover!=null){\n\t\t\t\t\tisCover.close();\n\t\t\t\t\tisCover =null;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\t}", "String getImagePath();", "String getImagePath();", "public Image getMinimRest();", "private static Bitmap getImage(JSONObject volumeInfo) throws JSONException {\n Bitmap image = null;\n JSONObject imageLinks = volumeInfo.optJSONObject(\"imageLinks\");\n if (imageLinks == null) {\n Log.e(LOG_TAG, \"No image link for this book\");\n return null;\n }\n String imageLink = imageLinks.optString(\"smallThumbnail\");\n if (imageLink.isEmpty()) {\n imageLink = imageLinks.optString(\"thumbnail\");\n }\n\n URL imageURL = convertStringToURL(imageLink);\n if (imageURL != null) {\n try {\n image = BitmapFactory.decodeStream(imageURL.openConnection().getInputStream());\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Could not get image from the server\");\n e.printStackTrace();\n }\n }\n return image;\n }", "public ImageComponent fetchImageComponent(URL url)\n throws IOException\n {\n String file_path = url.toExternalForm();\n ImageComponent ret_val = (ImageComponent)componentMap.get(file_path);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(file_path);\n componentMap.put(file_path, ret_val);\n }\n \n return ret_val;\n }", "private void loadImage(final String url) {\n\t\tnew AsyncTask<Void, Void, Drawable>() {\n\t\t\t@Override\n\t\t\tprotected Drawable doInBackground(Void... none) {\n\t\t\t\treturn NetHelper.getDrawableFromUrl(url);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onPostExecute(Drawable drawable) {\n\t\t\t\tImageView thumbnail = (ImageView) findViewById(R.id.details_image_view_thumbnail);\n\t\t\t\tthumbnail.setImageDrawable(drawable);\n\t\t\t}\n\t\t}.execute();\n\t}", "public Image getBassClef();", "public BufferedImage create(URL source, Dimension maxSize) {\n\t\treturn create(new URLImageSource(source), maxSize);\n\t}", "public String obtenerContenidoImg() {\r\n Element elemento = doc.select(\"IMG\").first();\r\n //obtine lo siguiente a \"src\"\r\n String imagen = elemento.attr(\"src\");\r\n return imagen;\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "public static Image imageFromURL(final URL url)\tthrows IOException,\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\tNotImageException\r\n\t{\r\n\t\turl.openStream().close(); // throws IOException if url bad\r\n\t\tfinal Image image = TOOLKIT.getImage(url);\r\n\t\tensureImage(image);\r\n\t\treturn image;\r\n\t}", "public Image getSemiquaverRest();", "@Override\n\tpublic String imageGroup(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "private String getLocalImageFileName(String url) {\n String name = URLUtil.guessFileName(url, null, null);\n return name;\n }", "public static BufferedImage loadBufferedImage( URL theUrl )\n\t\tthrows IOException\n\t{\n\t\tBufferedImage im = null;\n\t\ttry\n\t\t{\n\t\t\tim = ImageIO.read( theUrl );\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new IOException( \"Couldn't Load \" + theUrl, e );\n\t\t}\n\t\tcatch (Error e)\n\t\t{\n\t\t\tthrow new IOException( e );\n\t\t}\n\n\t\treturn im;\n\n\t}", "public static Bitmap readBitmapFromNetwork(String url) {\n InputStream inputStream = null;\n BufferedInputStream bufferedInputStream = null;\n Bitmap bitmap = null;\n \n try {\n URLConnection conn = new URL(url).openConnection();\n conn.connect();\n inputStream = conn.getInputStream();\n bufferedInputStream = new BufferedInputStream(inputStream, 8192);\n bitmap = BitmapFactory.decodeStream(bufferedInputStream);\n } catch (OutOfMemoryError e) {\n Log.d(TAG, \"Ran out of memory.\", e);\n } catch (Throwable e) {\n if (!e.getClass().equals(UnknownHostException.class)) {\n Log.d(TAG, \"Could not get remote image : \" + e.getClass().getSimpleName(), e);\n }\n } finally {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (IOException e) {\n Log.d(TAG, \"Error closing stream.\", e);\n }\n }\n return bitmap;\n }", "void seTubeDownImage(String image);", "protected Drawable doInBackground(String... url) {\n try {\n\t\t\tInputStream is = (InputStream) new URL(url[0]).getContent();\n\t\t\tDrawable d = Drawable.createFromStream(is, \"src\");\n\t\t\treturn d;\n\t\t} \n\t\t\t\t\n\t\tcatch (Exception e) {\n\t\t\t//do nothing\n\t\t\treturn null;\n\t\t}\n }", "String getAvatarUrl();", "public Single<Uri> image(@NonNull FragmentActivity activity) {\n return requestImage(\n activity,\n false,\n MimeType.IMAGE)\n .map(uris -> uris.get(0));\n }" ]
[ "0.6119505", "0.607123", "0.60654265", "0.60158646", "0.5933971", "0.59324485", "0.5906078", "0.58886236", "0.5860853", "0.5844452", "0.5840461", "0.5831334", "0.5797567", "0.57789874", "0.5774434", "0.57676977", "0.57664746", "0.57551515", "0.57310927", "0.57293826", "0.57118523", "0.5695992", "0.5687011", "0.568631", "0.5678667", "0.566092", "0.56154203", "0.5581087", "0.55644685", "0.5538107", "0.55350065", "0.5533751", "0.5530138", "0.55297613", "0.55288076", "0.5483919", "0.5479585", "0.54686856", "0.5455807", "0.54537946", "0.54521465", "0.5442611", "0.54070216", "0.54065496", "0.5398323", "0.53920853", "0.5382965", "0.5375207", "0.53742915", "0.5368274", "0.536029", "0.5358917", "0.5323907", "0.53100884", "0.5308351", "0.53051424", "0.53029746", "0.52827734", "0.52765214", "0.52762914", "0.5272455", "0.5264451", "0.52584815", "0.52401143", "0.5238017", "0.52359325", "0.5229243", "0.5214821", "0.5209305", "0.5189143", "0.5184593", "0.5183868", "0.5182067", "0.5177577", "0.5169863", "0.516771", "0.5159713", "0.51544535", "0.5152768", "0.5152538", "0.5151113", "0.5151113", "0.5135323", "0.51304966", "0.5130091", "0.5129649", "0.5119075", "0.51177925", "0.5110924", "0.5104886", "0.5104861", "0.51042694", "0.5102788", "0.508144", "0.5079166", "0.5078421", "0.5072398", "0.5060584", "0.50580126", "0.5051651" ]
0.5852888
9